diff options
author | Rami Santina <[email protected]> | 2011-08-05 12:35:22 +0300 |
---|---|---|
committer | Rami Santina <[email protected]> | 2011-08-05 12:35:22 +0300 |
commit | f98a8e29b46b6cfbd2c3e695a02093b19468e95d (patch) | |
tree | b4b4778ade414a35c9e3756e739d5dba57da6e6d /src | |
parent | 94d9bcebaa382c87cb4baa6be4b85c8789a140dd (diff) | |
parent | c43a0f3afdcd3c90aea1f9b233e113ab2bd83f8a (diff) |
Merge branch 'master' of http://github.com/sgothel/jogl
Diffstat (limited to 'src')
46 files changed, 1017 insertions, 189 deletions
diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherGearsActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsActivity.java new file mode 100644 index 000000000..785590fd7 --- /dev/null +++ b/src/android/com/jogamp/android/launcher/NEWTLauncherGearsActivity.java @@ -0,0 +1,140 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.android.launcher; + +import java.lang.reflect.Method; + +import dalvik.system.PathClassLoader; + +import android.app.Activity; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.widget.TextView; +import android.util.Log; + +public class NEWTLauncherGearsActivity extends Activity { + static final String TAG = "JoglLauncherActivity"; + TextView tv = null; + + @Override + public void onCreate(Bundle savedInstanceState) { + Log.d(TAG, "onCreate - S"); + super.onCreate(savedInstanceState); + + String packageGlueGen = "com.jogamp.common"; + String apkGlueGen = null; + String packageJogl = "javax.media.opengl"; + String apkJogl = null; + + String clazzMDName= "jogamp.newt.driver.android.MD"; + Method mdGetInfo = null; + + try { + apkGlueGen = getPackageManager().getApplicationInfo(packageGlueGen,0).sourceDir; + apkJogl = getPackageManager().getApplicationInfo(packageJogl,0).sourceDir; + } catch (PackageManager.NameNotFoundException e) { + Log.d(TAG, "error: "+e, e); + } + if(null == apkGlueGen || null == apkJogl) { + Log.d(TAG, "not found: gluegen <"+apkGlueGen+">, jogl <"+apkJogl+">"); + } else { + String cp = apkGlueGen + ":" + apkJogl ; + Log.d(TAG, "cp: " + cp); + + // add path to apk that contains classes you wish to load + PathClassLoader pathClassLoader = new dalvik.system.PathClassLoader( + cp, + ClassLoader.getSystemClassLoader()); + + try { + Class clazzMD= Class.forName(clazzMDName, true, pathClassLoader); + Log.d(TAG, "MD: "+clazzMD); + mdGetInfo = clazzMD.getMethod("getInfo"); + } catch (Exception e) { + Log.d(TAG, "error: "+e, e); + } + } + + String mdInfo = null; + try { + mdInfo = (String) mdGetInfo.invoke(null); + } catch (Exception e) { + Log.d(TAG, "error: "+e, e); + } + tv = new TextView(this); + if(null != mdInfo) { + tv.setText(mdInfo); + } else { + tv.setText("mdInfo n/a"); + } + setContentView(tv); + Log.d(TAG, "onCreate - X"); + } + + @Override + public void onStart() { + Log.d(TAG, "onStart - S"); + super.onStart(); + Log.d(TAG, "onStart - X"); + } + + @Override + public void onRestart() { + Log.d(TAG, "onRestart - S"); + super.onRestart(); + Log.d(TAG, "onRestart - X"); + } + + @Override + public void onResume() { + Log.d(TAG, "onResume - S"); + super.onResume(); + Log.d(TAG, "onResume - X"); + } + + @Override + public void onPause() { + Log.d(TAG, "onPause - S"); + super.onPause(); + Log.d(TAG, "onPause - X"); + } + + @Override + public void onStop() { + Log.d(TAG, "onStop - S"); + super.onStop(); + Log.d(TAG, "onStop - X"); + } + + @Override + public void onDestroy() { + Log.d(TAG, "onDestroy - S"); + super.onDestroy(); + Log.d(TAG, "onDestroy - X"); + } +} diff --git a/src/android/com/jogamp/android/launcher/NEWTLauncherVersionActivity.java b/src/android/com/jogamp/android/launcher/NEWTLauncherVersionActivity.java new file mode 100644 index 000000000..468beed0b --- /dev/null +++ b/src/android/com/jogamp/android/launcher/NEWTLauncherVersionActivity.java @@ -0,0 +1,140 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package com.jogamp.android.launcher; + +import java.lang.reflect.Method; + +import dalvik.system.PathClassLoader; + +import android.app.Activity; +import android.content.pm.PackageManager; +import android.os.Bundle; +import android.widget.TextView; +import android.util.Log; + +public class NEWTLauncherVersionActivity extends Activity { + static final String TAG = "JoglLauncherActivity"; + TextView tv = null; + + @Override + public void onCreate(Bundle savedInstanceState) { + Log.d(TAG, "onCreate - S"); + super.onCreate(savedInstanceState); + + String packageGlueGen = "com.jogamp.common"; + String apkGlueGen = null; + String packageJogl = "javax.media.opengl"; + String apkJogl = null; + + String clazzMDName= "jogamp.newt.driver.android.MD"; + Method mdGetInfo = null; + + try { + apkGlueGen = getPackageManager().getApplicationInfo(packageGlueGen,0).sourceDir; + apkJogl = getPackageManager().getApplicationInfo(packageJogl,0).sourceDir; + } catch (PackageManager.NameNotFoundException e) { + Log.d(TAG, "error: "+e, e); + } + if(null == apkGlueGen || null == apkJogl) { + Log.d(TAG, "not found: gluegen <"+apkGlueGen+">, jogl <"+apkJogl+">"); + } else { + String cp = apkGlueGen + ":" + apkJogl ; + Log.d(TAG, "cp: " + cp); + + // add path to apk that contains classes you wish to load + PathClassLoader pathClassLoader = new dalvik.system.PathClassLoader( + cp, + ClassLoader.getSystemClassLoader()); + + try { + Class clazzMD= Class.forName(clazzMDName, true, pathClassLoader); + Log.d(TAG, "MD: "+clazzMD); + mdGetInfo = clazzMD.getMethod("getInfo"); + } catch (Exception e) { + Log.d(TAG, "error: "+e, e); + } + } + + String mdInfo = null; + try { + mdInfo = (String) mdGetInfo.invoke(null); + } catch (Exception e) { + Log.d(TAG, "error: "+e, e); + } + tv = new TextView(this); + if(null != mdInfo) { + tv.setText(mdInfo); + } else { + tv.setText("mdInfo n/a"); + } + setContentView(tv); + Log.d(TAG, "onCreate - X"); + } + + @Override + public void onStart() { + Log.d(TAG, "onStart - S"); + super.onStart(); + Log.d(TAG, "onStart - X"); + } + + @Override + public void onRestart() { + Log.d(TAG, "onRestart - S"); + super.onRestart(); + Log.d(TAG, "onRestart - X"); + } + + @Override + public void onResume() { + Log.d(TAG, "onResume - S"); + super.onResume(); + Log.d(TAG, "onResume - X"); + } + + @Override + public void onPause() { + Log.d(TAG, "onPause - S"); + super.onPause(); + Log.d(TAG, "onPause - X"); + } + + @Override + public void onStop() { + Log.d(TAG, "onStop - S"); + super.onStop(); + Log.d(TAG, "onStop - X"); + } + + @Override + public void onDestroy() { + Log.d(TAG, "onDestroy - S"); + super.onDestroy(); + Log.d(TAG, "onDestroy - X"); + } +} diff --git a/src/jogl/native/GLDebugMessageHandler.c b/src/jogl/native/GLDebugMessageHandler.c index 790871111..509c6f695 100644 --- a/src/jogl/native/GLDebugMessageHandler.c +++ b/src/jogl/native/GLDebugMessageHandler.c @@ -1,4 +1,5 @@ +#include <stdio.h> /* android */ #include <stdlib.h> #include <stdarg.h> diff --git a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java index 3b71555b4..ee6d44d48 100644 --- a/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java +++ b/src/nativewindow/classes/javax/media/nativewindow/NativeWindowFactory.java @@ -62,6 +62,9 @@ public abstract class NativeWindowFactory { /** X11 type, as retrieved with {@link #getNativeWindowType(boolean)} */ public static final String TYPE_X11 = "X11"; + /** Android/EGL type, as retrieved with {@link #getNativeWindowType(boolean)}*/ + public static final String TYPE_ANDROID = "ANDROID"; + /** Mac OS X type, as retrieved with {@link #getNativeWindowType(boolean)} */ public static final String TYPE_MACOSX = "MacOSX"; @@ -101,7 +104,7 @@ public abstract class NativeWindowFactory { private static String _getNativeWindowingType() { switch(Platform.OS_TYPE) { case ANDROID: - throw new RuntimeException(Platform.OS_TYPE+" n/a yet"); + return TYPE_ANDROID; case MACOS: return TYPE_MACOSX; case WINDOWS: diff --git a/src/newt/classes/com/jogamp/newt/util/MainThread.java b/src/newt/classes/com/jogamp/newt/util/MainThread.java index 8bb725b99..5bd97c18f 100644 --- a/src/newt/classes/com/jogamp/newt/util/MainThread.java +++ b/src/newt/classes/com/jogamp/newt/util/MainThread.java @@ -55,7 +55,7 @@ import com.jogamp.common.util.RunnableTask; import com.jogamp.newt.Display; import jogamp.newt.Debug; import jogamp.newt.NEWTJNILibLoader; -import jogamp.newt.awt.AWTEDTUtil; +import jogamp.newt.driver.awt.AWTEDTUtil; /** * NEWT Utility class MainThread<P> diff --git a/src/newt/classes/jogamp/newt/DisplayImpl.java b/src/newt/classes/jogamp/newt/DisplayImpl.java index d18d1e912..d98e55bd8 100644 --- a/src/newt/classes/jogamp/newt/DisplayImpl.java +++ b/src/newt/classes/jogamp/newt/DisplayImpl.java @@ -56,16 +56,18 @@ public abstract class DisplayImpl extends Display { { Class displayClass = NewtFactory.getCustomClass(type, "Display"); if(null==displayClass) { - if (NativeWindowFactory.TYPE_EGL.equals(type)) { - displayClass = Class.forName("jogamp.newt.egl.kd.KDDisplay"); + if (NativeWindowFactory.TYPE_ANDROID.equals(type)) { + displayClass = Class.forName("jogamp.newt.driver.android.Display"); + } else if (NativeWindowFactory.TYPE_EGL.equals(type)) { + displayClass = Class.forName("jogamp.newt.driver.kd.KDDisplay"); } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) { - displayClass = Class.forName("jogamp.newt.windows.WindowsDisplay"); + displayClass = Class.forName("jogamp.newt.driver.windows.WindowsDisplay"); } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) { - displayClass = Class.forName("jogamp.newt.macosx.MacDisplay"); + displayClass = Class.forName("jogamp.newt.driver.macosx.MacDisplay"); } else if (NativeWindowFactory.TYPE_X11.equals(type)) { - displayClass = Class.forName("jogamp.newt.x11.X11Display"); + displayClass = Class.forName("jogamp.newt.driver.x11.X11Display"); } else if (NativeWindowFactory.TYPE_AWT.equals(type)) { - displayClass = Class.forName("jogamp.newt.awt.AWTDisplay"); + displayClass = Class.forName("jogamp.newt.driver.awt.AWTDisplay"); } else { throw new RuntimeException("Unknown display type \"" + type + "\""); } diff --git a/src/newt/classes/jogamp/newt/ScreenImpl.java b/src/newt/classes/jogamp/newt/ScreenImpl.java index 54f7aa411..d1ed10aaf 100644 --- a/src/newt/classes/jogamp/newt/ScreenImpl.java +++ b/src/newt/classes/jogamp/newt/ScreenImpl.java @@ -69,16 +69,18 @@ public abstract class ScreenImpl extends Screen implements ScreenModeListener { { Class screenClass = NewtFactory.getCustomClass(type, "Screen"); if(null==screenClass) { - if (NativeWindowFactory.TYPE_EGL.equals(type)) { - screenClass = Class.forName("jogamp.newt.egl.kd.KDScreen"); + if (NativeWindowFactory.TYPE_ANDROID.equals(type)) { + screenClass = Class.forName("jogamp.newt.driver.android.Screen"); + } else if (NativeWindowFactory.TYPE_EGL.equals(type)) { + screenClass = Class.forName("jogamp.newt.driver.kd.KDScreen"); } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) { - screenClass = Class.forName("jogamp.newt.windows.WindowsScreen"); + screenClass = Class.forName("jogamp.newt.driver.windows.WindowsScreen"); } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) { - screenClass = Class.forName("jogamp.newt.macosx.MacScreen"); + screenClass = Class.forName("jogamp.newt.driver.macosx.MacScreen"); } else if (NativeWindowFactory.TYPE_X11.equals(type)) { - screenClass = Class.forName("jogamp.newt.x11.X11Screen"); + screenClass = Class.forName("jogamp.newt.driver.x11.X11Screen"); } else if (NativeWindowFactory.TYPE_AWT.equals(type)) { - screenClass = Class.forName("jogamp.newt.awt.AWTScreen"); + screenClass = Class.forName("jogamp.newt.driver.awt.AWTScreen"); } else { throw new RuntimeException("Unknown window type \"" + type + "\""); } diff --git a/src/newt/classes/jogamp/newt/WindowImpl.java b/src/newt/classes/jogamp/newt/WindowImpl.java index f98315f53..71d36e905 100644 --- a/src/newt/classes/jogamp/newt/WindowImpl.java +++ b/src/newt/classes/jogamp/newt/WindowImpl.java @@ -140,16 +140,18 @@ public abstract class WindowImpl implements Window, NEWTEventConsumer { Class windowClass = NewtFactory.getCustomClass(type, "Window"); if(null==windowClass) { - if (NativeWindowFactory.TYPE_EGL.equals(type)) { - windowClass = Class.forName("jogamp.newt.egl.kd.KDWindow"); + if (NativeWindowFactory.TYPE_ANDROID.equals(type)) { + windowClass = Class.forName("jogamp.newt.driver.android.Window"); + } else if (NativeWindowFactory.TYPE_EGL.equals(type)) { + windowClass = Class.forName("jogamp.newt.driver.kd.KDWindow"); } else if (NativeWindowFactory.TYPE_WINDOWS.equals(type)) { - windowClass = Class.forName("jogamp.newt.windows.WindowsWindow"); + windowClass = Class.forName("jogamp.newt.driver.windows.WindowsWindow"); } else if (NativeWindowFactory.TYPE_MACOSX.equals(type)) { - windowClass = Class.forName("jogamp.newt.macosx.MacWindow"); + windowClass = Class.forName("jogamp.newt.driver.macosx.MacWindow"); } else if (NativeWindowFactory.TYPE_X11.equals(type)) { - windowClass = Class.forName("jogamp.newt.x11.X11Window"); + windowClass = Class.forName("jogamp.newt.driver.x11.X11Window"); } else if (NativeWindowFactory.TYPE_AWT.equals(type)) { - windowClass = Class.forName("jogamp.newt.awt.AWTWindow"); + windowClass = Class.forName("jogamp.newt.driver.awt.AWTWindow"); } else { throw new NativeWindowException("Unknown window type \"" + type + "\""); } diff --git a/src/newt/classes/jogamp/newt/driver/android/Display.java b/src/newt/classes/jogamp/newt/driver/android/Display.java new file mode 100644 index 000000000..e1944276f --- /dev/null +++ b/src/newt/classes/jogamp/newt/driver/android/Display.java @@ -0,0 +1,79 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ + +package jogamp.newt.driver.android; + +import jogamp.newt.*; +import jogamp.opengl.egl.*; +import javax.media.nativewindow.*; +import javax.media.nativewindow.egl.*; +import android.content.Context; + +public class Display extends jogamp.newt.DisplayImpl { + + /*package*/ Context appContext; + + static { + NEWTJNILibLoader.loadNEWT(); + + if (!Window.initIDs()) { + throw new NativeWindowException("Failed to initialize BCEGL Window jmethodIDs"); + } + } + + public static void initSingleton() { + // just exist to ensure static init has been run + } + + + public Display() { + } + + protected void createNativeImpl() { + long handle = CreateDisplay(Screen.fixedWidth, Screen.fixedHeight); + if (handle == EGL.EGL_NO_DISPLAY) { + throw new NativeWindowException("BC EGL CreateDisplay failed"); + } + aDevice = new EGLGraphicsDevice(handle, AbstractGraphicsDevice.DEFAULT_CONNECTION, AbstractGraphicsDevice.DEFAULT_UNIT); + } + + protected void closeNativeImpl() { + if (aDevice.getHandle() != EGL.EGL_NO_DISPLAY) { + DestroyDisplay(aDevice.getHandle()); + } + } + + protected void dispatchMessagesNative() { + // n/a .. DispatchMessages(); + } + + private native long CreateDisplay(int width, int height); + private native void DestroyDisplay(long dpy); + private native void DispatchMessages(); +} + diff --git a/src/newt/classes/jogamp/newt/driver/android/MD.java b/src/newt/classes/jogamp/newt/driver/android/MD.java new file mode 100644 index 000000000..9a2ed9824 --- /dev/null +++ b/src/newt/classes/jogamp/newt/driver/android/MD.java @@ -0,0 +1,44 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package jogamp.newt.driver.android; + +import com.jogamp.common.GlueGenVersion; +import com.jogamp.common.os.Platform; +import com.jogamp.common.util.VersionUtil; +import com.jogamp.opengl.JoglVersion; + +public class MD { + public static final String TAG = "JogAmp.NEWT"; + + public static String getInfo() { + return VersionUtil.getPlatformInfo()+Platform.NEWLINE+ + GlueGenVersion.getInstance()+Platform.NEWLINE+ + JoglVersion.getInstance()+Platform.NEWLINE+ + Platform.NEWLINE; + } +} diff --git a/src/newt/classes/jogamp/newt/driver/android/NEWTSurfaceView.java b/src/newt/classes/jogamp/newt/driver/android/NEWTSurfaceView.java new file mode 100644 index 000000000..0a2cfcf05 --- /dev/null +++ b/src/newt/classes/jogamp/newt/driver/android/NEWTSurfaceView.java @@ -0,0 +1,45 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package jogamp.newt.driver.android; + +import android.content.Context; +import android.view.SurfaceView; + +public class NEWTSurfaceView extends SurfaceView { + + SurfaceCallback scb; + + public NEWTSurfaceView(Context context) { + super(context); + scb = new SurfaceCallback(); + this.getHolder().addCallback(scb); + } + + public void doSomething() { + } +} diff --git a/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java new file mode 100644 index 000000000..b9452e44b --- /dev/null +++ b/src/newt/classes/jogamp/newt/driver/android/NewtVersionActivity.java @@ -0,0 +1,89 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package jogamp.newt.driver.android; + +import android.app.Activity; +import android.os.Bundle; +import android.widget.TextView; +import android.util.Log; + +public class NewtVersionActivity extends Activity { + TextView tv = null; + + @Override + public void onCreate(Bundle savedInstanceState) { + Log.d(MD.TAG, "onCreate - S"); + super.onCreate(savedInstanceState); + tv = new TextView(this); + tv.setText("need launcher"); + setContentView(tv); + Log.d(MD.TAG, "onCreate - X"); + } + + @Override + public void onStart() { + Log.d(MD.TAG, "onStart - S"); + super.onStart(); + Log.d(MD.TAG, "onStart - X"); + } + + @Override + public void onRestart() { + Log.d(MD.TAG, "onRestart - S"); + super.onRestart(); + Log.d(MD.TAG, "onRestart - X"); + } + + @Override + public void onResume() { + Log.d(MD.TAG, "onResume - S"); + super.onResume(); + Log.d(MD.TAG, "onResume - X"); + } + + @Override + public void onPause() { + Log.d(MD.TAG, "onPause - S"); + super.onPause(); + Log.d(MD.TAG, "onPause - X"); + } + + @Override + public void onStop() { + Log.d(MD.TAG, "onStop - S"); + super.onStop(); + Log.d(MD.TAG, "onStop - X"); + } + + @Override + public void onDestroy() { + Log.d(MD.TAG, "onDestroy - S"); + super.onDestroy(); + Log.d(MD.TAG, "onDestroy - X"); + } +} diff --git a/src/newt/classes/jogamp/newt/driver/android/Screen.java b/src/newt/classes/jogamp/newt/driver/android/Screen.java new file mode 100644 index 000000000..44c7ca95f --- /dev/null +++ b/src/newt/classes/jogamp/newt/driver/android/Screen.java @@ -0,0 +1,59 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ + +package jogamp.newt.driver.android; + +import javax.media.nativewindow.*; +import android.content.Context; + +public class Screen extends jogamp.newt.ScreenImpl { + + static { + Display.initSingleton(); + } + + + public Screen() { + } + + protected void createNativeImpl() { + aScreen = new DefaultGraphicsScreen(getDisplay().getGraphicsDevice(), screen_idx); + // WINDOW_SERVICEUse with getSystemService(String) to retrieve a WindowManager for accessing + setScreenSize(fixedWidth, fixedHeight); + } + + protected void closeNativeImpl() { } + + //---------------------------------------------------------------------- + // Internals only + // + + static final int fixedWidth = 1920; + static final int fixedHeight = 1080; +} + diff --git a/src/newt/classes/jogamp/newt/driver/android/SurfaceCallback.java b/src/newt/classes/jogamp/newt/driver/android/SurfaceCallback.java new file mode 100644 index 000000000..f953fe41d --- /dev/null +++ b/src/newt/classes/jogamp/newt/driver/android/SurfaceCallback.java @@ -0,0 +1,54 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ +package jogamp.newt.driver.android; + +import jogamp.common.os.android.MD; +import android.view.SurfaceHolder; +import android.view.SurfaceHolder.Callback2; +import android.util.Log; + +public class SurfaceCallback implements Callback2 { + + public void surfaceCreated(SurfaceHolder holder) { + Log.d(MD.TAG, "surfaceCreated"); + } + + public void surfaceChanged(SurfaceHolder holder, int format, int width, + int height) { + Log.d(MD.TAG, "surfaceChanged: f "+Integer.toString(format)+", "+width+"x"+height); + } + + public void surfaceDestroyed(SurfaceHolder holder) { + Log.d(MD.TAG, "surfaceDestroyed"); + } + + public void surfaceRedrawNeeded(SurfaceHolder holder) { + Log.d(MD.TAG, "surfaceRedrawNeeded"); + } + +} diff --git a/src/newt/classes/jogamp/newt/driver/android/Window.java b/src/newt/classes/jogamp/newt/driver/android/Window.java new file mode 100644 index 000000000..4d66debef --- /dev/null +++ b/src/newt/classes/jogamp/newt/driver/android/Window.java @@ -0,0 +1,168 @@ +/** + * Copyright 2011 JogAmp Community. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, are + * permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this list of + * conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, this list + * of conditions and the following disclaimer in the documentation and/or other materials + * provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY JogAmp Community ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JogAmp Community OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * The views and conclusions contained in the software and documentation are those of the + * authors and should not be interpreted as representing official policies, either expressed + * or implied, of JogAmp Community. + */ + +package jogamp.newt.driver.android; + +import jogamp.opengl.egl.*; +import javax.media.nativewindow.*; +import javax.media.nativewindow.util.Point; +import javax.media.opengl.GLCapabilitiesImmutable; + +import android.content.Context; + +public class Window extends jogamp.newt.WindowImpl { + static { + Display.initSingleton(); + } + + public Window() { + } + + public Window(Context ctx) { + } + + public static Class[] getCustomConstructorArgumentTypes() { + return new Class[] { Context.class } ; + } + + protected void createNativeImpl() { + if(0!=getParentWindowHandle()) { + throw new RuntimeException("Window parenting not supported (yet)"); + } + // query a good configuration .. even thought we drop this one + // and reuse the EGLUtil choosen one later. + config = GraphicsConfigurationFactory.getFactory(getScreen().getDisplay().getGraphicsDevice()).chooseGraphicsConfiguration( + capsRequested, capsRequested, capabilitiesChooser, getScreen().getGraphicsScreen()); + if (config == null) { + throw new NativeWindowException("Error choosing GraphicsConfiguration creating window: "+this); + } + setSizeImpl(getScreen().getWidth(), getScreen().getHeight()); + + setWindowHandle(realizeWindow(true, width, height)); + if (0 == getWindowHandle()) { + throw new NativeWindowException("Error native Window Handle is null"); + } + } + + protected void closeNativeImpl() { + if(0!=windowHandleClose) { + CloseWindow(getDisplayHandle(), windowHandleClose); + } + } + + protected void setVisibleImpl(boolean visible, int x, int y, int width, int height) { + reconfigureWindowImpl(x, y, width, height, false, 0, 0); + visibleChanged(visible); + } + + protected void requestFocusImpl(boolean reparented) { } + + protected void setSizeImpl(int width, int height) { + if(0!=getWindowHandle()) { + // n/a in BroadcomEGL + System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window"); + } else { + this.width = width; + this.height = height; + } + } + + protected boolean reconfigureWindowImpl(int x, int y, int width, int height, + boolean parentChange, int fullScreenChange, int decorationChange) { + if(0!=getWindowHandle()) { + if(0!=fullScreenChange) { + if( fullScreenChange > 0 ) { + // n/a in BroadcomEGL + System.err.println("setFullscreen n/a in BroadcomEGL"); + return false; + } + } + } + if(width>0 || height>0) { + if(0!=getWindowHandle()) { + // n/a in BroadcomEGL + System.err.println("BCEGL Window.setSizeImpl n/a in BroadcomEGL with realized window"); + } else { + this.width=(width>0)?width:this.width; + this.height=(height>0)?height:this.height; + } + } + if(x>=0 || y>=0) { + System.err.println("BCEGL Window.setPositionImpl n/a in BroadcomEGL"); + } + return true; + } + + protected Point getLocationOnScreenImpl(int x, int y) { + return new Point(x,y); + } + + + @Override + public boolean surfaceSwap() { + SwapWindow(getDisplayHandle(), getWindowHandle()); + return true; + } + + //---------------------------------------------------------------------- + // Internals only + // + + protected static native boolean initIDs(); + private native long CreateWindow(long eglDisplayHandle, boolean chromaKey, int width, int height); + private native void CloseWindow(long eglDisplayHandle, long eglWindowHandle); + private native void SwapWindow(long eglDisplayHandle, long eglWindowHandle); + + + private long realizeWindow(boolean chromaKey, int width, int height) { + if(DEBUG_IMPLEMENTATION) { + System.err.println("BCEGL Window.realizeWindow() with: chroma "+chromaKey+", "+width+"x"+height+", "+config); + } + long handle = CreateWindow(getDisplayHandle(), chromaKey, width, height); + if (0 == handle) { + throw new NativeWindowException("Error native Window Handle is null"); + } + windowHandleClose = handle; + return handle; + } + + private void windowCreated(int cfgID, int width, int height) { + this.width = width; + this.height = height; + GLCapabilitiesImmutable capsReq = (GLCapabilitiesImmutable) config.getRequestedCapabilities(); + config = EGLGraphicsConfiguration.create(capsReq, getScreen().getGraphicsScreen(), cfgID); + if (config == null) { + throw new NativeWindowException("Error creating EGLGraphicsConfiguration from id: "+cfgID+", "+this); + } + if(DEBUG_IMPLEMENTATION) { + System.err.println("BCEGL Window.windowCreated(): "+toHexString(cfgID)+", "+width+"x"+height+", "+config); + } + } + + private long windowHandleClose; +} diff --git a/src/newt/classes/jogamp/newt/egl/android/event/AndroidNewtEventFactory.java b/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java index 3619558f8..ef59cd4ad 100644 --- a/src/newt/classes/jogamp/newt/egl/android/event/AndroidNewtEventFactory.java +++ b/src/newt/classes/jogamp/newt/driver/android/event/AndroidNewtEventFactory.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community. */ -package jogamp.newt.egl.android.event; +package jogamp.newt.driver.android.event; import com.jogamp.common.util.IntIntHashMap; diff --git a/src/newt/classes/jogamp/newt/awt/AWTCanvas.java b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java index 01e813449..0729f02ab 100644 --- a/src/newt/classes/jogamp/newt/awt/AWTCanvas.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTCanvas.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.awt; +package jogamp.newt.driver.awt; import java.awt.Canvas; import java.awt.GraphicsDevice; diff --git a/src/newt/classes/jogamp/newt/awt/AWTDisplay.java b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java index 4c864c111..64c741464 100644 --- a/src/newt/classes/jogamp/newt/awt/AWTDisplay.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTDisplay.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.awt; +package jogamp.newt.driver.awt; import javax.media.nativewindow.AbstractGraphicsDevice; import javax.media.nativewindow.awt.AWTGraphicsDevice; diff --git a/src/newt/classes/jogamp/newt/awt/AWTEDTUtil.java b/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java index 7b638af31..0737e3281 100644 --- a/src/newt/classes/jogamp/newt/awt/AWTEDTUtil.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTEDTUtil.java @@ -26,7 +26,7 @@ * or implied, of JogAmp Community. */ -package jogamp.newt.awt; +package jogamp.newt.driver.awt; import java.awt.EventQueue; import javax.media.nativewindow.NativeWindowException; diff --git a/src/newt/classes/jogamp/newt/awt/AWTScreen.java b/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java index d05933321..644c96391 100644 --- a/src/newt/classes/jogamp/newt/awt/AWTScreen.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTScreen.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.awt; +package jogamp.newt.driver.awt; import java.awt.DisplayMode; diff --git a/src/newt/classes/jogamp/newt/awt/AWTWindow.java b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java index b07a9e313..1a86b891d 100644 --- a/src/newt/classes/jogamp/newt/awt/AWTWindow.java +++ b/src/newt/classes/jogamp/newt/driver/awt/AWTWindow.java @@ -32,7 +32,7 @@ * */ -package jogamp.newt.awt; +package jogamp.newt.driver.awt; import java.awt.BorderLayout; import java.awt.Container; diff --git a/src/newt/classes/jogamp/newt/awt/opengl/VersionApplet.java b/src/newt/classes/jogamp/newt/driver/awt/opengl/VersionApplet.java index 18524d0ba..1cff76872 100644 --- a/src/newt/classes/jogamp/newt/awt/opengl/VersionApplet.java +++ b/src/newt/classes/jogamp/newt/driver/awt/opengl/VersionApplet.java @@ -1,4 +1,4 @@ -package jogamp.newt.awt.opengl; +package jogamp.newt.driver.awt.opengl; import java.applet.Applet; import java.awt.BorderLayout; diff --git a/src/newt/classes/jogamp/newt/egl/broadcom/Display.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java index 9a97fe6a2..1ed91c1ac 100644 --- a/src/newt/classes/jogamp/newt/egl/broadcom/Display.java +++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Display.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.egl.broadcom; +package jogamp.newt.driver.broadcom.egl; import jogamp.newt.*; import jogamp.opengl.egl.*; diff --git a/src/newt/classes/jogamp/newt/egl/broadcom/Screen.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java index 9a6b6ed1e..0a8453701 100644 --- a/src/newt/classes/jogamp/newt/egl/broadcom/Screen.java +++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Screen.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.egl.broadcom; +package jogamp.newt.driver.broadcom.egl; import javax.media.nativewindow.*; diff --git a/src/newt/classes/jogamp/newt/egl/broadcom/Window.java b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java index 79e8b371e..5bb567067 100644 --- a/src/newt/classes/jogamp/newt/egl/broadcom/Window.java +++ b/src/newt/classes/jogamp/newt/driver/broadcom/egl/Window.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.egl.broadcom; +package jogamp.newt.driver.broadcom.egl; import jogamp.opengl.egl.*; import javax.media.nativewindow.*; diff --git a/src/newt/classes/jogamp/newt/intel/gdl/Display.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Display.java index b1afdb55e..20e151eb3 100644 --- a/src/newt/classes/jogamp/newt/intel/gdl/Display.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Display.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.intel.gdl; +package jogamp.newt.driver.intel.gdl; import jogamp.newt.*; import javax.media.nativewindow.*; diff --git a/src/newt/classes/jogamp/newt/intel/gdl/Screen.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java index b351fe6a9..26b7120a9 100644 --- a/src/newt/classes/jogamp/newt/intel/gdl/Screen.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Screen.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.intel.gdl; +package jogamp.newt.driver.intel.gdl; import jogamp.newt.*; import javax.media.nativewindow.*; diff --git a/src/newt/classes/jogamp/newt/intel/gdl/Window.java b/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java index d6003beae..0e9a17b09 100644 --- a/src/newt/classes/jogamp/newt/intel/gdl/Window.java +++ b/src/newt/classes/jogamp/newt/driver/intel/gdl/Window.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.intel.gdl; +package jogamp.newt.driver.intel.gdl; import javax.media.nativewindow.*; import javax.media.nativewindow.util.Point; diff --git a/src/newt/classes/jogamp/newt/egl/kd/KDDisplay.java b/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java index d7e7cb87a..bbfe10160 100644 --- a/src/newt/classes/jogamp/newt/egl/kd/KDDisplay.java +++ b/src/newt/classes/jogamp/newt/driver/kd/KDDisplay.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.egl.kd; +package jogamp.newt.driver.kd; import com.jogamp.newt.*; import jogamp.newt.*; diff --git a/src/newt/classes/jogamp/newt/egl/kd/KDScreen.java b/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java index 132e10b9e..fff496102 100644 --- a/src/newt/classes/jogamp/newt/egl/kd/KDScreen.java +++ b/src/newt/classes/jogamp/newt/driver/kd/KDScreen.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.egl.kd; +package jogamp.newt.driver.kd; import com.jogamp.newt.*; import jogamp.newt.ScreenImpl; diff --git a/src/newt/classes/jogamp/newt/egl/kd/KDWindow.java b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java index cde946bb2..2befaa9aa 100644 --- a/src/newt/classes/jogamp/newt/egl/kd/KDWindow.java +++ b/src/newt/classes/jogamp/newt/driver/kd/KDWindow.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.egl.kd; +package jogamp.newt.driver.kd; import jogamp.newt.*; import jogamp.opengl.egl.*; diff --git a/src/newt/classes/jogamp/newt/macosx/MacDisplay.java b/src/newt/classes/jogamp/newt/driver/macosx/MacDisplay.java index 49f2ff5d8..db8577562 100644 --- a/src/newt/classes/jogamp/newt/macosx/MacDisplay.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/MacDisplay.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.macosx; +package jogamp.newt.driver.macosx; import javax.media.nativewindow.*; import javax.media.nativewindow.macosx.*; diff --git a/src/newt/classes/jogamp/newt/macosx/MacScreen.java b/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java index 30028602c..67a3f8e92 100644 --- a/src/newt/classes/jogamp/newt/macosx/MacScreen.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/MacScreen.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.macosx; +package jogamp.newt.driver.macosx; import com.jogamp.newt.*; import jogamp.newt.ScreenImpl; diff --git a/src/newt/classes/jogamp/newt/macosx/MacWindow.java b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java index a27f04797..19a374511 100644 --- a/src/newt/classes/jogamp/newt/macosx/MacWindow.java +++ b/src/newt/classes/jogamp/newt/driver/macosx/MacWindow.java @@ -32,7 +32,7 @@ * */ -package jogamp.newt.macosx; +package jogamp.newt.driver.macosx; import javax.media.nativewindow.*; import com.jogamp.common.util.locks.RecursiveLock; diff --git a/src/newt/classes/jogamp/newt/windows/WindowsDisplay.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsDisplay.java index 750c38092..524d9fc57 100644 --- a/src/newt/classes/jogamp/newt/windows/WindowsDisplay.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsDisplay.java @@ -32,7 +32,7 @@ * */ -package jogamp.newt.windows; +package jogamp.newt.driver.windows; import jogamp.nativewindow.windows.RegisteredClass; import jogamp.nativewindow.windows.RegisteredClassFactory; diff --git a/src/newt/classes/jogamp/newt/windows/WindowsScreen.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java index ea7fe8d55..f2e457a0f 100644 --- a/src/newt/classes/jogamp/newt/windows/WindowsScreen.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsScreen.java @@ -30,7 +30,7 @@ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * */ -package jogamp.newt.windows; +package jogamp.newt.driver.windows; import com.jogamp.common.util.ArrayHashSet; import java.util.ArrayList; diff --git a/src/newt/classes/jogamp/newt/windows/WindowsWindow.java b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java index 653de295d..75b4e7d90 100644 --- a/src/newt/classes/jogamp/newt/windows/WindowsWindow.java +++ b/src/newt/classes/jogamp/newt/driver/windows/WindowsWindow.java @@ -32,7 +32,7 @@ * */ -package jogamp.newt.windows; +package jogamp.newt.driver.windows; import jogamp.nativewindow.windows.GDI; import jogamp.newt.WindowImpl; diff --git a/src/newt/classes/jogamp/newt/x11/X11Display.java b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java index 0804455d1..483556f82 100644 --- a/src/newt/classes/jogamp/newt/x11/X11Display.java +++ b/src/newt/classes/jogamp/newt/driver/x11/X11Display.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.x11; +package jogamp.newt.driver.x11; import javax.media.nativewindow.*; import javax.media.nativewindow.x11.*; diff --git a/src/newt/classes/jogamp/newt/x11/X11Screen.java b/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java index 4788f6b52..63fa46c9c 100644 --- a/src/newt/classes/jogamp/newt/x11/X11Screen.java +++ b/src/newt/classes/jogamp/newt/driver/x11/X11Screen.java @@ -30,7 +30,7 @@ * SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * */ -package jogamp.newt.x11; +package jogamp.newt.driver.x11; import jogamp.nativewindow.x11.X11Util; import jogamp.newt.ScreenImpl; diff --git a/src/newt/classes/jogamp/newt/x11/X11Window.java b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java index 9934d4b7a..19a0c7626 100644 --- a/src/newt/classes/jogamp/newt/x11/X11Window.java +++ b/src/newt/classes/jogamp/newt/driver/x11/X11Window.java @@ -31,7 +31,7 @@ * */ -package jogamp.newt.x11; +package jogamp.newt.driver.x11; import jogamp.nativewindow.x11.X11Util; import jogamp.newt.WindowImpl; diff --git a/src/newt/native/BroadcomEGL.c b/src/newt/native/BroadcomEGL.c index 9ae1b5836..df6aca611 100644 --- a/src/newt/native/BroadcomEGL.c +++ b/src/newt/native/BroadcomEGL.c @@ -37,7 +37,7 @@ #include <stdio.h> #include <string.h> -#include "jogamp_newt_egl_broadcom_egl_Window.h" +#include "jogamp_newt_driver_broadcom_egl_Window.h" #include "MouseEvent.h" #include "KeyEvent.h" @@ -67,7 +67,7 @@ static jmethodID windowCreatedID = NULL; * Display */ -JNIEXPORT void JNICALL Java_jogamp_newt_egl_broadcom_egl_Display_DispatchMessages +JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Display_DispatchMessages (JNIEnv *env, jobject obj) { // FIXME: n/a @@ -75,7 +75,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_egl_broadcom_egl_Display_DispatchMessage (void) obj; } -JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_broadcom_egl_Display_CreateDisplay +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_broadcom_egl_Display_CreateDisplay (JNIEnv *env, jobject obj, jint width, jint height) { (void) env; @@ -89,7 +89,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_broadcom_egl_Display_CreateDisplay return (jlong) (intptr_t) dpy; } -JNIEXPORT void JNICALL Java_jogamp_newt_egl_broadcom_egl_Display_DestroyDisplay +JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Display_DestroyDisplay (JNIEnv *env, jobject obj, jlong display) { EGLDisplay dpy = (EGLDisplay)(intptr_t)display; @@ -106,7 +106,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_egl_broadcom_egl_Display_DestroyDisplay * Window */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_egl_broadcom_egl_Window_initIDs +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_initIDs (JNIEnv *env, jclass clazz) { windowCreatedID = (*env)->GetMethodID(env, clazz, "windowCreated", "(III)V"); @@ -118,7 +118,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_egl_broadcom_egl_Window_initIDs return JNI_TRUE; } -JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_broadcom_egl_Window_CreateWindow +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_CreateWindow (JNIEnv *env, jobject obj, jlong display, jboolean chromaKey, jint width, jint height) { EGLDisplay dpy = (EGLDisplay)(intptr_t)display; @@ -162,7 +162,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_broadcom_egl_Window_CreateWindow return (jlong) (intptr_t) window; } -JNIEXPORT void JNICALL Java_jogamp_newt_egl_broadcom_egl_Window_CloseWindow +JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_CloseWindow (JNIEnv *env, jobject obj, jlong display, jlong window) { EGLDisplay dpy = (EGLDisplay) (intptr_t) display; @@ -175,7 +175,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_egl_broadcom_egl_Window_CloseWindow DBG_PRINT( "[CloseWindow] X\n"); } -JNIEXPORT void JNICALL Java_jogamp_newt_egl_broadcom_egl_Window_SwapWindow +JNIEXPORT void JNICALL Java_jogamp_newt_driver_broadcom_egl_Window_SwapWindow (JNIEnv *env, jobject obj, jlong display, jlong window) { EGLDisplay dpy = (EGLDisplay) (intptr_t) display; diff --git a/src/newt/native/IntelGDL.c b/src/newt/native/IntelGDL.c index e287ad1fa..690e1123d 100644 --- a/src/newt/native/IntelGDL.c +++ b/src/newt/native/IntelGDL.c @@ -37,9 +37,9 @@ #include <stdio.h> #include <string.h> -#include "jogamp_newt_intel_gdl_Display.h" -#include "jogamp_newt_intel_gdl_Screen.h" -#include "jogamp_newt_intel_gdl_Window.h" +#include "jogamp_newt_driver_intel_gdl_Display.h" +#include "jogamp_newt_driver_intel_gdl_Screen.h" +#include "jogamp_newt_driver_intel_gdl_Window.h" #include "MouseEvent.h" #include "KeyEvent.h" @@ -122,7 +122,7 @@ static void JNI_ThrowNew(JNIEnv *env, const char *throwable, const char* message * Display */ -JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DispatchMessages +JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Display_DispatchMessages (JNIEnv *env, jobject obj, jlong displayHandle, jobject focusedWindow) { // FIXME: n/a @@ -137,7 +137,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DispatchMessages } */ } -JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Display_CreateDisplay +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_intel_gdl_Display_CreateDisplay (JNIEnv *env, jobject obj) { gdl_ret_t retval; @@ -170,7 +170,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Display_CreateDisplay return (jlong) (intptr_t) p_driver_info; } -JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DestroyDisplay +JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Display_DestroyDisplay (JNIEnv *env, jobject obj, jlong displayHandle) { gdl_driver_info_t * p_driver_info = (gdl_driver_info_t *) (intptr_t) displayHandle; @@ -189,7 +189,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Display_DestroyDisplay * Screen */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Screen_initIDs +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_intel_gdl_Screen_initIDs (JNIEnv *env, jclass clazz) { screenCreatedID = (*env)->GetMethodID(env, clazz, "screenCreated", "(II)V"); @@ -201,7 +201,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Screen_initIDs return JNI_TRUE; } -JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Screen_GetScreenInfo +JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Screen_GetScreenInfo (JNIEnv *env, jobject obj, jlong displayHandle, jint idx) { gdl_driver_info_t * p_driver_info = (gdl_driver_info_t *) (intptr_t) displayHandle; @@ -233,7 +233,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Screen_GetScreenInfo * Window */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Window_initIDs +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_intel_gdl_Window_initIDs (JNIEnv *env, jclass clazz) { updateBoundsID = (*env)->GetMethodID(env, clazz, "updateBounds", "(IIII)V"); @@ -245,7 +245,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_intel_gdl_Window_initIDs return JNI_TRUE; } -JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Window_CreateSurface +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_intel_gdl_Window_CreateSurface (JNIEnv *env, jobject obj, jlong displayHandle, jint scr_width, jint scr_height, jint x, jint y, jint width, jint height) { gdl_driver_info_t * p_driver_info = (gdl_driver_info_t *) (intptr_t) displayHandle; @@ -338,7 +338,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_intel_gdl_Window_CreateSurface return (jlong) (intptr_t) plane; } -JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Window_CloseSurface +JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Window_CloseSurface (JNIEnv *env, jobject obj, jlong display, jlong surface) { gdl_plane_id_t plane = (gdl_plane_id_t) (intptr_t) surface ; @@ -347,7 +347,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Window_CloseSurface DBG_PRINT("[CloseSurface] plane %d\n", plane); } -JNIEXPORT void JNICALL Java_jogamp_newt_intel_gdl_Window_SetBounds0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_intel_gdl_Window_SetBounds0 (JNIEnv *env, jobject obj, jlong surface, jint scr_width, jint scr_height, jint x, jint y, jint width, jint height) { gdl_plane_id_t plane = (gdl_plane_id_t) (intptr_t) surface ; diff --git a/src/newt/native/KDWindow.c b/src/newt/native/KDWindow.c index ee335f73e..21ad312d0 100644 --- a/src/newt/native/KDWindow.c +++ b/src/newt/native/KDWindow.c @@ -43,7 +43,7 @@ #include <KD/kd.h> -#include "jogamp_newt_egl_kd_KDWindow.h" +#include "jogamp_newt_driver_kd_KDWindow.h" #include "MouseEvent.h" #include "KeyEvent.h" @@ -81,7 +81,7 @@ static jmethodID sendKeyEventID = NULL; * Display */ -JNIEXPORT void JNICALL Java_jogamp_newt_egl_kd_KDDisplay_DispatchMessages +JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDDisplay_DispatchMessages (JNIEnv *env, jobject obj) { const KDEvent * evt; @@ -177,7 +177,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_egl_kd_KDDisplay_DispatchMessages * Window */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_egl_kd_KDWindow_initIDs +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_kd_KDWindow_initIDs (JNIEnv *env, jclass clazz) { #ifdef VERBOSE_ON @@ -205,7 +205,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_egl_kd_KDWindow_initIDs return JNI_TRUE; } -JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_kd_KDWindow_CreateWindow +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_kd_KDWindow_CreateWindow (JNIEnv *env, jobject obj, jlong display, jintArray jAttrs) { jint * attrs = NULL; @@ -247,7 +247,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_kd_KDWindow_CreateWindow return (jlong) (intptr_t) window; } -JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_kd_KDWindow_RealizeWindow +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_kd_KDWindow_RealizeWindow (JNIEnv *env, jobject obj, jlong window) { KDWindow *w = (KDWindow*) (intptr_t) window; @@ -262,7 +262,7 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_egl_kd_KDWindow_RealizeWindow return (jlong) (intptr_t) nativeWindow; } -JNIEXPORT jint JNICALL Java_jogamp_newt_egl_kd_KDWindow_CloseWindow +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_kd_KDWindow_CloseWindow (JNIEnv *env, jobject obj, jlong window, jlong juserData) { KDWindow *w = (KDWindow*) (intptr_t) window; @@ -276,11 +276,11 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_egl_kd_KDWindow_CloseWindow } /* - * Class: jogamp_newt_egl_kd_KDWindow + * Class: jogamp_newt_driver_kd_KDWindow * Method: setVisible0 * Signature: (JJZ)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_egl_kd_KDWindow_setVisible0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setVisible0 (JNIEnv *env, jobject obj, jlong window, jboolean visible) { KDWindow *w = (KDWindow*) (intptr_t) window; @@ -290,7 +290,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_egl_kd_KDWindow_setVisible0 (*env)->CallVoidMethod(env, obj, visibleChangedID, visible); // FIXME: or send via event ? } -JNIEXPORT void JNICALL Java_jogamp_newt_egl_kd_KDWindow_setFullScreen0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setFullScreen0 (JNIEnv *env, jobject obj, jlong window, jboolean fullscreen) { /** not supported, due to missing NV property .. @@ -307,7 +307,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_egl_kd_KDWindow_setFullScreen0 (void)fullscreen; } -JNIEXPORT void JNICALL Java_jogamp_newt_egl_kd_KDWindow_setSize0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_kd_KDWindow_setSize0 (JNIEnv *env, jobject obj, jlong window, jint width, jint height) { KDWindow *w = (KDWindow*) (intptr_t) window; diff --git a/src/newt/native/MacWindow.m b/src/newt/native/MacWindow.m index 3b708acce..719acc927 100644 --- a/src/newt/native/MacWindow.m +++ b/src/newt/native/MacWindow.m @@ -33,7 +33,7 @@ #import <inttypes.h> -#import "jogamp_newt_macosx_MacWindow.h" +#import "jogamp_newt_driver_macosx_MacWindow.h" #import "NewtMacWindow.h" #import "MouseEvent.h" @@ -134,11 +134,11 @@ NS_ENDHANDLER } /* - * Class: jogamp_newt_macosx_MacDisplay + * Class: jogamp_newt_driver_macosx_MacDisplay * Method: initIDs * Signature: ()Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacDisplay_initNSApplication0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_macosx_MacDisplay_initNSApplication0 (JNIEnv *env, jclass clazz) { static int initialized = 0; @@ -168,11 +168,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacDisplay_initNSApplication0 } /* - * Class: jogamp_newt_macosx_MacDisplay + * Class: jogamp_newt_driver_macosx_MacDisplay * Method: dispatchMessages0 * Signature: ()V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacDisplay_dispatchMessages0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacDisplay_dispatchMessages0 (JNIEnv *env, jobject unused) { NSEvent* event = NULL; @@ -206,11 +206,11 @@ NS_ENDHANDLER } /* - * Class: jogamp_newt_macosx_MacScreen + * Class: jogamp_newt_driver_macosx_MacScreen * Method: getWidthImpl * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getWidthImpl0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_macosx_MacScreen_getWidthImpl0 (JNIEnv *env, jclass clazz, jint screen_idx) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -227,11 +227,11 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getWidthImpl0 } /* - * Class: jogamp_newt_macosx_MacScreen + * Class: jogamp_newt_driver_macosx_MacScreen * Method: getHeightImpl * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getHeightImpl0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_macosx_MacScreen_getHeightImpl0 (JNIEnv *env, jclass clazz, jint screen_idx) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -248,11 +248,11 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_macosx_MacScreen_getHeightImpl0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: initIDs * Signature: ()Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacWindow_initIDs0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_macosx_MacWindow_initIDs0 (JNIEnv *env, jclass clazz) { static int initialized = 0; @@ -269,11 +269,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_macosx_MacWindow_initIDs0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: createWindow0 * Signature: (JIIIIZIIIJ)J */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_createWindow0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_createWindow0 (JNIEnv *env, jobject jthis, jlong parent, jint x, jint y, jint w, jint h, jboolean fullscreen, jint styleMask, jint bufferingType, jint screen_idx, jlong jview) { @@ -355,11 +355,11 @@ NS_ENDHANDLER } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: makeKeyAndOrderFront * Signature: (J)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_makeKeyAndOrderFront0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_makeKeyAndOrderFront0 (JNIEnv *env, jobject unused, jlong window) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -369,11 +369,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_makeKeyAndOrderFront0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: makeKey * Signature: (J)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_makeKey0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_makeKey0 (JNIEnv *env, jobject unused, jlong window) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -383,11 +383,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_makeKey0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: orderOut * Signature: (J)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_orderOut0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_orderOut0 (JNIEnv *env, jobject unused, jlong window) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -397,11 +397,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_orderOut0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: close0 * Signature: (J)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_close0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_close0 (JNIEnv *env, jobject unused, jlong window) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -422,11 +422,11 @@ NS_ENDHANDLER } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: setTitle0 * Signature: (JLjava/lang/String;)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setTitle0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setTitle0 (JNIEnv *env, jobject unused, jlong window, jstring title) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -438,11 +438,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setTitle0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: contentView * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_contentView0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_contentView0 (JNIEnv *env, jobject unused, jlong window) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -453,11 +453,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_contentView0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: changeContentView * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_changeContentView0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_macosx_MacWindow_changeContentView0 (JNIEnv *env, jobject jthis, jlong parent, jlong window, jlong jview) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -473,11 +473,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_macosx_MacWindow_changeContentView0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: setContentSize * Signature: (JII)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setContentSize0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setContentSize0 (JNIEnv *env, jobject unused, jlong window, jint w, jint h) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; @@ -488,11 +488,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setContentSize0 } /* - * Class: jogamp_newt_macosx_MacWindow + * Class: jogamp_newt_driver_macosx_MacWindow * Method: setFrameTopLeftPoint * Signature: (JII)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_macosx_MacWindow_setFrameTopLeftPoint0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_macosx_MacWindow_setFrameTopLeftPoint0 (JNIEnv *env, jobject unused, jlong parent, jlong window, jint x, jint y) { NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index 5e666631b..16b6f8aec 100644 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -81,9 +81,9 @@ #define DISPLAY_DEVICE_ACTIVE 0x00000001 #endif -#include "jogamp_newt_windows_WindowsDisplay.h" -#include "jogamp_newt_windows_WindowsScreen.h" -#include "jogamp_newt_windows_WindowsWindow.h" +#include "jogamp_newt_driver_windows_WindowsDisplay.h" +#include "jogamp_newt_driver_windows_WindowsScreen.h" +#include "jogamp_newt_driver_windows_WindowsWindow.h" #include "MouseEvent.h" #include "InputEvent.h" @@ -1000,11 +1000,11 @@ static LRESULT CALLBACK wndProc(HWND wnd, UINT message, } /* - * Class: jogamp_newt_windows_WindowsDisplay + * Class: jogamp_newt_driver_windows_WindowsDisplay * Method: DispatchMessages * Signature: ()V */ -JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsDisplay_DispatchMessages0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsDisplay_DispatchMessages0 (JNIEnv *env, jclass clazz) { int i = 0; @@ -1029,22 +1029,22 @@ JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsDisplay_DispatchMessages0 } /* - * Class: jogamp_newt_windows_WindowsScreen + * Class: jogamp_newt_driver_windows_WindowsScreen * Method: getWidthImpl * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_windows_WindowsScreen_getWidthImpl0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_getWidthImpl0 (JNIEnv *env, jobject obj, jint scrn_idx) { return (jint)GetSystemMetrics(SM_CXSCREEN); } /* - * Class: jogamp_newt_windows_WindowsScreen + * Class: jogamp_newt_driver_windows_WindowsScreen * Method: getHeightImpl * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_windows_WindowsScreen_getHeightImpl0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_getHeightImpl0 (JNIEnv *env, jobject obj, jint scrn_idx) { return (jint)GetSystemMetrics(SM_CYSCREEN); @@ -1124,11 +1124,11 @@ static HDC NewtScreen_createDisplayDC(LPCTSTR displayDeviceName) { } /* - * Class: jogamp_newt_windows_WindowsScreen + * Class: jogamp_newt_driver_windows_WindowsScreen * Method: getScreenMode0 * Signature: (II)[I */ -JNIEXPORT jintArray JNICALL Java_jogamp_newt_windows_WindowsScreen_getScreenMode0 +JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_getScreenMode0 (JNIEnv *env, jobject obj, jint scrn_idx, jint mode_idx) { DISPLAY_DEVICE device; @@ -1197,11 +1197,11 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_windows_WindowsScreen_getScreenMode } /* - * Class: jogamp_newt_windows_WindowsScreen + * Class: jogamp_newt_driver_windows_WindowsScreen * Method: setScreenMode0 * Signature: (IIIIII)Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsScreen_setScreenMode0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_windows_WindowsScreen_setScreenMode0 (JNIEnv *env, jobject object, jint scrn_idx, jint width, jint height, jint bits, jint rate, jint rot) { DISPLAY_DEVICE device; @@ -1234,11 +1234,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsScreen_setScreenMode0 } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: initIDs0 * Signature: ()Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsWindow_initIDs0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_initIDs0 (JNIEnv *env, jclass clazz) { NewtCommon_init(env); @@ -1277,21 +1277,21 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_windows_WindowsWindow_initIDs0 } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: getNewtWndProc0 * Signature: ()J */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_getNewtWndProc0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_getNewtWndProc0 (JNIEnv *env, jclass clazz) { return (jlong) (intptr_t) wndProc; } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: CreateWindow */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_CreateWindow0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_CreateWindow0 (JNIEnv *env, jobject obj, jlong hInstance, jstring jWndClassName, jstring jWndName, jlong parent, jlong visualID, jboolean bIsUndecorated, @@ -1367,11 +1367,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_CreateWindow0 } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: MonitorFromWindow * Signature: (J)J */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_windows_WindowsWindow_MonitorFromWindow0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_MonitorFromWindow0 (JNIEnv *env, jobject obj, jlong window) { #if (_WIN32_WINNT >= 0x0500 || _WIN32_WINDOWS >= 0x0410 || WINVER >= 0x0500) && !defined(_WIN32_WCE) @@ -1442,11 +1442,11 @@ int NewtWindow_setVisiblePosSize(JNIEnv *env, jobject obj, HWND hwnd, jboolean t } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: setVisible0 * Signature: (JZ)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_setVisible0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_setVisible0 (JNIEnv *env, jobject obj, jlong window, jboolean visible, jboolean top, jint x, jint y, jint width, jint height) { HWND hwnd = (HWND) (intptr_t) window; @@ -1479,11 +1479,11 @@ static jboolean NewtWindows_setFullScreen(jboolean fullscreen) } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: reconfigureWindow0 * Signature: (JIIIIZZII)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_reconfigureWindow0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_reconfigureWindow0 (JNIEnv *env, jobject obj, jlong parent, jlong window, jint x, jint y, jint width, jint height, jboolean visible, jboolean parentChange, jint fullScreenChange, jint decorationChange) { @@ -1552,11 +1552,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_reconfigureWindow0 } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: setTitle * Signature: (JLjava/lang/String;)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_setTitle0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_setTitle0 (JNIEnv *env, jclass clazz, jlong window, jstring title) { HWND hwnd = (HWND) (intptr_t) window; @@ -1570,11 +1570,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_setTitle0 } /* - * Class: jogamp_newt_windows_WindowsWindow + * Class: jogamp_newt_driver_windows_WindowsWindow * Method: requestFocus * Signature: (JZ)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_windows_WindowsWindow_requestFocus0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_requestFocus0 (JNIEnv *env, jobject obj, jlong window, jboolean force) { DBG_PRINT("*** WindowsWindow: RequestFocus0\n"); diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c index 71a421656..e0efac6e5 100644 --- a/src/newt/native/X11Window.c +++ b/src/newt/native/X11Window.c @@ -48,9 +48,9 @@ #include <X11/extensions/Xrandr.h> -#include "jogamp_newt_x11_X11Screen.h" -#include "jogamp_newt_x11_X11Display.h" -#include "jogamp_newt_x11_X11Window.h" +#include "jogamp_newt_driver_x11_X11Screen.h" +#include "jogamp_newt_driver_x11_X11Display.h" +#include "jogamp_newt_driver_x11_X11Window.h" #include "MouseEvent.h" #include "InputEvent.h" @@ -254,11 +254,11 @@ static void displayDispatchErrorHandlerEnable(int onoff, JNIEnv * env) { } /* - * Class: jogamp_newt_x11_X11Display + * Class: jogamp_newt_driver_x11_X11Display * Method: initIDs * Signature: (Z)Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Display_initIDs0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Display_initIDs0 (JNIEnv *env, jclass clazz) { jclass c; @@ -286,11 +286,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Display_initIDs0 } /* - * Class: jogamp_newt_x11_X11Display + * Class: jogamp_newt_driver_x11_X11Display * Method: CompleteDisplay * Signature: (J)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_CompleteDisplay0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_CompleteDisplay0 (JNIEnv *env, jobject obj, jlong display) { Display * dpy = (Display *)(intptr_t)display; @@ -514,11 +514,11 @@ static void NewtWindows_setFullscreen (Display *dpy, Window root, Window w, Bool #define USE_SENDIO_DIRECT 1 /* - * Class: jogamp_newt_x11_X11Display + * Class: jogamp_newt_driver_x11_X11Display * Method: DispatchMessages * Signature: (JIJJ)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0 (JNIEnv *env, jobject obj, jlong display, jlong javaObjectAtom, jlong wmDeleteAtom) { Display * dpy = (Display *) (intptr_t) display; @@ -786,11 +786,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Display_DispatchMessages0 */ /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: GetScreen * Signature: (JI)J */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Screen_GetScreen0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_x11_X11Screen_GetScreen0 (JNIEnv *env, jclass clazz, jlong display, jint screen_index) { Display * dpy = (Display *)(intptr_t)display; @@ -813,14 +813,14 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Screen_GetScreen0 return (jlong) (intptr_t) scrn; } -JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getWidth0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getWidth0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) { Display * dpy = (Display *) (intptr_t) display; return (jint) XDisplayWidth( dpy, scrn_idx); } -JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getHeight0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getHeight0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) { Display * dpy = (Display *) (intptr_t) display; @@ -860,11 +860,11 @@ static int NewtScreen_XRotation2Degree(JNIEnv *env, int xrotation) { } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: getAvailableScreenModeRotations0 * Signature: (JI)I */ -JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getAvailableScreenModeRotations0 +JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_X11Screen_getAvailableScreenModeRotations0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) { Display *dpy = (Display *) (intptr_t) display; @@ -910,18 +910,18 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getAvailableScreenMod } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: getNumScreenModeResolution0 * Signature: (JI)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getNumScreenModeResolutions0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getNumScreenModeResolutions0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) { Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)scrn_idx); if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getNumScreenModeResolutions0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getNumScreenModeResolutions0: RANDR not available\n"); return 0; } @@ -932,18 +932,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getNumScreenModeResolution } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: getScreenModeResolutions0 * Signature: (JII)[I */ -JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeResolution0 +JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_X11Screen_getScreenModeResolution0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx, jint resMode_idx) { Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)scrn_idx); if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getScreenModeResolution0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getScreenModeResolution0: RANDR not available\n"); return (*env)->NewIntArray(env, 0); } @@ -975,18 +975,18 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeResoluti } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: getScreenModeRates0 * Signature: (JII)[I */ -JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeRates0 +JNIEXPORT jintArray JNICALL Java_jogamp_newt_driver_x11_X11Screen_getScreenModeRates0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx, jint resMode_idx) { Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)scrn_idx); if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getScreenModeRates0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getScreenModeRates0: RANDR not available\n"); return (*env)->NewIntArray(env, 0); } @@ -1019,18 +1019,18 @@ JNIEXPORT jintArray JNICALL Java_jogamp_newt_x11_X11Screen_getScreenModeRates0 } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: getCurrentScreenRate0 * Signature: (JI)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRate0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRate0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) { Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)scrn_idx); if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getCurrentScreenRate0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRate0: RANDR not available\n"); return -1; } @@ -1045,18 +1045,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRate0 } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: getCurrentScreenRotation0 * Signature: (JI)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRotation0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRotation0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) { Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)scrn_idx); if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getCurrentScreenRotation0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenRotation0: RANDR not available\n"); return -1; } @@ -1074,18 +1074,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenRotation0 /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: getCurrentScreenResolutionIndex0 * Signature: (JI)I */ -JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenResolutionIndex0 +JNIEXPORT jint JNICALL Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenResolutionIndex0 (JNIEnv *env, jclass clazz, jlong display, jint scrn_idx) { Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)scrn_idx); if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_getCurrentScreenResolutionIndex0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_getCurrentScreenResolutionIndex0: RANDR not available\n"); return -1; } @@ -1103,18 +1103,18 @@ JNIEXPORT jint JNICALL Java_jogamp_newt_x11_X11Screen_getCurrentScreenResolution } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: setCurrentScreenModeStart0 * Signature: (JIIII)Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModeStart0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModeStart0 (JNIEnv *env, jclass clazz, jlong display, jint screen_idx, jint resMode_idx, jint freq, jint rotation) { Display *dpy = (Display *) (intptr_t) display; Window root = RootWindow(dpy, (int)screen_idx); if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_setCurrentScreenModeStart0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModeStart0: RANDR not available\n"); return JNI_FALSE; } @@ -1163,11 +1163,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModeSt } /* - * Class: jogamp_newt_x11_X11Screen + * Class: jogamp_newt_driver_x11_X11Screen * Method: setCurrentScreenModePollEnd0 * Signature: (J)Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePollEnd0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModePollEnd0 (JNIEnv *env, jclass clazz, jlong display, jint screen_idx, jint resMode_idx, jint freq, jint rotation) { Display *dpy = (Display *) (intptr_t) display; @@ -1176,7 +1176,7 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePo XRRScreenChangeNotifyEvent * scn_event = (XRRScreenChangeNotifyEvent *) &evt; if(False == NewtScreen_hasRANDR(dpy)) { - DBG_PRINT("Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePollEnd0: RANDR not available\n"); + DBG_PRINT("Java_jogamp_newt_driver_x11_X11Screen_setCurrentScreenModePollEnd0: RANDR not available\n"); return JNI_FALSE; } @@ -1225,11 +1225,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Screen_setCurrentScreenModePo */ /* - * Class: jogamp_newt_x11_X11Window + * Class: jogamp_newt_driver_x11_X11Window * Method: initIDs * Signature: ()Z */ -JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Window_initIDs0 +JNIEXPORT jboolean JNICALL Java_jogamp_newt_driver_x11_X11Window_initIDs0 (JNIEnv *env, jclass clazz) { sizeChangedID = (*env)->GetMethodID(env, clazz, "sizeChanged", "(IIZ)V"); @@ -1265,11 +1265,11 @@ JNIEXPORT jboolean JNICALL Java_jogamp_newt_x11_X11Window_initIDs0 } /* - * Class: jogamp_newt_x11_X11Window + * Class: jogamp_newt_driver_x11_X11Window * Method: CreateWindow * Signature: (JJIJIIII)J */ -JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Window_CreateWindow0 +JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_x11_X11Window_CreateWindow0 (JNIEnv *env, jobject obj, jlong parent, jlong display, jint screen_index, jlong visualID, jlong javaObjectAtom, jlong windowDeleteAtom, @@ -1389,11 +1389,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_x11_X11Window_CreateWindow0 } /* - * Class: jogamp_newt_x11_X11Window + * Class: jogamp_newt_driver_x11_X11Window * Method: CloseWindow * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_CloseWindow0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_CloseWindow0 (JNIEnv *env, jobject obj, jlong display, jlong window, jlong javaObjectAtom, jlong wmDeleteAtom) { Display * dpy = (Display *) (intptr_t) display; @@ -1421,7 +1421,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_CloseWindow0 XUnmapWindow(dpy, w); // Drain all events related to this window .. - Java_jogamp_newt_x11_X11Display_DispatchMessages0(env, obj, display, javaObjectAtom, wmDeleteAtom); + Java_jogamp_newt_driver_x11_X11Display_DispatchMessages0(env, obj, display, javaObjectAtom, wmDeleteAtom); XDestroyWindow(dpy, w); XSync(dpy, False); @@ -1449,11 +1449,11 @@ static void NewtWindows_setPosSize(Display *dpy, Window w, jint x, jint y, jint } /* - * Class: jogamp_newt_x11_X11Window + * Class: jogamp_newt_driver_x11_X11Window * Method: setVisible0 * Signature: (JJZIIII)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_setVisible0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_setVisible0 (JNIEnv *env, jobject obj, jlong display, jlong window, jboolean visible, jint x, jint y, jint width, jint height) { Display * dpy = (Display *) (intptr_t) display; @@ -1475,11 +1475,11 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_setVisible0 } /* - * Class: jogamp_newt_x11_X11Window + * Class: jogamp_newt_driver_x11_X11Window * Method: reconfigureWindow0 * Signature: (JIJJIIIIZZII)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_reconfigureWindow0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_reconfigureWindow0 (JNIEnv *env, jobject obj, jlong jdisplay, jint screen_index, jlong jparent, jlong jwindow, jint x, jint y, jint width, jint height, jboolean isVisible, jboolean parentChange, jint fullscreenChange, jint decorationChange) { @@ -1544,22 +1544,22 @@ JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_reconfigureWindow0 } /* - * Class: jogamp_newt_x11_X11Window + * Class: jogamp_newt_driver_x11_X11Window * Method: requestFocus0 * Signature: (JJ)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_requestFocus0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_requestFocus0 (JNIEnv *env, jobject obj, jlong display, jlong window, jboolean force) { NewtWindows_requestFocus ( env, obj, (Display *) (intptr_t) display, (Window)window, force ) ; } /* - * Class: Java_jogamp_newt_x11_X11Window + * Class: Java_jogamp_newt_driver_x11_X11Window * Method: setTitle0 * Signature: (JJLjava/lang/String;)V */ -JNIEXPORT void JNICALL Java_jogamp_newt_x11_X11Window_setTitle0 +JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_X11Window_setTitle0 (JNIEnv *env, jclass clazz, jlong display, jlong window, jstring title) { Display * dpy = (Display *) (intptr_t) display; |