aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native
Commit message (Collapse)AuthorAgeFilesLines
* [Jogl|Nativewindow|Newt]Common: Align all ↵Sven Gothel2014-01-115-177/+120
| | | | | | | | | | | *Common_GetJNIEnv()/_ReleaseJNIEnv() Methods and Usage / Check arguments .. Since we still don't use inter-module native code sharing, align the JNIEnv get/release methods and usage. Most beneficary here is OSX and the GLDebugMessageHandle, both managed the JVM handle on their own - removed now. Also ensuring that *Common_init(..) is called for all modules on all platforms.
* X11: Harden usage of 'XGetWindowProperty(..)' and 'XGetVisualInfo' - Add ↵Sven Gothel2014-01-111-28/+38
| | | | missing XFree(..) calls and argument checks.
* BCM_VC_IV: Add 2 references (_poor_ API docs, very)Sven Gothel2014-01-092-0/+8
|
* NEWT Rasp.Pi: Add Support for multiple Windows, dynamic set size and positionSven Gothel2014-01-091-52/+30
| | | | | | | | Impl. manages up-to 32 windows (BCM layer elements) - dunno whether this is a proper value. Note: Layer 2000 is reserved for out PointerIcon. Removed 'dead code'.
* NEWT bcm_vc_iv.c: Disable VERBOSE_ONSven Gothel2014-01-091-2/+2
|
* Bug 676 - Add support for native Mouse Pointer rendering (Rasp.-Pi.)Sven Gothel2014-01-092-34/+416
| | | | | | | | | | | | | | - Utilizing layer element 2000 for PointerIcon - Using NEWT PointerIcon code - Using MouseListener to update PointerIcon position - FIXME: Check whether we shall intercept sendMouseEvent directly (lag) Misc: - Properly open, assign and close the BCM display handle - Properly destroy the window (BCM element) - Prepare for multiple windows, set position and size
* Bug 935: NEWT PointerIcon: Utilize Toolkit Agnostic PixelFormat and ↵Sven Gothel2014-01-084-20/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conversion Utilities (Allowing 'arbitrary' PointerIcon data input) Commit fe28bc125429b38cdcd016746081f4a6d521c6fd added the notion of toolkit agnostic PixelFormat and conversion utilities, utilized and further tested by this patch. +++ - PointerIcon is a PixelRectangle and hence holds the decoded data. This allows on-the-fly conversion if required as well as recreation w/o PNG re-decoding. - Using array-backed PointerIcon data where possible, allowing better performance when converting PixelFormat etc. - NEWT Display adds 'createPointerIcon(final IOUtil.ClassResources pngResource...' method to support agnostic PointerIcon creation. - NEWT Display adds methods to allow users to avoid PixelFormat and Buffer NIO type forced conversion: - PixelFormat getNativePointerIconPixelFormat() - boolean getNativePointerIconForceDirectNIO() +++ PNGImage -> PNGPixelRect Deleted: com.jogamp.opengl.util.texture.spi.PNGImage Added: com.jogamp.opengl.util.PNGPixelRect (We hope nobody was using PNGImage directly since it was a service-plugin for TextureIO) PNGPixelRect is a PixelRectangle PNGPixelRect actually is implemented OpenGL agnostic, however - since our PNGJ support lives under package 'jogamp.opengl.util.pngj' it cannot be moved up (yet). PNGPixelRect now handles all PixelFormat for the target format and also added support for grayscale+alpha (2 channels). The latter is force-converted to RGB* - similar to paletted. Further more, PNGPixelRect allows simply passing an OutputStream to write the PNG data. Used by: TextureIO and NEWT +++ - OffscreenSurfaceLayer's setCursor(..) uses the agnostic PixelRectangle instead of a PNG resource. - AWTMisc uses the PixelRectangle to produce the AWT Cursor and converts it to the required format. Hence same pixels are used for NEWT and AWT pointer/cursor icon. - TestGearsES2Newt and NewtAWTReparentingKeyAdapter 'tests' iterate over 3 custom PointerIcon when pressed 'c'. - JOGLNewtAppletBase uses the new custom PointerIcon 'newt/data/crosshair-lumina-trans-32x32.png', which is included in NEWT (213 bytes only). -
* NEWT OSX: Add missing NewtCommon_init(env) (duh!) - Issuing ↵Sven Gothel2014-01-051-31/+28
| | | | | | | NewtCommon_throwNewRuntimeException(..) if given references are of invalid type Missing NewtCommon_init(env) always lead to a crash when calling NewtCommon_throwNewRuntimeException(..) due to uninitialized clazz instances!
* Bug 935: NEWT Windows Pointer-Icon WM_SETCURSOR: Don't use DefWindowProc, ↵Sven Gothel2014-01-051-14/+35
| | | | SetCursor(..) if HTCLIENT && isChildWin && customCursor
* Bug 935: NEWT Windows Window-Icon: Use WNDCLASSEX w/ Small/Big Default Icons ↵Sven Gothel2014-01-051-8/+1
| | | | | | | | (NativeWindow GDI / NEWT ) .. this allows using the icon definition of WNDCLASSEX instead of setting them at CreateWindow0(..). - NativeWindow GDIUtil/RegisteredFactory uses WNDCLASSEX and Small/Big Defailt Icons
* Bug 935: NEWT Windows Window-Icon: Fix Window-Icon Visibility after ↵Sven Gothel2014-01-041-0/+4
| | | | | | | Reparenting CHILD -> TOP Hiding the window via 'ShowWindow(.., SW_HIDE)' before reparenting and subsequent style change incl. visibility renders the Window-Icon visible.
* Bug 935: NEWT PointerIcon: Refine Spec and Implementation / Fix OSX Crash ↵Sven Gothel2014-01-043-564/+652
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and Issues - Refine Display.PointerIcon: Complete type allowing re-creation - Add associated Display reference - Add used IOUtil.ClassResources reference - Add isValid()/validate() methods for recreation - Refine API doc - Move Display.destroyPointerIcon(PointerIcon) -> PointerIcon.destroy() - Move DisplayImpl.PointerIconImpl -> PointerIconImpl (own source file) - Creation/Destruction and setting of PointerIcon happens on EDT - DisplayImpl.shutdownAll() and Display.destroy() calls destroyAllPointerIconFromList - WindowDriver.setPointerIconImpl: Validates PointerIconImpl (i.e. re-creates if required) - Fix 'initial' window.setPointerIcon(..) before createNative(..), tested w/ TestGearsES2NEWT - OSX Native Code: - Move mouse and pointer-state handling from NewtMacWindow -> NewtView class to retain states (pointer handle, pointer visibility, etc) when reparenting. Reparenting will move an exisiting NewtView into a new NewtMacWindow. - Enable all mouse move events: - NewtView::mouseEnter [nsWin makeFirstResponder: nsView]; - NewtView::mouseExited if( !mouseConfined ) { [nsView resignFirstResponder]; } - NewtView::mouseMoved issued [myCurser set] if required, fixing OSX issue not updating NSCursor properly. - MacWindow: - Test NewtMacWindow, NewtView and NSCursor handles before usage - Fix DBG_PRINT(..) warnings
* Bug 935: NEWT PointerIcon OSX: Safe use of NSCursor handleSven Gothel2014-01-033-16/+42
|
* NewtMacWindow: NSView: Remove unused 'myCursor' fieldSven Gothel2014-01-022-18/+0
|
* MacWindow.m: Add missing NSAutoreleasePool 'decoration'Sven Gothel2014-01-021-3/+17
|
* Bug 934, Bug 935: NEWT: Add support for custom Application/Window and ↵Sven Gothel2013-12-316-15/+305
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pointer Icons - Utilizing JOGL's PNG decoder for all icons, if available. - Application/window icons: - Providing default application/window icons in 16x16 and 32x32 size - NewtFactory.setWindowIcons(..) or property 'newt.window.icons' maybe used to override default icons. - Using icons at application/window instantiation - Display.PointerIcons: - NativeWindow Win32 WindowClass no more references a default cursor in favor of fine grained cursor control [in NEWT] - Display provides create/destroy methods, where display destruction also releases open PointerIcon references. - Window.setPointerIcon(..) sets custom PointerIcon - Implemented Platforms - X11 - Windows - OSX - Manual Test: TestGearsES2NEWT (Press 'c')
* Bug 924: Make ALWAYS_ON_TOP Persistent when Reparenting (child -> top) (2nd ↵Sven Gothel2013-12-201-4/+0
| | | | | | | | | | | | attempt) Commit c8726ef04b94ad8e66e1191a06ff793b908d130c reinforced ALWAYS_ON_TOP in native reconfig code issued at reparenting call, which might be too early for the WM. Perform ALWAYS_ON_TOP reinforcement from java side when reparenting CHILD -> TOP was successful and visibility is reached. X11 only! NewtAWTReparentingKeyAdapter: Add 'a' alwaysOnTop toggle to test w/o applet code.
* Refine commit c9fcc8cd510abc0cbebb872dc3e457327655e778 (NEWT X11Window.c ↵Sven Gothel2013-12-201-8/+8
| | | | comments)
* Bug 924: Fix X11 Fullscreen ALT-TAB Regression ; Make ALWAYS_ON_TOP ↵Sven Gothel2013-12-191-1/+14
| | | | | | | | | | | | | | | | | | Persistent when Reparenting (child -> top) - X11 Fullscreen ALT-TAB regression (no task-switcher visible) We still need the fast reconfigure path for ALWAYSONTOP only toggle. It was removed w/ commit c9fcc8cd510abc0cbebb872dc3e457327655e778, which disabled toggling FULLSCREEN and ALWAYSONTOP. Note: Another bug in Unity WM's Compiz: 'Unredirect Fullscreen Windows := True' disables the ALT-TAB taskbar/launcher HUD rendering and subsequent task-switch. Hence it shall be disabled .. nothing we can do here. - ALWAYS_ON_TOP not persistent when child -> top WM removes ALWAYS_ON_TOP state when reparenting, hence reinforce it when Child -> Top.
* Bug 924: Fix 'Unity WM' issue w/ sticky _NET_WM_STATE after Fullscreen ↵Sven Gothel2013-12-191-4/+12
| | | | | | | | | On/Off Cycle Unity WM keeps the _NET_WM_STATE (_NET_WM_STATE_FULLSCREEN, ..) after fullscreen-exit even though _NET_WM_STATE_REMOVE was issued. Add remedy: Reparent Child -> TOP: Reset _NET_WM_STATE (! _NET_WM_STATE_FULLSCREEN, ..).
* NEWT X11Window.c: Cleanup Code - No changes.Sven Gothel2013-12-191-8/+25
|
* Bug 919 - TestNewtKeyCodesAWT w/ NewtCanvasAWT Fails on Windows Due to ↵Sven Gothel2013-12-041-2/+2
| | | | | | | | | | | | | | Clogged Key-Release Event by AWT Robot Impact: Only unit test code - TestNewtKeyCodesAWT: Fix Bug 919 - Move mouse bacl/forth while waiting for events .. - Use common wait for key timeout/polling using constants in NEWTKeyUtil - InputEventCountAdapter: 'getQueued()' -> 'copyQueue()' - ensuring queue is copied while instance is locked.
* Bug 914: Newt OSX: Reset NSApp's presentationOptions @ windowClose0() / ↵Sven Gothel2013-12-033-51/+67
| | | | | | | | | | | | | | | Assume having focus in fullscreen-mode - Reset NSApp's presentationOptions @ windowClose0() Commit 69c334448cfe8af553fd97689137ecf8f996b378 started using the [NSApp setPresentationOptions: opts] but missed to reset to defaults @ windowClose0(); - Assume having focus in fullscreen-mode NewtMacWindow::windowDidBecomeKey()' is not always called in fullscreen-mode! Note: OSX Fullscreen from a browser still shows the browser title-bar until mouse-click. Don't know how to avoid this. Minor issue..
* Bug 916 - NEWT Fullscreen Mode on Windows ALT-TAB doesn't allow Application ↵Sven Gothel2013-12-031-20/+58
| | | | | | | Switching Remedy for 'some' display drivers, i.e. Intel HD: Explicitly push fullscreen window to BOTTOM when inactive (ALT-TAB)
* NEWT Windows: Rearrange wndProc switch-case: All key/mouse events shall be ↵Sven Gothel2013-12-021-448/+449
| | | | at last
* Bug 914: Newt OSX: Don't use exclusive fullscreen mode (captured display) in ↵Sven Gothel2013-12-023-0/+37
| | | | favor of proper WM incl. ALT-TAB app-switching
* Nativewindow/NEWT: Fix C Return StatementSven Gothel2013-11-171-1/+2
|
* Bug 903 - NEWT: Support 'Continue Drag on Exit'; Consistent Mouse ENTER/EXITSven Gothel2013-11-172-45/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Support 'Continue Drag on Exit' - Track dragging operation, allow exterior dragging - Hence track EXIT (see below) - Windows: - Capture mouse for exterior dragging - Only 'NewtWindows_trackPointerLeave' if 'entering' - Simplify touch: No 'inside' check - Not required. - Consistent Mouse ENTER/EXIT - Track ENTER/EXIT and synthesize if required, drop duplicate - OSX benefits, since it never produced ENTER/EXIT events - AWT (or other TK) translated events beahve equal now. - Required for EXIT event after ending exterior dragging and final RELEASE Tests: Passed unit tests 'junit.run.newt.event' on - GNU/Linux - Windows7 - OSX 10.7 Tested exterior tracking manually w/ NEWT TestGearsES2NEWT and TestGearsES2NewtCanvasAWT: - GNU/Linux - Windows7 (mouse) - Windows8.1 (touch) - OSX 10.7
* Fix Bug 901 - NEWT: Lookup Windows 7 Touch Event Functions Dynamically to ↵Sven Gothel2013-11-101-5/+39
| | | | not break Windows < 7 Compatibility
* Bug 882 - Crash on OSX when closing NEWT window - Fix: Release NewtMacWindow ↵Sven Gothel2013-11-011-7/+21
| | | | | | | | | | manually in close0() Release NewtMacWindow manually in close0() - Mark [NewtMacWindow setReleasedWhenClosed: NO] in init0(..) - Release NewtMacWindow manually in close0(..) Check pointer args in close0(..)
* Bug 882 - Crash on OSX when closing NEWT window - Check JavaVM and JNIEnv ↵Sven Gothel2013-11-011-11/+43
| | | | handles before usage in NewtMacWindow (Not the culprit .. but more safe)
* Bug 800: Windows 7 Touch Event Support for NEWT: Fix Focus and ↵Sven Gothel2013-10-171-51/+74
| | | | | | | | | | | | | LBUTTON[DOWN|UP] issues - w/ TOUCH, Win8 may steal focus (KILLFOCUS), quickly grab FOCUS again when on TOUCH operation - track 'touchDownLastUp', and don't act on LBUTTON[UP|DOWN] and MOUSEMOVE if just lifted last finger - don't use GetMessageExtraInfo() to distinguish MOUSE/TOUCH, simply use tracked touchDownCount - Also track mouseInside in TOUCH operation, i.e. true if _all_ fingers are inside, otherwise don't send TOUCH event
* Bug 800: Add Windows 7 Touch Event Support for NEWTSven Gothel2013-10-171-101/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Native: - WindowUserData tracks: - window size - mouse inside - pointer touch-down count and flags whether multiple-touch is supported. - Suppress WM_*BUTTON* events if within TOUCH operations, e.g. fingers are pressed, or if event is determined as TOUCH (0 != GetMessageExtraInfo()) - MOUSEMOVE issues NewtWindows_trackPointerLeave(..) directly if no TOUCH operation is in process. Removes need for MouseListener on Java side. - TOUCH events are send as follows: - PRIMARY first - 1 MOVE 2nd (if not sent already) - UP/DOWN (if not sent already) We only send max. one MOVE event, since Win7 / Win8 assignes MOVE per default, even if no actual move happened. Hence a single MOVE event shall suffice and is compatible w/ e.g. Android (AFAIK). - TOUCH pointer names are mapped to consecutive IDs on the java side.
* NEWT Reparent/Fullscreen: Fixes X11 unsuccessful return to parent window; ↵Sven Gothel2013-10-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add reparentWindow(..) top-level position arguments; Misc - Fixes X11 unsuccessful return to parent window On X11 when returning to parent window (-> CHILD), we have to set the window invisible and wait for the result. Otherwise it sometimes happens that the WM's reparent operation fails, i.e. the window won't become a child of desired parent and is positioned randomly. - Add reparentWindow(..) top-level position arguments .. allows bringing the child-window to top-level w/ a desired position. Otherwise the window would be positioned elsewhere as a top-level as the plain reparenting operation. X11 needs to set position and size _after_ making the window visible, otherwise WM may ignore the XConfigureWindow request. - Reparent recreate shall always store the desired position and size On OSX/CALayer when recreation is being used, we need to store the pos/size for later creation. - Tests: Use 'NewtAWTReparentingKeyAdapter' where possible (reparent/fullscreen) instead of duplicating such code. NewtAWTReparentingKeyAdapter: Performs reparenting and fullscreen operations off-thread (i.e. not on AWT/NEW EDT) while decorating the action w/ revoking/restoring the ExclusiveContextThread (ECT). Manually tested 'TestGearsES2NewtCanvasAWT' reparenting and fullscreen on X11, Windows and OSX/CALayer w/ JDK 7u40 successful.
* NEWT/OSX (Bug 836): Lifecycle operations performed on main-thread must be ↵Sven Gothel2013-10-071-25/+34
| | | | | | | | | | | | | synchronized (wait-until-done) Wait-until-done (main thread): - WindowDriver.close0(..) - WindowDriver.initWindow0(..) Otherwise a re-queued operation (i.e. CALayer attachment) will mixup the order .. Experienced w/ fullscreen exit.
* X11Window FullScreen: Toggle _NET_WM_BYPASS_COMPOSITOR not only for ABOVE .. ↵Sven Gothel2013-07-041-2/+2
| | | | but also for FULLSCREEN WM state.
* Revise commit 4c34f5980bddcdc84b10cb3bcbb96b365b9d471e (Bug 767): TAB, BS ↵Sven Gothel2013-07-031-1/+1
| | | | | | | | | and CR/ENTER are printable for NEWT KeyEvent and font handling. Fix regression. - Original behavior was treating CR/ENTER them as printable, lets keep it this way. - KeyEvent: Query these 3 whitespaces upfront, no need to incl. them in 'nonPrintableKeys'. - Fix regression: Native VK_ENTER was not change in commit 4c34f5980bddcdc84b10cb3bcbb96b365b9d471e.
* Fix Bug 768 / NEWT Windows: Use layout dependent keySymbol, if independent ↵Sven Gothel2013-07-021-0/+3
| | | | keyCode is 0.
* Fix Bug 770 and 771Sven Gothel2013-07-021-98/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 770: X11Window.c: - Request focus _before_ enabling EWMH flags (fullscreen or above) after resize and temporary invisibility. This actually allows us to keep the focus after resize and repositioning! - Set _NET_WM_BYPASS_COMPOSITOR implicit analog to _NET_WM_STATE_FLAG_ABOVE - Clean up _NET_WM_* flag names, avoiding name space collisions, i.e. adding FLAG! - Remove dead _NET_WM_STATE setting via direct window property (not working anyways) - Remove dead code: FS_GRAB_KEYBOARD X11/WindowDriver.java: - Enable _NET_WM_STATE_FLAG_ABOVE temporarily if FLAG_IS_FULLSCREEN && !FLAG_IS_ALWAYSONTOP - Override focusChanged(..) to react on focus lost/gained in case of temporarily enabled _NET_WM_STATE_FLAG_ABOVE. If focus is lost, disable _NET_WM_STATE_FLAG_ABOVE, otherwise re-enable it. WindowImpl.java: - FullscreenAction.run: Always use 'FLAG_IS_FULLSCREEN_SPAN' +++ Bug 771: WindowImpl.java: - Keep fullscreenMonitors and fullscreenUseMainMonitor values intact, allowing them to be tracked. Remove duplicates in FullscreenAction class. - MonitorModeListenerImpl.monitorModeChanged: Add fullscreen path: If the changed monitor is part of fullscreenMonitors, recalculate the viewport union and reset position and fullscreen-size. - MonitorModeListenerImpl: Try to regain focus after successful mode change.
* NEWT Screen ..: Typos / JNI signatureSven Gothel2013-06-301-1/+1
|
* Fix Bug 688: Removal of NEWT KeyEvent.EVENT_KEY_TYPED and ↵Sven Gothel2013-06-174-14/+0
| | | | KeyListener.keyTyped(KeyEvent)
* Fix Bug 750: Leaked X11 ColorMap for each created X11 Window in NativeWindow ↵Sven Gothel2013-06-121-0/+7
| | | | | | | (dummy) and NEWT Free the colormap at WindowDestroy, which we have created at WindowCreate w/ AllocNone. Due to the fact we used 'AllocNone' the leak is minimal though ..
* Fix Bug 723: Remove VK_KP_<Cursor> numpad key-codes, use general VK_<Cursor> ↵Sven Gothel2013-05-163-33/+53
| | | | | | | | | | | | | | | | key-codes; Respect numpad printable keys; Use keySym for numpad if possible. - KeyEvent keyCode/keySym values re-ordered! - Remove VK_KP_<Cursor> numpad key-codes, use general VK_<Cursor> key-codes. Numpad cursor keys are not supported on some platforms (Windows), or not configured on most X11 configurations. - Respect numpad printable keys, i.e. don't treat them as non-printable. - Use keySym for numpad if possible. Numpad keys require modifiers, hence X11 and Windows shall return keySym.
* Fix Bug 600 and Bug 721: Adding support for multiple monitors w/ NEWTSven Gothel2013-05-0611-495/+773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Support for all monitor devices and their available modes - X11: Use RandR 1.3 if available - Retrieve information - Changing a monitor device's mode - Support for dedicated and spannig fullscreen - See <http://jogamp.org/files/screenshots/newt-mmonitor/html/> - TODO: - X11 RandR does _not_ relayout the virtual screen size and neither the CRT's viewport. We may need to relayout them if they were covering a seamless region to achieve same experience! - OSX: No machine to attach a secondary CRT -> TEST! - Tested Manually for Regressions - Linux ARMv6hf (Rasp-Pi/BCM, Panda/X11) - Android (Huawei, Kindle) - Tested Manually and junit: - X11/Linux - NV, ATI-Catalyst w/ 2 CRTs - VBox w/ 4 CRTs - Win/Windows - NV, w/ 2 CRTs - VBox w/ 4 CRTs - X11/OpenIndiana, NV, 1 CRT
* Bug 721: NEWT/X11 RandR 1.3 Support - Part 2 - Rename impl class/files, ↵Sven Gothel2013-04-195-103/+90
| | | | start RandR13 coding.
* Bug 721: NEWT/X11 RandR 1.3 Support - Part 1 - Delegate RandR functionality ↵Sven Gothel2013-04-184-452/+219
| | | | to pluggable impl. for RandR 1.1 and 1.3 (todo)
* Bug 697: Fix commit 4db745e84fac610f85ab085e5c147e571e82e008 - Not compile ↵Sven Gothel2013-04-111-31/+36
| | | | | | | | | | | | | clean! Also brought back my safe showCursor logic. The code was not compile clean: - declaration after use w/o prototype! - missing var declaration 'success'! - 'pointerVisible=0', instead of 'wud->pointerVisible=0' var. not found! Used my old safe show cursor logic, while removing the max count, which was redundant, since we can check whether the counter moves in the right direction.
* NEWT/WindowsWindow.c: Simplify pointerVisible branch for calling ↵Sven Gothel2013-04-111-7/+2
| | | | SafeShowCursor(..)
* Merge remote-tracking branch 'gouessej/master'Sven Gothel2013-04-111-29/+53
|\
| * Adds the missing fileJulien Gouesse2013-04-061-29/+53
| |