| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
instances; Removing ref. at API destroy() is wrong ; Allow GC to clear ..
- Removing ref. at API destroy() is wrong
- Since all instances can be recreated, removing ref at destroy() is simply wrong.
- Keep weak references until GC collects, i.e. user does not claim them anymore.
- Safe for Display, since it holds it's EDT thread.
- Window/Screen .. if user abandons reference .. nothing we can do here.
- Allow GC to clear ..
No need to hold ref loonger than user.
|
|
|
|
|
|
|
|
|
| |
- Quaternion.isEmpty()
- Texture.dispose(GL)
- GLContext.getGLVersionMajor() / ..Minor()
- GLContextImpl.bindPbufferToTexture() / releasePbufferFromTexture()
- MouseEvent.getWheelRotation()
-
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
view and 'font-definition' view. ENTER not. Fix ENTER code: 0xa -> 0xd !
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
MonitorMode* ; Sort List<MonitorMode> in descending order to be well determined.
Add Comparable<?>: Point*, Dimension*, Rectangle*, SurfaceSize* and MonitorMode*:
- Compare square values
- See API doc for order of special semantics (flags, rotation, ..)
Sort List<MonitorMode> in descending order to be well determined:
- Removes order by native mode id, give user a reliable natural order.
|
|
|
|
| |
blocking.
|
|
|
|
| |
shutdown. DisplayImpl.shutdownAll(): Don't block.
|
|
|
|
|
|
| |
(NewtCanvasAWT, ..)
.. otherwise an auto repeated key would cause fast focus traversal, not intended.
|
|
|
|
| |
component method.
|
|
|
|
|
|
|
|
|
|
|
|
| |
70bf3a4ec44504b86294a332255aaae8d2e86bf4 was not sufficient.
Commit 70bf3a4ec44504b86294a332255aaae8d2e86bf4 did not work out on Windows.
Solution now gathers the next or previous 'to be focused' component,
using the FocusTraversalPolicy of the visible/focusable/enabled container.
Then we simply request it's focus.
Works w/ Java7 on Linux and Windows.
|
|
|
|
|
|
|
|
| |
i.e. AWT Component's transferFocus() does nothing if component does not hold the focus.
.. this seems to be violating the AWT 'spec' .. however.
Workaround: Request focus before transfering it to the next/previous element.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NativeWindowFactory.shutdownHook head, allowing proper resource cleanup.
1 WindowImpl.shutdownAll():
- For all instances:
- mark invalid (causes any user thread to disregard the window)
2 ScreenImpl.shutdownAll():
- Removed own shutdown-hook!
- For all instances:
- Reset ScreenMonitorState
3 DisplayImpl.shutdownAll():
- For all instances:
- Remove EDT
- closeNativeImpl
Manually tested on X11 w/ NV and ATI Catalyst (fglrx)
- DFLAGS="-Djogl.debug.GLDrawable -Dnativewindow.debug.X11Util -Dnativewindow.debug.NativeWindow -Dnewt.debug.Display -Dnewt.debug.Screen -Dnewt.debug.Window"
- java $DFLAGS com.jogamp.opengl.test.junit.jogl.demos.es2.newt.TestGearsES2NEWT -time 2000 -sysExit testExit
- valid arguments for sysExit: testExit, testError, displayExit, displayError
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
forceRelayout at end of applet.start(); Cleanup AWTKeyAdapter.
Refine 893cf0c8c32edf231dbf418d45d3181532d2402b: Partial revert and issue forceRelayout at end of applet.start();
- Seems the workaround of OSX CALayer positioning bug is timing dependent,
i.e. stopped working when disabled DEBUG output.
- Move NewtCanvasAWT creation and attachment back to init()
- Issue extra forceRelayout (if OSX) at end of start() .. works 'most of the time'.
Cleanup AWTKeyAdapter: Adapt code style of keyPressed() to keyReleased().
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
applet.start() (only once), working around 'OS X' CALayer positioning bug.
The NewtCanvasAWT workaround for the 'OS X' CALayer positioning bug(*)
may only work if parent is not only dislayable, but also visible.
(*): Workaround resizes the component 2x, forcing a relayout.
++
RequestFocus after setVisibile(true).
+++
Clear references to glWindow, newtCanvasAWT @ destroy.
|
|
|
|
| |
KeyListener.keyTyped(KeyEvent) - Part2: API Documentation and Comments
|
|
|
|
| |
KeyListener.keyTyped(KeyEvent)
|
|
|
|
| |
@ addNotify() w/o newtChild
|
| |
|
|
|
|
| |
rotationScale arguments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|\ |
|
| |
| |
| |
| | |
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
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
when attaching NEWT Child to avoid false CALayer position.
|
|
|
|
| |
SurfaceUpdateListener to NEWT Window when it gets attached/detached.
|
|
|
|
|
|
|
| |
a3f2ef50ad33c58a240a17fcf03e415d772207c3, etc; Fix NewtVersion, NativeWindowVersion and NewtVersionActivityLauncher
NewtVersion, NativeWindowVersion: Also search for extension javax.media.opengl (all packaging)
NewtVersionActivityLauncher: Use new launcher URI
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
Due to high fluctuation (lack of normalized) pressure values on Android devices,
an option to query the normalized value and access to the current known maximum pressure is required.
MouseEvent:
- getMaxPressure() returning the [self calibrated] known maximum pressure
- getPressure(..) -> getPressure(.., boolean normalize) (API Change!)
- return normalize ? pressure/maxPressure : pressure;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Original author: Eric Brayet <[email protected]>
Revised by: Sven Gothel <[email protected]>
I took the freedom to cleanup the three original patches
from https://github.com/Pooouf/jogl.git branch 'bug_677':
- 7449d4726633d524a3bb79efffd04cfd0ca25e58 (removed by followup patch!)
- 68c739a4f03e46deecdbb71c125b4586aec08d63 (removes previous patch!)
- c2813dfc325a1482d18b6fc304e4e483f5633964
Further more I was able to reduce the 'extra' code while utilizing
- Window's isKeyboardVisible() and using keyboardVisibilityChanged(false)
to update the hidden keyboard state.
- Moving the key-handling code to the containing WindowDriver class
avoiding passing a reference to the inner view.
- Using AndroidNewtEventFactory for NEWT KeyEvent creation
+++
- Handle KeyEvent.KEYCODE_BACK w/ jogamp.newt.driver.android.WindowDriver.MSurfaceView.onKeyPreIme(..):
if( soft keyboard is up )
[1] Update keyboard visibility state and return NEWT KeyEvent.VK_KEYBOARD_INVISIBLE;
else
[2] call WindowImpl.windowDestroyNotify(true)
[3] then cont. processing, i.e. return false;
- Turns out respecting WindowClosingMode might be
- too complicated
- interfere w/ Android UI behavior
- AndroidNewtEventFactory
- createKeyEvent
- static
- adding boolean param 'inclSysKeys', if true, KEYCODE_BACK and KEYCODE_HOME are mapped
- Unit tests: GearsES2 + MovieCubeActivity0 shows keyboard if pressure > 0.6f
- pressure on Android shall be between [0..1], however we have to figure out
badly calibrated touchpads/Android device where we could experience
pressure > 2.0f !
- TODO: API documentation of pressure [0..1]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
mechanism
Due to a NEWT WindowClosing event regression cause by NewtCanvasAWT changes
a review of our WindowClosing event mechanism was required.
Important cleanups are marked w/ '(*)' below.
I would have preferred to change the 'WindowListener.windowDestroyNotify(WindowEvent)'
method to pass a WindowCloseEvent object exposing more information like
toolkit or programmatic destruction and passing whether a 'closing' or 'nop' action
will be performed based on the WindowClosingMode.
For now I postponed this idea .. since it would change the API again,
but may reconsider it after merging the Android 'closing' patch.
- InputEvent.consumedTag -> NEWTEvent.consumedTag
- Window
- (*) Promote setWindowDestroyNotifyAction(Runnable) to public,
former WindowImpl.setHandleDestroyNotify(boolean).
Using a Runnable action for WindowImpl.windowDestroyNotify(boolean)
allows a setting defined alternative for destroy() and gets rid
of [ab]using WindowListener.windowDestroyNotify(WindowEvent) for
lifecycle actions. Used in:
- GLWindow
- GLAutoDrawableDelegate impl.
- WindowImpl
- Respect NEWTEvent.consumedTag for WindowEvents as well
- (*) Impl. setHandleDestroyNotify(boolean) (see above)
- (*) destroy() simply sends out pre- and post- destruction Window events,
where windowDestroyNotify(boolean) sends out the pre-destruction event if NOP.
- (*) windowDestroyNotify(boolean) is public now, allowing other impl. details
to follow proper destruction using handleDestroyNotify Runnable (-> NewtCanvasAWT).
- AWTWindowClosingProtocol:
- addClosingListenerOneShot() -> addClosingListener()
- calling addClosingListener() at addNotify()
- calling removeClosingListener() at removeNotify()
- AWTWindowClosingProtocol ctor taking NOP runnable,
allowing to send WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY at WindowClosingMode.DO_NOTHING_ON_CLOSE
- add/remove listener on AWT-EDT
- AWTWindowAdapter
- Add 'removeWindowClosingFrom(..)',
allowing to remove window closing event fwd.
- Also fwd windowClosed in window closing fwd'ing.
- NewtCanvasAWT
- (*) Utilize AWTWindowClosingProtocol NOP runnable (see above)
to fwd closing-NOP event to NEWT
- (*) Unify remove/destroy code in destroyImpl(..)
- !removeNotify -> destroy NEWT child programatic or as toolkit event
- removeNotify || windowClosing -> destroy jawtWindow
- (*) Remove AWTWindowAdapter/AWTParentWindowAdapter's windowClosingListener,
since we utilize AWTWindowClosingProtocol
- DisplayImpl
- Adding 'final void dispatchMessage(final NEWTEvent event)'
allowing to remove the NEWTEventTask wrapping for no reason
in enqueueEvent(..) if on EDT and waiting.
|