aboutsummaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorRami Santina <[email protected]>2010-10-17 03:36:59 +0300
committerRami Santina <[email protected]>2010-10-17 03:36:59 +0300
commit735ebb60ead9996106dfcb958ddfbb6b00b407fd (patch)
treebf393633d7fffc754ef6928aba6cc63abd299e53 /make
parent774138544e1eec3330309ad682fa05154a07ab8d (diff)
Screen Mode manipulation API (with X11 impl) ; X11 Fullscreen impl
Added screen mode change capability with impl for X11 (using Xrandr) com.jogamp.newt.Screen: added 4 methods which cover screen mode lifecycle ScreenMode[] getScreenModes(): Get list of available screen modes returns null if not natively implemented. On first call will fetch the list thru a set of native calls and stores them in the ScreenModeState. Consequent calls will retreive the data from the ScreenModeStatus object. Native calls are done on creation stage, so subsequent API calls will return cached data. int getDesktopScreenModeIndex(): Get the Current Desktop Screen mode index returns -1 if functionality not natively implemented. The index returned refers to the screen mode location in the ScreenMode array. Used to get initial mode for reverting back. Initial call will retreive the mode thru a native call (done on initialization), subsequent API calls will retreive it from the ScreenModeStatus object. Note: If Window is closed without reverting back and screen is set to unreachable. The api will revert the screen. A call to destoy(unreachable) is needed for revert to take place on close windowDestroyNotify(WindowEvent e) { ... window.destroy(true); } short getCurrentScreenRate(): Get the current screen rate returns -1 if not natively implemented. Used along with getDesktopScreenModeIndex You can identify the current screen mode (w x h) and the rate. Initial call will retreive the mode thru a native call (done on initialization), subsequent API calls will retreive it from the ScreenModeStatus object. void setScreenMode(int modeIndex, short rate): change the screen mode to the mode index which refers to one of the screen modes retreived by getScreenModes() and a rate which can be one of screenModes.getRates(). If the rate provided doesnt belong to the list of available rates the first rate is chosen. build-newt.xml: Added header files generation for Screen and Display Added Xrandr syslink to x11 based builds. +++++++++++++ Fullscreen for X11Window: Added Fullscreen WM Hint for X11Window. Event of Fullscreen is sent to the display root. When changing to fullscreen the request is send after configuring the window otherwize before decoration. Not Stable yet, needs tweeking on other Linux dist. Window looses focus after switching to fullscreen mode. +++++++++++++++ Added TestScreenMode01NEWT which includes 4 tests 1- Fullscreen change mode 2- Screen mode change 3- Screen change with fullscreen (revert screenmode then revert fullscreen) 4- Screen change with fullscreen (revert fullscreen then revert screenmode) should fail if not screenmode not implemented on platform. +++++++++++++++ Cleaned up some unused imports
Diffstat (limited to 'make')
-rw-r--r--make/build-newt.xml10
-rwxr-xr-xmake/scripts/tests.sh8
2 files changed, 16 insertions, 2 deletions
diff --git a/make/build-newt.xml b/make/build-newt.xml
index 58f8d1962..820c50a3a 100644
--- a/make/build-newt.xml
+++ b/make/build-newt.xml
@@ -239,11 +239,13 @@
<linker id="linker.cfg.freebsd.newt.x11" extends="linker.cfg.freebsd">
<syslibset dir="/usr/local/lib" libs="X11"/>
+ <syslibset libs="Xrandr"/>
<syslibset dir="/usr/local/lib" libs="Xxf86vm" />
</linker>
<linker id="linker.cfg.freebsd.amd64.newt.x11" extends="linker.cfg.freebsd.amd64">
<syslibset dir="/usr/local/lib" libs="X11"/>
+ <syslibset libs="Xrandr"/>
<syslibset dir="/usr/local/lib" libs="Xxf86vm" />
</linker>
@@ -254,11 +256,13 @@
<linker id="linker.cfg.linux.newt.x11" extends="linker.cfg.linux">
<syslibset libs="X11"/>
+ <syslibset libs="Xrandr"/>
<syslibset libs="Xxf86vm" />
</linker>
<linker id="linker.cfg.linux.amd64.newt.x11" extends="linker.cfg.linux.amd64">
<syslibset libs="X11"/>
+ <syslibset libs="Xrandr"/>
<syslibset libs="Xxf86vm" />
</linker>
@@ -531,8 +535,14 @@
<target name="c.build.newt.prepare.desktop" unless="setup.nodesktop">
<javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="com.jogamp.newt.impl.windows.WindowsWindow" />
+ <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="com.jogamp.newt.impl.windows.WindowsScreen" />
+ <javah destdir="${src.generated.c}/Windows" classpath="${classes}" class="com.jogamp.newt.impl.windows.WindowsDisplay" />
<javah destdir="${src.generated.c}/MacOSX" classpath="${classes}" class="com.jogamp.newt.impl.macosx.MacWindow" />
+ <javah destdir="${src.generated.c}/MacOSX" classpath="${classes}" class="com.jogamp.newt.impl.macosx.MacScreen" />
+ <javah destdir="${src.generated.c}/MacOSX" classpath="${classes}" class="com.jogamp.newt.impl.macosx.MacDisplay" />
<javah destdir="${src.generated.c}/X11" classpath="${classes}" class="com.jogamp.newt.impl.x11.X11Window" />
+ <javah destdir="${src.generated.c}/X11" classpath="${classes}" class="com.jogamp.newt.impl.x11.X11Screen" />
+ <javah destdir="${src.generated.c}/X11" classpath="${classes}" class="com.jogamp.newt.impl.x11.X11Display" />
</target>
<target name="c.build.newt.prepare" depends="c.build.newt.prepare.KD,c.build.newt.prepare.IntelGDL,c.build.newt.prepare.BroadcomEGL,c.build.newt.prepare.desktop" />
diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh
index adaaafff0..a3c8c71d7 100755
--- a/make/scripts/tests.sh
+++ b/make/scripts/tests.sh
@@ -29,7 +29,7 @@ spath=`dirname $0`
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01bAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01cAWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting01cSwingAWT $*
-$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting02AWT $*
+# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting02AWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.TestParenting03AWT $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.jogl.awt.TestSwingAWTRobotUsageBeforeJOGLInitBug411 $*
@@ -38,6 +38,10 @@ $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.parenting.Test
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus01SwingAWTRobot $*
# $spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestFocus02SwingAWTRobot $*
-$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestEventSourceNotAWTBug $*
+#$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestEventSourceNotAWTBug $*
+
+$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestScreenMode01NEWT $*
+
+
$spath/count-edt-start.sh java-run.log