summaryrefslogtreecommitdiffstats
path: root/src/test/com
Commit message (Collapse)AuthorAgeFilesLines
* Update PNGJ 0.85 -> 1.12 (w/ interlace read support) ; Added PNG Interlace ↵Sven Gothel2012-12-315-14/+52
| | | | read tests (TestPNGTextureFromFileNEWT)
* Bug632: Test NEWT Child Window Translucency (X11/Windows) ..Sven Gothel2012-12-302-10/+134
| | | | | | | | | | | | | - Windows: Child window is not translucent at all - X11: Child window is translucent to parent's background, however - parents content is _not_ 'composed in'. - TODO: Find whether there is a solution or not. - Note: The child window does not change it's rel. position if parent moves! This is a feature, since we don't have impl. a layout.
* Fix Bug 658 (Mesa 9.0 3.1 Intel compat quirk, 3.1 core only) ; No ↵Sven Gothel2012-12-292-2/+214
| | | | | | | | | | | | | | | | | | | PROFILE_ALIASING compat -> core ; Fix setGLFunctionAvailability(..) failure path @ profile query - Add GLRendererQuirks.GLNonCompliant, marking a GL context/profile non compliant. Currently: 'Mesa DRI Intel(R) Sandybridge Desktop' && 3.1 compat profile - Fix Bug 658 (Mesa 9.0 3.1 Intel compat quirk, 3.1 core only) Detect case using new GLRendererQuirks.GLNonCompliant in setGLFunctionAvailability() and return 'false'. - No PROFILE_ALIASING compat -> core Use true core GL profiles / context if available to ensure proper API behavior across platforms due to different functionality. E.g. don't use GL3bc if GL3 is requested. - Fix setGLFunctionAvailability(..) failure path @ profile query Destroy temp context & zero result to cont. iterating through GL versions. This missing cleanup lead to returning the faulty GL context handle and it's mapping/usage.
* Adapt change of commit d93c5d23e304ea20e868595748f92a5bef4f5703 to unit test ↵Sven Gothel2012-12-291-26/+76
| | | | (GLCanvas realization point)
* Test*NewtEventModifiers*: Clear 'clearing' events on thread - @Before/@After ↵Sven Gothel2012-12-251-42/+32
| | | | | | -> execOffThreadWithOnThreadEventDispatch Remaining 'clearing' events from _releaseModifiers() and escape() broke test case.
* Misc OSX/SWT: OSXUtil.RunOnMainThread(..) refinement; Fix ↵Sven Gothel2012-12-253-82/+152
| | | | | | | | | | | | | | | | | Test*NewtEventModifiers for SWT (TestNewtEventModifiersNewtCanvasSWT) - Misc OSX/SWT: OSXUtil.RunOnMainThread(..) refinement - 'waitUntilDone' is implemented on Java site via lock/wait on RunnableTask to not freeze OSX main thread. - Fix Test*NewtEventModifiers for SWT (TestNewtEventModifiersNewtCanvasSWT) - Deal with SWT's requirement to run the SWT event dispatch on the TK thread, which must be the main thread on OSX. We spawn off the actual test-action into another thread, while dispatching the events until the test-action is completed. - AWTRobot: Add 'void requestFocus(Robot robot, Object obj, int x, int y)' - Use waitForIdle() only if programmed in Robot (Deadlock w/ OSX SWT) - Required for SWT usage (see above)
* WT-NEWT Modifier mapping and test: part-4 (Fix unit tests): ↵Sven Gothel2012-12-242-75/+117
| | | | BaseNewtEventModifiers ignore more events (clicked, wheel, entered, exited); Fix TestNewtEventModifiersNewtCanvasSWT SWT-Display thread.
* AWT-NEWT Modifier mapping and test: part-3 (Fix unit tests)Sven Gothel2012-12-245-167/+208
| | | | | | | | | | | | | | | | | | | | | | | - Finetune delay - Wait for eventCount - Fix Listener concurrency - Manually tested (enabled in our unit tests now) - Tool Combinations - NEWT GLWindow - AWT GLCanvas - NewtCanvasAWT - NewtCanvasSWT - On - Linux/X11 - Windows - OSX(+) (+): Failure NEWT: When multiple buttons are pressed, only the last one is visible via modifier MASK. "expected:[button1, button2], have: [button2]"
* AWT-NEWT Modifier mapping and test: part-3 (NEWT BUTTON MASK always, ..)Sven Gothel2012-12-245-117/+129
| | | | | | | | | | | | | | | | - AWTNewtEventFactory's awtModifiers2Newt: - always include NEWT BUTTON_MASK (press, release, ..) where AWT doesn't include them at release (it's only a DOWN_MASK). - Test BaseNewtEventModifiers, .. - No need to call super class Before, BeforeClass, .. manually - Use RedSquareES2 as GL demo - Adapt to AWTNewtEventFactory's modifier change above (NEWT BUTTON MASK even at release) - More descriptive error/log text - Added _mandatory_ TestNewtEventModifiersNEWTWindowAWT to test native NEWT behavior. This shall be the golden behavior all translated events shall compare w/.
* Move pre-existing NEWT event test to new dedicated package package: ↵Sven Gothel2012-12-236-12/+5
| | | | com.jogamp.opengl.test.junit.newt.event
* Fix 13168c99ff9e8bf71c83f1be7afee270a3db4074 / ↵Sven Gothel2012-12-235-94/+36
| | | | | | | | | | | | | | | | | 811e3791b98fea0dfa3b7d301cb532c54df8dc82: AWT-NEWT Modifier mapping - part-2 AWTNewtEventFactory: - getAWTButtonMask() -> getAWTButtonDownMask() - using proper _DOWN_MASK values (regression of commit 13168c99ff9e8bf71c83f1be7afee270a3db4074) - com.jogamp.newt.event.MouseEvent.BUTTON_NUMBER buttons - adding 'ModifierMappings.txt' to API doc header - remove obsolete 'int awtModifiers2Newt(int awtMods, boolean mouseHint)' - 'int awtButton2Newt(int awtButton)' 1:1 button name mapping Tests: - rename TestNewtEventModifiers -> BaseNewtEventModifiers to avoid being picked up by our junit testing framework. The latter tests all classes starting w/ 'Test*'
* Fix commit 811e3791b98fea0dfa3b7d301cb532c54df8dc82: Make AWT usage Java6 ↵Sven Gothel2012-12-231-8/+31
| | | | clean (was using Java7 stuff); Note: Need to test!
* Merge pull request #54 from rhatcher/masterSven Gothel2012-12-235-0/+1138
|\ | | | | Fix For Bug 629, Plus First Crack At Associated Unit Tests
| * Merge branch 'master' of https://github.com/sgothel/joglrhatcher2012-12-065-23/+400
| |\
| * | Fix for JOGL bug 629, and added new unit tests.rhatcher2012-11-295-0/+1138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change to AWTNewtEventFactory appears to fix the original issue for AWTCanvas instances, and the TestNewtEventModifiersAWTCanvas appears to work ok too. However, there are still issues with NewtCanvasAWT and NewtCanvasSWT instances. These might be problems in the test code, but there's also a good chance there are still issues in the NEWT event delivery infrastructure. For the time being I recommend that only TestNewtEventModifiersAWTCanvas be included in routine unit tests. The tests are defined in TestNewtEventModifiers, and the remaining test classes extend it to define how the window and associated GL drawing surface are created. File ModifierMappings.txt is simply informational, and shows how the modifier bits are laid out between AWT and NEWT. This possibly should have been a spreadsheet.
* | | Fix regression of commit b8a8fc24a3afb0cb06a31504bdea1a98b8f00ef4: Cache ↵Sven Gothel2012-12-221-4/+5
| | | | | | | | | | | | ShaderState for share ctor.
* | | Bug 642: Refine test case, adding Hw/Lw mix intermediate Container test to ↵Sven Gothel2012-12-222-8/+24
| | | | | | | | | | | | avoid remove/add of GL component on Window when moving splitter.
* | | Fix Bug 642 TestJSplitPaneMixHwLw01AWT (AWT-GLCanvas); Robustness ↵Sven Gothel2012-12-223-2/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLContext/GLDrawable - Fix Bug 642 TestJSplitPaneMixHwLw01AWT On Windows platform when mixing hw/lw JSplitPanel, the GLCanvas is removed and added when splitter is moved. The lack of robustness (see below) lead to an exception. Note: Only w/ GLJPanel (no hw/lw mixing) the splitter can be moved in both direction. Only here it is guaranteed that the GL component will survive the action. - Fix AWT-GLCanvas EDT Runnable: swapBuffer().. / display(..) - Check drawable.isRealized() within the lock on the performing thread. This is not possible before issuing the EDT Runnable action since we cannot hold the lock beforehand. - Robustness GLDrawableImpl - boolean realized -> volatile boolean realized - remove 'synchronized' on isRealized() and setRealized(..) - Use dbl-checked locking on 'realized' test for swapBuffers() and setRealized(..) - Robustness GLContextImpl - Catch createImpl(..) exception and properly return CONTEXT_NOT_CURRENT
* | | Bug 651: Mesa3D: GL_INVALID_ENUM in ↵Sven Gothel2012-12-202-2/+212
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glGetIntegerv(pname=GL_MAX_TEXTURE_IMAGE_UNITS) ; Add unit test / bisect Mesa3D This bug lies within Mesa3D (any renderer) and is fixed in commit 8dc79ae7d73cf6711c2182ff9a5d37ef6c989d23. Mesa3D Version 9.0 still exposes this bug, where 9.0.1 has it fixed w/ above commit.
* | | Bug642: Add test case for Swing JSplit Pane w/ GLCanvas and GLJPanelSven Gothel2012-12-161-0/+179
| | |
* | | MacOSXCGLContext: Use new setLocation(gl, shader-program); Minor edits..Sven Gothel2012-12-161-1/+1
| | |
* | | GLArrayData/ImmModeSink: Remove implicit dependency on ShaderState - allow ↵Sven Gothel2012-12-1610-174/+662
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | operating w/o it; ShaderState: Remove notion of GL context attachment, use pass-through or object association; GLArrayData/GLUniformData: Add basic GLSL location methods - GLArrayData/GLUniformData: Add basic GLSL location methods - GLArrayData - add: setLocation(..) for attribute location/index retrieval (post link) and binding (pre link) - GLUniformData - add: setLocation(..) for attribute location/index retrieval (post link) - GLArrayData/ImmModeSink: Remove implicit dependency on ShaderState - allow operating w/o it - GLArrayData - add: 'public void associate(Object obj, boolean enable)', allows setting ShaderState usage - ShaderState: Remove notion of GL context attachment, use pass-through or object association - ownsAttribute(..) associates the attribute w/ ShaderState - removed GL context ShaderState attachment Tested: - ImmModeSink w/ GLSL/ES2 w/ and w/o ShaderState - GLArrayData* w/ and w/o ShaderState
* | SWT GLCanvas: Fix sporadic drop of redraw on X11 _and_ allow using custom ↵Sven Gothel2012-12-044-18/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GLCapabilities on X11 (feature complete) To allow custom GLCapabilities, we had to use native parenting on X11 w/ a new child window. The desired visualID chosen by the users GLCapabilities is passed to the new child window. The redraw drops must be caused by the original GDK or the new child GDK window. Now we use a plain X11 child window similar to NEWT's X11 window and NewtCanvasSWT, which doesn't expose this bug. (Note: SWTAccessor/GLCanvas still contains the uncommented GDK code path for further inspection, if desired) Also added SWTNewtEventFactory to test event handling on the SWT GLCanvas w/ GearsES2. TestSWTJOGLGLCanvas01GLn tests custom GLCapabilities now. SWTEDTUtil has been moved to private: com.jogamp.newt.swt -> jogamp.newt.swt.
* | SWT GLCanvas/NewtCanvasSWT: Check isVisible() @ validation; NewtCanvasSWT ↵Sven Gothel2012-12-022-50/+106
| | | | | | | | | | | | | | | | | | | | remove just introduced setVisible(false) and adapt to setEDTUtil() changes. ; Enhance Bug 643 unit test: Also test NEWT EDT and pre-visible GLWindow. - SWT GLCanvas/NewtCanvasSWT: Check isVisible() @ validation - NewtCanvasSWT remove just introduced setVisible(false) and adapt to setEDTUtil() changes - Enhance Bug 643 unit test: Also test NEWT EDT and pre-visible GLWindow.
* | NEWT EDTUtil: Simplify running state (default is running @ setEDTUtil()); ↵Sven Gothel2012-12-021-1/+3
| | | | | | | | Simplify DefaultEDTUtil impl. and fix concurrency leak w/ 'shouldStop'
* | Bug628: Adding unit-test 'TestNewtCanvasSWTBug628ResizeDeadlock' exposing ↵Sven Gothel2012-11-292-7/+288
| | | | | | | | | | | | | | | | | | | | | | NewtCanvasSWT asyncExec(..) bug w/ native parenting The unit test shows, that while using JOGL's SWT GLCanvas Display's asyncExec(..) works properly, but w/ NewtCanvasSWT on Windows does not. NewtCanvasSWT differs w/: - Using native parenting [Newt GLWindow to SWT Canvas] - Processing native events in own NEWT EDT, w/ own Windows dispatch hook [For the child GLWindow only]
* | TestSWTJOGLGLCanvas01GLn: Use display.syncExec(..) where possible, add AnimatorSven Gothel2012-11-291-5/+24
|/
* SWTEDTUtil/AWTEDTUtil: Fix deadlock situations ; Cleanup ↵Sven Gothel2012-11-272-57/+129
| | | | | | | | | | TestNewtCanvasSWTBug628ResizeDeadlock - Fix deadlock situation in waitUntilStopped/Idle(), skip if on AWT/SWT EDT - Use RunnableTask for sync task invocation, don't block AWT/SWT EDT. - Cleanup TestNewtCanvasSWTBug628ResizeDeadlock (works on OSX as well)
* Bug628: Adding unit test reproducing the deadlock realiable withing first ↵Sven Gothel2012-11-233-9/+370
| | | | | | | rounds of multi-threaded display. If a NEWT Window locking operation is performed from within NEWT's EDT (native event dispatch) and a mutable SWT operation performed via NEWT's display invoke - a deadlock occurs.
* OSX CALayer Stencil/.. Fix: In case of FBO CALayer usage, use default ↵Sven Gothel2012-11-216-47/+280
| | | | | | | | | | caps/pixelformat w/ chosen GLProfile only Using a pixelformat w/ chosen stencil for CALayer does corrupt rendering for an unknown reason, probably due to incompatible pixelformat w/ CALayer composition. This patch simply discards any special chosen caps, while only recognizing the desired GLProfile for the FBO CALayer pixelformat.
* Fix Graph SceneUIController: Remove Listener by itself in dispose()Sven Gothel2012-11-112-3/+3
|
* PMVMatrix: Add 'Frustum glGetFrustum()' adding same dirty/request ↵Sven Gothel2012-11-111-9/+33
| | | | | | | | | methodology as for Mvi and Mvit Allows user to derive Frustum from updated P + MV Clarify method name for clearing all update request: - disableMviMvitUpdate() -> clearAllUpdateRequests()
* Reorganize math code into: com.jogamp.opengl.math and ↵Sven Gothel2012-11-117-7/+7
| | | | | | | | | | | | | | | | | | | | | | | com.jogamp.opengl.math.geom packages Note: WIP - We may relocate / reorg math package. Public relocations: com.jogamp.opengl.util -> com.jogamp.opengl.math - FixedPoint - FloatUtil com.jogamp.graph.math -> com.jogamp.opengl.math - Quaternion - VectorUtil com.jogamp.graph.geom -> com.jogamp.opengl.math.geom - AABBox VectorUtil: Introducing Vert2fImmutable and Vert3fImmutable interfaces, allowing graph Vertex instances to be used 'graph' agnostic and to document 2d/3d use-cases.
* Fix GLAutoDrawable.dispose(): Dispose drawable even w/o context; ↵Sven Gothel2012-11-082-35/+90
| | | | | | | | | | | | | | | | | | | JAWTWindow.lockSurface(): Check AWT component's native peer - Fix GLAutoDrawable.dispose(): Dispose drawable even w/o context - It is possible to have the GLContext not being created (not made current), so drawable shall be disposed independent. - Merge Runnable 'postDisposeOnEDTAction' to dispose Runnable for clarity - GLDrawableHelper: Split disposeGL from invokeGLImpl for clarity - JAWTWindow.lockSurface(): Check AWT component's native peer - W/o a native peer (!isDisplayable()), JAWT locking cannot succeed. - On OSX OpenJDK 1.7, attempting to JAWT lock a peer-less component crashes the VM - MacOSXJAWTWindow.lockSurfaceImpl(): Remove redundant null checks
* TestGLCanvasAWTActionDeadlock0[01]AWT: Disable 'restart' test on current ↵Sven Gothel2012-11-052-2/+4
| | | | | | (non AWT) thread - crashes on solaris (which is fine) Modifying AWT components shall always happen on AWT-EDT anyways.
* GLAutoDrawable: Refine API change of commit ↵Sven Gothel2012-11-051-4/+4
| | | | | | | | | | c002e04f848116922a1ed7bd96ead54961649bbd As suggested by Julien Gouesse, align 'enqueue(..)' method w/ 'invoke(..)': - public void enqueue(GLRunnable glRunnable); + public boolean invoke(boolean wait, List<GLRunnable> glRunnables);
* Analyzed OSX Deadlock w/ AWT Applet & CALayer: Andres Colubri's Test Case, ↵Sven Gothel2012-11-052-55/+127
| | | | | | | | | | | | | | | | | | | | | | Commit 77db6a5c22cb4a53cf911b4caf57127770c70968 [1] - The AWT/Applet test case on OSX utilized offscreen CALayer, which is correct. [2] - the GLEventListener.display(..) method calls Frame.setTitle(".."); which is correct, but freezes when called right after GLEventListener.init(..) BUG on OSX/CALayer: If frame.setTitle() is issued right after initialization the call hangs in at apple.awt.CWindow._setTitle(Native Method) at apple.awt.CWindow.setTitle(CWindow.java:765) [1.6.0_37, build 1.6.0_37-b06-434-11M3909] Happens w/ Oracle's JRE7u9 as well! Workaround: - Set 'justInitialized' flag in GLEventListener.init(..) - Clear 'justInitialized' flag in GLEventListener.display(..) at the end - Skip Frame.setTitle(..) in GLEventListener.display(..) if 'true == justInitialized' Somebody may send a bugreport to Oracle / OpenJDK.
* TestGLCanvasAWTActionDeadlock01AWT: Reproducing OSX deadlock variation, ↵Sven Gothel2012-11-041-0/+259
| | | | using Applet as component which provokes offscreen FBO layer.
* TestGLCanvasAWTActionDeadlock00AWT: Remove redundant argumentSven Gothel2012-11-041-3/+3
|
* TestGLCanvasAWTActionDeadlock01AWT -> TestGLCanvasAWTActionDeadlock02AWT; To ↵Sven Gothel2012-11-041-7/+7
| | | | add another intermediate unit test for analysis
* Adding Andres Colubri's Test Case (junit'fyed), which provokes a Deadlock on ↵Sven Gothel2012-11-042-0/+844
| | | | | | | | | | | | | | | OSX - Adding a similar one w/o deadlock and less framework bits. Andres Colubri reported a test case in the forum: <http://forum.jogamp.org/Thread-blocking-issue-with-AWT-but-not-NEWT-on-OSX-td4026674.html> Which is now included as TestGLCanvasAWTActionDeadlock01AWT. A similar w/ less framework bits and w/o dealock is also included as TestGLCanvasAWTActionDeadlock00AWT. A followup commit will incl. a fix after further analysis. A commit at this point where TestGLCanvasAWTActionDeadlock01AWT still freezes on OSX is done to be able to reproduce the bug and see the fix as a patch.
* GLAutoDrawable: Fix GLEventListener lifecycle and expose more user control ↵Sven Gothel2012-11-044-70/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (API Change) ; Added GLDrawableUtil A GLEventListener resides in two states, initialized and uninitialized. When added to a GLAutoDrawable, it is uninitialized. A first 'display()' will issue GLEventListener's 'init(..)' which renders it initialized. This is usually accompanied by 'reshape(..)' propagating the drawable's dimension. Destruction of the GLAutoDrawable will issue GLEventListener's 'dispose(..)' which renders it uninitialized. It turns our these means of GLEventListener controls are not sufficient in case the user requires to remove and add them during the lifecycle and rendering of their GLAutoDrawable host. GLAutoDrawable 'removeGLEventListener(..)' merely removes the GLEventListener from the list, but does not complete it's lifecycle, i.e. issues 'dispose(..)' if initialized to realease GL related resources. Hence the following essential API changes are made to complete the lifecycle: + public GLEventListener disposeGLEventListener(GLEventListener listener, boolean remove); disposing a single GLEventListener, allowing it's removal from the list being optional This is demonstrated via GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b), see below. ++++++++ Further more the following API changes were made to expose complete control of GLEventListener to the user: - public void removeGLEventListener(GLEventListener listener); + public GLEventListener removeGLEventListener(GLEventListener listener); The return value allows simple pipelining, and also delivers information whether the passed listener was actually removed. - public GLEventListener removeGLEventListener(int index) throws IndexOutOfBoundsException; + public int getGLEventListenerCount(); + public GLEventListener getGLEventListener(int index) throws IndexOutOfBoundsException; Dropping the redundant removal by index, while adding count and get methods. + public boolean getGLEventListenerInitState(GLEventListener listener); + public void setGLEventListenerInitState(GLEventListener listener, boolean initialized); Allows retrieving and setting of listener states. All in all these API changes allows a user to experience all freedoms in dealing w/ GLEventListeners hosted by GLAutoDrawable impl. and shall be future proof. Note that we have avoided the Iterator pattern due to it's overhead of temporal objects creation. The simple indexed access allows us to implement each method as an atomic operation. +++++++++++ Further more a simple enqueue(..) method has been added, allowing to just enqueue a GLRunnable w/o provoking it's execution - as invoke(..) does. This method pleases a use case where GLRunnables are batched and shall be executed later on.. public boolean invoke(boolean wait, GLRunnable glRunnable); + public void enqueue(GLRunnable glRunnable); +++++++++++ Added GLDrawableUtil, exposes utility function to rearrange GLEventListener, modifiy GLAutoDrawable, etc. GLDrawableUtil.swapGLContextAndAllGLEventListener(GLAutoDrawable a, GLAutoDrawable b) is tested and demonstrated w/ TestGLContextDrawableSwitchNEWT. Manually tested on X11, OSX and Windows.
* MacOSXCGLContext: Fix ShaderCode instantiation .. (duh!) ; Tested via ↵Sven Gothel2012-10-312-2/+7
| | | | reparenting TestParentingFocusTraversal01AWT
* Fix Unit Tests regarding commit 55f4405dbf9253e6ca686e44c50b2cfc1af7f3eb: ↵Sven Gothel2012-10-314-15/+16
| | | | Shader program name is valid if non-zero.
* Fix ProjectFloat (Bug 633): Adding missing offset of sliced buffer usage; ↵Sven Gothel2012-10-311-0/+109
| | | | | | reduce buffer usage (performance) in favor of float[]. Thomas De Bodt reported this error and provided the unit test.
* Add OSX CALayer OpenGL 3 (core) support: Derive pixelformat from parent ↵Sven Gothel2012-10-312-20/+30
| | | | | | | | (GL3), use GL3.2 compatible shader; Use VBO in general. Covered by: Auto unit tests: TestOffscreenLayer01GLCanvasAWT, TestOffscreenLayer02NewtCanvasAWT Manual: TestGearsES2AWT '-gl3 -layered'
* Shader: Add '#define texture2D texture' for GLSL >= 130 ; TestGearsES2AWT ↵Sven Gothel2012-10-318-16/+21
| | | | add forceGL3; TextureDraw01ES2Listener uses defaultShaderCustomization()
* TestInitConcurrent02NEWT: Disabled for auto unit test until further analysis ↵Sven Gothel2012-10-311-0/+12
| | | | - Windows/ATI driver crash
* Fix NEWT KeyEvent: Deliver keyChar w/ pressed and released; Deliver proper ↵Sven Gothel2012-10-3112-96/+402
| | | | | | | | | | | | | | | | | | | | | | modified flags and modifier-key events; Simplify Windows key handling Preface: Modifier-keys are SHIFT, CTRL, ALT and META and they have a matching modifier-bit. - Simplify Windows key handling - Employ MapVirtualKey(..) for virtual-key to character and scancode to virtual-key mappings, allowing to drop tracking of keyCode to keyChar in java code. This also removes the platform restriction of delivering keyChar at TYPED only. - Deliver keyChar w/ pressed and released - Due to the lift restriction on the Windows platform (see above), we can deliver keyChar w/ all key events on all platforms. - Deliver proper modified flags and modifier-key events All modifier-keys deliver pressed, released and typed events with their modifier-bit set. The above is covered by unit tests, which passed on X11, Windows and OSX (manual test run).
* TestNewtKey*: Don't test TAB (focus traversal, duh!); Add ↵Sven Gothel2012-10-304-15/+15
| | | | AWTRobotUtil.requestFocus(robot, ..) for kbd input on Windows (some 'confusion' w/ prev unit test runs)