| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
handle); Use set size by frame only for OSX/CALayer
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
SafeShowCursor(..)
|
|\ |
|
| | |
|
| |
| |
| |
| | |
b13868b612689307ebf4e46ee4ede2fd0560e504, which got lost via my merge conflict resolution (duh).
|
|\ \
| | |
| | |
| | |
| | | |
Conflicts:
src/newt/classes/jogamp/newt/driver/linux/LinuxEventDeviceTracker.java
|
| | |
| | |
| | |
| | | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Xerxes Rånby <[email protected]>
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | | |
Signed-off-by: Harvey Harrison <[email protected]>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
is the 'unshifted' UTF-16 char value ; Add isPrintable() to toString().
|
| |
| |
| |
| | |
lower-case UTF-16 character.
|
| |
| |
| |
| | |
defined keyCode [and keyChar]; VK_KEYBOARD_INVISIBLE -> isActionKey
|
| |
| |
| |
| | |
clear we need to enqeue the events
|
| |
| |
| |
| | |
dead-keys (zero keyChar); For 'unshifted' keySym's also unmask Ctrl and Mod* states
|
| |
| |
| |
| | |
OSX JNI attachments to save time since detachment is skipped.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
when attaching NEWT Child to avoid false CALayer position.
|
|
|
|
| |
SurfaceUpdateListener to NEWT Window when it gets attached/detached.
|
|
|
|
| |
only onStop() declares invisible status. onPause() could imply other non fullscreen activity on top.
|
|
|
|
|
|
|
| |
a3f2ef50ad33c58a240a17fcf03e415d772207c3, etc; Fix NewtVersion, NativeWindowVersion and NewtVersionActivityLauncher
NewtVersion, NativeWindowVersion: Also search for extension javax.media.opengl (all packaging)
NewtVersionActivityLauncher: Use new launcher URI
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
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 !
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
destroy allowing to continue destruction.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
i.e. cannot be intercepted this way.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
usage, using the existing consumedTag attachment for compatibility and efficiency.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bugs w/ parenting
Fix native window parenting freeze:
- Pull out setJavaWindowObject(..) of changeContentView(..) to be called seperately,
add param for changeContentView(..) to enable/disable setJavaWindowObject()
- initWindow0(..):
- Call changeContentView(..) w/o setJavaWindowObject()
- setJavaWindowObject(..) at end of initialization
Fix native window parenting orderOut0:
If parent window is invisible or no parent used call orderOut(..),
otherwise call orderBack().
Fix updatePosition(..): positionChanged(..) - Position bug w/ parenting
- AWT parent passed 0/0
- call positionChanged(..) w/ client-pos instead of screen-pos
Fix getLocationOnScreenImpl(..) - Position bug w/ parenting
- Position < 0/0 is valid!
Misc:
- setWindowClientTopLeftPointAndSize0(..), setWindowClientTopLeftPoint0(..):
Add 'display' param, deciding whether area should be display (invalidated)
|
|
|
|
|
|
|
|
|
| |
Continues commit 81cbcdc8469143587b2044661dd613c798ae02ba
Perform on main-thread invocation from Java, allowing to issue
visibleChanged(..) after creation/visible calls.
This fixes the 'Visibility not reached ..' regressions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
on main-thread w/o blocking; NEWT/WindowImpl: Volatile multithreaded mutable values
Similar to commits:
28c6472335b924080d638b33a28f8f4eedb459b1
f354fb204d8973453c538dda78a2c82c87be61dc
main-thread operations cannot block main-thread.
Luckily we are able to create the NSWindow and NSView instance uninitialized (deferred) on the current thread,
while issuing their initialization on the main-thread w/o blocking.
Further more a size glitch is fixed, which didn't take the title bar into account.
+++
NEWT/WindowImpl: Volatile multithreaded mutable values
Since position, size and other attributes might get changes off-thread, these fields needs to be volatile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
design on main-thread w/o [infinitive] blocking
History:
Part1 commit 896e8b021b39e9415040a57a1d540d7d24b02db1 (Run CALayer Ops on current thread to avoid blocking)
Part2 commit 28c6472335b924080d638b33a28f8f4eedb459b1 (Run CALayer Ops on main-thread w/o blocking)
Dependency:
GlueGen commit 4becdfa125b07ff969d6540e1112735b53cd15eb (Fix RecursiveLockImpl* Timeout corner case)
Part2 misses essential locking of the OpenGL context (and it's surface upfront) while creating the
NSOpenGLLayer instance. The latter instantiates a OpenGL context shared w/ JOGL's, hence it cannot be locked.
Encapsulating NSOpenGLLayer creation/attachment and it's detachment/release in sub-classes
AttachNSOpenGLLayer and DetachNSOpenGLLayer, where instances will be streamed on main-thread.
Both tasks are triggered at associateDrawable(boolean bound).
The mentioned GL context locking requires disturbs the 'streaming' design considerably in AttachNSOpenGLLayer.
It is solved by attempt to acquire the recursive lock of the surface and the context via 'tryLock(maxwait)'
w/ screen-vSync-period/2. If the locks could not be acquired completly, the AttachNSOpenGLLayer instance
will be re-queued to the main-thread for later execution.
Before DetachNSOpenGLLayer is being streamed, it is validated whether AttachNSOpenGLLayer did run.
A recursive situation does happen w/ resizing an offscreen pbuffer drawable! Hence extra care is being taken.
|
|
|
|
| |
RunnableTask adds PrintStream 'exceptionOut' argument in ctor.
|
|
|
|
|
|
|
|
|
| |
introduced w/ commit e2506d7663b752f00f0a98f793ebad52e65bd1e3
In case a reparent action takes place w/ recreate,
only preserve the GLEventListenerState if the window is valid and will become visible again (wasVisible).
Also add proper DEBUG log prefix to GLEventListenerState.
|
|
|
|
|
|
|
|
|
|
|
|
| |
need for explicit call
- OffscreenLayerSurface.layoutSurfaceLayer() removed, no more required
- JAWTWindow adds a ComponentListener, which issues FixCALayerLayout() at resized, moved and shown.
- MyNSOpenGLLayer no more requires fix*Size() methods
- MyNSOpenGLLayer::setDedicatedSize() need no explicit CATransaction, performed by caller.
|
|
|
|
| |
DPYs; JAWTWindow: Add JAWT info in toString()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Part 5)
- GLAutoDrawableBase:
- Add 'setPreserveGLStateAtDestroy(..)' to preserve the GLEventListenerState at destroy() operation,
and impl. details pullGLEventListenerState()/pushGLEventListenerState().
pullGLEventListenerState() is called automatic at destroyImplInLock(),
where pushGLEventListenerState() has to be called after drawable realization
instead of context creation.
- Note/TODO: Method will become public in GLAutoDrawable in general!
- NEWT/GLWindow:
- Use GLEventListenerState preservation for reparenting case w/ destruction,
i.e. keep GLContext/GLEventListener alive while reparenting in recreation mode.
Scenario: NewtCanvasAWT Child <-> Top on OSX w/ CALayer
|