aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/classes/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* GLContext/NativeSurface Impl's toString(): Add lock.toString()Sven Gothel2012-01-081-1/+2
|
* NEWT/Android: MonitorMode: Don't validate refreshRate (0 on some devices); ↵Sven Gothel2011-12-261-1/+3
| | | | AndroidWindow: Trigger ScreenModeChanged only if Screen is already valid.
* ScreenImpl.ScreenMode: getOrAdd current ScreenMode.Sven Gothel2011-12-241-14/+20
| | | | | On Gnome it happend that the current mode was not 'scanned' by RandR, hence adding it if not existing helps stability.
* NEWT Windows/X11: Remove missed negative coordinate restrictions.Sven Gothel2011-12-243-10/+5
|
* NEWT Screen: Add virtual top-left origin getX()/getY() ; WindowsWindow.c: ↵Sven Gothel2011-12-2411-58/+86
| | | | | | | | | | | | | | | | | | allow negative coordinates - ScreenImpl: - Use Point & Dimension for holding virtual origin and size - updateScreenSize() -> updateVirtualScreenOriginAndSize() - DimensionImmutable getNativeScreenSizeImpl() -> void getVirtualScreenOriginAndSize(Point virtualOrigin, Dimension virtualSize) - WindowImpl setFullscreen(true): Use Screen virtual origin - WindowsWindow.c - For x/y coords use GET_X_LPARAM/GET_Y_LPARAM which casts '(int)(short)' to preserve negative coordinates. - NewtWindow_setVisiblePosSize() allow negative coordinates
* Fix regression of commit: 3f5df93484a2ea97c6e51a717f05d9ddcec64d84 (compile ↵Sven Gothel2011-12-231-2/+2
| | | | error, private field access)
* NEWT/OSX MacWindow.close(): More conservative closing approach.Sven Gothel2011-12-231-3/+6
| | | | | | | | | | | Closing: - Java: Set handle to null - Native: - Don't release the NSView explicit, but rely on NSWindow's release - Don't use NSWindow close() but simply call release() instead. The latter doesn't produce a crash SIGSEGV on exit in some cases. OSX 10.7.2, NV GPU
* Screen: width/height reflects virtual Screen size (-> big-desktop)Sven Gothel2011-12-2311-50/+110
| | | | | | | | | | Add updateScreenSize() utilizing new getNativeScreenSizeImpl() to set/update the virtual Screen size. This replaces setScreenSize() where the ScreenMode dimension was being used which doesn't reflect the virtual size. ScreenMode Test Impact: We cannot assertEquals(sm.getRotatedWidth(), screen.getWidth()), since ScreenMode size != virtual size.
* NEWT Multi-Monitor 1/2: Allow negative window position; Validate Screen-Index;Sven Gothel2011-12-2314-24/+63
| | | | | | | | | | | | | | | | - Allow negative window position, using flag 'autoPosition' to mark a custom user position. This impacts Windows and X11 window creation code, which supports native auto positioning. - Screen: Validate Screen-Index. In 'big-desktop' mode the Screen index is always 0. This is true for X11 with Xinerama enabled and MS-Windows in general. Platforms w/o multiple Screen support always use index 0. - X11: Separate X11 Display/Screen/Window native code in their respective C files - Windows test scripts: use '%*' to catch all arguments - Add missing (c)
* NEWT OSX: Add native ScreenMode impl. - TODO: Programmatically set the ↵Sven Gothel2011-12-202-4/+60
| | | | | | | rotation! (How to ?) Get/Set ScreenMode impl on OSX. Set is limited to resolution and size, since I don't know how to change the rotation.
* NEWT initScreenModeStatus(): Issue setScreenSize() to update screen size ↵Sven Gothel2011-12-201-0/+11
| | | | | | | | based on native RANDR (more correct) Clarify Screen's getWidth(), getHeight() values (-> rotated) Also add DEBUG output for collected native modes and nativeIdx mapping.
* Fix bug 531. Thx to Sebastien (finding) and Julien (fixing) it.Sven Gothel2011-12-181-3/+3
| | | | | | | https://jogamp.org/bugzilla/show_bug.cgi?id=531 Sorry .. we normally don't add credits in these git logs, maybe we should change that to encourage contributors!?
* CgDynamicLibraryBundleInfo: Add TempJarCache usage for atomic native jar (of ↵Sven Gothel2011-12-181-0/+2
| | | | | | | atomic java JAR) - GLProfile, NWJNILibLoader, NEWTJNILibLoader: Issue Platform.initSingleton() upfront within priviledge block.
* New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and ↵Sven Gothel2011-12-171-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | NewtCanvasAWT/GLCanvas (delegation) ; Fix GLCanvas OffscreenLayerSurface usage. JAWTWindow.destroy(): - No more getGraphicsConfiguration().getScreen().getDevice().close() call, since the configuration (hence the device) is passed @ creation and owned by the caller. New Interface 'OffscreenLayerOption', impl. by JAWTWindow (impl) and NewtCanvasAWT/GLCanvas (delegation) - Abstract offscreenLayer option to be delegated by using classes - Allow offscreen testing of GLCanvas as well (like NewtCanvasAWT) Fix GLCanvas OffscreenLayerSurface usage - common 'createDrawableAndContext()' for context and drawable instance creation - addNotify() calls createDrawableAndContext() after super.addNotify() to be able to lock the surface (JAWTWindow) and hence to determine offscreen usage. - reshape(...) issues recreation 'dispose(true)' in case of using an offscreen layer - dispose() explicitly destroys the JAWTWindow NewtCanvasAWT: - explicitly close the device of the JAWTWindow (as GLCanvas does) Tests: com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer01GLCanvasAWT com.jogamp.opengl.test.junit.newt.parenting.TestParentingOffscreenLayer02NewtCanvasAWT
* Fix concurrency bug of GLProfile initialization ; Fix SharedResourceRunner ↵Sven Gothel2011-12-111-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'dead' thread (Applets) GLDrawableFactory: - clarify: public getWasSharedContextCreated(..) -> protected createSharedResource(..) - add: getSharesResourceThread() GLProfile: - proper locking of initSingletion(..) path: - Use RecursiveThreadGroupLock and add/remove GLDrawableFactory's sharesResourceThread while creating it's the sharedResource. This simplifies and fixes GLProfile's locking code. - Fix and simplify initSingleton(boolean) API doc - mark it deprecated. - Add initSingleton() for controlled initialization only, pairing w/ shutdown(..) Remove initSingleton(boolean) calls in code and test! +++ Fix SharedResourceRunner 'dead' thread (Applets) In Applets, stopping an Applet makes the browser Java plugin interrupting and killing all related threads, including our SharedResourceRunner thread. - Validate whether the shared resource thread is alive - Catch interruption in shared resource thread and assume it's a kill signal - releaseSharedResource: clear devicesTried set
* NEWT EVENT_MOUSE_WHEEL_MOVED: Fix Bug 413 - Generate proper mouse wheel events.Sven Gothel2011-12-022-3/+52
| | | | | | | | | | > 0: UP < 0: DOWN See MouseEvent.getWheelRotation() for details. OSX/Windows: Default to wheel 'button' 1 OSX: Properly report '<0' X11: Synthesize wheel events by mapping buttons 4/5 and 6/7 to wheel 1 and 2.
* Fix Bug 522: NEWT requestFocus() causes a crash if !isNativeValid()Sven Gothel2011-12-011-1/+1
|
* Adapt to GlueGen commit 7e6cf46ed2e0e9772f79e06437596056efa8c682: ↵Sven Gothel2011-12-011-1/+1
| | | | JNILibLoaderBase addNativeJarLibs(..)
* Move manual GDI utils to GDIUtil ; Minor cleanup.Sven Gothel2011-12-012-6/+2
| | | | | | RegisteredClassFactory: Reference the factories itself instead of the RegisteredClass. This enables the shutdown hook to clear the factories state, which is required for proper recreation.
* NEWT ScreenMode: Use unified ScreenMode in impl; X11Screen: Be verbose if TO ↵Sven Gothel2011-11-282-7/+7
| | | | reached, ie not successfully changed mode.
* NEWT MacWindow: Fix positionChange() Usage ; Fix getLocationOnScreenImpl()Sven Gothel2011-11-271-32/+27
| | | | | | | | | - Native invocation of positionChange(x,y) uses screen coordinates of client area. Manual invocation shall respect the semantics - hence calling super.positionChanged w/ client coords. - getLocationOnScreenImpl() shall return the screen coordinates of the client area - Use getTopLevelLocationOnScreen(), ie substract Insets of getLocationOnScreenImpl()
* MacWindow: Impl. DriverUpdatePosition; Alias position2TopLevel -> ↵Sven Gothel2011-11-272-70/+78
| | | | | | | | getLocationOnScreenImpl Since the MacWindow position needs to be changed in concert with the parent, we need to be triggered to update ours. AWTParentWindowAdapter issues 'updatePosition()' if DriverUpdatePosition is implemented.
* NEWT: Add DriverUpdatePosition interface; Clarify NativeWindow API doc ↵Sven Gothel2011-11-272-1/+10
| | | | | | | (position) DriverUpdatePosition: Interface tagging driver requirement of absolute positioning, ie. depend on parent position.
* NEWT OSX: Add stopNSApplication(), revert commit ↵Sven Gothel2011-11-271-0/+4
| | | | c26d6005e1fe74e9aee01d9d72942f566884fcd2
* Revert some changes: X11Screen/RANDR, X11Util (XInitThreads/XLockDisplay), ↵Sven Gothel2011-11-262-6/+18
| | | | | | | | | | | | | | | NEWT XDisplay Locking Revert X11Screen RANDR commit 8cecd0c2963d982aa119cbb07698e56b9c271188, ie. use default 'render' display connection, best results on Ubuntu, Solaris, CentOS (no failures). Revert X11Util (XInitThreads/XLockDisplay) rational logic, commit 0314be79a7a93931a74fe4322bc78e699d7741e9, X11Util.HAS_XLOCKDISPLAY_BUG:=true and X11Util.XINITTHREADS_ALWAYS_ENABLED:=true. Which enables always utilizing XInitThreads() either before or after AWT initialization, as well as disable all XLockDisplay/XUnlockDisplay locks. Rever NEWT XDisplay X11 basic Locking commit 50100b85ce5fde48788efbc2211b26fb9d7c9dfd, ie use null locking if X11Util.HAS_XLOCKDISPLAY_BUG and X11Util.XINITTHREADS_ALWAYS_ENABLED.
* X11Screen RANDR: Use temp display connection due to arbirary failures sometimesSven Gothel2011-11-261-6/+5
|
* X11Util: Remove wrapped/locked X11Lib methodsSven Gothel2011-11-261-2/+2
| | | | | We shall lock a level above due to differentiation of XLockDisplay/RecursiveLock using X11/AWT ToolkitLock.
* NEWT X11Screen: Update X11 RANDR / GL locking test code (still commented out)Sven Gothel2011-11-261-8/+13
|
* NEWT X11Display: Use default X11 locking for X11GraphicsDeviceSven Gothel2011-11-261-5/+15
| | | | | | | | Due to Display's reusage and hence concurrent involvement in off-thread animation, the X11 default lock is required. In case you require 2 GLWindow's w/o interference to each other (ie. locking), you need to use separate Display instances.
* Complete commit bafd9b99816f55c105230a59211caf13f0315910 (NEWT):Sven Gothel2011-11-252-8/+15
| | | | | | - WindowImpl exposes private non-delegated GraphicsConfiguration, - which is being used by GLWindow's wrapped NativeWindow instantiation (eg: AWT driver) - Fix NewtFactoryAWT.getNativeWindow() use AWTGraphicsConfiguration.create(..)
* Forgot to add JogAmp (c)Sven Gothel2011-11-254-0/+4
|
* NativeWindow X11GraphicsDevice: Pass 'owner' for close-display operation @ ↵Sven Gothel2011-11-251-7/+2
| | | | constructor
* Nativewindow AWT Device/Screen: Cleanup construction [default, specific]; ↵Sven Gothel2011-11-252-3/+4
| | | | AWTDevice: Remove subtype
* JOGL/NativeWindow: Push down JOGL's X11AWTGLXGraphicsConfigurationFactory to ↵Sven Gothel2011-11-251-20/+3
| | | | | | | | | | | | | | NativeWindow X11AWTGraphicsConfigurationFactory X11AWTGraphicsConfigurationFactory properly construct a AWTGraphicsConfiguration encapsulated a native X11GraphicsConfiguration, now available for non JOGL modules, ie NEWT. AWTGraphicsConfiguration's create() utilizes the X11AWTGraphicsConfigurationFactory via the generic factory mechanism and hence allows encapsulating a native [X11]GraphicsConfiguration. NewtCanvasAWT creates/destroys the JAWT NativeWindow on addNotify/removeNotify (reparentWindow) again. Hence the JAWTWindow is instantiated completly only, instead of utilizing updateConfiguration(..), which simplifies the mechanism.
* NativeSurface's getGraphicsConfiguration() returns the native (delegated) ↵Sven Gothel2011-11-2311-60/+75
| | | | | | | | | | | AbstractGraphicsConfiguration, if delegation is used. This change restricts the usage of AbstractGraphicsConfiguration's getNativeGraphicsConfiguration() to NativeSurface implementations and hence reduces complexity. NativeSurface implementations are adapted and access to it's AbstractGraphicsConfiguration is controlled via get/set method avoiding flawed usage (read/write), since read access shall return the delegated AbstractGraphicsConfiguration, if used.
* NEWT MacWindow: Revised offscreen FIXME tagsSven Gothel2011-11-201-6/+5
|
* NEWT/AWT Focus traversal enhancement/fix (incl. OS X fixes)Sven Gothel2011-11-193-193/+348
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - MacWindow/OffscreeSurface - Exclude native NEWT window calls in case it's an offscreen surface - MacWindow/DriverClearFocus - Introduce driver detail DriverClearFocus interface - OS X needs to clear the focus, before another TK (eg. AWT) can claim it's (native parent window focus) - MacWindow/KeyCode: - Move OS X keyCode utils to MacKeyUtil - MacKeyUtil now uses OS X virtual key codes first, before matching keyChar -> keyCode - NewtCanvasAWT - Issue all AWT 'requestFocus()' on current thread, Newt-EDT -> AWT-EDT may freeze Window's native peer requestFocus() impl. - FocusAction directly issue action on Newt-EDT, also request AWT focus if not having it (proper AWT traversal) - Add an FocusPropertyChangeListener, detecting focus lost to issue DriverClearFocus's clearFocus() if available. - merge configureNewtChildInputEventHandler() code into configureNewtChild() to simplify call tree. - WindowImplAccess: Use getDelegatedWindow()
* NEWT: Move 'focusAction()' invokation from native code to Java, avoiding ↵Sven Gothel2011-11-191-9/+21
| | | | deadlocks and simplify call-tree
* NEWT Window: Promote/Expose 'Window getDelegatedWindow()' for accessing the ↵Sven Gothel2011-11-191-4/+1
| | | | delegate (ie GLWindow)
* Relocate NewtFactoryAWT: jogamp.newt.awt.event -> jogamp.newt.awtSven Gothel2011-11-191-1/+1
|
* NEWT/AWT Focus Traversal / Deadlock Fix (Windows) ; Harmonized NEWT ↵Sven Gothel2011-11-184-44/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KeyListener handling (Bug 526) NativeWindow: - expose 'hasFocus()' Window: - 'protected enqueueRequestFocus(..)' -> 'public requestFocus(boolean wait)' - New: 'setKeyboardFocusHandler(KeyListener)' allowing focus traversal co-op w/ covered TK (AWT) WindowImpl: - Impl Window changes (see above) - Impl 'consumedTag' see commit 3b38957f36d4f89b85730755a41c00892ac70591 NewtCanvasAWT: - FocusAction only removes the global AWT focus owner. This fixes a deadlock on the Windows platform of AWT's native peer requestFocus impl, since it's no more called at this point. - NEW FocusTraversalKeyListener is set as the newtChild's KeyboardFocusHandler, allowing traversal to the next/previous AWT component. AWTParentWindowAdapter: - focusGained(..) clears AWT focus and propagates focus to Newt child, non blocking w/ 'requestFocus(false)' (see above) KeyEvent: - Document limitations of getKeyChar() (Bug 526) MacWindow: - only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526) WindowsWindow: - regenerate the keyCode for EVENT_KEY_TYPED (Bug 526) X11Windows: - complete keyCode mapping X11 -> Newt - X11KeySym2NewtVKey() - only deliver keyChar on key Typed events, harmonizing platform behavior (Bug 526) Tests: - GearsES2: Make focus visible - TestParentingFocusTraversal01AWT: unit test for keyboard focus traversal w/ NewtCanvasAWT
* OS X Layered View Part8: Generalize OffscreenLayerSurface ; Use local JAWT ↵Sven Gothel2011-11-121-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instance ; Applet's on OS X are working Generalize OffscreenLayerSurface - Using new OffscreenLayerSurface allows using this functionality in a clean manner, ie. no 'dirty' usage of MacOSXJAWTWindow in a JOGL GL class. - 'Promoting' OffscreenLayerSurface functionality to JAWTWindow and it's handling to GLDrawableFactoryImpl::createGLDrawable(). - Move MacOSXCGLDrawableFactory's "MacOSXJAWTWindow getLayeredSurfaceHost(NativeSurface surface)" to NativeWindowFactory "OffscreenLayerSurface getOffscreenLayerSurface(NativeSurface surface, boolean ifEnabled)" Use local JAWT instance - Only w/ a local JAWT instance per JAWTWindow it is possible to switch between offscreen-layer and onscreen. We also have to determing offscreen-layer lazy at surface lock, since only at that time we have knowledge whether it's an Applet or not. +++ ContextUpdater: Use local pthread mutex, add DEBUG output JAWTWindow/NewtCanvasAWT: Adding methods to request offscreen-layer-surface (if supported), besides 'if applet' this may trigger the new functionality. +++ Applet's on OS X are working: - OS X 10.6.4 - Safari: - Hangs for a while at start .. whole screen freezes .. approx. 10s - Sometimes crashes when Applet stops - after all our resources are released! - Keyboard input isn't assigned sometimes. - Otherwise .. works well, incl. offscreen/onscreen parenting - Firefox 8.0: - Hangs for a while at start .. whole screen freezes .. approx. 10s - Sometimes crashes when Applet stops - after all our resources are released! - Keyboard input is never assigned. - Otherwise .. works well, incl. offscreen/onscreen parenting - OS X 10.7 - Safari: - Sometimes crashes when Applet stops - after all our resources are released! - Keyboard input isn't assigned sometimes. - Otherwise .. works well, incl. offscreen/onscreen parenting - Firefox 8.0: - Sometimes crashes when Applet stops - after all our resources are released! - Keyboard input is never assigned. - Otherwise .. works well, incl. offscreen/onscreen parenting
* OS X Layered View: Part7 Allow NEWT onscreen MacWindow to be used incl ↵Sven Gothel2011-11-112-23/+73
| | | | | | reparenting Test: enable NEWT 'onscreen' case
* Revert introduction of NativeSurfaceHolder and NativeWindowHolder interfacesSven Gothel2011-11-111-8/+0
| | | | | | | | | | | | | I was too fast introducing these accessors, since they are currently not needed and hence redundant. Complete - 7bc4c218b47033cb66f4eb5e707a86a0a4e60cff Partial in regards to the holder interfaces only: - d8fa00d35a49f4faf5f04aeb7e2bba4e972965f5 - f51e3dad6c4bd1f6d0001cecf6a0f692400ed602 - 46542168d64b37f544f61802693f15b59b224e4e
* NEWT/WindowImpl: Fix minor regression offscreen recreate @ setSize() (commit ↵Sven Gothel2011-11-101-3/+6
| | | | | | | | | | 51ad6992e068f25d86d2c9e085bd7ec6f49d2432) Even though this is not a bug, but it changes the expected EDT lifecycle and hence would require to change our test cases. Only flip screen's reference count (which may lead to create/destroy of the EDT) in the recreate case, where it's needed.
* NEWT/Screen: minor editing/cleanupSven Gothel2011-11-101-4/+3
|
* NEWT/WindowImpl: Generalize recreation @ setSize() for offscreen surfaceSven Gothel2011-11-101-53/+54
| | | | | In case of offscreen surfaces (pbuffer, ..) we have to go through a whole destroy/setSize/create cycle.
* Fix regression JAWTWindow/AWTGraphicsConfiguration ↵Sven Gothel2011-11-101-1/+10
| | | | | | | | | | | updateGraphicsConfiguration() of commit 46542168d64b37f544f61802693f15b59b224e4e While introducing NewtCanvasAWT's lifetime reference of (JAWTWindow) nativeWindow using updateGraphicsConfiguration() to determine the actual config values at addNotify(), it was overseen that the AWTGraphicsDevice needs to be re-validated. JAWTWindow's validateNative() ensures that the AWTGraphicsDevice reflects the platform native handle where required (X11).
* NativeWindow: SurfaceChangeable::setSize() -> surfaceSizeChanged() to avoid ↵Sven Gothel2011-11-091-0/+4
| | | | | | | | | | | | conflicts with setSize() This fixes the NEWT OffscreenWindow conflict w/ setSize() which represents the action of changing the window's size. SurfaceChangeable's surfaceSizeChanged() merily notifies the actual size. JAWTWindow: Remove setSize() since it propagates the surface size upstream only. MacOSXJAWTWindow is not SurfaceChangeable complete (no surfaceSizeChanged).
* Fix regression: setScreen(..) invalid ref count & flagSven Gothel2011-11-091-25/+6
| | | | | | Undo parts of commits in this regard: - 46542168d64b37f544f61802693f15b59b224e4e: move method back to ReparentAction - f51e3dad6c4bd1f6d0001cecf6a0f692400ed602: remove added ref counter / flag