aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native
Commit message (Collapse)AuthorAgeFilesLines
...
* NEWT/OSX: Add mouse enter/exit and pointer features (visible, confined, ↵Sven Gothel2011-10-163-70/+249
| | | | warp) - cleanup pos/coord translations
* NEWT/Mouse: Skip 'move' event w/ same position. Add Enter/Exit eventsSven Gothel2011-10-152-3/+60
| | | | | | | | | | Skip 'mouse move' event w/ same position - On Windows, the OS sends us multiple event w/o change in position, suppress them Add Enter/Exit events incl. synthesize 'enter' event for windows/osx - X11: using native Enter/Leave events - Windows: using native Leave event (tracking) and synthesized enter event - OSX: TODO (required for the confined feature, etc)
* NEWT/OSX: Fix resize behavior / Cleanup coordinate transormation ↵Sven Gothel2011-10-131-9/+17
| | | | | | | | | | | | (client-space/top-level, child/parent) At resizing a perent window w/ a NEWT OSX child, the window position needs to be updated since it's absolute. Re-adding sending *Changed notifications via the appropriate WindowImpl methods. Turns out they are missing in some parent/child situations (fullscreen for example). Native getLocationOnScreen0(..) queries totalHeight by it's own to have correct values.
* NEWT/OSX MacWindow: Use screen of windowSven Gothel2011-10-121-1/+1
|
* Newt/OSX: Fix top/child positioning, positionChanged(), rely on native ↵Sven Gothel2011-10-123-32/+111
| | | | | | | | | | | | pos/size notifications Newt/MacWindow - remove redundant manual window-move/set-size code - Use local getLocationOnScreen(..), fixes positionChanged(..) - setFrameTopLeftPoint(..) use totalHeight (w/ insets) - create: don't 'retain' the window reference (ref counter) - close: release view, - cache insets - to be used @ create
* NEWT OSX: Disable native VERBOSITYSven Gothel2011-10-121-1/+1
|
* Fix Nativewindow GetLocationOnScreen OSX impl. - Transform OSX origin ↵Sven Gothel2011-10-121-1/+1
| | | | bottom-left to our top-left origin.
* NEWT/OSX: Fix erroneous child Window position and top-parent visibilitySven Gothel2011-10-111-34/+64
| | | | | | | | | | | | | | | | | - Regardless whether the window is a top-level or child window, we set it's position w/ absolut left-bottom coordinated. To do so even for an AWT parent component, we retrieve the screen position by traversing through the AWT tree and adding up each parent's rel. position, since the native view only reflects the AWT frame. Note: OSX does not use native views for each AWT component. - In case we reparent child -> top, we cannot orderOut() the ex parent, but need to just call orderBack(..), otherwise the whole ex-parent frame gets hidden. - In case we close a child window (and reparent child -> top), we need to remove the parent/child relation and orderOut(..) before close(..), otherwise the window artifact is left behind.
* NEWT Pointer Feature: Add Windows impl. ; Fix test (warp action) ; Minor ↵Sven Gothel2011-10-102-6/+79
| | | | cleanup in X11
* NEWT: Add pointer features: visibility, confined and warp (move)Sven Gothel2011-10-101-0/+76
| | | | | | | | | | | | | | | visibility: - set pointer visible or invisible confined: - confine pointer to window, or not warp: - set mouse position within the window Implemented for X11, tested manually with TestGearsES2NEWT (see code for action keys). TODO: Windows, MaxOSX and Android (limited)
* NEWT/Android: 565, 5551 or RGBA_8888 (no RGBX/888) ; surfaceRealized() ASAPSven Gothel2011-10-011-6/+20
|
* NEWT/Android: More ANativeWindow coop;Sven Gothel2011-09-301-0/+21
| | | | | | | | | | | | | | | | Note: surface's format _is_ the nativeVisualID of EGL. More ANativeWindow (ANW) coop: - add acquire/release for ANW - validate ANW format - Add fixCaps: 'format -> GLCaps' validation Test: - Constructor: Start w/ surface format RGB_565 (default) - createNative: Filter EGLConfig w/ surface format - Move surfaceHandle fetching from surfaceCreated -> surfaceChanged, where the format is available. - surfaceChanged: use fixedCaps validation
* NEWT/OSX: 'Better' child window positioning, still, after reparenting into ↵Sven Gothel2011-09-271-6/+6
| | | | | | | | | parent, a white window rectangle remains. .. we also need to understand the absolute screen position better, ie. when required and when not (at window creation currently).
* NEWT: Adapt to GlueGen's Lock ChangeSet, all java callbacks for native have ↵Sven Gothel2011-09-276-78/+124
| | | | | | | | | | | | | | 'defer' 1st argument - Adapt to GlueGen's Lock ChangeSet: e4baba27507ce78e64a150ec6f69fb96f5721a34 - All java callbacks for native have 'defer' 1st argument. This allows enqueuing resulting events to the EDT if required, ie. the native thread may not be 'compatible' (MacOSX). - MacOSX-Native: enqueue key/mouse events and defer:=true for all java callbacks Since we are comming from a 3rd-party thread (AWT/NSApp-MainThread) we shall not abuse it.
* NEWT/JOGL: MacOSX UpdateSven Gothel2011-09-256-149/+354
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Feature related: - Added always-on-top - Added translucency - Child Window Position - AWT parent: manual traverse up the tree and calc position on screen (Problem: the parent view rect is not at the proper position, but covers the whole frame) EDTUtil related: - Works now w/ AWT ot headless (again) - OSX native JNI callbacks gathering JNIEnv properly and attaches/detaches thread. - AWT case: using AWT-Event which properly dispatches our cocoa events - MainThread (headless) case: Fork off thread w/ main class and kick off NSApp run(). This leads to same behavior as w/ AWT case. - Using DefaultEDTUtil - Cleanup MainThread (implements EDTUtil) - Currently not used as EDTUtil (osx), just as launcher - Removed EDTUtil impl code, reuse DefaultEDTUtil - Cleanup AWTEDTUtil (implements EDTUtil) - Currently not used as EDTUtil (osx)
* NEWT/WindowImpl: Remove wait for position (keep waitForSize for ↵Sven Gothel2011-09-162-8/+0
| | | | | | reparent/fullscreen) Window position is not deterministic enough and slows down processing while sync on it
* NEWT/X11: Fix ABOVE handling, notify Java on reparentNotify, cleanup of ↵Sven Gothel2011-09-161-51/+110
| | | | setFullscreenEWMH
* NEWT X11/Windows: Fix AlwaysOnTop (startup and change)Sven Gothel2011-09-152-36/+42
|
* NEWT setAlwaysOnTop(): X11 impl. / fix setFullscreen(false), child-win bugSven Gothel2011-09-141-29/+35
|
* NEWT setAlwaysOnTop(): Allow windows to stay permanent on top; TODO: X11/WindowsSven Gothel2011-09-141-12/+18
|
* NEWT/Window: CreateWindow - Wait for user req. position: Fix about ↵Sven Gothel2011-09-092-2/+6
| | | | window-decoration/insets size
* NEWT: Window default pos ; FullScreenSven Gothel2011-09-092-122/+280
| | | | | | | | | | | | | | | - FullScreen - lock parent window if child - X11: more sophisticated EWMH FS usage - X11: set window 'Above' before FS and at focus - allow window WM default position at window creation - default position { -1, -1 } as hint to native WM to gather a suitable default position - wait until user-pos or WM-pos reached - reconfigureWindow* - allow -1 values for pos/size to mark no-change
* NEWT/ScreenMode: X11 fixes ; Ensure Screen's size is set if screenMode ↵Sven Gothel2011-09-081-6/+3
| | | | | | | | | | | | | | | | | | changed ; Enhanced tests; Catch NV/XRANDR/GL bug X11 fixes - X11Screen properly uses it's display's connection decorated in lock/unlock (for ScreenMode etc) Ensure Screen's size is set if screenMode changed - ScreenImpl's ScreenModeListener updates it's screen size so 'external' changes will be detected. Enhanced tests - Verify more data rel. ScreenMode Catch NV/XRANDR/GL bug - Read TestScreenMode01NEWT/TestScreenMode01bNEWT comments
* NEWT/Window: Cleanup Actions: Reparenting, Fullscreen and DecorationSven Gothel2011-09-072-21/+58
| | | | | | | | | | | | - don't assume size/pos change - hence don't set window's values, but wait for satisfaction - don't send resize events on our own, just rely on the event mechanism - fullscreen: don't wrap action around invisibility from Java, Win7 flashes otherwise. Clients who benefit from it (X11) impl. it natively. - fullscreen exit: validate pos/size in case of a child window, like reparenting. Otherwise the container might gets confused (eg. AWT).
* NEWT/WindowsWindow: call sizeChanged() if invisible as wellSven Gothel2011-09-061-5/+2
| | | | no reason to supress this information, it's sent only once (like X11)
* NEWT/X11Window: Remove unused 'windowReparented()' callback; Remove ↵Sven Gothel2011-09-061-9/+4
| | | | redundant DBG_PRINT on _NET_FRAME_EXTENTS
* _NET_FRAME_EXTENTS: Remove annoying Warning message. 1 Compiler warningSven Gothel2011-09-061-4/+4
|
* NEWT/Window/Insets: Implement proper Inset usage ; Cleanup ↵Sven Gothel2011-09-063-166/+220
| | | | | | | | | | | | | | | | | | | | | | | | | WindowImpl::reconfigureWindowImpl Implement proper Inset usage (window decoration size) - Insets are either polled (updateInsets()) or event driven (insetsChanged()) - Insets are used for size/pos calculations from Java side - Natural size/pos in NEWT is client-area, ie w/o Insets - Adding setTopLevelPosition()/setTopLevelSize() for top-level values, ie including insets WindowImpl::reconfigureWindowImpl - Use flags to pass down the requested action to the native implementation - Impl. all native actions: visible, decoration, reparent, resize, fullscreen - Always use size/pos in client-area space, impl. shall use Insets to tranform them - Remove double-setting of (reparent/fullscreen), which where introduced due to buggy impl. code - Fix return from fullscreen position: Was overwritten with FS position (0/0) - Fix decoration change: Remove visible toggle - not required, and actually disturbing X11Windows/WindowsWindow: Added/Fixed Insets impl. Tests (manual): - TestSharedContextVBOES2NEWT utilizies proper window layout using Insets - TestParenting03bAWT uses window layout for reparenting
* NativeWindow/NEWT: Refine Insets definition for size and position, read and ↵Sven Gothel2011-09-041-1/+1
| | | | write access
* Fix NEWT/Window/Windows: setSize/setPosition/reconfigure: 'nop size' -1x-1 ↵Sven Gothel2011-09-021-3/+0
| | | | | | | -> 0x0 Windows: setPosition was invoking setSize (new size propagation) even w/ nop size, let WM event wmSize invoke setSize.
* NEWT/X11/Fullscreen: Fix Leaving FullScreenSven Gothel2011-09-011-6/+6
| | | | | | | | | | | | | | | NativeCode: "XChangeProperty( dpy, w, _NET_WM_STATE, XA_ATOM, 32, PropModeReplace, [ FULLSCREEN, ABOVE ] .." shall only be issued if entering FS, otherwise [ FULLSCREEN, ABOVE ] will be set on the client side at leaving FS, which is not intended. This caused a size reset to fullscreen size/mode. WindowImpl: Used WindowImpl.this.width and WindowImpl.this.height, where w and h should be used, the FS and pre-FS values.
* NEWT/X11 Bug 502 regressions: WM_DELETE_ATOM, .. etc couldn't be catched, etc.Sven Gothel2011-09-011-70/+54
| | | | | | | | | | Use EDT X11 Display connection (DPY) for whole display/screen/window lifecycle, but the user utilization (OpenGL, ..). Only using the same DPY for creation and event dispatching allows catching WM_DELETE_ATOM 'ClientMessage's. Sync X11Window.c w/ commit 4dbb8731219212e27c9afb769a1c62b32bd230a6 - remove 'test' code .. use orig lines
* NEWT/X11 Display: CloseDisplay in same order as creation (ATI); Adding ↵Sven Gothel2011-08-311-22/+45
| | | | | | | | | | | | | | DisplayRelease0; Using 'EDT' suffix for display arguments CloseDisplay in same order as creation (ATI) - This enhanced the erroneous bug 515 (b54497155815852744adb657816cb4057948dae2) situation with closing the display connections. However, some SIGSEGV still slipped through. Adding DisplayRelease0 - Intended for cleaning up resources. Currently a NOP. Using 'EDT' suffix for display arguments - To mark the semantics of the display connection, which may be for window or EDT now.
* Fix NEWT regression due to fix of bug 502, commit ↵Sven Gothel2011-08-301-6/+14
| | | | | | | | | | | | 9ed513e9a9616f6028084df4c650c8caf31ea49d In case of exessive destroy/create (the NEWT reparenting test cases), some dpyEDT events are slipping through the event dispatcher. This fix uses issues more XSync on both Display connection in case of 'requestFocus' and 'closeWindow'. 'requestFocus' also uses the dpyEDT to issue the XSetInputFocus(..), since it's EDT related.
* Workaround (Fix) for Bug 502: Multithreading issue w/ libX11 1.4.2 and ↵Sven Gothel2011-08-301-17/+25
| | | | | | | | | | | | | | | | | | | | | libxcb 1.7 bug 20708 See https://jogamp.org/bugzilla/show_bug.cgi?id=502 Since the libX11/xcb code doesn't seem to be fixed anytime soon a better usable workaround is required than using a system property to enable 'over locking'. It turns out that the race condition is related to the parallel X11 Display connection usage of GLX/OpenGL and event dispatching. This workaround utilizes 2 X11 Display handles, one for windowing/OpenGL and one for event dispatching. This approach allows us to cont. multithreading use w/o locking the display and works on both implementations, the old bug-free libX11 and the 'new' buggy one. Downside is the little resource overhead of the 2nd X11 Display connection .. well. - Removes the property: 'nativewindow.x11.mt-bug'
* Android Cleanup: Remove EGL header & library (compile time)Sven Gothel2011-08-111-1/+0
|
* NEWT/Android: Add missing native codeSven Gothel2011-08-111-0/+47
|
* deployment resturcturing: combine nativewindow/jogl/newt ; newt: 'driver' ↵Sven Gothel2011-08-056-144/+144
| | | | | | | | | | | | | | | | | | | | | separation ; android cleanup remaining all-in-one jnlp's / jars: jogl-all-awt.jnlp -> jogl.all.jar jogl-all-noawt.jnlp -> jogl.all-noawt.jar jogl-all-mobile.jnlp -> jogl.all-mobile.jar native for all above: jogl-all-natives-linux-amd64.jar jogl.all-android.apk jogl.all-android.jar more may follow for each supported platfrom ++++ - newt: proper 'driver' separation - all drivers reside now in jogamp.newt.driver.* - remove intptr.cfg / use gluegen's
* Renamed jogamp.newt.opengl -> jogamp.newt.egl, properly reflecting EGL ↵Sven Gothel2011-08-032-18/+18
| | | | | | dependency, not OpenGL The native impl packages utilize EGL, not opengl, to query the proper pixelformat.
* X11 Nativewindow/NEWT: X11 Error Handler (JNIEnv query for thread, stack ↵Sven Gothel2011-06-261-23/+38
| | | | | | | | | trace), cleanup - X11 Error Handler: if throwing JVM stack trace or fatal JVM error query proper JNIEnv for running thread and attach thread to JVM if necessary. - NEWT/X11: Proper XEvent polling documentation, cleanup window creation event mask
* Minor editing (compile script, X11Window.c - cleanups)Sven Gothel2011-06-121-3/+3
|
* Utilize GlueGen's platform independent header for stdin.h, gluegen_stdint.h, ↵Sven Gothel2011-06-115-50/+8
| | | | | | | .. (remove local copy) - Use them for gluegen code generation - Use them for native compilation (cc)
* NEWT/X11 WindowClosing: End dispatch loop since Display could be destroyed ↵Sven Gothel2011-04-261-3/+15
| | | | after Java callback
* Misc cleanup, strings etcSven Gothel2011-04-241-2/+2
|
* Newt X11: keyPress/Release must use upper case XP_ values to match VK_ ; Set ↵Sven Gothel2011-03-301-50/+65
| | | | modifier properly.
* Move implementation private files from com.jogamp.<module>.impl. to ↵Sven Gothel2011-02-096-144/+144
| | | | | | | | | | | | | | | jogamp.<module> (2/2) - edit files - com.jogamp.opengl.impl -> jogamp.opengl - com.jogamp.opengl.util.glsl.fixedfunc.impl -> jogamp.opengl.util.glsl.fixedfunc - com.jogamp.nativewindow.impl -> jogamp.nativewindow - com.jogamp.newt.impl -> jogamp.newt This sorts implementation details from the top level, ie skipping the public 'com', allowing a better seperation of public classes and implementation details and also reduces strings. This approach of public/private seperation is also used in the OpenJDK.
* NEWT: Add WindowListener.windowDestroyed() ; Remove WindowImpl.windowDestroyed()Sven Gothel2010-12-235-27/+9
| | | | | | | | | | | | | Add WindowListener.windowDestroyed() To expose a proper window lifecycle, ie destroy-notify and destroyed, this notification is added. This will be used at least in unit tests, where we verify destruction. Remove WindowImpl.windowDestroyed(): This native hook (planned to be called by native destroy notification) is unreliable or not supported for all platforms. NEWT relies on the pre destroy native hooks and handles the final destroy notification itself.
* Windows RegisterClass: Use new RegisteredClassFactory (window class), Misc.Sven Gothel2010-12-121-83/+22
| | | | | | | | | | | | | | | | | This solves the issue when an applet is started/stop and started again, or another applet runs in the same JVM. Also soves the issue for multiple JVMs. RegisteredClassFactory can be instanced to manage one shared window class, currently in use for GDI's dummy window and NEWT. A class base name and a window proc handle must be passed in the factory cstr. Before registering, the class is tested if already exists, eg another applet in the same JVM. If registration fails, the class name will iterate until successful or MAX_INT reached, eg if multiple JVMs are running. Added NativeWindow Common Native Code.
* NEWT/Windows: Use GDI GetDC/ReleaseDCSven Gothel2010-12-091-22/+0
|
* X11 DummyWindow: Pass size and set size in proxySven Gothel2010-12-041-1/+0
|