summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1398: Refine test case: Make classpath and libpath runtime configurable ↵Sven Gothel2020-02-2110-177/+352
| | | | + show JOGL version
* Bug 1398: Fixing native test allowing its execution using JOGL 2.3.2 and ↵Sven Gothel2020-02-2110-11/+575
| | | | | | | | | | | | | | | | | | latest tip using XCode 11 Changes to test - Using own 'NSApplicationMain' entry to avoid the 'missing Info.plist' message! - Configurable CLASSPATH and LIBPATH at compile time. Note that the java.library.path is now hardcoded as well. - Don't close stderr in test, just fflush - Don't close the JVM after launch via 'die(env)', let it run. - Java: Add GLEventListener RedSquareES2 to see something in action @ 30fps - Java: GLCanvase visible bounds
* Bug 1398: Importing Jani's native test, attempting to reproduce the crash ↵Sven Gothel2020-02-213-0/+373
| | | | | | | | | | using XCode 11 and JOGL 2.3.2 as well as current tip This change imports '[email protected]' patch as reported and provided in Bug 1398. I can not execute this patch properly, as received a error message regarding missing Info.plist at start.
* When explicitly generating native header, avoid implicit referenced classes.Sven Gothel2020-02-023-0/+18
| | | | | | | | | | | | | | | | | | | | Thanks to Phil Jordan, who is debating certain build issues of JOGL with me, we figured that certain generated header files ended up in the wrong build folder. E.g. on GNU/Linux, jogamp_nativewindow_windows_GDI.h ended up in build-x86_64/nativewindow/gensrc/native/drm/ This happens due to the new java11 way of generating header files using javac. Per default, all referenced files are being compiled and header files were generated in this case for all of them using the given '-h location' argument. Since nativewindow generates headers for the new drm functionality first (where available), all headers of all included referenced classes ended up in this drm build location. Subsequent javac was skipped 'thanks' to the already existing class files ;-) This patch disables implicit class file creation when explicitly generating headers only using the javac argument '-implicit:none'. This is done for the whole JOGL project (nativewindow, jogl and newt). Other JogAmp modules should not be concerned due to the lack of overspecific platform parts ..
* Bug 1422: Windows test*.bat: Add C:\temp to PATH, allowing picking up custom ↵Sven Gothel2020-01-172-2/+5
| | | | | | | | | | libraries for testing Used for testing Bug 1422 on Windows via qemu-kvm using Mesa 19.3.2 <https://github.com/pal1000/mesa-dist-win/releases>. Here I dropped the native libs to C:\temp and moved the C:\Windows\System32\OpenGL32.dll out of sight by renaming it.
* Bug 1374: NEWT/AWT: Annotation regarding general High-DPI for even non ↵Sven Gothel2020-01-175-3/+28
| | | | | | | | | | | | | | | native DPI toolkit aware platforms (Linux, Windows) NEWT + NewtCanvasAWT: Maybe create "interface ScalableSurface.Upstream { void pixelScaleChangeNotify(final float[] curPixelScale, final float[] minPixelScale, final float[] maxPixelScale); }" to allow downstream to notify upstream ScalableSurface implementations like NEWT's Window to act accordingly. +++ AWT GLCanvas: Add remark where to add the potential pixel scale.
* Bug 1423: NEWT Child Window on OSX: Don't use parent derived location in ↵Sven Gothel2020-01-161-15/+20
| | | | | | fullscreen mode WindowDriver OSX: useParent(..) -> useParentLocation(..) and add !isFullscreen() as a criteria to use the parent derived location.
* NEWT: Enhance FullScreen.run DEBUG output a bit; NEWTDemoListener ignore ↵Sven Gothel2020-01-163-5/+12
| | | | input if not visible.
* Bug 1422: NewtCanvasSWT: Handle case of !OSX && DPIUtil.getScalingFactor() > 1Sven Gothel2020-01-161-7/+17
| | | | | | | | NewtCanvasSWT.SWTNativeWindow's surfaceSize in pixel units shall only return scaled-up windowUnits using SWTAccessor.deviceZoomScaleUp(..) for !OSX and potentially auto scaled-up pixelUnits to passthrough (OSX). See detailed API doc to NewtCanvasSWT.newtScaleUp(..)
* Bug 1422: Use own deviceZoomScaleUp(..) disregarding higher-toolkit's ↵Sven Gothel2020-01-163-17/+167
| | | | | | | | | | | | | | | | | | | compensation like 'DPIUtil.useCairoAutoScale()' We can't use DPIUtil's 'autoScaleUp(..)' method on non-native DPI scaling platforms as it uses a scale-factor of 1f if the higher toolkit compensates, i.e. 'DPIUtil.useCairoAutoScale()'. Since NEWT uses X11 and GDI directly, which are not DPI scale-aware, we have to drop the semnatics of 'DPIUtil.useCairoAutoScale()' and merely use the actual 'deviceZoom'. This was proposed by Marcel Au in the first place. At least I understand these semantics by now. +++ Additionally NewtCanvasSWT.SWTNativeWindow needs to return the 'deviceZoomScaleUp(..)' values for returning its size in window- and pixel-units (surface).
* NEWT.Window: Refine string representation, renamed append(StringBuilder) -> ↵Sven Gothel2020-01-164-89/+162
| | | | | | | toString(..), added toSimpleString(..) This also revised commit f56adf14deadd4ee8f434ea1293e27bcafdf2a90 Window API addition of 'append(StringBuilder)', which has been renamed to 'toString(StringBuilder)' as aligned to out other classes.
* Bug 1422: Emulate DPI Scaling on non-native DPI autoscale platforms (!MacOS)Sven Gothel2020-01-156-13/+75
| | | | | | | | | | | | | | | | | | | | | | | | Bug 1422 shows that it seems to be desired to emulate DPI scaling where the native toolkit does not implmement the same. On GTK, DPIUtil.mapDPIToZoom (int dpi) reads: double zoom = (double) dpi * 100 / 96; int roundedZoom = (int) Math.round (zoom); return roundedZoom; While having dpi calculated as: dpi = 96 * GDK.gdk_monitor_get_scale_factor(monitor); Well, this seems to exist to allow 96 dpi fixed layout to 'look' OK on high-dpi screens. However, you get in trouble if you layout high-dpi aware, i.e. using percentages etc. There is one exception: If DPIUtil.useCairoAutoScale() is true, scalingFactor is 1f and hence the scaling emulation dropped. 'DPIUtil.setUseCairoAutoScale((sx[0]*100) == scaleFactor || OS.isGNOME);'
* Nativewindow Rectangle*: Cleanup up union(..), intersection(..): Return a ↵Sven Gothel2020-01-152-26/+21
| | | | | | new Rectangle instance (mutable) Also return 'this' for setter methods for chaining.
* TestGLCanvasSWTNewtCanvasSWTPosInTabs: Only use 1 Animator to easy example codeSven Gothel2020-01-151-24/+14
| | | | | Otherwise one would want to pause the Animator instance for the hidden GLWindow, otherwise such animator with zero visible drawables will become a CPU hog.
* Bug 1421: NEWT OSX Invisible: Refine 'Fake invisible child window' ↵Sven Gothel2020-01-151-1/+2
| | | | | | | off-viewport position Ensure it stays out of sight by moving it to 2x width/height of viewport. Otherwise one could see the child window moving from lower-right to upper-left ;-)
* Bug 1421: Conclude OSX: Forward SHOW and HIDE events to NewtCanvasSWT ↵Sven Gothel2020-01-151-2/+50
| | | | | | | instances if 'below notification threshold' 'below notification threshold' here is simply being a child SWT Control of like a Composition or SashForm etc where these events won't get propagated.
* Bug 1421: NEWTCanvasSWT: No action on SWT.Activate, use SWT.FocusIn. Also ↵Sven Gothel2020-01-151-83/+119
| | | | | | remove all SWT listener on dispose. Additionally print more details about the newtChild's state in DEBUG mode.
* NEWT.Window: Add 'StringBuilder append(StringBuilder sb)' supporting ↵Sven Gothel2020-01-153-6/+26
| | | | building custom efficient presentations
* Bug 1421: NEWT OSX Invisible: Implement 'Fake invisible child window'Sven Gothel2020-01-153-13/+40
| | | | | | | | | | | | | | | | | | | 'Fake invisible child window' is implemented by simply moving the window out of sight (viewport). - orderOut0 needs to use '[mWin orderWindow: NSWindowBelow relativeTo:..' parentWindow instead of '[mWin orderBack:..', otherwise the whole parent application gets invisible w/ SWT ;-) - NewtNSWindow may also needs to use parent's Screen instance if moved offscreen, as the own Screen is invalid (zero size) in this case. - WindowDriver: Adding special treatment for 'Fake invisible child window' (tagged as such): -- reconfigureWindowImpl: setWindowClientTopLeftPointAndSize0(..) will be called using the viewport's max position -> out of sight. -- screenPositionChanged: ignore the 'new' position -- sizeChanged: ignore the 'new' size This sensitive NEWT change set shall benefit other toolkits being used as parentWindow besides SWT, as this behavior is the same across MacOS.
* Bug 1421: NEWT OSX Invisible: Fix orderOut0 re commit ↵Sven Gothel2020-01-151-2/+3
| | | | | | | | | | d92dc518eb891f2d125a8136efd6ed603d74a6e9 We also cannot use 'mWin orderWindow: NSWindowOut relativeTo:..]' as it also removes the child-NSWindow from its parent like 'orderOut'. Hence only use 'orderBack' to keep the relationship inplace. Fake invisible child window is in progress, i.e. moving it out of the overal viewport (all screens).
* NEWT OSX MacWindow.c: Add parentWindow to DBG_PRINTSven Gothel2020-01-151-16/+25
|
* NEWT OSX/IOS WindowDriver: Minor cleanup of local var usage (prefer reuse); ↵Sven Gothel2020-01-142-19/+19
| | | | reconfig: Only orderOut w/ valid window-handle
* Bug 1421: NEWT OSX Invisible: Refining child window visibility setting, ↵Sven Gothel2020-01-143-9/+31
| | | | | | | | | | | | | | | | | | | commenting on child-window orderOut Actual small change is to have child-NSWindow to use '[myWindow orderWindow: NSWindowAbove relativeTo:..' instead of 'orderFront' in creation and use the simple 'orderFront' to set a top-level NSWindow visible. Adding comment why we can't use 'orderOut' on child-NSWindow setting it invisible, this is due to OSX 10.7 changes and testing detaching the child-window from its parent causes havoc w/ SWT at least. Hence we only issue 'mWin orderWindow: NSWindowOut relativeTo:..]' and the result is having the child-NSWindow below the application. This in turn will make it visible again when moving the application around, as this child-NSWindow will no more follow the position. Suggestion is to have this 'fake invisible' child-NSWindow to be moved out of the overal viewport (all screens).
* NewtCanvasSWT Tests: Add NEWTDemoListener giving weight to toolkit ↵Sven Gothel2020-01-133-2/+23
| | | | independent UI interaction coding
* TestSWTAccessor02NewtGLWindow: Setup SWT EDTUtil for NEWT, avoiding ↵Sven Gothel2020-01-133-45/+37
| | | | | | deadlocks on OSX and Windows Essentially same code path as NewtCanvasSWT
* build-test.xml: FIX usage of generic.junit.run.swt.headless.include.pattern ↵Sven Gothel2020-01-131-1/+1
| | | | | | (its a property!) Missed the SWT headless unit tests altogether ;-)
* build-test.xml: *generic* tests: unset temp vars and be more verbose on used ↵Sven Gothel2020-01-131-0/+40
| | | | pattern
* Bug 1421 Related: Handle SWT Events: Activate (focus), Show and Hide.Sven Gothel2020-01-131-0/+9
| | | | | Show and Hide handling resolves TabFolder layout, i.e. hiding the 'hidden' and showing the current tab.
* Bug 1421, Bug 1358, Bug 969, Bug 672: Fix NEWT's coordinate conversion on ↵Sven Gothel2020-01-1311-245/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | MacOS (fixes NewtCanvasSWT on SWT positioning) Newt's OSX Window consist out of NSView wrapped up within its own NSWindow. It's position is being set via its NSWindow's client-area position on screen (frame), which we derive from NSView's client-area position. When NEWT reparents into a new 'window', on OSX it uses the parent's NSView and its NSWindow to attach its own NSView and NSWindow as a subview and childwindow. SWT's OSX implementation uses NSView's for each Compositor, but an individual NSWindow is only established for the Shell (Window). An oversight in Nativewindow and NEWT's coordinate translation: 'top-left view <-> top-left screen' by missing the 'view <-> window' translation caused this whole issue. The oversight occured as NEWT's 'view <-> window' translation had no impact due to its 1-view to 1-window mapping. Fixing the coordinate translation resolves the mess for SWT and for potential other toolkits on OSX. NewtCanvasSWT behaves same on OSX as on X11 etc finally.
* NativeWindow Point.set*(..): Return instance for scaling (chaining)Sven Gothel2020-01-122-5/+20
|
* NEWT JVM_JNI8: Adapt to native library separation (head, drm) of commit ↵Sven Gothel2020-01-091-2/+9
| | | | | | | | | b91c680fb93a03720ff9fcb39cf052cfe8d40e76 See commit b91c680fb93a03720ff9fcb39cf052cfe8d40e76 To support static libraries JEP 178, we have to provide JNI_OnLoad_<libname> etc. Hence change and add function entries accordingly.
* Bug 1358: Merely simplifying the non MacOS getClientAreaInPixels() code pathSven Gothel2020-01-061-2/+6
| | | | | | This also demonstrates that on non MacOS, SWT's scale-factor is artificially imposed on the actual pixel-units, as SWT's getClientArea() is simply returning: DPIUtil.autoScaleDown(getClientAreaInPixels())
* Bug 1421: Tackle wrong position of TabFolder, SashForm etcSven Gothel2020-01-062-60/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | getClientArea() on MacOS produces a 'difficult' result regarding the position, which usually is returned as zero. Using a zero position issues the bug w/ SashForm, where the offset doesn't seems to be covered by the native NSView nor an SWT parent Composition. Then using the getLocation() as is (i.e. the view's frame position) may also cause issues with the TabFolder, as it includes the tab's trimming. Here the native NSView 's position includes the tab's trimming, gladly the parent (TabFolder or a Composition)'s clientArea includes this offset. Therefor, as a testbed - on OSX, getClientArea2(..) returns - position: getLocation() - getParent().getClientArea().position - size: getSize() This at least works OK'sh using - no special layout parent - TabFolder - SashForm ++++ Unit test TestGLCanvasSWTNewtCanvasSWTPosInTabs: Adding 'addComposite' to test matrix. 'addComposite' wraps our GLCanvas or NewtCanvasSWT into a Composite instead of adding it directly into the layouting parent. It demonstrates an issue with the new test 'test32_NewtCanvasSWTTabSashGLWComp', i.e. the NewtCanvasSWT is shown on the left as the SashForm's offset is being dropped. Summary: - No more issues with High-DPI pixelScale observed! - GLCanvas is being most well layouted, no issues in tests - NewtCanvasSWT may show severe positioning issues -> test32_NewtCanvasSWTTabSashGLWComp - NewtCanvasSWT always shows a small positioning offset into the lower-right corner w/ overlapping - NewtCanvasSWT overall positioning is not perfectly understood - NewtCanvasSWT misses to hide the NEWT child when changing tabs in TabFolder
* Bug 1421: Minor commentingSven Gothel2020-01-061-2/+1
|
* Bug 1421: Minor cleanup / commentingSven Gothel2020-01-061-9/+8
|
* Bug 1421: Move Bug 1362 'setBackground(..)' fix before potential ↵Sven Gothel2020-01-061-4/+4
| | | | 'setNEWTChild(..)'
* Bug 1421: OSXUtil: Add GetLocation(..), simply returning the view's frame ↵Sven Gothel2020-01-062-0/+44
| | | | position
* Bump SWT to Release 4.14-201912100610 (jogl/make/lib/swt)Sven Gothel2020-01-068-748/+748
| | | | Due to issues on MacOS, added the src.zip for MacOS as well.
* Bug 1421, Bug 1358, Bug 969, Bug 672: Deleting merged tests (obsolete)Sven Gothel2020-01-064-739/+1
|
* Bug 1421, Bug 1358, Bug 969, Bug 672: Generalization of test case ↵Sven Gothel2020-01-062-114/+392
| | | | | | TestGLCanvasSWTNewtCanvasSWTPosInTabs (2/2) Complete merging unit tests.
* SWT GLCanvas: Fix NPE in DEBUG mode; NewtCanvasSWT: Resurect comment in ↵Sven Gothel2020-01-062-2/+5
| | | | setBounds(..)
* Bug 1358: GLCanvas: Call new OSXUtil.SetWindowPixelScale(..) when GLCanvas ↵Sven Gothel2020-01-053-4/+57
| | | | | | gets realized on MacOS This fixes GLCanvas's High-DPI scaled size issue on MacOS of Bug 1358.
* Bug 1421, Bug 1358, Bug 969, Bug 672: SWTAccessor: Add ↵Sven Gothel2020-01-051-1/+74
| | | | get[Location|Size]InPixels(..) and getLocationOnScreen()
* Bug 1421, Bug 1358, Bug 969, Bug 672: Generalization of test case ↵Sven Gothel2020-01-052-69/+118
| | | | | | | | | | | | | TestGLCanvasSWTNewtCanvasSWTPosInTabs (1/2) Testing the TabFolder and a SashForm in the 2nd tab covering both SWT layout use cases on both out SWT support classes SWT GLCanvas and NewtCanvasSWT. Merging TestBug1421NewtCanvasSWTPosInTabs + TestBug672NewtCanvasSWTSashFormComposite into TestGLCanvasSWTNewtCanvasSWTPosInTabs. TestBug672NewtCanvasSWTSashFormComposite exposes that SWT GLCanvas still requires work for proper High-DPI scaling on OSX!
* Bug 1421: NewtCanvasSWT child on layouted SWT parent only occurs on MacOS, ↵Sven Gothel2020-01-054-8/+13
| | | | regardless of High-DPI
* Bug 1421: Demo wrong NEWT Child window position within an SWT TabFolder ↵Sven Gothel2020-01-052-1/+240
| | | | layout using NewtCanvasSWT on MacOSX with High-DPI Retina
* linker.cfg.linux.*.nativewindow: Specialize for x86 and amd64 allowing ↵Sven Gothel2020-01-041-2/+12
| | | | cross-compilation 32bit on 64bit
* scripts: use gluegen's renamed setenv-build-jogl-* -> setenv-build-jogamp-*Sven Gothel2020-01-0420-40/+40
|
* swt.jar: On linux-i586 and windows-i586 we have to use any 64bit for ↵Sven Gothel2020-01-041-6/+2
| | | | compilation - as 32bit builds are no more supported since SWT 4.10
* fix windows build scriptsSven Gothel2020-01-042-3/+3
|