Bug 910: Add Standalone Extended Applet Lifecycle Validation Test

Test is online @ http://jogamp.org/deployment/test/bug910/

Test validates the state of the added component:
  TC1 - addNotify() and removeNotify() has been called from AWT-EDT.
  TC2 - removeNotify() is not called before Applet.destroy()

Test also validates the Applet state:
  TA1 - isActive()
  TA2 - init count
  TA3 - start count
  TA4 - stop count
  TA5 - destroy count
Refine DemoBug910ExtendedAWTAppletLifecycleCheck (commit 9310b11b2b6e1e89fa5ed9b8de26e56ff6a6b262): Test start/stop balance.
Fix Bug 902: FFMPEGMediaPlayer uses IOUtil.decodeURIIfFilePath(uri) to decode proper file-scheme if applicable - otherwise encoded ASCII URI.
Bug 907 - Initial patch allowing Jogl to respond to other applications that try to retrieve window names
Bug 907 - Cleanup Commit e9c711a86aa05f4f24c69972532833f5a98911a3

Cleanup Commit e9c711a86aa05f4f24c69972532833f5a98911a3:
  - Fix while loop in SendCloseMessage (native)

  - static 'threadid' must be volatile

  - Whitespace

  - Redundancy
    - CreateDummyWindow

  - Scope (java, move JNI funcs back to private)

  - Remove [invalid] pointer usage (native)
    - ThreadParam's threadReady and hWndPtr shall not be pointers - invalid
    - No need to use a threadReady pointer.

  - Validate threadid (native)

TODO:
  - Make 'native dispatch thread' optional
  - Store 'native dispatch thread' in window class
Bug 907 - Fix regression of 'cleanup' Commit 52c95c19dbd69a7fc6b307d2b2db357ceb43ddf5
GLDrawableFactory: destroy() -> shutdownImpl() - Add DEBUG output in implementation
GLDrawableFactory.shutdown0() Add DEBUG line at the end
Bug 907 - Refine DummyDispatchThread (DDT) Handling: Proper OO integration in RegisteredClass; Safe DDT Post/WaitForReady handling and error cases ; ...

Proper OO integration of DDT in RegisteredClass
  - DDT is optional to RegisteredClass[Factory],
    i.e. NEWT without DDT and DummyWindow with DDT.

  - Using native type DummyThreadContext per DDT
    passed as DDT handle to java referenced in RegisteredClass

  - Passing DDT handle to related native methods,
    if not null use DDT - otherwise work on current thread.
    The latter impacts CreateDummyWindow0 and DestroyWindow0.

Safe DDT Post/WaitForReady handling and error cases ; ...
  - Wait until command it complete using a 3s timeout
  - Terminate thread if errors occur and throw an exception

+++

Discussion: DDT Native Implementation

Due to original code, the DDT is implemented in native code.
Usually we should favor running the DDT from a java thread.
However, since it's main purpose is _not_ to interact w/ java
and the native implementation has less footprint (performance and memory)
we shall be OK w/ it for now - as long the implementation IS SAFE.
Bug 907 - Add native Windows test sending WM_GETTEXT to all windows and dumping the result. If working, Bug907 is fixed and hence DDT is working.
GLJPanel.initializeBackend(offthread=true): Enable on Windows, thanks to Bug 907 impl. DummyDispatchThread (DDT)

Bug 907 implemented DDT used to create and destroy offscreen surface's dummy drawable on Windows.
This enables offscreen initialization on Windows running from a short lived arbitrary thread.
Bug 914 - Don't allow 'alwaysontop' in fullscreen mode, always allow switching to other applications via ALT-TAB

As described @ <http://forum.jogamp.org/Regression-of-alwaysOnTopBug-tp4030735p4030738.html>,
we shall not steal the desktop in fullscreen mode via 'alwaysontop'.

Latest tests on X11/GNU/Linux and Windows7 - before this patch:

With default settings, i.e. alwaysontop (atop) disabled,
it works as expected here, i.e.:
  - ALT-TAB triggers WM dialog, switching between apps.
  - ALT-TAB can actually switch to other apps.

However, with enabled atop:
  - ALT-TAB triggers WM dialog, switching between apps.
  - ALT-TAB does _not_ switch to other apps. (*)

I consider this a serious issue, since we shall not steal
the desktop in fullscreen mode.

This patch disables atop in fullscreen mode,
i.e. (*) will switch to other apps again!
Bug 914: Newt OSX: Don't use exclusive fullscreen mode (captured display) in favor of proper WM incl. ALT-TAB app-switching
NEWT Windows: Rearrange wndProc switch-case: All key/mouse events shall be at last
Bug 916 - NEWT Fullscreen Mode on Windows ALT-TAB doesn't allow Application Switching

Remedy for 'some' display drivers, i.e. Intel HD:
  Explicitly push fullscreen window to BOTTOM when inactive (ALT-TAB)
Bug 914: Newt OSX: Reset NSApp's presentationOptions @ windowClose0() / Assume having focus in fullscreen-mode

- Reset NSApp's presentationOptions @ windowClose0()

  Commit 69c334448cfe8af553fd97689137ecf8f996b378 started using the [NSApp setPresentationOptions: opts]
  but missed to reset to defaults @ windowClose0();

- Assume having focus in fullscreen-mode
  NewtMacWindow::windowDidBecomeKey()' is not always called in fullscreen-mode!

Note: OSX Fullscreen from a browser still shows the browser title-bar
until mouse-click. Don't know how to avoid this. Minor issue..
Bug 919 - TestNewtKeyCodesAWT w/ NewtCanvasAWT Fails on Windows Due to Clogged Key-Release Event by AWT Robot

Impact: Only unit test code

- TestNewtKeyCodesAWT:
  Fix Bug 919 - Move mouse bacl/forth while waiting for events ..

- Use common wait for key timeout/polling using constants in NEWTKeyUtil

- InputEventCountAdapter:
  'getQueued()' -> 'copyQueue()' - ensuring queue is copied while instance is locked.
TestNewtKeyEventAutoRepeatAWT: Fix regression of commit 8512777873461ee33d8ed913ee26bafc00a08a02
jogl: update the entry for JaamSim to a better image, update link to homepage

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Bug 747: VectorUtil: Make scale(..) creating new float[] deprecated, adding 'in place' variant w/ passing result float[] ; TODO: Replace all variations with 'in place' version to be more memory efficient.

Make scale(..) creating new float[] deprecated, adding 'in place' variant w/ passing result float[]

TODO: Replace all variations with 'in place' version to be more memory efficient.

See Bug747: Validate memory footprint and usage / General performance