From c74be6eeeb273cd7530ac7e94c3128cb5fa1e420 Mon Sep 17 00:00:00 2001 From: Rami Santina Date: Mon, 18 Oct 2010 23:06:50 +0300 Subject: Added Screen Rotation manipulation API (with X11 impl) Added screen rotation change capability with impl for X11 (using Xrandr) com.jogamp.newt.Screen: added 2 methods which cover screen roation lifecycle setScreenRotation(int rot): Change the Screen Rotation to one of the rotations defined in ScreenMode, namely: ROTATE_0, ROTATE_90, ROTATE_180, ROTATE_270 int getCurrentScreenRotation(): Get the Current screen rotation returns -1 if not implemented natively. +++++++++++++++++++++++++ Notes: 1- At init the original rotation is called natively and cached, when screen is destroyed the rotation is reverted. 2- On X11 with Nvidia: you need to edit /etc/X11/xorg.conf: Add the following line: Option "RandRRotation" "on" in Section "Device" after BoardName. +++++++++++++++ Added TestScreenMode02NEWT which includes 4 tests 1- Rotate 90 2- Rotate 180 3- Rotate 270 4- Rotate with screen mode change should fail if screen rotation not implemented natively. (4) withh fail if screen mode not impl natively as well. --- make/scripts/tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'make') diff --git a/make/scripts/tests.sh b/make/scripts/tests.sh index a3c8c71d7..7246a7ec4 100755 --- a/make/scripts/tests.sh +++ b/make/scripts/tests.sh @@ -40,7 +40,9 @@ spath=`dirname $0` #$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/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestScreenMode01NEWT $* + +$spath/java-run-all.sh ../build-x86_64 com.jogamp.test.junit.newt.TestScreenMode02NEWT $* -- cgit v1.2.3