summaryrefslogtreecommitdiffstats
path: root/src/newt
Commit message (Collapse)AuthorAgeFilesLines
* Fix Bug 723: Remove VK_KP_<Cursor> numpad key-codes, use general VK_<Cursor> ↵Sven Gothel2013-05-166-80/+83
| | | | | | | | | | | | | | | | 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 NEWT MultiMonitor Regression: Use case w/o attached monitor, and NPE ↵Sven Gothel2013-05-092-9/+24
| | | | | | | | | (Cache) in ScreenImpl.getVirtualMonitorDevice(..). W/ RandR13, we can have a case of an Output/CRT w/o valid modes, indicating a switched off or detached monitor. ScreenImpl.getVirtualMonitorDevice(..) requires a Cache .. due to MonitorModeProps.streamInMonitorDevice(..)
* NEWT MonitorMode: Refine 081177f2433be50e3b5d46385c2f0f3f96311ed8: Reduce ↵Sven Gothel2013-05-071-1/+1
| | | | EDT roundtrip when resize/positioning on MonitorMode changed ..
* NEWT Multiple Monitor Mode: Fix monitorModeChanged(..) event id, ↵Sven Gothel2013-05-073-9/+11
| | | | WindowImpl.monitorModeChanged(): Resize/position if not fitting into virtual screen viewport.
* NEWT Multiple Monitor Mode: Add missing 'collect' impl. for NEWT/AWT impl.Sven Gothel2013-05-071-4/+43
|
* MonitorMode: Fix API doc / comments / names.Sven Gothel2013-05-079-113/+116
|
* Fix Bug 600 and Bug 721: Adding support for multiple monitors w/ NEWTSven Gothel2013-05-0645-2115/+4068
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-1910-128/+222
| | | | start RandR13 coding.
* Bug 721: NEWT/X11 RandR 1.3 Support - Part 1 - Delegate RandR functionality ↵Sven Gothel2013-04-188-646/+486
| | | | to pluggable impl. for RandR 1.1 and 1.3 (todo)
* NEWT/AWT-Wrapper-Driver: Fix MS-Windows Case (Use NativeWindow window ↵Sven Gothel2013-04-142-83/+106
| | | | handle); Use set size by frame only for OSX/CALayer
* NEWT/AWT: Fix 'AWT driver' to work w/ OSX CALayer ; WindowImpl: 'Object ↵Sven Gothel2013-04-134-56/+111
| | | | | | | | | | | | getWrappedWindow()' -> 'NativeSurface getWrappedSurface()' WindowImpl: 'Object getWrappedWindow()' -> 'NativeSurface getWrappedSurface()' - AWT driver itself instantiates the JAWTWindow for eager initialization at createNative(). Fix 'AWT driver' to work w/ OSX CALayer - See above - size reconfig changed to ease OSX CALayer, i.e. set frame's size if already visible reducing CALayer artefacts.
* 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
| |
* | LinuxEventDeviceTracker: Reapply changes from commit ↵Sven Gothel2013-04-111-4/+4
| | | | | | | | b13868b612689307ebf4e46ee4ede2fd0560e504, which got lost via my merge conflict resolution (duh).
* | Merge remote-tracking branch 'xranby/NEWT-input'Sven Gothel2013-04-111-762/+831
|\ \ | | | | | | | | | | | | Conflicts: src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java
| * | LinuxEventDeviceTracker: ALT, ALT_GRAPH & CTRL modifiers.Xerxes Rånby2013-04-091-4/+37
| | | | | | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * | LinuxEventDeviceTracker: 4 space indentationXerxes Rånby2013-04-091-798/+798
| | | | | | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
| * | LinuxEventDeviceTracker: shift-modifierXerxes Rånby2013-04-091-27/+63
| | | | | | | | | | | | Signed-off-by: Xerxes Rånby <[email protected]>
* | | Merge remote-tracking branch 'hharrison/master'Sven Gothel2013-04-112-0/+0
|\ \ \
| * | | jogl: remove executable bit from some java files and a pngHarvey Harrison2013-04-092-0/+0
| |/ / | | | | | | | | | Signed-off-by: Harvey Harrison <[email protected]>
* / / NEWT KeyEvent: Use UTF-16 UniCode for key-code and key-symbol exposing well ↵Sven Gothel2013-04-1112-815/+1315
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined key encoding and simplify usage. Note, we use one collision to reduce key-code range: [0x61 .. 0x78] keyCodes [F1..F24] collide w/ ['a'..'x'] Since keyCode/Sym won't use lower capital a-z, this is a no isssue. KeyEvent: - 'printable' type is being determined by a nonPrintableKeys table, while 'action' type is set in case !printable and !modifier. - public ctor hidden, use create(..) method instead. This allows us to ensure modifier bit are properly set (incl. the keySym one) w/o performance loss. - ctor validates that only one of the type flags is set, printable, modifyable or action. WindowImpl: - Using IntBitfield of 255 bits to track pressed state, while removing the repeat state tracking since it is redundant. The Windows impl. uses a single field to validate whether a key was already repeated or not. - Properly cast keyCode short values to int for tracking! AWTNewtEventFactory, SWTNewtEventFactory: - Add translation of keyCode/Sym from and to NEWT - All tested via: - Newt -> Awt for AWTRobot - OSX CALayer: AWT -> NEWT - SWT tests X11: - Add VK_CONTEXT_MENU mapping (XK_Menu) LinuxEventDeviceTracker: - Fix apostrophe and grave mapping, i.e. to VK_QUOTE and VK_BACK_QUOTE. Adapted all unit tests, especially: - TestNewtKeyCodesAWT: More fine grained keyCode ranges to test using proper keyCode symbols.
* | Bug 641 NEWT: Refine definition of keySym, i.e. for printable keys, keySym ↵Sven Gothel2013-04-081-1/+6
| | | | | | | | is the 'unshifted' UTF-16 char value ; Add isPrintable() to toString().
* | Bug 641 NEWT/OSX Deliver keySym, derived from the current layout's ↵Sven Gothel2013-04-084-12/+171
| | | | | | | | lower-case UTF-16 character.
* | NEWT KeyEvent: More tight definition of isPrintable(), i.e. must have ↵Sven Gothel2013-04-083-16/+26
| | | | | | | | defined keyCode [and keyChar]; VK_KEYBOARD_INVISIBLE -> isActionKey
* | NEWT/OSX: Remove USE_SENDIO_DIRECT conditional compilation, by now it's ↵Sven Gothel2013-04-081-25/+2
| | | | | | | | clear we need to enqeue the events
* | Bug 641 NEWT/X11: Deliver 'J_VK_WINDOWS'; keySym is layout independent for ↵Sven Gothel2013-04-081-3/+16
| | | | | | | | dead-keys (zero keyChar); For 'unshifted' keySym's also unmask Ctrl and Mod* states
* | NEWT/Native: NewtCommon_GetJNIEnv(..) adding 'asDaemon' flag, used by all ↵Sven Gothel2013-04-083-30/+35
| | | | | | | | OSX JNI attachments to save time since detachment is skipped.
* | Bug 641 NEWT: X11 Deliver keyCode layout independent, keySym layout ↵Sven Gothel2013-04-084-30/+80
| | | | | | | | | | | | | | | | | | | | dependent and UTF-16 keyChar value On X11, the layout dependent keySym was not delivered [1], as well as the UTF-8 to UTF-16 translation was missing [2]. [1] is solved using XLookupString w/o ShiftMask [2] is solved using JNI's NewStringUTF, which takes UTF-8.
* | Bug 678: Differentiate ALT (left) and ALT_GRAPH (right) on X11, EventDev, ↵Sven Gothel2013-04-066-28/+51
|/ | | | | | | Windows and OSX - X11: Memorize pressed Alt_R to decide which 'alt' has to be used for non key modifier fetching - Windows: Only use GetKeyState(..) and compare the US vkey, since int. kbd layout use reduced scancode
* Bug 707: Fix NEWT EVENT_MOUSE_EXITED not sent on Windows - Regression of ↵Sven Gothel2013-04-052-10/+20
| | | | | | | commit 85338858f5c58694fa88e77df1386d0556887944 Commit replaced enqueueMouseEventID w/ sendMouseEventID, while not removing the 'jboolean wait' argument. This also lead to staying in DRAGGED mode when mouse left the window.
* OSX CALayer/NewtCanvasAWT: Force relayout of component (size +1, size -1) ↵Sven Gothel2013-04-041-1/+22
| | | | when attaching NEWT Child to avoid false CALayer position.
* NewtCanvasAWT: Cleanup up private method calls; Attach/Detach JAWTWindow's ↵Sven Gothel2013-04-031-12/+9
| | | | SurfaceUpdateListener to NEWT Window when it gets attached/detached.
* NewtBaseActivity: Move setVisible(false) from onPause() -> onStop(), since ↵Sven Gothel2013-03-291-4/+4
| | | | only onStop() declares invisible status. onPause() could imply other non fullscreen activity on top.
* Adapt to new version scheme, see GlueGen ↵Sven Gothel2013-03-282-4/+5
| | | | | | | a3f2ef50ad33c58a240a17fcf03e415d772207c3, etc; Fix NewtVersion, NativeWindowVersion and NewtVersionActivityLauncher NewtVersion, NativeWindowVersion: Also search for extension javax.media.opengl (all packaging) NewtVersionActivityLauncher: Use new launcher URI
* NewtBaseActivity: Perform cleanup() even on onCreate() due to possible call ↵Sven Gothel2013-03-281-10/+55
| | | | | | w/ initialized states (App process is killed for memory exhaustion etc) .. even though I was not able to reproduce this case, it will not harm.
* NEWTEvent: Fix toString message - add commaSven Gothel2013-03-261-1/+1
|
* Android/NEWT MouseEvent: Fix Detection/Processing of 2-Finger-Scroll Gesture ↵Sven Gothel2013-03-241-81/+143
| | | | | | | | | | | | | | | | | - Part 2 Multiple tests on different devices disclosed that: - 1 of 2 pointers get disconnected every now and then .. -> Shall tolerate this case - dist-delta within gesture may shrink below doubleTouchSlope -> Remove constraint after gesture detection - Always validate pointer-id GearsES2 - Works quite stable on several devices now - Moved soft-keyboad show to 4-pointer pressed >= 0.7f pressure
* Newt/MouseEvent: Add 'float[3] getRotation()', getWheelScale() -> ↵Sven Gothel2013-03-243-38/+101
| | | | | | | | | | | | getRotationScale(), refinement of commit 18cb57246372eda72c25a5cd9a69a873bdf09489 Turns out the 'wheel' semantics are not generic enough and confining rotation values to one axis only satisfies the traditional mouse wheel. Widen the definition of 'rotation' and delivering 3-axis if supported. On NEWT/Android, we deliver the 2-axis for example, allowing to rotate around both or scrolling using both directions (-> GearsES2).
* Android/NEWT MouseEvent: Fix Delivery of MultiTouch PRESSED/RELEASE; Fix ↵Sven Gothel2013-03-241-146/+194
| | | | | | | | | | | | | | | | | | | | | | | | Detection/Processing of 2-Finger-Scroll Gesture ; GearsES2: Add NEWT based 'zoom' gesture detection. - Fix Delivery of MultiTouch PRESSED/RELEASE Adopting MouseEvent changes of commit 18cb57246372eda72c25a5cd9a69a873bdf09489 - Fix Detection/Processing of 2-Finger-Scroll Gesture Dropping utilization of Android's GestureDetector and implementing our own, which turns out to simplify keeping track of states. Our gesture detection works well w/ user NEWT based gesture detection (-> See GearsES2 zoom and rotate), using following criteria related to Android parameter: - ScaledDoubleTapSlop: - Max 2 finger distance - ScaledTouchSlop: - Min. movement w/ 2 pointer withing ScaledDoubleTapSlop starting 'scroll' mode - Max. change of finger distance in respect to initiating 2-finger distance (2x ScaledTouchSlop) - Max. distance growth in respect to initiating 2-finger distance. - GearsES2: Add NEWT based 'zoom' gesture detection.
* NEWT/MouseEvent: Refine MultiTouch Event Spec regarding associated 'action' ↵Sven Gothel2013-03-241-15/+82
| | | | | | | | | | | | | | | | | | | | pointer Index; Add PointerType[PointerClass]; Add 'wheelScale' Attribute; - Refine MultiTouch Event Spec regarding associated 'action' pointer Index In case an instance represents multi-touch events, i.e. {@link #getPointerCount()} is > 1, the first data element represents the pointer which triggered the action if individual to one pointer. For example {@link #getX(int) e.getX(0)} at {@link #EVENT_MOUSE_PRESSED} returns the data of the pressed pointer, etc. - Add PointerType[PointerClass] This allows applications to identify the type and it's class [On-/Offscreen] helping to interpret semantics, e.g. wheel-rotate and new wheel-scale - Add 'wheelScale' Attribute Returns the scale used to determine the {@link #getWheelRotation() wheel rotation}, which semantics depends on the {@link #getPointerType() pointer type's} {@link PointerClass}. See API doc for details .. TODO: NEWT/Android changes adopting these changes.
* NEWT/Android: Fix suspense regression of commit ↵Sven Gothel2013-03-231-2/+6
| | | | | | | | | | d514ecbf052d013ea8c0982c490757678075a9ea Explicit win.destroy() shall only be called at activity.onDestroy(), - GLStateKeeper preservation is marked at pause, - and the Window's surfaceDestroyed() will also issue destroy() - so it's safe Reason: On Suspense (or power button), application is paused _without_ surfaceDestruction !
* NEWT/Android (Bug 665): Add Support for GLStateKeeper ; onPause() always ↵Sven Gothel2013-03-224-52/+165
| | | | | | | | | | | | | | | | | | | destroys ; Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume ; Use GLAnimatorControl instead of Animator - Add Support for GLStateKeeper If !isFinishing() (HOME button), preserve the GLEventListener if an GLStateKeeper instance - onPause() always destroys onDestroy() is too late, i.e. surfaceDestroyed() already called - Recognizing all GLAutoDrawable's GLAnimatorControl for pause/resume pause/resume the GLAnimatorControl of all GLAutoDrawable instances - Use GLAnimatorControl instead of Animator We used an Animator reference .. duh! Note: The EGL native WindowDriver (Android and BCM.IV) must retain their own copy of EGLGraphicsDevice, which preserves the EGLDisplay handle due to EGLDisplayUtil reference counting per nativeHandleID.
* NEWT/Android WindowDriver.closeNative0(..): Catch Exception at surface ↵Sven Gothel2013-03-221-4/+10
| | | | destroy allowing to continue destruction.
* Add GLStateKeeper handling GLEventListenerState preservation and ↵Sven Gothel2013-03-222-4/+7
| | | | | | | | | | | | | | | restauration for GLAutoDrawable - New GLStateKeeper interface, package com.jogamp.opengl Implemented by: - GLAutoDrawableBase Currently supported by: - NEWT GLWindow - GLEventListenerState package move: com.jogamp.opengl.util -> com.jogamp.opengl
* NEWT/Android: Remove KeyEvent.KEYCODE_HOME handling, since it doesn't work - ↵Sven Gothel2013-03-221-19/+0
| | | | i.e. cannot be intercepted this way.
* NEWT/Android: Fix BACK button implementation, use different KeyCode mappings ↵Sven Gothel2013-03-215-24/+146
| | | | | | | | | | | | | | | | | | | | | and allowing native action to be suppressed. - Don't trust soft-kbd visibility state, but perform invisible action. If the latter was successful - soft-kbd was visible before. - Map BACK to VK_KEYBOARD_INVISIBLE and propagate it, if soft-kbd was visible before. No native default action is performed. - Map BACK to VK_ESCAPE event and propagate it, if soft-kbd was invisible _and_ an activity was registered via registerActivity(Activity), i.e. by NewtBaseActivity. Otherwise proceed w/ default action (-> activity.finish()). - If the KeyListener consumed the [EVENT_KEY_RELEASED, VK_ESCAPE] event, it will be suppressed and no default action performed. This allows applications to have a custom 'ESCAPE' or 'BACK' handling. Otherwise (not consumed) the default action is performed.
* NEWTEvent: Add isConsumed() and setConsumed(boolean) methods to simply ↵Sven Gothel2013-03-213-14/+42
| | | | usage, using the existing consumedTag attachment for compatibility and efficiency.
* OSX/NEWT: Fix visible -> false when closing and reparenting window. This ↵Sven Gothel2013-03-202-4/+4
| | | | | | | | | | | lead to non functional recreational reparenting. OSX recreational reparenting moves the saved GLEventListenerState at destroy to the new dawable/surface, which must be valid. The flaky visible state caused seemingly random reparenting failures. - WindowImpl.ReparentActionRecreate.run() set 'visible:=true', which circumvented OSX to wait for actual realization. - OSX WindowDriver.closeNative(): Issue visibleChanged(true, false); ASAP