aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt
Commit message (Collapse)AuthorAgeFilesLines
* Bug 741 HiDPI: Add new NativeSurfaceHolder interface to GLDrawable and ↵Sven Gothel2014-06-069-108/+192
| | | | | | | | | | | | | | NativeWindow; [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion - Add new NativeSurfaceHolder interface to GLDrawable and NativeWindow, allowing NativeSurface access (pixel unit conversion) A NativeSurfaceHolder is e.g.: - NativeWindow (is-a) - NEWT [GL]Window - GLDrawable (has-a) - [AWT|SWT]GLCanvas - [AWT|SWT]NewtEventFactory use NativeSurfaceHolder as source, fixes pixel unit conversion
* NEWT AWTAdapter: Simplify event processing / Window.enqueueEvent(..): Add ↵Sven Gothel2014-06-055-56/+58
| | | | | | | | | | API doc Simplify event processing of NEWT's AWTAdapter: - enqueueEvent -> processEvent - add return value (new enum) determinating action Using processEvent(..) now reduces manual invocation of NEWT Window.enqeueEvent(..).
* Bug 741 HiDPI: Fix missing window -> pixel unit conversion in ↵Sven Gothel2014-05-281-1/+4
| | | | AWTNewtEventFactory of commit 8b255eb303bba045b4eb087da1d1cb33b2e89e96
* Bug 741 HiDPI: Add missing window -> pixel unit conversion in ↵Sven Gothel2014-05-271-2/+3
| | | | AWTNewtEventFactory (e.g. for NewtCanvasAWT)
* Bug 741 HiDPI: Fix OSX NEWT Offscreen Size Regression from commit ↵Sven Gothel2014-05-271-9/+9
| | | | | | | | | | 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1 Fix regression of commit 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1: createWindow(..) was issuing sizeChanged(..) to ensure size notification, however - the offscreen case used the dummy size 64x64. Fix issues the notifications in caller w/ true size.
* Bug 741 HiDPI: Fix regression MIN_MONITOR_DEVICE_PROPERTIES: Adding missing ↵Sven Gothel2014-05-279-47/+136
| | | | | | 'Rotated Viewport window-units' / Refine API doc in MonitorModeProps Regression of commit 56d60b36798fa8dae48bf2aa5e2de6f3178ab0d1
* Bug 741 HiDPI: [Core API Change] Bring back get[Width|Height]() in ↵Sven Gothel2014-05-2716-69/+69
| | | | | | | | | | | NativeWindow, i.e. getWindow[Width|Height]() -> get[Width|Height]() We have distinguished pixel- and window units in commit f9a00b91dcd146c72a50237b62270f33bd0da98e and introduced NativeWindow.getWindow[Width|Height]() and NativeSurface.getSurface[Width|Height](). To have a unique naming scheme, we could rename all method using 'Window', but for simplicity and since there will be no 'semantic override' just use the simple version.
* NewtCanvasSWT: Fixe newtChild NPE; Perform getParentLocationOnScreen() on ↵Sven Gothel2014-05-261-21/+79
| | | | valid SWT thread (OSX: on main-thread); unclutter updatePosSizeCheck(..)
* Bug 1013: Fix switching monitor resolution for NEWT Window (content black ↵Sven Gothel2014-05-262-49/+78
| | | | | | | | | | | | after) / Bug 741 HiDPI: Update pixelScale after monitor mode change This seems to be a bug within QUARTZ .. hence this is a workaround Monitor-Mode-Changed Notification: - In case the window is not in fullscreen, render it temporary invisible until the mode change is completed. - Also update the HiDPI pixel-scale when the mode change is completed.
* Bug 1012: Fix erroneous handling of multiple monitor coordinates on OSX with ↵Sven Gothel2014-05-262-20/+53
| | | | | | | | | | | NEWT To properly convert Top-Left (TL) from/to Bottom-Left (BL) coordinates we need to utilize the given CGDisplay viewport (TL) and NSScreen (BL) to perform the y-flip. This is especially true for the case of having multiple monitors covering different viewports (mixed resolution).
* Bug 741 HiDPI: Refine Monitor/Screen [virtual] Viewport Definition / Add ↵Sven Gothel2014-05-2625-262/+593
| | | | | | | | | | | | | | | | | | | | NEWT Support / Fix JAWT getPixelScale deadlock - NativeWindow/Surface/NEWT API DOC: Define Coordinate System of Window and Screen - OSXUtil: Add getPixelScale(..) via Screen index and 'windowOrView' - JAWTWindow/JAWTUtil.getPixelScale(..): Use pre-fetched AWT GraphicsConfiguration to solve AWT-TreeLock (deadlock) - [Virtual] Viewport of MonitorDevice and Screen: - Properly calculate and expose [virtual] viewport in window and pixel units - OSX Monitor viewports in pixel units are 'reconstructed' - Window/Viewport to Monitor selection shall be perfomed via window units (unique) - OSX NEWT Window create/init (native): Use given size and coordinates even in fullscreen mode Don't override by quering NSScreen coordinates, trust given values. - Fix test cases, i.e. usage of pixel- and window-units
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: ↵Sven Gothel2014-05-2312-80/+153
| | | | | | | | | | | | | | | Refine commit fb57c652fee6be133990cd7afbbd2fdfc084afaa - NEWT Screen, Monitor, MonitorMode, .. - All Units are in pixel units, not window units! - On OSX HiDPI, we report the current scaled monitor resolution, instead of the native pixel sized. Need to filter out those, i.e. report only native unscaled resolutions, since out MonitorMode analogy is per MonitorDevice and not per window! - Fix usage (one by one) of - Screen and Monitor viewport usage
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units: ↵Sven Gothel2014-05-2220-209/+320
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refine commit f9a00b91dcd146c72a50237b62270f33bd0da98e - Using comment tag 'FIXME HiDPI' to locate remaining issues - Fix remaining 'getPixel*(..)' -> 'getSurface*(..)' - UpstreamSurfaceHook - Fix usage (one by one) of - NativeWindow: getWindowWidth() / getWindowHeight() - NativeSurface/GLDrawable: getSurfaceWidth() / getSurfaceHeight() - mention window- or pixel units in API doc where required - use 'setSurfaceSize(..)' where appropriate to match 'getSurface*()' - GLFBODrawable - GLOffscreenAutoDrawable - UpstreamSurfaceHook.MutableSize - NativeWindow's Point: Add API doc and 'Point scaleInv(..)' - NativeSurface Simplify new conversion methods and use single in-place storage - 'int[] getWindowUnitXY(int[], int[])' -> 'int[] convertToWindowUnits(int[], int[])' - 'int[] getPixelUnitXY(int[], int[])' -> 'int[] convertToPixelUnits(int[], int[])' - NEWT Screen/Monitor - Assume screen/window units - TODO: Refine semantics - Monitor resolution probably is in pixel units ?! - Including the Rectangle/Monitor association etc etc - NEWT Window - Add setSurfaceSize(..) for convenience - Add 'Point convertToWindowUnits(final Point pixelUnitsAndResult)', etc .. - All window ops are using window units (size, pos, ..), but methods operating on the surface/drawable: windowRepaint(..) .. - TODO: Consider changing method names 'window*(..)' to 'surface*(..)' actually operating on surface/drawable - Window.windowRepaint(..) - GLAutoDrawableDelegate.windowResizedOp(..) (maybe all similar methods in here) - NEWT Mouse/Pointer Events - Using pixel units
* Bug 742 HiDPI: [Core API Change] Distinguish window-units and pixel-units; ↵Sven Gothel2014-05-2122-134/+239
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HiDPI for AWT GLCanvas w/ OSX CALayer Core API Change: To support HiDPI thoroughly in JOGL (NativeWindow, JOGL, NEWT) we need to separate window- and pixel units. NativeWindow and NativeSurface now have distinguished access methods for window units and pixel units. NativeWindow: Using window units - getWindowWidth() * NEW Method * - getWindowHeight() * NEW Method * - getX(), getY(), ... NativeSurface: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED * - getHeight() -> getSurfaceHeight() * RENAMED * GLDrawable: Using pixel units - getWidth() -> getSurfaceWidth() * RENAMED, aligned w/ NativeSurface * - getHeight() -> getSurfaceHeight() * RENAMED, aligned w/ NativeSurface * Above changes also removes API collision w/ other windowing TK, e.g. AWT's getWidth()/getHeight() in GLCanvas and the same method names in GLDrawable before this change. +++ Now preliminary 'working': - AWT GLCanvas - AWT GLJPanel Tested manually on OSX w/ and w/o HiDPI Retina: java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2AWT -manual -noanim -time 1000000 java com.jogamp.opengl.test.junit.jogl.demos.es2.awt.TestGearsES2GLJPanelAWT -manual -noanim -time 1000000 +++ TODO: - NEWT - Change Window.setSize(..) to use pixel units ? - OSX HiDPI support - Testing .. - API refinement
* Minor edits: Fix comments / API-docsSven Gothel2014-05-191-1/+1
|
* NEWT MouseEvent: Decouple pointerIds from single-pointer button, i.e. always ↵Sven Gothel2014-04-093-114/+100
| | | | | | | | | | | | | | use proper pointerId >= 0 In case of single-pointer mouse events, always use pointerId 0, don't derive from button name. Multiple pointer events still derive button name from the 'action' pointerId. This allows applications to utilize pointerId equally for single and multiple pointer events. Passed all 'junit.run.newt.event' unit tests
* PinchToZoomGesture: Add 'delta' value [-1..1], move 'InputEvent trigger' up ↵Sven Gothel2014-04-092-12/+44
| | | | to GestureHandler
* NEWT Events: Use final .. (minor edit)Sven Gothel2014-04-059-48/+52
|
* NEWT: Minor editsSven Gothel2014-03-162-18/+18
|
* NEWT MonitorDevice: Add convenient getPixelsPerMM(..) method to retrieve the ↵Sven Gothel2014-03-011-1/+27
| | | | pixels-per-millimeter (Requires manual Conversion to dpi)
* Fix whitespaces of commit 78fcb8228d4a391054501aef16eb0462322ba39d and ↵Sven Gothel2014-02-252-7/+7
| | | | WindowImpl comment
* Merge remote-tracking branch 'petros-koutsolampros/master'Sven Gothel2014-02-252-12/+25
|\
| * A more wholesome solution to the windowing problems in OSX. As describedPetros Koutsolampros2014-02-252-12/+25
| | | | | | in bug https://jogamp.org/bugzilla/show_bug.cgi?id=969
* | Bug 937 : Fix regression of commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 ↵Sven Gothel2014-02-251-2/+2
|/ | | | | | | | | | (which disables print if !isShowing()) Commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651 uses 'isShowing' state to determine whether to display or not. It also uses 'isShowing' instead of 'isVisible' for printing, which is a regression, since not showing elements offscreen shall be able to be printed.
* SurfaceUpdatedListener: Order methods in impl. Class; ↵Sven Gothel2014-02-132-43/+40
| | | | SurfaceUpdatedListener: Mark methods final, use volatile 'isEmpty' to bail out early @ surfaceUpdated.
* Bug 972 - Reduce ClassLoader Lookup, i.e. Class.forName(..): GLProfile, ↵Sven Gothel2014-02-121-2/+1
| | | | | | | | | | | | GLContextImpl, DisplayImpl GLProfile, GLContextImpl: - ReflectionUtil.DEBUG_STATS_FORNAME: Dump forName stats if set - Cache GL*Impl and GL*ProcAddressTable Constructor<?> for GLContextImpl's createInstance(..) - Remove off-thread early classloading thread which only adds complications DisplayImpl: - Remove one redundant availability test
* Bug 970: NEWT OSX ChildWindow setVisible(..) does not hide child window ↵Sven Gothel2014-02-101-8/+12
| | | | | | | appropriately Instead of using [mWin orderBack: mWin] for child windows, utilize [mWin orderWindow: NSWindowOut relativeTo: [pWin windowNumber]]
* JOGLNewtApplet3Run: Don't set position if normal child window.v2.1.4Sven Gothel2014-01-311-1/+0
|
* NEWT WindowImpl: Don't waitForPosition(..) if child window - issues w/ ↵Sven Gothel2014-01-311-8/+13
| | | | | | | | | | | | | | | | different toolkits! With Applet3 plugin (firefox - using GTK), our child window seems to receives the absolute position, or 'arbitrary' values (?). Will need to figure out how to properly determine these cases. In the meantime, simply turn off waitForPosition(..) for child windows, which shall not harm NEWT. Impacts following actions as child window: - createNativeWindow - reparent - fullscreen
* Adapt to new plugin3 / Use browser window's location on screen for top-level ↵Sven Gothel2014-01-312-24/+56
| | | | window.
* NewtFactory: Cleanup / createWindow(..) w/ parentWindow variant shall fall ↵Sven Gothel2014-01-311-11/+6
| | | | back to top-level ctor if parentWindow is null
* NEWT: Add Support for AWT-Less Applet3Sven Gothel2014-01-304-8/+563
| | | | | | - Adding 'plugin3-public' jar and sources for Applet3 support, copied from icedtea-web3 - Added com.jogamp.newt.util.applet.JOGLNewtApplet3Run capable to run Applet3
* NewtFactory: Fix createWindow(..) ctor w/ given native window handle (use ↵Sven Gothel2014-01-301-8/+10
| | | | displayConnection string and screen-idx)
* NEWT Window: Add API Doc for Custom Window IconsSven Gothel2014-01-302-0/+16
|
* Script: Correct joal.jar path; Remove redundant NewtDebugActivity (Debug is ↵Sven Gothel2014-01-265-182/+87
| | | | on for NewtVersionActivity)
* EGLDisplayUtil.eglCreateEGLGraphicsDevice(..): Don't open() device implicit; ↵Sven Gothel2014-01-235-113/+118
| | | | EGLDrawableFactory.mapAvailableEGLESConfig(..): Clarify
* NEWT X11 DisplayDriver.dispatchMessagesNative(): Avoid aDevice NPE while ↵Sven Gothel2014-01-231-5/+4
| | | | being pulled
* JOGLNewtAppletBase: Typo of new PNG icons .. used AE's 'gray' instead of ↵Sven Gothel2014-01-121-1/+1
| | | | | | BE's 'grey', which is used for the filename Same as 42d3b31d1becd8eb8e2847c87e14e47e15e730cd
* DefaultEDTUtil: At EDT finish, notify all task-waiter to avoid deadlock at ↵Sven Gothel2014-01-121-9/+40
| | | | error / Add test method 'invokeAndWaitError(..)'
* AWTParentWindowAdapter/AWTRobotUtil: Use 'isShowing()' instead of ↵Sven Gothel2014-01-121-10/+10
| | | | | | 'isVisible()' determining actual on-screen showing state See commit 071bdd6ce9f8c41ccecdbf8bc74f276ccd7ff651
* Bug 937 - JAWTWindow: Unsatisfying Visibility ComputationSven Gothel2014-01-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Simplify JAWTComponentListener's HierarchyListener: - Don't interfere w/ Component's visibility anymore! This shall reduce sideeffects. Utilize 'isShowing' in each Component specialization, i.e. GLCanvas. - On SHOWING_CHANGED if a parent caused a change of the tracked components showing state, propagate it to the offscreen-layer! - Remove all other complicated states! GLCanvas, GLJPanel: - Instead of 'isVisible()' use 'showing state', since only the 'showing state' reflects 'true' visibility throughout the hierarchy. - Add HierarchyListener and track volatile showing state to be used instead of 'isVisible'. Using a cached showing state is more efficient than quering 'isShowing()' all the time! NewtCanvasAWT: - Use 'isShowing()' instead of 'isVisible(), see above
* Misc Cleanup: JAWTWindow: Reusing visible in HIERARCHY listener; Remove ↵Sven Gothel2014-01-111-7/+0
| | | | obsolete 'getPrivateGraphicsConfiguration()'
* [Jogl|Nativewindow|Newt]Common: Align all ↵Sven Gothel2014-01-115-177/+120
| | | | | | | | | | | *Common_GetJNIEnv()/_ReleaseJNIEnv() Methods and Usage / Check arguments .. Since we still don't use inter-module native code sharing, align the JNIEnv get/release methods and usage. Most beneficary here is OSX and the GLDebugMessageHandle, both managed the JVM handle on their own - removed now. Also ensuring that *Common_init(..) is called for all modules on all platforms.
* X11: Harden usage of 'XGetWindowProperty(..)' and 'XGetVisualInfo' - Add ↵Sven Gothel2014-01-111-28/+38
| | | | missing XFree(..) calls and argument checks.
* BCM_VC_IV: Add 2 references (_poor_ API docs, very)Sven Gothel2014-01-092-0/+8
|
* NEWT Rasp.Pi: Add Support for multiple Windows, dynamic set size and positionSven Gothel2014-01-092-88/+72
| | | | | | | | Impl. manages up-to 32 windows (BCM layer elements) - dunno whether this is a proper value. Note: Layer 2000 is reserved for out PointerIcon. Removed 'dead code'.
* NEWT bcm_vc_iv.c: Disable VERBOSE_ONSven Gothel2014-01-091-2/+2
|
* Bug 676 - Add support for native Mouse Pointer rendering (Rasp.-Pi.) - ↵Sven Gothel2014-01-092-22/+5
| | | | | | Intercept sendMouseEvent(..) Intercepting 'sendMouseEvent(..)' to reduce the lag (time) and listener footprint.
* Bug 676 - Add support for native Mouse Pointer rendering (Rasp.-Pi.)Sven Gothel2014-01-096-56/+617
| | | | | | | | | | | | | | - Utilizing layer element 2000 for PointerIcon - Using NEWT PointerIcon code - Using MouseListener to update PointerIcon position - FIXME: Check whether we shall intercept sendMouseEvent directly (lag) Misc: - Properly open, assign and close the BCM display handle - Properly destroy the window (BCM element) - Prepare for multiple windows, set position and size
* NEWT DisplayImpl/PointerIcon: Don't use blocking isNativeValid() before and ↵Sven Gothel2014-01-092-11/+8
| | | | after EDT entry (deadlock)