aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-27 18:20:37 +0100
committerSven Gothel <[email protected]>2012-02-27 18:20:37 +0100
commitb7407c39c0d3785f2fc21782d31c439622f0d744 (patch)
tree5ef1fc876f54e182fa8cdea0226f55783c324a2f /make
parentf519190f0cf97eb6b3fda61f4eb8c1f55de43b51 (diff)
NativeWindow: Relax Xinerama dependency / Rename Windows impl subfolder to common name win32 (same as stub_include)
Utilizing dlopen/dlsym in an efficient way relaxes the platform requirement of having Xinerama available. This allows using Nokia N9 MeeGo out of the box.
Diffstat (limited to 'make')
-rw-r--r--make/build-nativewindow.xml23
-rw-r--r--make/config/nativewindow/x11-lib.cfg2
-rwxr-xr-xmake/scripts/tests.sh2
-rw-r--r--make/stub_includes/x11/window-lib.c5
4 files changed, 11 insertions, 21 deletions
diff --git a/make/build-nativewindow.xml b/make/build-nativewindow.xml
index 40fd24def..c66a92d09 100644
--- a/make/build-nativewindow.xml
+++ b/make/build-nativewindow.xml
@@ -227,7 +227,7 @@
outputRootDir="${build.nativewindow}"
config="${windowlib.os.cfg}"
includeRefid="stub.includes.fileset.platform"
- literalInclude="${stub.includes.gluegen.gg}"
+ literalInclude="${stub.includes.gluegen.gg}, ${src.c}/${window.os.system}"
emitter="com.jogamp.gluegen.JavaEmitter"
debug="false"
dumpCPP="false">
@@ -372,42 +372,36 @@
<linker id="linker.cfg.freebsd.nativewindow.x11" extends="linker.cfg.freebsd">
<syslibset dir="/usr/local/lib" libs="X11"/>
<syslibset dir="/usr/local/lib" libs="Xxf86vm" />
- <syslibset dir="/usr/local/lib" libs="Xinerama"/>
<syslibset dir="/usr/local/lib" libs="Xrender"/>
</linker>
<linker id="linker.cfg.freebsd.amd64.nativewindow.x11" extends="linker.cfg.freebsd.amd64">
<syslibset dir="/usr/local/lib" libs="X11" />
<syslibset dir="/usr/local/lib" libs="Xxf86vm" />
- <syslibset dir="/usr/local/lib" libs="Xinerama"/>
<syslibset dir="/usr/local/lib" libs="Xrender"/>
</linker>
<linker id="linker.cfg.linux.nativewindow.x11" extends="linker.cfg.linux">
<syslibset libs="X11"/>
<syslibset libs="Xxf86vm" />
- <syslibset libs="Xinerama"/>
<syslibset libs="Xrender"/>
</linker>
<linker id="linker.cfg.linux.x86.nativewindow.x11" extends="linker.cfg.linux.x86">
<syslibset libs="X11"/>
<syslibset libs="Xxf86vm" />
- <syslibset libs="Xinerama"/>
<syslibset libs="Xrender"/>
</linker>
<linker id="linker.cfg.linux.amd64.nativewindow.x11" extends="linker.cfg.linux.amd64">
<syslibset libs="X11"/>
<syslibset libs="Xxf86vm" />
- <syslibset libs="Xinerama"/>
<syslibset libs="Xrender"/>
</linker>
<linker id="linker.cfg.linux.armv7.nativewindow.x11" extends="linker.cfg.linux.armv7">
<syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="X11" />
<syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xxf86vm" />
- <syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xinerama" />
<syslibset dir="${env.TARGET_PLATFORM_LIBS}" libs="Xrender" />
</linker>
@@ -415,9 +409,7 @@
<linkerarg value="-L/usr/sfw/lib"/>
<syslibset libs="X11"/>
<syslibset libs="Xxf86vm" />
- <syslibset libs="Xinerama"/>
<syslibset libs="Xrender"/>
- <syslibset libs="X11"/>
</linker>
<linker id="linker.cfg.solaris.sparcv9.nativewindow.x11" extends="linker.cfg.solaris.sparcv9">
@@ -425,9 +417,7 @@
<linkerarg value="-L/usr/sfw/lib/sparcv9"/>
<syslibset libs="X11"/>
<syslibset libs="Xxf86vm" />
- <syslibset libs="Xinerama"/>
<syslibset libs="Xrender"/>
- <syslibset libs="X11"/>
</linker>
<linker id="linker.cfg.solaris.amd64.nativewindow.x11" extends="linker.cfg.solaris.amd64">
@@ -435,9 +425,7 @@
<linkerarg value="-L/usr/sfw/lib/amd64"/>
<syslibset libs="X11"/>
<syslibset libs="Xxf86vm" />
- <syslibset libs="Xinerama"/>
<syslibset libs="Xrender"/>
- <syslibset libs="X11"/>
</linker>
<linker id="linker.cfg.win32.mingw.nativewindow" extends="linker.cfg.win32.mingw">
@@ -468,7 +456,7 @@
<linker id="linker.cfg.hpux.nativewindow" extends="linker.cfg.hpux">
<syslibset dir="/usr/lib" libs="X11"/>
- <syslibset dir="/usr/lib" libs="Xinerama"/>
+ <syslibset dir="/usr/lib" libs="Xrender"/>
</linker>
</target>
@@ -665,8 +653,8 @@
<patternset id="c.src.files.windows">
<include name="${rootrel.generated.c}/Windows/GDI*.c"/>
- <include name="${rootrel.src.c}/windows/GDImisc.c"/>
- <include name="${rootrel.src.c}/windows/WindowsDWM.c"/>
+ <include name="${rootrel.src.c}/win32/GDImisc.c"/>
+ <include name="${rootrel.src.c}/win32/WindowsDWM.c"/>
<include name="${rootrel.src.c}/NativewindowCommon.c"/>
</patternset>
@@ -710,7 +698,8 @@
<includepath path="${src.generated.c}/X11" if="isX11"/>
<includepath path="${src.generated.c}/MacOSX" if="isOSX"/>
<includepath path="${src.generated.c}/Windows" if="isWindows"/>
- <includepath path="${src.c}/windows" if="isWindows"/>
+ <includepath path="${src.c}/win32" if="isWindows"/>
+ <includepath path="${src.c}/x11" if="isX11"/>
<includepath path="${src.c}"/>
<!-- This must come last to not override real include paths -->
diff --git a/make/config/nativewindow/x11-lib.cfg b/make/config/nativewindow/x11-lib.cfg
index 2fe45cf12..ed8c13b54 100644
--- a/make/config/nativewindow/x11-lib.cfg
+++ b/make/config/nativewindow/x11-lib.cfg
@@ -21,6 +21,7 @@ Opaque long Display *
Opaque boolean Bool
Opaque long GLXFBConfig
Opaque long Visual *
+Opaque long void *
IncludeAs CustomJavaCode X11Lib x11-CustomJavaCode.java
@@ -46,4 +47,5 @@ CustomCCode #include <gluegen_stddef.h>
CustomCCode #include <X11/Xlib.h>
CustomCCode #include <X11/Xutil.h>
CustomCCode #include <X11/extensions/Xrender.h>
+CustomCCode #include <XineramaHelper.h>
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index 8a861679f..c2905ea2e 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -50,7 +50,7 @@ function jrun() {
swton=$1
shift
- D_ARGS="-Dnewt.test.Screen.disableScreenMode -Dnewt.debug.Screen"
+ #D_ARGS="-Dnewt.test.Screen.disableScreenMode -Dnewt.debug.Screen"
#D_ARGS="-Djogl.debug.ExtensionAvailabilityCache -Djogl.debug=all -Dnativewindow.debug=all -Djogamp.debug.ProcAddressHelper=true -Djogamp.debug.NativeLibrary=true -Djogamp.debug.NativeLibrary.Lookup=true"
#D_ARGS="-Djogamp.debug=all -Dnativewindow.debug=all -Djogl.debug=all -Dnewt.debug=all"
#D_ARGS="-Dnewt.debug.MainThread"
diff --git a/make/stub_includes/x11/window-lib.c b/make/stub_includes/x11/window-lib.c
index 7b6da3c65..bc5df4ae4 100644
--- a/make/stub_includes/x11/window-lib.c
+++ b/make/stub_includes/x11/window-lib.c
@@ -8,6 +8,8 @@
#define _Xconst const
#endif /* _Xconst */
+#include <XineramaHelper.h>
+
extern intptr_t XSynchronize(Display *display, Bool onoff);
extern int XFlush(Display *display);
@@ -52,9 +54,6 @@ extern int XFree(
void* /* data */
);
-// Helper routine for querying whether Xinerama is enabled.
-Bool XineramaEnabled(Display* display);
-
// Routines for changing gamma settings.
// Note that these are not currently supported on Solaris.
Bool XF86VidModeGetGammaRampSize(