summaryrefslogtreecommitdiffstats
path: root/src/newt/classes
Commit message (Collapse)AuthorAgeFilesLines
* NEWT/OSX: Proper impl. of NEWT's focus management (fixes NEWT/AWT focus ↵Sven Gothel2011-10-162-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | behavior/tests) - Old code was just requesting the focus and made the window upfront and notifying a gained focus to WindowImpl. (hack) - Using proper requestFocus impl. issuing focusAction() and utilizing native focus gained/lost messages. This distinguish between 'makeKey' and 'orderFront'. Also requesting and accepting (view) first responder role, which is a precursor to proper gained/lost focus handling on OSX. - NEWTCanvasAWT: Adding 'steal AWT focus': +++ void requestFocus() { super.requestFocus(); // AWT < steal AWT focus > NEWTChild.requestFocus() } +++ Helps make the focus traversal between NEWT/AWT more reliable. Happend on OSX that AWT (NewtCanvasAWT instance) didn't release the focus after NEWT child gained the same. We are not able to use the 'focusAction()' here (disabled in this code path) due to AWT-EDT blocking and recursive focus changes. The latter is also intendend to request the AWT focus first .. - AWT/NEWT focus test 01 passes on OSX
* NEWT/OSX: Add mouse enter/exit and pointer features (visible, confined, ↵Sven Gothel2011-10-162-28/+50
| | | | warp) - cleanup pos/coord translations
* NEWT/Mouse: Skip 'move' event w/ same position. Add Enter/Exit eventsSven Gothel2011-10-152-4/+47
| | | | | | | | | | 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/Pointer Confined: Dispatch mouse move events before enabled; Only ↵Sven Gothel2011-10-151-3/+12
| | | | | | | | | | | | | | | | | | | request-focus/warp-ptr if enabled Dispatch mouse move events before enabled - Allows user app listener to track to the new centered mouse position before using the confined position. This is important for position change usage. See simplified demo GearsES2 Only request-focus/warp-ptr if enabled - No need to request focus and center mouse if leaving confinement Demo GearsES2: - No need to assume some position changes are erroneous (jumps) due to confinement. - Track unconfined mouse position, allowing confined navigation to have the proper position change value
* Fix NEWT/Pointer Invisible: INVISIBLE_MASK was equal w/ CONFINED_MASK (duh)Sven Gothel2011-10-151-1/+1
|
* NEWT/EDTUtil: Allow get/set poll period, defaults to defaultEDTPollPeriodSven Gothel2011-10-153-5/+32
|
* NEWT/OSX: Fix resize behavior / Cleanup coordinate transormation ↵Sven Gothel2011-10-131-42/+63
| | | | | | | | | | | | (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: Filter Window focusChanged() and visibleChanged() [test if value changed]Sven Gothel2011-10-131-12/+16
|
* GLCanvas / GLWindow: Change 'manual' resize/repaint animation filterSven Gothel2011-10-131-2/+2
| | | | | | We not only shall skip windowing system triggered repaint if another animation thread is running, but also if the current thread is the animator thread. This keeps the animator intervals stable while resizing.
* Newt/OSX: Fix top/child positioning, positionChanged(), rely on native ↵Sven Gothel2011-10-121-18/+9
| | | | | | | | | | | | 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
* OSX Minor Cleanups: ctx delete note (freeze when shared ctx), Better ↵Sven Gothel2011-10-121-6/+14
| | | | MainThread Thread name[s]
* NEWTCanvasAWT: Add AWT GraphicsConfiguration in constructor, allowing ↵Sven Gothel2011-10-121-0/+16
| | | | transparency
* NEWT/OSX: Fix erroneous child Window position and top-parent visibilitySven Gothel2011-10-111-39/+26
| | | | | | | | | | | | | | | | | - 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 Mods: Propagate 'confined' and 'invisible' to modifier mask of ↵Sven Gothel2011-10-115-15/+51
| | | | | | | | | | InputEvent (Mouse) ; Test confined navigation w/ GearsES2 InputEvent adds new MASK values: CONFINED_MASK and INVISIBLE_MASK, set at event creation allowing convenient testing of these mods. GearsES2 demonstrates the confined navigation testing the CONFINED_MASK and if having his mode acting on mouseMoved(..) and reset the mouse position.
* NEWT Pointer Feature: Add Windows impl. ; Fix test (warp action) ; Minor ↵Sven Gothel2011-10-104-8/+57
| | | | cleanup in X11
* NEWT: Add pointer features: visibility, confined and warp (move)Sven Gothel2011-10-106-36/+161
| | | | | | | | | | | | | | | 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)
* GLWindow/GLDrawableHelper: Adding experimental notion of skipping GL context ↵Sven Gothel2011-10-082-5/+30
| | | | | | | | | | | | | release for a specific thread - marked deprecated - used to perf measure situation on omap3, ie figuring out where the low perf. in GearsES2 comes from, our core JOGL code or the GL usage. Turns out it's the GL usage itself, ie the shader - good. - calls are commented out in the demos
* NEWT/Android: Fix setting 'format'Sven Gothel2011-10-071-11/+12
|
* NEWT/Android: respect isUndecorated() and custom window size.Sven Gothel2011-10-061-37/+40
| | | | TODO: custom position and change position ?!
* NEWT/Window/setVisible: Remove setVisible(..) fast path - Always set ↵Sven Gothel2011-10-061-8/+2
| | | | | | | visible=true, even if size==0 We need to earmark visible=true in case the native window could not be created, even if the size is currently 0.
* NEWT/Android: Add TRANSLUCENT feature / Demo: 'GearsES2T'Sven Gothel2011-10-061-3/+6
|
* NEWT/Android: Add BUTTON1 for one-pointer eventsSven Gothel2011-10-061-2/+4
|
* NEWT/Android: Move fullscreen setting to AndroidWindow ; Cleanup AndroidWindowSven Gothel2011-10-062-53/+67
|
* Android/EGL: dump all caps, write-back formatSven Gothel2011-10-011-2/+10
|
* NEWT/Android: 565, 5551 or RGBA_8888 (no RGBX/888) ; surfaceRealized() ASAPSven Gothel2011-10-012-31/+48
|
* AndroidWindow: get required PixelFormat ID by req. CapsSven Gothel2011-09-302-4/+48
|
* Android: Use standard launch mode; Add default actions to NewtBaseActivity; ↵Sven Gothel2011-09-302-51/+26
| | | | Add RedSquare ES1 + ES2
* NEWT/Android: More ANativeWindow coop;Sven Gothel2011-09-301-48/+108
| | | | | | | | | | | | | | | | 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 DisplayImpl: Check for null event in taskSven Gothel2011-09-281-0/+6
|
* NewtBaseActivity: Enable 'slave' mode, ie as a downstream for external ↵Sven Gothel2011-09-281-11/+42
| | | | launched Activity, see NewtLauncherActivity
* NEWT/Android: Send MouseClicked event, MouseEvent enhancement, Demo: real 2 ↵Sven Gothel2011-09-283-16/+114
| | | | | | | | finger zoom MouseEvent: Check array sizes at cstr. Enhance 'toString()', pointer arrays added. GPUUISceneGLListener0A now uses 2 finger distance for zoom
* NEWT/OSX: 'Better' child window positioning, still, after reparenting into ↵Sven Gothel2011-09-272-2/+9
| | | | | | | | | 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/Threading: MainThread / DefaultEDTUtilSven Gothel2011-09-275-224/+94
| | | | | | | | | | | | | | | | | | | | | | | - MainThread: This class no more implements EDTUtil! This class just provides a main-thread utility, forking of a main java class on another thread while being able to continue doing platform specific things on the main-thread. The latter is essential for eg. MacOSX, where we continue to run NSApp.run(). - DefaultEDTUtil: - if Lock.DEBUG validate that no recursive locks are being hold, where it shall not (EDT: startup and return from task execution) - If task execution's result wasn't waited for (checked), at least dump exeception's stack trace if i happened. - MacDisplay: Just use DefaultEDTUtil - MacWindow: - No more need of special locking -> removed nsViewLock, since: - using proper EDT - capability to run from multiple threads (native Java thread attachment)
* NEWT: Adapt to GlueGen's Lock ChangeSet, all java callbacks for native have ↵Sven Gothel2011-09-279-54/+69
| | | | | | | | | | | | | | '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-364/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* CreateWindow set visible; lockSurface: lock AWT if availableSven Gothel2011-09-241-11/+15
|
* OSX: Sync MainThread w/ DefaultEDTUtil and proper deledation AWT EDT, ↵Sven Gothel2011-09-242-77/+176
| | | | MacWindow: create/visible at native creation
* Cleanup DefaultEDTUtil: Generics and DEBUGSven Gothel2011-09-241-32/+22
|
* Use new JNILIbLoaderBase addNativeJarLibs(all, atomic) for JOGL, ↵Sven Gothel2011-09-241-1/+7
| | | | NativeWindow and NEWT; no more LD_LIB_.. in setenv.sh for test scripts
* Use Platform's initSingleton() instead of JVMUtil's (private package) ; Use ↵Sven Gothel2011-09-231-2/+4
| | | | TempJarCache if used.
* Proper usage of loadLibrarySven Gothel2011-09-211-7/+2
|
* NEWT/WindowImpl: Remove wait for position (keep waitForSize for ↵Sven Gothel2011-09-161-21/+6
| | | | | | reparent/fullscreen) Window position is not deterministic enough and slows down processing while sync on it
* NEWT Cleanup: AWT driver fix, WindowImpl createNative .., minor editsSven Gothel2011-09-162-21/+20
| | | | | | | | | AWT driver fix - setVisible at creation, using reconfigureWindow impl (fixed WindowImpl createNative .., - no double visibility check on creation - visible:=true anyway for later creation, if failed or not available yet
* waitForPosSize/createWindow: exclude 0/0, at creation wait for size as wellSven Gothel2011-09-161-37/+9
| | | | | | | - 0/0 may result in -1/-1, which is impl. specific (X11), might get deleted if causes more harm than ham - waiting for size after creation is actually a good thing todo
* NEWT Window: Allow positionChanged(..) notification for child windowsSven Gothel2011-09-161-1/+1
|
* NEWT/Reparent: Make new local position/size persitent if not promoted ↵Sven Gothel2011-09-161-0/+14
| | | | natively (invisible or recreation)
* NEWT/X11: Fix ABOVE handling, notify Java on reparentNotify, cleanup of ↵Sven Gothel2011-09-161-1/+8
| | | | setFullscreenEWMH
* NEWT/Reparenting: Give Composite WM some slack, sleep(100); Minor edits/fixesSven Gothel2011-09-161-5/+11
|
* NewtCanvasAWT: Minor edits, prefer requestFocusInWindow() in ↵Sven Gothel2011-09-161-7/+12
| | | | requestFocusAWTParent()
* JOGLNewtApplet1Run: Add gl_alpha, gl_multisamplebuffer and ↵Sven Gothel2011-09-152-26/+28
| | | | gl_nodefaultkeylistener ; Cleanup