aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
Commit message (Collapse)AuthorAgeFilesLines
* NEWT/ScreenMode: Make getCurrenctScreenMode..() more fail proof in case the ↵Sven Gothel2011-10-232-15/+31
| | | | (native) impl. doesn't work.
* Newt/OSX: Disable VERBOSESven Gothel2011-10-221-1/+1
|
* NEWT/Native RequestFocus: Even if owning focus, run the focusAction() call ↵Sven Gothel2011-10-223-34/+35
| | | | incl. native focus request (X11, Windows, OSX)
* NewtCanvasAWT: Cleanup / Remove FIXME tag (impl. is ok)Sven Gothel2011-10-221-6/+2
|
* NEWT/MacOSX: Fix resignKeyWindow super call. Summarize ↵Sven Gothel2011-10-222-44/+15
| | | | sendFocusLost/sendFocusGained -> focusChanged
* NEWT/ScreenMode: If unimplemented have at least current mode in list. ↵Sven Gothel2011-10-222-74/+86
| | | | Current mode uses ScreenSize w/ dummy values if unimplemented.
* Remove warningsSven Gothel2011-10-201-1/+5
|
* NEWT/OSX: Attempt to stabilize native parenting (ie w/ AWT) ; Add ↵Sven Gothel2011-10-204-100/+174
| | | | | | | | | | | | | | | | | windowRepaint() callback - act on positionChanged(..) only for realized windows, otherwise we could end in an AWT deadlock (AWT parent window). - add view parenting calls (addSubView/removeFromSuperview) - attachToParent after view configuration - allow concurrently view draw - add windowRepaint() callback (native -> java) - add more debug tracing
* Only revert ScreenMode (destroy/shutdown) if owner (Screen) changed itSven Gothel2011-10-193-11/+36
|
* NEWT/OSX: Adding 'fake' lockSurface based on [view canDraw]. Can't use ↵Sven Gothel2011-10-162-6/+53
| | | | lockFocus(), deadlocks since we render separate to focus mgmt.
* NEWT/OSX: Send events direct w/o EDT queue (like X11 and Win32)Sven Gothel2011-10-161-10/+28
|
* NEWT/OSX: Proper impl. of NEWT's focus management (fixes NEWT/AWT focus ↵Sven Gothel2011-10-165-34/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: exec. makeKeyAndOrderFront/makeKeyWindow on MainThreadSven Gothel2011-10-161-5/+6
|
* NEWT/OSX: Add mouse enter/exit and pointer features (visible, confined, ↵Sven Gothel2011-10-165-98/+299
| | | | warp) - cleanup pos/coord translations
* NEWT/Mouse: Skip 'move' event w/ same position. Add Enter/Exit eventsSven Gothel2011-10-154-7/+107
| | | | | | | | | | 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-132-51/+80
| | | | | | | | | | | | (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 MacWindow: Use screen of windowSven Gothel2011-10-121-1/+1
|
* Newt/OSX: Fix top/child positioning, positionChanged(), rely on native ↵Sven Gothel2011-10-124-50/+120
| | | | | | | | | | | | 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]
* NEWT OSX: Disable native VERBOSITYSven Gothel2011-10-121-1/+1
|
* NEWTCanvasAWT: Add AWT GraphicsConfiguration in constructor, allowing ↵Sven Gothel2011-10-121-0/+16
| | | | transparency
* 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-112-73/+90
| | | | | | | | | | | | | | | | | - 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-106-14/+136
| | | | cleanup in X11
* NEWT: Add pointer features: visibility, confined and warp (move)Sven Gothel2011-10-107-36/+237
| | | | | | | | | | | | | | | 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-013-37/+68
|
* 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-302-48/+129
| | | | | | | | | | | | | | | | 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-273-8/+15
| | | | | | | | | 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-2715-132/+193
| | | | | | | | | | | | | | '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-2512-513/+609
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)