| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
-
|
|
|
|
| |
i.e. 'jailed'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PointerIcon's size and hotspot maybe be useful for certain user-app calculation.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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')
|
|
|
|
| |
WindowImpl initialization)
|
|
|
|
| |
REPARENT_HINT_BECOMES_VISIBLE to ensure GL State Preservation ; Add unit test !
|
|
|
|
|
|
|
|
|
|
|
|
| |
REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints; Deprecate other reparentWindow(..) variants w/o hints.
NEWT Window.reparentWindow(..): Provide REPARENT_HINT_BECOMES_VISIBLE hint via new method variant using hints:
- Add REPARENT_HINT_FORCE_RECREATION, covering 'old' forceDestroyCreate boolean argument
- Add REPARENT_HINT_BECOMES_VISIBLE, Claim window becomes visible after reparenting, which is important for e.g. preserving the GL-states in case window is invisible while reparenting.
Deprecate other reparentWindow(..) variants w/o hints.
Use only new variant using hints w/o semantical change.
|
|
|
|
| |
considered in AWTTilePainter: 'Origin of GL image is still on Bottom'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
destruction via explicit set flag.
IcedTea-Web_1.5pre+rbc73a1362e9c still issues NewtCanvasAWT.removeNotify()
before before Applet.destroy(), i.e. removes NewtCanvasAWT from the Container
ahead of time (Applet protocol destroy()).
However, it fixes the non AWT-EDT issue, i.e. calls NewtCanvasAWT.removeNotify()
from the actual AWT-EDT - good.
Since the root cause still exist, we cannot use heuristics as described in
Bug 910 comment 9, but need to set a flag in NewtCanvasAWT to skip JAWT destruction
and remove it latter within Applet.destroy().
NewtCanvasAWT.removeNotify.0 - isApplet true @ [AWT-EventQueue-0, isAWT-EDT true]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NW.getLocationOnScreen(..) for X11 and Windows ; Allow unit test to run on all platforms.
- Reuse SWTAccessor.isOS_TYPE (public now)
- Impl NW.getLocationOnScreen(..) for X11 and Windows reusing existing native code
- Allow unit test to run on all platforms.
Note: NewtCanvasSWT unit tests require a 'wait for realized' while SWT dispatching.
Otherwise the 'sash unit test' will fail since realiziation happens later, at least on X11.
Hence extended AWTRobotUtil.waitForRealized(..) to use a 'waitAction'
which is used here w/ special SWT dispatch Runnable.
AWTRobotUtil.waitForRealized(..) operates on time-delta instead of iteration-counter,
allowing above 'waitAction' Runnable.
AWTRobotUtil.waitForRealized(..) removed 2nd 'glad.isRealized()' loop ..
|
|
|
|
|
|
|
|
|
|
|
| |
The NewtCanvasSWT is now brought into place by the parent SWT Composite
and the super SWT Canvas it extends. Also added two test cases. One with
a simple SashForm and the NewtCanvasSWT in the second cell, and another
with the NewtCanvasSWT in a Composite, that Composite now in the second
cell of the SashForm. The second test is necessary because the
NewtCanvasSWT does not receive SWT.Resize events in this configuration,
but only SWT.Paint ones (a behaviour inherited from the super SWT
Canvas)
|
|
|
|
| |
destruction if removeNotify() is called from non AWT-EDT
|
| |
|
|
|
|
| |
explicit call to reparentWindow(null) @ destroy
|
|
|
|
| |
reparenting 'back to parent'
|
| |
|
|
|
|
|
|
|
|
|
| |
Follow-on to commit:
d544c839f6df10f20977c786a446833f3aa7ef13 (jogl: do the clearGlobalFocusOwner() call on the AWT EDT in NewtCanvasAWT)
Likely this won't hurt anything.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
| |
Otherwise we can deadlock in the native focusrequest calls from the AWT thread,
see bug 879 for the details.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
if (isOnscreen)
else if (!isOnScreen)
change to
if (isOnscreen)
else
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
| |
periodically)
As suggested: Employ synchronization on lifecycle actions _and_ perform destroyImpl(..) always on AWT-EDT to avoid a deadlock.
|
|
|
|
| |
to fix event validation for offscreen mode (OSX/CALayer)
|
|
|
|
| |
commit 5c6c11abf643013976ecbc0df463a923a1f52696
|
|
|
|
| |
Consume AWT KeyEvents in downstream mode; Test respects 'consumed' key events.
|
|
|
|
| |
for key events); Allow AWTAdapter to be lazily setup w/ downstream object.
|
|
|
|
|
|
|
|
|
| |
when in offscreen-mode (OSX/CALayer)
NewtCanvasAWT.FocusAction must take focus when in offscreen-mode (OSX/CALayer)
since the NEWT window _is_ offscreen (no input events) and AWT events are translated to NEWT.
Regression of commit 0be87f241c0f0b2f5881d9a602ce12378b8e453d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
multiple threads; Fix Bug 892: Reduce Focus Hopping
Since we manage focus key traversal ourselves w/o requiring the AWT
component to have the focus[1],
we simply can drop requesting the focus for 'focus hopping' NEWT -> AWT -> NEWT[2].
Further more, 'MenuSelectionManager.defaultManager().clearSelectedPath()'
must be performed on AWT-EDT w/o blocking. Otherwise it may perform blocking tasks on AWT-EDT.
[1] Commit cb7118fc875b6722803e4b11d5681671962a8d3a
introduced function to query the next or previous 'to be focused' component:
AWTMisc.getNextFocus(..) .. etc.
[2] Focus hopping is also addressed in Bug 892
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
| |
applications to not block until window becomes visible.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
; Fix GLContext memory contract (volatile)
(Unit test remarks see below)
- Add shared GLContext queries
- Refined GLContextShareSet:
- Use IdentityHashMap since GLContext's can only be identical w/ same reference (footprint, performance)
- Add API doc for clarification
- Add methods:
- ArrayList<GLContext> getCreatedShares(final GLContext context)
- ArrayList<GLContext> getDestroyedShares(final GLContext context)
- Use 'final' where possible
- Add GLContext methods:
- boolean isShared()
- List<GLContext> getCreatedShares()
- List<GLContext> getDestroyedShares()
- Add GLSharedContextSetter interface defining setting a shared GLContext
directly (GLContext) or via a GLAutoDrawable:
- setSharedContext(GLContext)
- setSharedAutoDrawable(GLAutoDrawable)
Both cause initialization/creation of GLAutoDrawable's drawable/context to be postponed,
if the shared GLContext is not yet created natively or
the shared GLAutoDrawable's GLContext does not yet exist.
Most of impl. resides in GLDrawableHelper
Implemented in:
- GLAutoDrawableBase, GLOffscreenAutoDrawable
- GLWindow
- AWT GLCanvas
TODO:
- GLJPanel
- SWT GLCanvas
- GLDrawableFactory:
- Add 'GLOffscreenAutoDrawable createOffscreenAutoDrawable(..)' variant w/o passing the
optional shared GLContext _and_ specifying lazy GLContext
creation. This allows to benefit from GLSharedContextSetter contract.
Lazy GLContext creation is performed at 2st display() call at the latest.
All JOGL code and unit tests use this new method now.
- Mark 'createOffscreenAutoDrawable(..)' w/ shared GLContext argument
and immediate GLContext creation deprecated - shall be removed in 2.2.0
- Make reference to GLContext and it's native handle volatile
Since we rely on the query 'GLContext.isCreated()' to properly allow GLAutoDrawable's to query whether
a shared GLContext is natively created (already), the handle must be volatile
since such query and the actual creation may operate on different threads.
+++++
- Add/Refine shared GLContext unit tests demonstrating diff. sharing methods.
All variants of using shared GLContext:
com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBO*
Most convenient way to share via setSharedAutoDrawable(GLAutoDrawable):
com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextVBOES2[NEWT|AWT]3
AWT use w/ JTabbedPane using setSharedAutoDrawable(GLAutoDrawable):
com.jogamp.opengl.test.junit.jogl.acore.TestSharedContextWithJTabbedPaneAWT
|
|
|
|
| |
more stable (i.e. only 2 pointer pressed)
|
|
|
|
|
|
|
| |
One String is already being built, passing it to new String() is just wasteful as
the temp String can be returned just as easily.
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
| |
Signed-off-by: Harvey Harrison <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
button/pointer', i.e. button == 0, pointer-ID == -1
doPointerEvent:
- allow id==-1 -> button==0 for no button, i.e. mouse move
doMouseEvent:
- keep button 0 value, i.e. map to pointer-ID -1
|
|
|
|
|
|
|
|
|
|
|
|
| |
a05b87a369441d9ef38f97929f866b3d4ced0e57: NULL printGLAD of GLCanvas and NewtCanvasAWT
We have to pre-init printGLAD w/ current GLAD (similiar w/ GLJPanel).
Also properly define reqNewGLAD:
reqNewGLAD = !caps.getSampleBuffers() && ( reqNewGLADOnscrn || reqNewGLADSamples || reqNewGLADSize );
where '!caps.getSampleBuffers() && ( .. )' is due to Bug 830,
swapGLContextAndAllGLEventListener and onscreen MSAA w/ NV/GLX does not work.
|
|
|
|
|
|
|
| |
40863632d1428de015099b5967e5136425e99f25), throw IllegalArgumentException if ordinal is out-of-range. Add API doc.
- FFMPEGNatives
- MouseEvent.PointerType
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
consumePointerEvent(..) - Unifies native mouse and Android's pointer event, ready for Win7 touch
Unify event processing in new doPointerEvent(..), which is also invoked from doMouseEvent(..),
and consumePointerEvent().
doPointerEvent(..): Validates and modifies event data and finally creates the event,
where consumePointerEvent(..) calls gesture handlers and may synthesize events.
Unifies native mouse and Android's pointer event, ready for Win7 touch.
AndroidNewtEventFactory calls doPointerEvent(..) directly.
Removed lots of duplicated pointer event handling code.
|
|
|
|
| |
FFMPEGNatives's Enums and new MouseEvent.PointerType.valueOf(int)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
InputEvent: getButtonDownCount() and isAnyButtonDown();
- Clarify 'Multiple-Pointer' w/ button[mask] semantics
- Pointer IDs start w/ 0 and are consecutive numbers.
- 'button' == triggering pointer-ID
- buttonMask in modifiers show pressed button _and_ pointer-IDs
- deprecated BUTTON_NUMBER -> use BUTTON_COUNT (name semantics)
|
|
|
|
| |
NativeWindow's util types.
|
|
|
|
| |
allowing user to set custom tile size for performance evaluation/tweak
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We processed MouseEvents within NEWT as follows:
sendMouseEvent/enqueueMouseEvent -> doMouseEvent,
- called by native code to be delivered via consumeMouseEvent (now or later)
- events are validated (move/drag, boundaries)
- missing events are synthesized (click, enter, ..)
as well as in several factories, i.e.:
- AWTNewtEventFactory (1:1)
- AndroidNewtEventFactory
- synthesized events .. (click, ..)
- android typed gesture detection (drag -> 1 finger scroll..)
The latter enqueues events do Window/Display directly to be consumed by WindowImpl.
Then users may have their own gesture detection etc.
+++
This change unifies mouse/pointer event processing within NEWT within consumeEvent(..)
which represents a common entry point.
Gesture processing is now realized w/ a public API
- GestureHandler
- GestureHandler.GestureListener
- GestureHandler.GesureEvent
which supplies:
- default impl. of optional gesture handlers (scroll, .. - default: enabled)
- public API to add/remove gesture-handler and -listener
+++
This allows our impl. to scale better in support of
more multiple pointer devices (-> Win7/Win8, X11, ..).
|
|
|
|
| |
beginTile() throws an EOT IllegalStateException to avoid division by zero
|
|
|
|
| |
from fullscreen; JOGLNewtAppletBase: Reparent to pos 32/32, trying to avoid browser window focus/top stealing on X11.
|
|
|
|
|
|
|
|
|
|
| |
favor of FocusPropertyChangeListener requestFocusNEWTChild()
The AWT's requestFocus*() overrides were intended to receive the AWT focus (default) and
clear it afterwards to forward the focus to the NEWT component -> requestFocusNEWTChild().
This can be achieved simply by using our FocusPropertyChangeListener
and invoking requestFocusNEWTChild() when receiving the focus on the NewtCanvasAWT component.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|