GLDrawable: Refine API doc; GLDrawableImpl: Balance createHandle()/destroyHandle(); Handle LOCK_SURFACE_CHANGED in lockSurface() ; GLContextImpl.makeCurrent(): Fix drawable handle validation.
GLDrawable: Refine API doc (realized/handle) - Lifecycle of the drawable handle was not clear - Ephasizing handle's dependency on NativeSurface's lock state and drawable's realization
GLDrawableImpl: Balance createHandle()/destroyHandle() - updateHandle() -> createHandle() - ensure both are balance, see below
GLDrawableImpl: Handle LOCK_SURFACE_CHANGED in GLDrawableImpl's lockSurface() - call destroyHandle() and createHandle()
GLContextImpl.makeCurrent(): Validate drawable handle if realized only. - it is valid to have an invalid drawable handle if not realized (see above)
NEWT KeyEvent: Use UTF-16 UniCode for key-code and key-symbol exposing well 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 697: Fix commit 4db745e84fac610f85ab085e5c147e571e82e008 - Not compile 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.