diff options
author | Sven Gothel <[email protected]> | 2023-03-13 05:52:59 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-03-13 05:52:59 +0100 |
commit | 35d07fa97404921bb8e9b5185d6f89a3c09d0e9f (patch) | |
tree | 4c80af9925160c11aa96d09d66bdbe3b5015b4dc /src/newt | |
parent | 4b6db72f86eef63196da0c13cd205314d5a109ee (diff) |
Move png assets (NEWT icons + GLMediaPlayer dummy/test) to simple classpath, allowing access w/o jars. TODO: Test Android.
Diffstat (limited to 'src/newt')
-rw-r--r-- | src/newt/classes/com/jogamp/newt/NewtFactory.java | 2 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/Window.java | 6 | ||||
-rw-r--r-- | src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java | 4 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/DisplayImpl.java | 3 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/assets/cross-grey-alpha-16x16.png | bin | 0 -> 286 bytes | |||
-rw-r--r-- | src/newt/classes/jogamp/newt/assets/jogamp-16x16.png | bin | 0 -> 549 bytes | |||
-rw-r--r-- | src/newt/classes/jogamp/newt/assets/jogamp-32x32.png | bin | 0 -> 1020 bytes | |||
-rw-r--r-- | src/newt/classes/jogamp/newt/assets/pointer-grey-alpha-16x24.png | bin | 0 -> 511 bytes | |||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java | 2 | ||||
-rw-r--r-- | src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java | 2 |
10 files changed, 11 insertions, 8 deletions
diff --git a/src/newt/classes/com/jogamp/newt/NewtFactory.java b/src/newt/classes/com/jogamp/newt/NewtFactory.java index 61d21026a..12e61d0b2 100644 --- a/src/newt/classes/com/jogamp/newt/NewtFactory.java +++ b/src/newt/classes/com/jogamp/newt/NewtFactory.java @@ -60,7 +60,7 @@ public class NewtFactory { public static final String DRIVER_DEFAULT_ROOT_PACKAGE = "jogamp.newt.driver"; private static IOUtil.ClassResources defaultWindowIcons; - private static String sysPaths = "newt/data/jogamp-16x16.png newt/data/jogamp-32x32.png"; + private static String sysPaths = "jogamp/newt/assets/jogamp-16x16.png jogamp/newt/assets/jogamp-32x32.png"; static { SecurityUtil.doPrivileged(new PrivilegedAction<Object>() { diff --git a/src/newt/classes/com/jogamp/newt/Window.java b/src/newt/classes/com/jogamp/newt/Window.java index 3a84bd79c..60ed53c9f 100644 --- a/src/newt/classes/com/jogamp/newt/Window.java +++ b/src/newt/classes/com/jogamp/newt/Window.java @@ -87,12 +87,12 @@ import com.jogamp.nativewindow.util.SurfaceSize; * The location must be resolvable via classpath, i.e. shall reference a location within the jar file. * Example (our default): * <pre> - * -Dnewt.window.icons="newt/data/jogamp-16x16.png,newt/data/jogamp-32x32.png" - * -Djnlp.newt.window.icons="newt/data/jogamp-16x16.png,newt/data/jogamp-32x32.png" + * -Dnewt.window.icons="jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png" + * -Djnlp.newt.window.icons="jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png" * </pre> * The property can also be set programmatically, which must happen before any NEWT classes are <i>touched</i>: * <pre> - * System.setProperty("newt.window.icons", "newt/data/jogamp-16x16.png, newt/data/jogamp-32x32.png"); + * System.setProperty("newt.window.icons", "jogamp/newt/assets/jogamp-16x16.png,jogamp/newt/assets/jogamp-32x32.png"); * </pre> * To disable even Jogamp's own window icons in favor of system icons, * simply set a non-existing location, e.g.: diff --git a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java index aaed713a8..563c09474 100644 --- a/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java +++ b/src/newt/classes/com/jogamp/newt/opengl/util/NEWTDemoListener.java @@ -493,7 +493,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous disp.createNative(); { PointerIcon _pointerIcon = null; - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/cross-grey-alpha-16x16.png" }, disp.getClass().getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "jogamp/newt/assets/cross-grey-alpha-16x16.png" }, disp.getClass().getClassLoader(), null); try { _pointerIcon = disp.createPointerIcon(res, 8, 8); pointerIcons.add(_pointerIcon); @@ -504,7 +504,7 @@ public class NEWTDemoListener extends WindowAdapter implements KeyListener, Mous } { PointerIcon _pointerIcon = null; - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/pointer-grey-alpha-16x24.png" }, disp.getClass().getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "jogamp/newt/assets/pointer-grey-alpha-16x24.png" }, disp.getClass().getClassLoader(), null); try { _pointerIcon = disp.createPointerIcon(res, 0, 0); pointerIcons.add(_pointerIcon); diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java index 8c0240ffd..aea42b66d 100644 --- a/src/newt/classes/jogamp/newt/DisplayImpl.java +++ b/src/newt/classes/jogamp/newt/DisplayImpl.java @@ -66,6 +66,7 @@ import com.jogamp.nativewindow.util.PointImmutable; public abstract class DisplayImpl extends Display { protected static final boolean DISABLE_POINTER_ICON = PropertyAccess.isPropertyDefined("newt.disable.PointerIcon", true); + protected static final String defaultPointerIconPath = "jogamp/newt/assets/pointer-grey-alpha-16x24.png"; private static int serialno = 1; private static final boolean pngUtilAvail; @@ -123,6 +124,7 @@ public abstract class DisplayImpl extends Display { final Exception[] ex = { null }; final String exStr = "Could not resolve "+pngResource.resourcePaths[0]; runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { try { if( !DisplayImpl.this.isNativeValidAsync() ) { @@ -198,6 +200,7 @@ public abstract class DisplayImpl extends Display { } final PointerIconImpl[] res = { null }; runOnEDTIfAvail(true, new Runnable() { + @Override public void run() { try { if( !DisplayImpl.this.isNativeValidAsync() ) { diff --git a/src/newt/classes/jogamp/newt/assets/cross-grey-alpha-16x16.png b/src/newt/classes/jogamp/newt/assets/cross-grey-alpha-16x16.png Binary files differnew file mode 100644 index 000000000..303c454fa --- /dev/null +++ b/src/newt/classes/jogamp/newt/assets/cross-grey-alpha-16x16.png diff --git a/src/newt/classes/jogamp/newt/assets/jogamp-16x16.png b/src/newt/classes/jogamp/newt/assets/jogamp-16x16.png Binary files differnew file mode 100644 index 000000000..02df8997f --- /dev/null +++ b/src/newt/classes/jogamp/newt/assets/jogamp-16x16.png diff --git a/src/newt/classes/jogamp/newt/assets/jogamp-32x32.png b/src/newt/classes/jogamp/newt/assets/jogamp-32x32.png Binary files differnew file mode 100644 index 000000000..ab21c6e1b --- /dev/null +++ b/src/newt/classes/jogamp/newt/assets/jogamp-32x32.png diff --git a/src/newt/classes/jogamp/newt/assets/pointer-grey-alpha-16x24.png b/src/newt/classes/jogamp/newt/assets/pointer-grey-alpha-16x24.png Binary files differnew file mode 100644 index 000000000..98b2c8640 --- /dev/null +++ b/src/newt/classes/jogamp/newt/assets/pointer-grey-alpha-16x24.png diff --git a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java index 8a29f96f6..7eabbc3ee 100644 --- a/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/bcm/vc/iv/DisplayDriver.java @@ -67,7 +67,7 @@ public class DisplayDriver extends DisplayImpl { PNGPixelRect image = null; if( DisplayImpl.isPNGUtilAvailable() ) { - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/pointer-grey-alpha-16x24.png" }, DisplayDriver.class.getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { defaultPointerIconPath }, DisplayDriver.class.getClassLoader(), null); try { final URLConnection urlConn = res.resolve(0); if( null != urlConn ) { diff --git a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java index 19e44b830..222adebf1 100644 --- a/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java +++ b/src/newt/classes/jogamp/newt/driver/egl/gbm/DisplayDriver.java @@ -70,7 +70,7 @@ public class DisplayDriver extends DisplayImpl { PNGPixelRect image = null; if( DisplayImpl.isPNGUtilAvailable() ) { - final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { "newt/data/pointer-grey-alpha-16x24.png" }, DisplayDriver.class.getClassLoader(), null); + final IOUtil.ClassResources res = new IOUtil.ClassResources(new String[] { defaultPointerIconPath }, DisplayDriver.class.getClassLoader(), null); try { final URLConnection urlConn = res.resolve(0); if( null != urlConn ) { |