Dynamically load the Xinerama and xf86vmode extensions

This fixes a few bugs with different distributions:
http://bugs.freedesktop.org/show_bug.cgi?id=17431
http://bugs.gentoo.org/show_bug.cgi?id=246177
This commit is contained in:
Sam Lantinga 2011-02-28 09:01:53 -08:00
parent e32b25be9e
commit 73b501d88c
31 changed files with 654 additions and 7156 deletions

613
configure vendored
View File

@ -1537,20 +1537,19 @@ Optional Features:
--enable-dummyaudio support the dummy audio driver [default=yes]
--enable-video-x11 use X11 video driver [default=yes]
--enable-x11-shared dynamically load X11 support [default=maybe]
--enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]
--enable-video-x11-xv use X11 XvImage extension for video [default=yes]
--enable-video-x11-xinerama
enable X11 Xinerama support [default=yes]
--enable-video-x11-xshape
enable X11 XShape support [default=yes]
--enable-video-x11-xrandr
enable X11 Xrandr extension for fullscreen
[default=yes]
--enable-video-x11-xinput
enable X11 XInput extension for manymouse, tablets,
etc [default=yes]
--enable-video-x11-xrandr
enable X11 Xrandr extension for fullscreen
[default=yes]
--enable-video-x11-scrnsaver
enable X11 screensaver extension [default=yes]
--enable-video-x11-xshape
enable X11 XShape support [default=yes]
--enable-video-x11-vm use X11 VM extension for fullscreen [default=yes]
--enable-video-cocoa use Cocoa video driver [default=yes]
--enable-video-directfb use DirectFB video driver [default=no]
--enable-directfb-shared
@ -3770,13 +3769,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
(eval echo "\"\$as_me:3773: $ac_compile\"" >&5)
(eval echo "\"\$as_me:3772: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
(eval echo "\"\$as_me:3776: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval echo "\"\$as_me:3775: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
(eval echo "\"\$as_me:3779: output\"" >&5)
(eval echo "\"\$as_me:3778: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@ -5003,7 +5002,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 5006 "configure"' > conftest.$ac_ext
echo '#line 5005 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -7164,11 +7163,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7167: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7166: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7171: \$? = $ac_status" >&5
echo "$as_me:7170: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7503,11 +7502,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7506: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7505: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:7510: \$? = $ac_status" >&5
echo "$as_me:7509: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -7608,11 +7607,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7611: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7610: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7615: \$? = $ac_status" >&5
echo "$as_me:7614: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -7663,11 +7662,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:7666: $lt_compile\"" >&5)
(eval echo "\"\$as_me:7665: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:7670: \$? = $ac_status" >&5
echo "$as_me:7669: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -10421,7 +10420,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10424 "configure"
#line 10423 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -10517,7 +10516,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 10520 "configure"
#line 10519 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -14199,11 +14198,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14202: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14201: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:14206: \$? = $ac_status" >&5
echo "$as_me:14205: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@ -14298,11 +14297,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14301: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14300: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14305: \$? = $ac_status" >&5
echo "$as_me:14304: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -14350,11 +14349,11 @@ else
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
(eval echo "\"\$as_me:14353: $lt_compile\"" >&5)
(eval echo "\"\$as_me:14352: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:14357: \$? = $ac_status" >&5
echo "$as_me:14356: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@ -24086,12 +24085,12 @@ fi
x11_symbols_private=yes
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
xss_lib='/usr/X11R6/lib/libXss.6.dylib'
xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
xss_lib='/usr/X11R6/lib/libXss.1.dylib'
xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
;;
*-*-osf*)
x11_lib='libX11.so'
@ -24104,12 +24103,12 @@ fi
*)
x11_lib=`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
x11ext_lib=`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xrender_lib=`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xrandr_lib=`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xinerama_lib=`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xinput_lib=`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xrandr_lib=`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xrender_lib=`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xss_lib=`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xdamage_lib=`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xfixes_lib=`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
xvidmode_lib=`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`
;;
esac
@ -24160,34 +24159,6 @@ _ACEOF
fi
have_video=yes
# Check whether --enable-video-x11-vm was given.
if test "${enable_video_x11_vm+set}" = set; then
enableval=$enable_video_x11_vm;
else
enable_video_x11_vm=yes
fi
if test x$enable_video_x11_vm = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_VIDMODE 1
_ACEOF
SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
fi
# Check whether --enable-video-x11-xv was given.
if test "${enable_video_x11_xv+set}" = set; then
enableval=$enable_video_x11_xv;
else
enable_video_x11_xv=yes
fi
if test x$enable_video_x11_xv = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XV 1
_ACEOF
SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
fi
# Check whether --enable-video-x11-xinerama was given.
if test "${enable_video_x11_xinerama+set}" = set; then
enableval=$enable_video_x11_xinerama;
@ -24196,23 +24167,10 @@ else
fi
if test x$enable_video_x11_xinerama = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
_ACEOF
SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
fi
# Check whether --enable-video-x11-xshape was given.
if test "${enable_video_x11_xshape+set}" = set; then
enableval=$enable_video_x11_xshape;
else
enable_video_x11_xshape=yes
fi
if test x$enable_video_x11_xshape = xyes; then
{ echo "$as_me:$LINENO: checking for X11/extensions/shape.h" >&5
echo $ECHO_N "checking for X11/extensions/shape.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_shape_h+set}" = set; then
definitely_enable_video_x11_xinerama=no
{ echo "$as_me:$LINENO: checking for X11/extensions/Xinerama.h" >&5
echo $ECHO_N "checking for X11/extensions/Xinerama.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_Xinerama_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
@ -24224,7 +24182,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>
#include <X11/extensions/Xinerama.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
@ -24243,109 +24201,41 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_X11_extensions_shape_h=yes
ac_cv_header_X11_extensions_Xinerama_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_X11_extensions_shape_h=no
ac_cv_header_X11_extensions_Xinerama_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_shape_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_shape_h" >&6; }
if test $ac_cv_header_X11_extensions_shape_h = yes; then
have_shape_h_hdr=yes
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xinerama_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xinerama_h" >&6; }
if test $ac_cv_header_X11_extensions_Xinerama_h = yes; then
have_xinerama_h_hdr=yes
else
have_shape_h_hdr=no
have_xinerama_h_hdr=no
fi
if test x$have_shape_h_hdr = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
_ACEOF
fi
fi
# Check whether --enable-video-x11-xrandr was given.
if test "${enable_video_x11_xrandr+set}" = set; then
enableval=$enable_video_x11_xrandr;
else
enable_video_x11_xrandr=yes
fi
if test x$enable_video_x11_xrandr = xyes; then
definitely_enable_video_x11_xrandr=no
{ echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_X11_extensions_Xrandr_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_X11_extensions_Xrandr_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
have_xrandr_h_hdr=yes
else
have_xrandr_h_hdr=no
fi
if test x$have_xrandr_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
echo "-- dynamic libXrandr -> $xrandr_lib"
if test x$have_xinerama_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
echo "-- dynamic libXinerama -> $xinerama_lib"
cat >>confdefs.h <<_ACEOF
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "$xrandr_lib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "$xinerama_lib"
_ACEOF
definitely_enable_video_x11_xrandr=yes
definitely_enable_video_x11_xinerama=yes
else
{ echo "$as_me:$LINENO: checking for XRRQueryExtension in -lXrandr" >&5
echo $ECHO_N "checking for XRRQueryExtension in -lXrandr... $ECHO_C" >&6; }
if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then
{ echo "$as_me:$LINENO: checking for XineramaQueryExtension in -lXinerama" >&5
echo $ECHO_N "checking for XineramaQueryExtension in -lXinerama... $ECHO_C" >&6; }
if test "${ac_cv_lib_Xinerama_XineramaQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXrandr $LIBS"
LIBS="-lXinerama $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@ -24359,11 +24249,11 @@ cat >>conftest.$ac_ext <<_ACEOF
#ifdef __cplusplus
extern "C"
#endif
char XRRQueryExtension ();
char XineramaQueryExtension ();
int
main ()
{
return XRRQueryExtension ();
return XineramaQueryExtension ();
;
return 0;
}
@ -24386,34 +24276,34 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_Xrandr_XRRQueryExtension=yes
ac_cv_lib_Xinerama_XineramaQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_Xrandr_XRRQueryExtension=no
ac_cv_lib_Xinerama_XineramaQueryExtension=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; }
if test $ac_cv_lib_Xrandr_XRRQueryExtension = yes; then
have_xrandr_lib=yes
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xinerama_XineramaQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryExtension" >&6; }
if test $ac_cv_lib_Xinerama_XineramaQueryExtension = yes; then
have_xinerama_lib=yes
fi
if test x$have_xrandr_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
definitely_enable_video_x11_xrandr=yes
if test x$have_xinerama_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
definitely_enable_video_x11_xinerama=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xrandr = xyes; then
if test x$definitely_enable_video_x11_xinerama = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
_ACEOF
fi
@ -24562,6 +24452,154 @@ fi
if test x$definitely_enable_video_x11_xinput = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XINPUT 1
_ACEOF
fi
# Check whether --enable-video-x11-xrandr was given.
if test "${enable_video_x11_xrandr+set}" = set; then
enableval=$enable_video_x11_xrandr;
else
enable_video_x11_xrandr=yes
fi
if test x$enable_video_x11_xrandr = xyes; then
definitely_enable_video_x11_xrandr=no
{ echo "$as_me:$LINENO: checking for X11/extensions/Xrandr.h" >&5
echo $ECHO_N "checking for X11/extensions/Xrandr.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_Xrandr_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_X11_extensions_Xrandr_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_X11_extensions_Xrandr_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_Xrandr_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_Xrandr_h" >&6; }
if test $ac_cv_header_X11_extensions_Xrandr_h = yes; then
have_xrandr_h_hdr=yes
else
have_xrandr_h_hdr=no
fi
if test x$have_xrandr_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
echo "-- dynamic libXrandr -> $xrandr_lib"
cat >>confdefs.h <<_ACEOF
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "$xrandr_lib"
_ACEOF
definitely_enable_video_x11_xrandr=yes
else
{ echo "$as_me:$LINENO: checking for XRRQueryExtension in -lXrandr" >&5
echo $ECHO_N "checking for XRRQueryExtension in -lXrandr... $ECHO_C" >&6; }
if test "${ac_cv_lib_Xrandr_XRRQueryExtension+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXrandr $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char XRRQueryExtension ();
int
main ()
{
return XRRQueryExtension ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_Xrandr_XRRQueryExtension=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_Xrandr_XRRQueryExtension=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xrandr_XRRQueryExtension" >&5
echo "${ECHO_T}$ac_cv_lib_Xrandr_XRRQueryExtension" >&6; }
if test $ac_cv_lib_Xrandr_XRRQueryExtension = yes; then
have_xrandr_lib=yes
fi
if test x$have_xrandr_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
definitely_enable_video_x11_xrandr=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xrandr = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
_ACEOF
fi
@ -24708,7 +24746,222 @@ fi
fi
if test x$definitely_enable_video_x11_scrnsaver = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_SCRNSAVER 1
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
_ACEOF
fi
# Check whether --enable-video-x11-xshape was given.
if test "${enable_video_x11_xshape+set}" = set; then
enableval=$enable_video_x11_xshape;
else
enable_video_x11_xshape=yes
fi
if test x$enable_video_x11_xshape = xyes; then
{ echo "$as_me:$LINENO: checking for X11/extensions/shape.h" >&5
echo $ECHO_N "checking for X11/extensions/shape.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_shape_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_X11_extensions_shape_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_X11_extensions_shape_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_shape_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_shape_h" >&6; }
if test $ac_cv_header_X11_extensions_shape_h = yes; then
have_shape_h_hdr=yes
else
have_shape_h_hdr=no
fi
if test x$have_shape_h_hdr = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
_ACEOF
fi
fi
# Check whether --enable-video-x11-vm was given.
if test "${enable_video_x11_vm+set}" = set; then
enableval=$enable_video_x11_vm;
else
enable_video_x11_vm=yes
fi
if test x$enable_video_x11_vm = xyes; then
definitely_enable_video_x11_vm=no
{ echo "$as_me:$LINENO: checking for X11/extensions/xf86vmode.h" >&5
echo $ECHO_N "checking for X11/extensions/xf86vmode.h... $ECHO_C" >&6; }
if test "${ac_cv_header_X11_extensions_xf86vmode_h+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Xlib.h>
#include <X11/extensions/xf86vmode.h>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
ac_cv_header_X11_extensions_xf86vmode_h=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_header_X11_extensions_xf86vmode_h=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_extensions_xf86vmode_h" >&5
echo "${ECHO_T}$ac_cv_header_X11_extensions_xf86vmode_h" >&6; }
if test $ac_cv_header_X11_extensions_xf86vmode_h = yes; then
have_vm_h_hdr=yes
else
have_vm_h_hdr=no
fi
if test x$have_vm_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
echo "-- dynamic libXxf86vm -> $xvidmode_lib"
cat >>confdefs.h <<_ACEOF
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "$xvidmode_lib"
_ACEOF
definitely_enable_video_x11_vm=yes
else
{ echo "$as_me:$LINENO: checking for XF86VidModeQueryVersion in -lXxf86vm" >&5
echo $ECHO_N "checking for XF86VidModeQueryVersion in -lXxf86vm... $ECHO_C" >&6; }
if test "${ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lXxf86vm $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char XF86VidModeQueryVersion ();
int
main ()
{
return XF86VidModeQueryVersion ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
(eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest$ac_exeext &&
$as_test_x conftest$ac_exeext; then
ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion=no
fi
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ echo "$as_me:$LINENO: result: $ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion" >&5
echo "${ECHO_T}$ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion" >&6; }
if test $ac_cv_lib_Xxf86vm_XF86VidModeQueryVersion = yes; then
have_vm_lib=yes
fi
if test x$have_vm_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
definitely_enable_video_x11_vm=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_vm = xyes; then
cat >>confdefs.h <<\_ACEOF
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
_ACEOF
fi

View File

@ -1095,12 +1095,12 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
x11_symbols_private=yes
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
xss_lib='/usr/X11R6/lib/libXss.6.dylib'
xdamage_lib='/usr/X11R6/lib/libXdamage.1.dylib'
xfixes_lib='/usr/X11R6/lib/libXfixes.3.dylib'
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
xss_lib='/usr/X11R6/lib/libXss.1.dylib'
xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
;;
*-*-osf*)
x11_lib='libX11.so'
@ -1113,12 +1113,12 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
*)
x11_lib=[`find_lib "libX11.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
x11ext_lib=[`find_lib "libXext.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xinerama_lib=[`find_lib "libXinerama.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xinput_lib=[`find_lib "libXi.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrandr_lib=[`find_lib "libXrandr.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xrender_lib=[`find_lib "libXrender.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xss_lib=[`find_lib "libXss.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xdamage_lib=[`find_lib "libXdamage.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xfixes_lib=[`find_lib "libXfixes.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
xvidmode_lib=[`find_lib "libXxf86vm.so.*" "$X_LIBS -L/usr/X11/$base_libdir -L/usr/X11R6/$base_libdir" | sed 's/.*\/\(.*\)/\1/; q'`]
;;
esac
@ -1158,66 +1158,32 @@ AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
fi
have_video=yes
AC_ARG_ENABLE(video-x11-vm,
AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
, enable_video_x11_vm=yes)
if test x$enable_video_x11_vm = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_VIDMODE)
SOURCES="$SOURCES $srcdir/src/video/Xext/Xxf86vm/*.c"
fi
AC_ARG_ENABLE(video-x11-xv,
AC_HELP_STRING([--enable-video-x11-xv], [use X11 XvImage extension for video [[default=yes]]]),
, enable_video_x11_xv=yes)
if test x$enable_video_x11_xv = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XV)
SOURCES="$SOURCES $srcdir/src/video/Xext/Xv/*.c"
fi
AC_ARG_ENABLE(video-x11-xinerama,
AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
, enable_video_x11_xinerama=yes)
if test x$enable_video_x11_xinerama = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
SOURCES="$SOURCES $srcdir/src/video/Xext/Xinerama/*.c"
fi
AC_ARG_ENABLE(video-x11-xshape,
AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
, enable_video_x11_xshape=yes)
if test x$enable_video_x11_xshape = xyes; then
AC_CHECK_HEADER(X11/extensions/shape.h,
have_shape_h_hdr=yes,
have_shape_h_hdr=no,
definitely_enable_video_x11_xinerama=no
AC_CHECK_HEADER(X11/extensions/Xinerama.h,
have_xinerama_h_hdr=yes,
have_xinerama_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_shape_h_hdr = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
fi
fi
AC_ARG_ENABLE(video-x11-xrandr,
AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
, enable_video_x11_xrandr=yes)
if test x$enable_video_x11_xrandr = xyes; then
definitely_enable_video_x11_xrandr=no
AC_CHECK_HEADER(X11/extensions/Xrandr.h,
have_xrandr_h_hdr=yes,
have_xrandr_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xrandr_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
echo "-- dynamic libXrandr -> $xrandr_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
definitely_enable_video_x11_xrandr=yes
if test x$have_xinerama_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xinerama_lib != x ; then
echo "-- dynamic libXinerama -> $xinerama_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA, "$xinerama_lib")
definitely_enable_video_x11_xinerama=yes
else
AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
if test x$have_xrandr_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
definitely_enable_video_x11_xrandr=yes
AC_CHECK_LIB(Xinerama, XineramaQueryExtension, have_xinerama_lib=yes)
if test x$have_xinerama_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXinerama"
definitely_enable_video_x11_xinerama=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xrandr = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
if test x$definitely_enable_video_x11_xinerama = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINERAMA)
fi
AC_ARG_ENABLE(video-x11-xinput,
AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
@ -1246,6 +1212,33 @@ AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for man
if test x$definitely_enable_video_x11_xinput = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XINPUT)
fi
AC_ARG_ENABLE(video-x11-xrandr,
AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
, enable_video_x11_xrandr=yes)
if test x$enable_video_x11_xrandr = xyes; then
definitely_enable_video_x11_xrandr=no
AC_CHECK_HEADER(X11/extensions/Xrandr.h,
have_xrandr_h_hdr=yes,
have_xrandr_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_xrandr_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xrandr_lib != x ; then
echo "-- dynamic libXrandr -> $xrandr_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR, "$xrandr_lib")
definitely_enable_video_x11_xrandr=yes
else
AC_CHECK_LIB(Xrandr, XRRQueryExtension, have_xrandr_lib=yes)
if test x$have_xrandr_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXrandr"
definitely_enable_video_x11_xrandr=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_xrandr = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XRANDR)
fi
AC_ARG_ENABLE(video-x11-scrnsaver,
AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
, enable_video_x11_scrnsaver=yes)
@ -1270,7 +1263,47 @@ AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension
fi
fi
if test x$definitely_enable_video_x11_scrnsaver = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_SCRNSAVER)
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSCRNSAVER)
fi
AC_ARG_ENABLE(video-x11-xshape,
AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
, enable_video_x11_xshape=yes)
if test x$enable_video_x11_xshape = xyes; then
AC_CHECK_HEADER(X11/extensions/shape.h,
have_shape_h_hdr=yes,
have_shape_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_shape_h_hdr = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XSHAPE)
fi
fi
AC_ARG_ENABLE(video-x11-vm,
AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
, enable_video_x11_vm=yes)
if test x$enable_video_x11_vm = xyes; then
definitely_enable_video_x11_vm=no
AC_CHECK_HEADER(X11/extensions/xf86vmode.h,
have_vm_h_hdr=yes,
have_vm_h_hdr=no,
[#include <X11/Xlib.h>
])
if test x$have_vm_h_hdr = xyes; then
if test x$enable_x11_shared = xyes && test x$xvidmode_lib != x ; then
echo "-- dynamic libXxf86vm -> $xvidmode_lib"
AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE, "$xvidmode_lib")
definitely_enable_video_x11_vm=yes
else
AC_CHECK_LIB(Xxf86vm, XF86VidModeQueryVersion, have_vm_lib=yes)
if test x$have_vm_lib = xyes ; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lXxf86vm"
definitely_enable_video_x11_vm=yes
fi
fi
fi
fi
if test x$definitely_enable_video_x11_vm = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_X11_XVIDMODE)
fi
fi
fi

View File

@ -267,16 +267,17 @@
#undef SDL_VIDEO_DRIVER_X11
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
#undef SDL_VIDEO_DRIVER_X11_VIDMODE
#undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
#undef SDL_VIDEO_DRIVER_X11_XINERAMA
#undef SDL_VIDEO_DRIVER_X11_XRANDR
#undef SDL_VIDEO_DRIVER_X11_XINPUT
#undef SDL_VIDEO_DRIVER_X11_SCRNSAVER
#undef SDL_VIDEO_DRIVER_X11_XV
#undef SDL_VIDEO_DRIVER_X11_XRANDR
#undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER
#undef SDL_VIDEO_DRIVER_X11_XSHAPE
#undef SDL_VIDEO_DRIVER_X11_XVIDMODE
#undef SDL_VIDEO_RENDER_D3D
#undef SDL_VIDEO_RENDER_OGL

View File

@ -136,17 +136,17 @@
#define SDL_VIDEO_DRIVER_X11 1
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER "/usr/X11R6/lib/libXrender.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT "/usr/X11R6/lib/libXi.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.6.dylib"
#define SDL_VIDEO_DRIVER_X11_VIDMODE 1
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
#define SDL_VIDEO_DRIVER_X11_XINPUT 1
#define SDL_VIDEO_DRIVER_X11_SCRNSAVER 1
#define SDL_VIDEO_DRIVER_X11_XV 1
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
#ifndef SDL_VIDEO_RENDER_OGL
#define SDL_VIDEO_RENDER_OGL 1

View File

@ -1,10 +0,0 @@
The reason these libraries are built outside of the standard XFree86
tree is so that they can be linked as shared object code directly into
SDL without causing any symbol collisions with code in the application.
You can't link static library code into shared libraries on non-x86
Linux platforms. Since these libraries haven't become standard yet,
we'll just include them directly.
These sources are synchronized with XFree86 4.2.1

View File

@ -1,426 +0,0 @@
/*
* Copyright 1993-2001 by Xi Graphics, Inc.
* All Rights Reserved.
*
* Please see the LICENSE file accompanying this distribution for licensing
* information.
*
* Please send any bug fixes and modifications to src@xig.com.
*
* $XiGId: xme.c,v 1.2 2001/11/30 21:56:59 jon Exp $
*
*/
#define NEED_EVENTS
#define NEED_REPLIES
/* Apparently some X11 systems can't include this multiple times... */
#ifndef SDL_INCLUDED_XLIBINT_H
#define SDL_INCLUDED_XLIBINT_H 1
#include <X11/Xlibint.h>
#endif
#include <X11/Xthreads.h>
#include <X11/Xmd.h>
#include <X11/Xproto.h>
#include "../extensions/Xext.h"
#include "../extensions/extutil.h"
/*****************************************************************************/
#define XIGMISC_PROTOCOL_NAME "XiG-SUNDRY-NONSTANDARD"
#define XIGMISC_MAJOR_VERSION 2
#define XIGMISC_MINOR_VERSION 0
#define XiGMiscNumberEvents 0
#define X_XiGMiscQueryVersion 0
#define X_XiGMiscQueryViews 1
#define X_XiGMiscQueryResolutions 2
#define X_XiGMiscChangeResolution 3
#define X_XiGMiscFullScreen 4
#define sz_xXiGMiscQueryVersionReq 8
#define sz_xXiGMiscQueryViewsReq 8
#define sz_xXiGMiscQueryResolutionsReq 8
#define sz_xXiGMiscChangeResolutionReq 16
#define sz_xXiGMiscFullScreenReq 16
#define sz_xXiGMiscQueryVersionReply 32
#define sz_xXiGMiscQueryViewsReply 32
#define sz_xXiGMiscQueryResolutionsReply 32
#define sz_xXiGMiscQueryFullScreenReply 32
/*******************************************************************/
typedef struct
{
CARD8 reqType; /* always codes->major_opcode */
CARD8 xigmiscReqType; /* always X_XiGMiscQueryVersion */
CARD16 length;
CARD16 major;
CARD16 minor;
} xXiGMiscQueryVersionReq;
typedef struct
{
CARD8 reqType; /* always codes->major_opcode */
CARD8 xigmiscReqType; /* always X_XiGMiscQueryViews */
CARD16 length;
CARD8 screen;
CARD8 pad0;
CARD16 pad1;
} xXiGMiscQueryViewsReq;
typedef struct
{
CARD8 reqType; /* always codes->major_opcode */
CARD8 xigmiscReqType; /* always X_XiGMiscQueryResolutions */
CARD16 length;
CARD8 screen;
CARD8 view;
CARD16 pad0;
} xXiGMiscQueryResolutionsReq;
typedef struct
{
CARD8 reqType; /* always codes->major_opcode */
CARD8 xigmiscReqType; /* always X_XiGMiscChangeResolution */
CARD16 length;
CARD8 screen;
CARD8 view;
CARD16 pad0;
CARD16 width;
CARD16 height;
INT32 refresh;
} xXiGMiscChangeResolutionReq;
typedef struct
{
CARD8 reqType; /* always codes->major_opcode */
CARD8 xigmiscReqType; /* always X_XiGMiscFullScreen */
CARD16 length;
CARD8 screen;
CARD8 pad0;
CARD16 pad1;
CARD32 window;
CARD32 cmap;
} xXiGMiscFullScreenReq;
/*******************************************************************/
typedef struct
{
BYTE type; /* X_Reply */
CARD8 pad0;
CARD16 sequenceNumber;
CARD32 length;
CARD16 major;
CARD16 minor;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
CARD32 pad5;
} xXiGMiscQueryVersionReply;
typedef struct
{
BYTE type; /* X_Reply */
CARD8 pad0;
CARD16 sequenceNumber;
CARD32 length;
CARD32 nviews;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
CARD32 pad5;
} xXiGMiscQueryViewsReply;
typedef struct
{
BYTE type; /* X_Reply */
CARD8 pad0;
CARD16 sequenceNumber;
CARD32 length;
CARD16 active;
CARD16 nresolutions;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
CARD32 pad5;
} xXiGMiscQueryResolutionsReply;
typedef struct
{
BYTE type; /* X_Reply */
BOOL success;
CARD16 sequenceNumber;
CARD32 length;
CARD32 pad1;
CARD32 pad2;
CARD32 pad3;
CARD32 pad4;
CARD32 pad5;
CARD32 pad6;
} xXiGMiscFullScreenReply;
/*******************************************************************/
typedef struct
{
INT16 x;
INT16 y;
CARD16 w;
CARD16 h;
} XiGMiscViewInfo;
typedef struct
{
CARD16 width;
CARD16 height;
INT32 refresh;
} XiGMiscResolutionInfo;
/*****************************************************************************/
static XExtensionInfo *xigmisc_info = NULL;
static char *xigmisc_extension_name = XIGMISC_PROTOCOL_NAME;
#define XiGMiscCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, xigmisc_extension_name, val)
#define XiGMiscSimpleCheckExtension(dpy,i) \
XextSimpleCheckExtension (dpy, i, xigmisc_extension_name)
#if defined(__STDC__) && !defined(UNIXCPP)
#define XiGMiscGetReq(name,req,info) GetReq (name, req); \
req->reqType = info->codes->major_opcode; \
req->xigmiscReqType = X_##name;
#define XiGMiscGetReqExtra(name,n,req,info) GetReqExtra (name, n, req); \
req->reqType = info->codes->major_opcode; \
req->xigmicReqType = X_##name;
#else
#define XiGMiscGetReq(name,req,info) GetReq (name, req); \
req->reqType = info->codes->major_opcode; \
req->xigmiscReqType = X_/**/name;
#define XiGMiscGetReqExtra(name,n,req,info) GetReqExtra (name, n, req); \
req->reqType = info->codes->major_opcode; \
req->xigmiscReqType = X_/**/name;
#endif
/*
* find_display - locate the display info block
*/
static int XiGMiscCloseDisplay();
static XExtensionHooks xigmisc_extension_hooks = {
NULL, /* create_gc */
NULL, /* copy_gc */
NULL, /* flush_gc */
NULL, /* free_gc */
NULL, /* create_font */
NULL, /* free_font */
XiGMiscCloseDisplay, /* close_display */
NULL, /* wire_to_event */
NULL, /* event_to_wire */
NULL, /* error */
NULL, /* error_string */
};
static
XEXT_GENERATE_CLOSE_DISPLAY(XiGMiscCloseDisplay, xigmisc_info)
static XEXT_GENERATE_FIND_DISPLAY(XiGMiscFindDisplay, xigmisc_info,
xigmisc_extension_name,
&xigmisc_extension_hooks,
XiGMiscNumberEvents, NULL)
/*****************************************************************************/
Bool XiGMiscQueryVersion(Display * dpy, int *major, int *minor)
{
int opcode, event, error;
xXiGMiscQueryVersionReq *req;
xXiGMiscQueryVersionReply rep;
XExtDisplayInfo *info = XiGMiscFindDisplay(dpy);
if (!XQueryExtension(dpy, XIGMISC_PROTOCOL_NAME, &opcode, &event, &error))
return xFalse;
XiGMiscCheckExtension(dpy, info, xFalse);
LockDisplay(dpy);
XiGMiscGetReq(XiGMiscQueryVersion, req, info);
req->major = XIGMISC_MAJOR_VERSION;
req->minor = XIGMISC_MINOR_VERSION;
if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
UnlockDisplay(dpy);
SyncHandle();
return xFalse;
}
*major = rep.major;
*minor = rep.minor;
UnlockDisplay(dpy);
SyncHandle();
return xTrue;
}
int
XiGMiscQueryViews(Display * dpy, int screen, XiGMiscViewInfo ** pviews)
{
int n, size;
XiGMiscViewInfo *views;
xXiGMiscQueryViewsReq *req;
xXiGMiscQueryViewsReply rep;
XExtDisplayInfo *info = XiGMiscFindDisplay(dpy);
XiGMiscCheckExtension(dpy, info, 0);
LockDisplay(dpy);
XiGMiscGetReq(XiGMiscQueryViews, req, info);
req->screen = screen;
if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
n = rep.nviews;
if (n > 0) {
size = sizeof(XiGMiscViewInfo) * n;
views = (XiGMiscViewInfo *) Xmalloc(size);
if (!views) {
_XEatData(dpy, (unsigned long) size);
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
_XReadPad(dpy, (void *) views, size);
*pviews = views;
}
UnlockDisplay(dpy);
SyncHandle();
return n;
}
int
XiGMiscQueryResolutions(Display * dpy, int screen, int view, int *pactive,
XiGMiscResolutionInfo ** presolutions)
{
int n, size;
XiGMiscResolutionInfo *resolutions;
xXiGMiscQueryResolutionsReq *req;
xXiGMiscQueryResolutionsReply rep;
XExtDisplayInfo *info = XiGMiscFindDisplay(dpy);
XiGMiscCheckExtension(dpy, info, 0);
LockDisplay(dpy);
XiGMiscGetReq(XiGMiscQueryResolutions, req, info);
req->screen = screen;
req->view = view;
if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
n = rep.nresolutions;
if (n > 0) {
size = sizeof(XiGMiscResolutionInfo) * n;
resolutions = (XiGMiscResolutionInfo *) Xmalloc(size);
if (!resolutions) {
_XEatData(dpy, (unsigned long) size);
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
_XReadPad(dpy, (void *) resolutions, size);
*presolutions = resolutions;
*pactive = rep.active;
}
UnlockDisplay(dpy);
SyncHandle();
return n;
}
void
XiGMiscChangeResolution(Display * dpy, int screen, int view, int width,
int height, int refresh)
{
xXiGMiscChangeResolutionReq *req;
XExtDisplayInfo *info = XiGMiscFindDisplay(dpy);
XiGMiscSimpleCheckExtension(dpy, info);
LockDisplay(dpy);
XiGMiscGetReq(XiGMiscChangeResolution, req, info);
req->screen = screen;
req->view = view;
req->width = width;
req->height = height;
req->refresh = refresh;
UnlockDisplay(dpy);
SyncHandle();
}
Bool
XiGMiscFullScreen(Display * dpy, int screen, XID window, XID cmap)
{
xXiGMiscFullScreenReq *req;
xXiGMiscFullScreenReply rep;
XExtDisplayInfo *info = XiGMiscFindDisplay(dpy);
XiGMiscCheckExtension(dpy, info, xFalse);
LockDisplay(dpy);
XiGMiscGetReq(XiGMiscFullScreen, req, info);
req->screen = screen;
req->pad0 = 0;
req->pad1 = 0;
req->window = window;
req->cmap = cmap;
if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
UnlockDisplay(dpy);
SyncHandle();
return xFalse;
}
UnlockDisplay(dpy);
SyncHandle();
return (rep.success ? xTrue : xFalse);
}
/* SDL addition from Ryan: free memory used by xme. */
void
XiGMiscDestroy(void)
{
if (xigmisc_info) {
XextDestroyExtension(xigmisc_info);
xigmisc_info = NULL;
}
}
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,303 +0,0 @@
/* $Xorg: XPanoramiX.c,v 1.4 2000/08/17 19:45:51 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/lib/Xinerama/Xinerama.c,v 1.2 2001/07/23 17:20:28 dawes Exp $ */
#define NEED_EVENTS
#define NEED_REPLIES
/* Apparently some X11 systems can't include this multiple times... */
#ifndef SDL_INCLUDED_XLIBINT_H
#define SDL_INCLUDED_XLIBINT_H 1
#include <X11/Xlibint.h>
#endif
#include <X11/Xutil.h>
#include "../extensions/Xext.h"
#include "../extensions/extutil.h" /* in ../include */
#include "../extensions/panoramiXext.h"
#include "../extensions/panoramiXproto.h" /* in ../include */
#include "../extensions/Xinerama.h"
static XExtensionInfo _panoramiX_ext_info_data;
static XExtensionInfo *panoramiX_ext_info = &_panoramiX_ext_info_data;
static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME;
#define PanoramiXCheckExtension(dpy,i,val) \
XextCheckExtension (dpy, i, panoramiX_extension_name, val)
#define PanoramiXSimpleCheckExtension(dpy,i) \
XextSimpleCheckExtension (dpy, i, panoramiX_extension_name)
static int close_display();
static /* const */ XExtensionHooks panoramiX_extension_hooks = {
NULL, /* create_gc */
NULL, /* copy_gc */
NULL, /* flush_gc */
NULL, /* free_gc */
NULL, /* create_font */
NULL, /* free_font */
close_display, /* close_display */
NULL, /* wire_to_event */
NULL, /* event_to_wire */
NULL, /* error */
NULL, /* error_string */
};
static
XEXT_GENERATE_FIND_DISPLAY(find_display, panoramiX_ext_info,
panoramiX_extension_name,
&panoramiX_extension_hooks, 0, NULL)
static XEXT_GENERATE_CLOSE_DISPLAY(close_display, panoramiX_ext_info)
/****************************************************************************
* *
* PanoramiX public interfaces *
* *
****************************************************************************/
Bool SDL_NAME(XPanoramiXQueryExtension) (Display * dpy,
int *event_basep,
int *error_basep)
{
XExtDisplayInfo *info = find_display(dpy);
if (XextHasExtension(info)) {
*event_basep = info->codes->first_event;
*error_basep = info->codes->first_error;
return True;
} else {
return False;
}
}
Status SDL_NAME(XPanoramiXQueryVersion) (Display * dpy,
int *major_versionp,
int *minor_versionp)
{
XExtDisplayInfo *info = find_display(dpy);
xPanoramiXQueryVersionReply rep;
register xPanoramiXQueryVersionReq *req;
PanoramiXCheckExtension(dpy, info, 0);
LockDisplay(dpy);
GetReq(PanoramiXQueryVersion, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXQueryVersion;
req->clientMajor = PANORAMIX_MAJOR_VERSION;
req->clientMinor = PANORAMIX_MINOR_VERSION;
if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
*major_versionp = rep.majorVersion;
*minor_versionp = rep.minorVersion;
UnlockDisplay(dpy);
SyncHandle();
return 1;
}
SDL_NAME(XPanoramiXInfo) * SDL_NAME(XPanoramiXAllocInfo) (void)
{
return (SDL_NAME(XPanoramiXInfo) *)
Xmalloc(sizeof(SDL_NAME(XPanoramiXInfo)));
}
Status SDL_NAME(XPanoramiXGetState) (Display * dpy,
Drawable drawable,
SDL_NAME(XPanoramiXInfo) *
panoramiX_info)
{
XExtDisplayInfo *info = find_display(dpy);
xPanoramiXGetStateReply rep;
register xPanoramiXGetStateReq *req;
PanoramiXCheckExtension(dpy, info, 0);
LockDisplay(dpy);
GetReq(PanoramiXGetState, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXGetState;
req->window = drawable;
if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
UnlockDisplay(dpy);
SyncHandle();
panoramiX_info->window = rep.window;
panoramiX_info->State = rep.state;
return 1;
}
Status SDL_NAME(XPanoramiXGetScreenCount) (Display * dpy,
Drawable drawable,
SDL_NAME(XPanoramiXInfo) *
panoramiX_info)
{
XExtDisplayInfo *info = find_display(dpy);
xPanoramiXGetScreenCountReply rep;
register xPanoramiXGetScreenCountReq *req;
PanoramiXCheckExtension(dpy, info, 0);
LockDisplay(dpy);
GetReq(PanoramiXGetScreenCount, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXGetScreenCount;
req->window = drawable;
if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
UnlockDisplay(dpy);
SyncHandle();
panoramiX_info->window = rep.window;
panoramiX_info->ScreenCount = rep.ScreenCount;
return 1;
}
Status SDL_NAME(XPanoramiXGetScreenSize) (Display * dpy,
Drawable drawable,
int screen_num,
SDL_NAME(XPanoramiXInfo) *
panoramiX_info)
{
XExtDisplayInfo *info = find_display(dpy);
xPanoramiXGetScreenSizeReply rep;
register xPanoramiXGetScreenSizeReq *req;
PanoramiXCheckExtension(dpy, info, 0);
LockDisplay(dpy);
GetReq(PanoramiXGetScreenSize, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_PanoramiXGetScreenSize;
req->window = drawable;
req->screen = screen_num; /* need to define */
if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
UnlockDisplay(dpy);
SyncHandle();
return 0;
}
UnlockDisplay(dpy);
SyncHandle();
panoramiX_info->window = rep.window;
panoramiX_info->screen = rep.screen;
panoramiX_info->width = rep.width;
panoramiX_info->height = rep.height;
return 1;
}
/*******************************************************************\
Alternate interface to make up for shortcomings in the original,
namely, the omission of the screen origin. The new interface is
in the "Xinerama" namespace instead of "PanoramiX".
\*******************************************************************/
Bool SDL_NAME(XineramaQueryExtension) (Display * dpy,
int *event_base, int *error_base)
{
return SDL_NAME(XPanoramiXQueryExtension) (dpy, event_base, error_base);
}
Status SDL_NAME(XineramaQueryVersion) (Display * dpy, int *major, int *minor)
{
return SDL_NAME(XPanoramiXQueryVersion) (dpy, major, minor);
}
Bool SDL_NAME(XineramaIsActive) (Display * dpy)
{
xXineramaIsActiveReply rep;
xXineramaIsActiveReq *req;
XExtDisplayInfo *info = find_display(dpy);
if (!XextHasExtension(info))
return False; /* server doesn't even have the extension */
LockDisplay(dpy);
GetReq(XineramaIsActive, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_XineramaIsActive;
if (!_XReply(dpy, (xReply *) & rep, 0, xTrue)) {
UnlockDisplay(dpy);
SyncHandle();
return False;
}
UnlockDisplay(dpy);
SyncHandle();
return rep.state;
}
#include <stdio.h>
SDL_NAME(XineramaScreenInfo) *
SDL_NAME(XineramaQueryScreens) (Display * dpy, int *number)
{
XExtDisplayInfo *info = find_display(dpy);
xXineramaQueryScreensReply rep;
xXineramaQueryScreensReq *req;
SDL_NAME(XineramaScreenInfo) * scrnInfo = NULL;
PanoramiXCheckExtension(dpy, info, 0);
LockDisplay(dpy);
GetReq(XineramaQueryScreens, req);
req->reqType = info->codes->major_opcode;
req->panoramiXReqType = X_XineramaQueryScreens;
if (!_XReply(dpy, (xReply *) & rep, 0, xFalse)) {
UnlockDisplay(dpy);
SyncHandle();
return NULL;
}
if (rep.number) {
if ((scrnInfo =
Xmalloc(sizeof(SDL_NAME(XineramaScreenInfo)) * rep.number))) {
xXineramaScreenInfo scratch;
int i;
for (i = 0; i < rep.number; i++) {
_XRead(dpy, (char *) (&scratch), sz_XineramaScreenInfo);
scrnInfo[i].screen_number = i;
scrnInfo[i].x_org = scratch.x_org;
scrnInfo[i].y_org = scratch.y_org;
scrnInfo[i].width = scratch.width;
scrnInfo[i].height = scratch.height;
}
*number = rep.number;
} else
_XEatData(dpy, rep.length << 2);
}
UnlockDisplay(dpy);
SyncHandle();
return scrnInfo;
}
/* vi: set ts=4 sw=4 expandtab: */

File diff suppressed because it is too large Load Diff

View File

@ -1,82 +0,0 @@
/***********************************************************
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/lib/Xv/Xvlibint.h,v 1.5 2001/07/25 15:04:53 dawes Exp $ */
#ifndef XVLIBINT_H
#define XVLIBINT_H
/*
** File:
**
** Xvlibint.h --- Xv library internal header file
**
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
** Revisions:
**
** 01.24.91 Carver
** - version 1.4 upgrade
**
*/
#define NEED_REPLIES
/* Apparently some X11 systems can't include this multiple times... */
#ifndef SDL_INCLUDED_XLIBINT_H
#define SDL_INCLUDED_XLIBINT_H 1
#include <X11/Xlibint.h>
#endif
#include "../extensions/Xvproto.h"
#include "../extensions/Xvlib.h"
#if !defined(UNIXCPP)
#define XvGetReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xv##name##Req)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xv##name##Req *)(dpy->last_req = dpy->bufptr);\
req->reqType = info->codes->major_opcode;\
req->xvReqType = xv_##name; \
req->length = (SIZEOF(xv##name##Req))>>2;\
dpy->bufptr += SIZEOF(xv##name##Req);\
dpy->request++
#else /* non-ANSI C uses empty comment instead of "##" for token concatenation */
#define XvGetReq(name, req) \
WORD64ALIGN\
if ((dpy->bufptr + SIZEOF(xv/**/name/**/Req)) > dpy->bufmax)\
_XFlush(dpy);\
req = (xv/**/name/**/Req *)(dpy->last_req = dpy->bufptr);\
req->reqType = info->codes->major_opcode;\
req->xvReqType = xv_/**/name;\
req->length = (SIZEOF(xv/**/name/**/Req))>>2;\
dpy->bufptr += SIZEOF(xv/**/name/**/Req);\
dpy->request++
#endif
#endif /* XVLIBINT_H */
/* vi: set ts=4 sw=4 expandtab: */

File diff suppressed because it is too large Load Diff

View File

@ -1,46 +0,0 @@
/*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/include/extensions/Xext.h,v 1.7 2005/01/27 03:03:09 dawes Exp $ */
#ifndef _XEXT_H_
#define _XEXT_H_
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
typedef int (*XExtensionErrorHandler) (Display *, _Xconst char *,
_Xconst char *);
extern XExtensionErrorHandler
XSetExtensionErrorHandler(XExtensionErrorHandler handler);
extern int XMissingExtension(Display * /* dpy */ ,
_Xconst char * /* ext_name */
);
_XFUNCPROTOEND
#define X_EXTENSION_UNKNOWN "unknown"
#define X_EXTENSION_MISSING "missing"
#endif /* _XEXT_H_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,37 +0,0 @@
/* $XFree86: xc/include/extensions/Xinerama.h,v 3.2 2000/03/01 01:04:20 dawes Exp $ */
#ifndef _Xinerama_h
#define _Xinerama_h
#include "SDL_name.h"
typedef struct
{
int screen_number;
short x_org;
short y_org;
short width;
short height;
} SDL_NAME(XineramaScreenInfo);
Bool SDL_NAME(XineramaQueryExtension) (Display * dpy,
int *event_base, int *error_base);
Status SDL_NAME(XineramaQueryVersion) (Display * dpy, int *major, int *minor);
Bool SDL_NAME(XineramaIsActive) (Display * dpy);
/*
Returns the number of heads and a pointer to an array of
structures describing the position and size of the individual
heads. Returns NULL and number = 0 if Xinerama is not active.
Returned array should be freed with XFree().
*/
SDL_NAME(XineramaScreenInfo) *
SDL_NAME(XineramaQueryScreens) (Display * dpy, int *number);
#endif /* _Xinerama_h */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,129 +0,0 @@
/***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/extensions/Xv.h,v 1.5 1999/12/11 19:28:48 mvojkovi Exp $ */
#ifndef XV_H
#define XV_H
/*
** File:
**
** Xv.h --- Xv shared library and server header file
**
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
** Revisions:
**
** 05.15.91 Carver
** - version 2.0 upgrade
**
** 01.24.91 Carver
** - version 1.4 upgrade
**
*/
#include <X11/X.h>
#define XvName "XVideo"
#define XvVersion 2
#define XvRevision 2
/* Symbols */
typedef XID XvPortID;
typedef XID XvEncodingID;
#define XvNone 0
#define XvInput 0
#define XvOutput 1
#define XvInputMask (1L<<XvInput)
#define XvOutputMask (1L<<XvOutput)
#define XvVideoMask 0x00000004
#define XvStillMask 0x00000008
#define XvImageMask 0x00000010
/* These two are not client viewable */
#define XvPixmapMask 0x00010000
#define XvWindowMask 0x00020000
#define XvGettable 0x01
#define XvSettable 0x02
#define XvRGB 0
#define XvYUV 1
#define XvPacked 0
#define XvPlanar 1
#define XvTopToBottom 0
#define XvBottomToTop 1
/* Events */
#define XvVideoNotify 0
#define XvPortNotify 1
#define XvNumEvents 2
/* Video Notify Reasons */
#define XvStarted 0
#define XvStopped 1
#define XvBusy 2
#define XvPreempted 3
#define XvHardError 4
#define XvLastReason 4
#define XvNumReasons (XvLastReason + 1)
#define XvStartedMask (1L<<XvStarted)
#define XvStoppedMask (1L<<XvStopped)
#define XvBusyMask (1L<<XvBusy)
#define XvPreemptedMask (1L<<XvPreempted)
#define XvHardErrorMask (1L<<XvHardError)
#define XvAnyReasonMask ((1L<<XvNumReasons) - 1)
#define XvNoReasonMask 0
/* Errors */
#define XvBadPort 0
#define XvBadEncoding 1
#define XvBadControl 2
#define XvNumErrors 3
/* Status */
#define XvBadExtension 1
#define XvAlreadyGrabbed 2
#define XvInvalidTime 3
#define XvBadReply 4
#define XvBadAlloc 5
#endif /* XV_H */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,455 +0,0 @@
/***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/extensions/Xvlib.h,v 1.3 1999/12/11 19:28:48 mvojkovi Exp $ */
#ifndef XVLIB_H
#define XVLIB_H
/*
** File:
**
** Xvlib.h --- Xv library public header file
**
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
** Revisions:
**
** 26.06.91 Carver
** - changed XvFreeAdaptors to XvFreeAdaptorInfo
** - changed XvFreeEncodings to XvFreeEncodingInfo
**
** 11.06.91 Carver
** - changed SetPortControl to SetPortAttribute
** - changed GetPortControl to GetPortAttribute
** - changed QueryBestSize
**
** 05.15.91 Carver
** - version 2.0 upgrade
**
** 01.24.91 Carver
** - version 1.4 upgrade
**
*/
#include <X11/Xfuncproto.h>
#include "Xv.h"
#include "SDL_name.h"
typedef struct
{
int numerator;
int denominator;
} SDL_NAME(XvRational);
typedef struct
{
int flags; /* XvGettable, XvSettable */
int min_value;
int max_value;
char *name;
} SDL_NAME(XvAttribute);
typedef struct
{
XvEncodingID encoding_id;
char *name;
unsigned long width;
unsigned long height;
SDL_NAME(XvRational) rate;
unsigned long num_encodings;
} SDL_NAME(XvEncodingInfo);
typedef struct
{
char depth;
unsigned long visual_id;
} SDL_NAME(XvFormat);
typedef struct
{
XvPortID base_id;
unsigned long num_ports;
char type;
char *name;
unsigned long num_formats;
SDL_NAME(XvFormat) * formats;
unsigned long num_adaptors;
} SDL_NAME(XvAdaptorInfo);
typedef struct
{
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
Drawable drawable; /* drawable */
unsigned long reason; /* what generated this event */
XvPortID port_id; /* what port */
Time time; /* milliseconds */
} SDL_NAME(XvVideoNotifyEvent);
typedef struct
{
int type;
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent request */
Display *display; /* Display the event was read from */
XvPortID port_id; /* what port */
Time time; /* milliseconds */
Atom attribute; /* atom that identifies attribute */
long value; /* value of attribute */
} SDL_NAME(XvPortNotifyEvent);
typedef union
{
int type;
SDL_NAME(XvVideoNotifyEvent) xvvideo;
SDL_NAME(XvPortNotifyEvent) xvport;
long pad[24];
} SDL_NAME(XvEvent);
typedef struct
{
int id; /* Unique descriptor for the format */
int type; /* XvRGB, XvYUV */
int byte_order; /* LSBFirst, MSBFirst */
char guid[16]; /* Globally Unique IDentifier */
int bits_per_pixel;
int format; /* XvPacked, XvPlanar */
int num_planes;
/* for RGB formats only */
int depth;
unsigned int red_mask;
unsigned int green_mask;
unsigned int blue_mask;
/* for YUV formats only */
unsigned int y_sample_bits;
unsigned int u_sample_bits;
unsigned int v_sample_bits;
unsigned int horz_y_period;
unsigned int horz_u_period;
unsigned int horz_v_period;
unsigned int vert_y_period;
unsigned int vert_u_period;
unsigned int vert_v_period;
char component_order[32]; /* eg. UYVY */
int scanline_order; /* XvTopToBottom, XvBottomToTop */
} SDL_NAME(XvImageFormatValues);
typedef struct
{
int id;
int width, height;
int data_size; /* bytes */
int num_planes;
int *pitches; /* bytes */
int *offsets; /* bytes */
char *data;
XPointer obdata;
} SDL_NAME(XvImage);
_XFUNCPROTOBEGIN extern int SDL_NAME(XvQueryExtension) (
#if NeedFunctionPrototypes
Display *
/* display */ ,
unsigned int *
/* p_version */ ,
unsigned int *
/* p_revision */ ,
unsigned int *
/* p_requestBase */
, unsigned int *
/* p_eventBase */
, unsigned int * /* p_errorBase */
#endif
);
extern int SDL_NAME(XvQueryAdaptors) (
#if NeedFunctionPrototypes
Display * /* display */ ,
Window /* window */ ,
unsigned int * /* p_nAdaptors */ ,
SDL_NAME(XvAdaptorInfo) ** /* p_pAdaptors */
#endif
);
extern int SDL_NAME(XvQueryEncodings) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
unsigned int * /* p_nEncoding */ ,
SDL_NAME(XvEncodingInfo) ** /* p_pEncoding */
#endif
);
extern int SDL_NAME(XvPutVideo) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Drawable /* d */ ,
GC /* gc */ ,
int /* vx */ ,
int /* vy */ ,
unsigned int /* vw */ ,
unsigned int /* vh */ ,
int /* dx */ ,
int /* dy */ ,
unsigned int /* dw */ ,
unsigned int /* dh */
#endif
);
extern int SDL_NAME(XvPutStill) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Drawable /* d */ ,
GC /* gc */ ,
int /* vx */ ,
int /* vy */ ,
unsigned int /* vw */ ,
unsigned int /* vh */ ,
int /* dx */ ,
int /* dy */ ,
unsigned int /* dw */ ,
unsigned int /* dh */
#endif
);
extern int SDL_NAME(XvGetVideo) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Drawable /* d */ ,
GC /* gc */ ,
int /* vx */ ,
int /* vy */ ,
unsigned int /* vw */ ,
unsigned int /* vh */ ,
int /* dx */ ,
int /* dy */ ,
unsigned int /* dw */ ,
unsigned int /* dh */
#endif
);
extern int SDL_NAME(XvGetStill) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Drawable /* d */ ,
GC /* gc */ ,
int /* vx */ ,
int /* vy */ ,
unsigned int /* vw */ ,
unsigned int /* vh */ ,
int /* dx */ ,
int /* dy */ ,
unsigned int /* dw */ ,
unsigned int /* dh */
#endif
);
extern int SDL_NAME(XvStopVideo) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Drawable /* drawable */
#endif
);
extern int SDL_NAME(XvGrabPort) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Time /* time */
#endif
);
extern int SDL_NAME(XvUngrabPort) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Time /* time */
#endif
);
extern int SDL_NAME(XvSelectVideoNotify) (
#if NeedFunctionPrototypes
Display * /* display */ ,
Drawable /* drawable */ ,
Bool /* onoff */
#endif
);
extern int SDL_NAME(XvSelectPortNotify) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Bool /* onoff */
#endif
);
extern int SDL_NAME(XvSetPortAttribute) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Atom /* attribute */ ,
int /* value */
#endif
);
extern int SDL_NAME(XvGetPortAttribute) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Atom /* attribute */ ,
int * /* p_value */
#endif
);
extern int SDL_NAME(XvQueryBestSize) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
Bool /* motion */ ,
unsigned int /* vid_w */ ,
unsigned int /* vid_h */ ,
unsigned int /* drw_w */ ,
unsigned int /* drw_h */ ,
unsigned int * /* p_actual_width */
, unsigned int * /* p_actual_width */
#endif
);
extern
SDL_NAME(XvAttribute) *
SDL_NAME(XvQueryPortAttributes) (
#if NeedFunctionPrototypes
Display * /* display */ ,
XvPortID /* port */ ,
int * /* number */
#endif
);
extern void SDL_NAME(XvFreeAdaptorInfo) (
#if NeedFunctionPrototypes
SDL_NAME(XvAdaptorInfo) * /* adaptors */
#endif
);
extern void SDL_NAME(XvFreeEncodingInfo) (
#if NeedFunctionPrototypes
SDL_NAME(XvEncodingInfo) * /* encodings */
#endif
);
extern SDL_NAME(XvImageFormatValues) * SDL_NAME(XvListImageFormats) (
#if NeedFunctionPrototypes
Display
*
display,
XvPortID
port_id,
int
*count_return
#endif
);
extern SDL_NAME(XvImage) * SDL_NAME(XvCreateImage) (
#if NeedFunctionPrototypes
Display *
display,
XvPortID port,
int id,
char *data,
int width,
int height
#endif
);
extern int SDL_NAME(XvPutImage) (
#if NeedFunctionPrototypes
Display * display,
XvPortID id,
Drawable d,
GC gc,
SDL_NAME(XvImage) * image,
int src_x,
int src_y,
unsigned int src_w,
unsigned int src_h,
int dest_x,
int dest_y,
unsigned int dest_w,
unsigned int dest_h
#endif
);
extern int SDL_NAME(XvShmPutImage) (
#if NeedFunctionPrototypes
Display * display,
XvPortID id,
Drawable d,
GC gc,
SDL_NAME(XvImage) * image,
int src_x,
int src_y,
unsigned int src_w,
unsigned int src_h,
int dest_x,
int dest_y,
unsigned int dest_w,
unsigned int dest_h,
Bool send_event
#endif
);
#ifdef _XSHM_H_
extern SDL_NAME(XvImage) * SDL_NAME(XvShmCreateImage) (
#if NeedFunctionPrototypes
Display *
display,
XvPortID
port, int id,
char *data,
int width,
int height,
XShmSegmentInfo
* shminfo
#endif
);
#endif
_XFUNCPROTOEND
#endif /* XVLIB_H */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,644 +0,0 @@
/***********************************************************
Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts,
and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the names of Digital or MIT not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
******************************************************************/
/* $XFree86: xc/include/extensions/Xvproto.h,v 1.6 2001/05/07 21:37:12 tsi Exp $ */
#ifndef XVPROTO_H
#define XVPROTO_H
/*
** File:
**
** Xvproto.h --- Xv protocol header file
**
** Author:
**
** David Carver (Digital Workstation Engineering/Project Athena)
**
** Revisions:
**
** 11.06.91 Carver
** - changed SetPortControl to SetPortAttribute
** - changed GetPortControl to GetPortAttribute
** - changed QueryBestSize
**
** 15.05.91 Carver
** - version 2.0 upgrade
**
** 24.01.91 Carver
** - version 1.4 upgrade
**
*/
#include <X11/Xmd.h>
/* Symbols: These are undefined at the end of this file to restore the
values they have in Xv.h */
#define XvPortID CARD32
#define XvEncodingID CARD32
#define ShmSeg CARD32
#define VisualID CARD32
#define Drawable CARD32
#define GContext CARD32
#define Time CARD32
#define Atom CARD32
/* Structures */
typedef struct
{
INT32 numerator B32;
INT32 denominator B32;
} xvRational;
#define sz_xvRational 8
typedef struct
{
XvPortID base_id B32;
CARD16 name_size B16;
CARD16 num_ports B16;
CARD16 num_formats B16;
CARD8 type;
CARD8 pad;
} xvAdaptorInfo;
#define sz_xvAdaptorInfo 12
typedef struct
{
XvEncodingID encoding B32;
CARD16 name_size B16;
CARD16 width B16, height B16;
xvRational rate;
CARD16 pad B16;
} xvEncodingInfo;
#define sz_xvEncodingInfo (12 + sz_xvRational)
typedef struct
{
VisualID visual B32;
CARD8 depth;
CARD8 pad1;
CARD16 pad2 B16;
} xvFormat;
#define sz_xvFormat 8
typedef struct
{
CARD32 flags B32;
INT32 min B32;
INT32 max B32;
CARD32 size B32;
} xvAttributeInfo;
#define sz_xvAttributeInfo 16
typedef struct
{
CARD32 id B32;
CARD8 type;
CARD8 byte_order;
CARD16 pad1 B16;
CARD8 guid[16];
CARD8 bpp;
CARD8 num_planes;
CARD16 pad2 B16;
CARD8 depth;
CARD8 pad3;
CARD16 pad4 B16;
CARD32 red_mask B32;
CARD32 green_mask B32;
CARD32 blue_mask B32;
CARD8 format;
CARD8 pad5;
CARD16 pad6 B16;
CARD32 y_sample_bits B32;
CARD32 u_sample_bits B32;
CARD32 v_sample_bits B32;
CARD32 horz_y_period B32;
CARD32 horz_u_period B32;
CARD32 horz_v_period B32;
CARD32 vert_y_period B32;
CARD32 vert_u_period B32;
CARD32 vert_v_period B32;
CARD8 comp_order[32];
CARD8 scanline_order;
CARD8 pad7;
CARD16 pad8 B16;
CARD32 pad9 B32;
CARD32 pad10 B32;
} xvImageFormatInfo;
#define sz_xvImageFormatInfo 128
/* Requests */
#define xv_QueryExtension 0
#define xv_QueryAdaptors 1
#define xv_QueryEncodings 2
#define xv_GrabPort 3
#define xv_UngrabPort 4
#define xv_PutVideo 5
#define xv_PutStill 6
#define xv_GetVideo 7
#define xv_GetStill 8
#define xv_StopVideo 9
#define xv_SelectVideoNotify 10
#define xv_SelectPortNotify 11
#define xv_QueryBestSize 12
#define xv_SetPortAttribute 13
#define xv_GetPortAttribute 14
#define xv_QueryPortAttributes 15
#define xv_ListImageFormats 16
#define xv_QueryImageAttributes 17
#define xv_PutImage 18
#define xv_ShmPutImage 19
#define xv_LastRequest xv_ShmPutImage
#define xvNumRequests (xv_LastRequest + 1)
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
} xvQueryExtensionReq;
#define sz_xvQueryExtensionReq 4
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
CARD32 window B32;
} xvQueryAdaptorsReq;
#define sz_xvQueryAdaptorsReq 8
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
CARD32 port B32;
} xvQueryEncodingsReq;
#define sz_xvQueryEncodingsReq 8
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Drawable drawable B32;
GContext gc B32;
INT16 vid_x B16;
INT16 vid_y B16;
CARD16 vid_w B16;
CARD16 vid_h B16;
INT16 drw_x B16;
INT16 drw_y B16;
CARD16 drw_w B16;
CARD16 drw_h B16;
} xvPutVideoReq;
#define sz_xvPutVideoReq 32
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Drawable drawable B32;
GContext gc B32;
INT16 vid_x B16;
INT16 vid_y B16;
CARD16 vid_w B16;
CARD16 vid_h B16;
INT16 drw_x B16;
INT16 drw_y B16;
CARD16 drw_w B16;
CARD16 drw_h B16;
} xvPutStillReq;
#define sz_xvPutStillReq 32
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Drawable drawable B32;
GContext gc B32;
INT16 vid_x B16;
INT16 vid_y B16;
CARD16 vid_w B16;
CARD16 vid_h B16;
INT16 drw_x B16;
INT16 drw_y B16;
CARD16 drw_w B16;
CARD16 drw_h B16;
} xvGetVideoReq;
#define sz_xvGetVideoReq 32
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Drawable drawable B32;
GContext gc B32;
INT16 vid_x B16;
INT16 vid_y B16;
CARD16 vid_w B16;
CARD16 vid_h B16;
INT16 drw_x B16;
INT16 drw_y B16;
CARD16 drw_w B16;
CARD16 drw_h B16;
} xvGetStillReq;
#define sz_xvGetStillReq 32
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Time time B32;
} xvGrabPortReq;
#define sz_xvGrabPortReq 12
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Time time B32;
} xvUngrabPortReq;
#define sz_xvUngrabPortReq 12
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
Drawable drawable B32;
BOOL onoff;
CARD8 pad1;
CARD16 pad2;
} xvSelectVideoNotifyReq;
#define sz_xvSelectVideoNotifyReq 12
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
BOOL onoff;
CARD8 pad1;
CARD16 pad2;
} xvSelectPortNotifyReq;
#define sz_xvSelectPortNotifyReq 12
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Drawable drawable B32;
} xvStopVideoReq;
#define sz_xvStopVideoReq 12
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Atom attribute B32;
INT32 value B32;
} xvSetPortAttributeReq;
#define sz_xvSetPortAttributeReq 16
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Atom attribute B32;
} xvGetPortAttributeReq;
#define sz_xvGetPortAttributeReq 12
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
CARD16 vid_w B16;
CARD16 vid_h B16;
CARD16 drw_w B16;
CARD16 drw_h B16;
CARD8 motion;
CARD8 pad1;
CARD16 pad2 B16;
} xvQueryBestSizeReq;
#define sz_xvQueryBestSizeReq 20
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
} xvQueryPortAttributesReq;
#define sz_xvQueryPortAttributesReq 8
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Drawable drawable B32;
GContext gc B32;
CARD32 id B32;
INT16 src_x B16;
INT16 src_y B16;
CARD16 src_w B16;
CARD16 src_h B16;
INT16 drw_x B16;
INT16 drw_y B16;
CARD16 drw_w B16;
CARD16 drw_h B16;
CARD16 width B16;
CARD16 height B16;
} xvPutImageReq;
#define sz_xvPutImageReq 40
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
Drawable drawable B32;
GContext gc B32;
ShmSeg shmseg B32;
CARD32 id B32;
CARD32 offset B32;
INT16 src_x B16;
INT16 src_y B16;
CARD16 src_w B16;
CARD16 src_h B16;
INT16 drw_x B16;
INT16 drw_y B16;
CARD16 drw_w B16;
CARD16 drw_h B16;
CARD16 width B16;
CARD16 height B16;
CARD8 send_event;
CARD8 pad1;
CARD16 pad2 B16;
} xvShmPutImageReq;
#define sz_xvShmPutImageReq 52
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
XvPortID port B32;
} xvListImageFormatsReq;
#define sz_xvListImageFormatsReq 8
typedef struct
{
CARD8 reqType;
CARD8 xvReqType;
CARD16 length B16;
CARD32 port B32;
CARD32 id B32;
CARD16 width B16;
CARD16 height B16;
} xvQueryImageAttributesReq;
#define sz_xvQueryImageAttributesReq 16
/* Replies */
typedef struct _QueryExtensionReply
{
BYTE type; /* X_Reply */
CARD8 padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 version B16;
CARD16 revision B16;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvQueryExtensionReply;
#define sz_xvQueryExtensionReply 32
typedef struct _QueryAdaptorsReply
{
BYTE type; /* X_Reply */
CARD8 padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 num_adaptors B16;
CARD16 pads3 B16;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvQueryAdaptorsReply;
#define sz_xvQueryAdaptorsReply 32
typedef struct _QueryEncodingsReply
{
BYTE type; /* X_Reply */
CARD8 padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 num_encodings B16;
CARD32 padl3 B32;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvQueryEncodingsReply;
#define sz_xvQueryEncodingsReply 32
typedef struct
{
BYTE type; /* X_Reply */
BYTE result;
CARD16 sequenceNumber B16;
CARD32 length B32; /* 0 */
CARD32 padl3 B32;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvGrabPortReply;
#define sz_xvGrabPortReply 32
typedef struct
{
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32; /* 0 */
INT32 value B32;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvGetPortAttributeReply;
#define sz_xvGetPortAttributeReply 32
typedef struct
{
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32; /* 0 */
CARD16 actual_width B16;
CARD16 actual_height B16;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvQueryBestSizeReply;
#define sz_xvQueryBestSizeReply 32
typedef struct
{
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32; /* 0 */
CARD32 num_attributes B32;
CARD32 text_size B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvQueryPortAttributesReply;
#define sz_xvQueryPortAttributesReply 32
typedef struct
{
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 num_formats B32;
CARD32 padl4 B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvListImageFormatsReply;
#define sz_xvListImageFormatsReply 32
typedef struct
{
BYTE type; /* X_Reply */
BYTE padb1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 num_planes B32;
CARD32 data_size B32;
CARD16 width B16;
CARD16 height B16;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} xvQueryImageAttributesReply;
#define sz_xvQueryImageAttributesReply 32
/* DEFINE EVENT STRUCTURE */
typedef struct
{
union
{
struct
{
BYTE type;
BYTE detail;
CARD16 sequenceNumber B16;
} u;
struct
{
BYTE type;
BYTE reason;
CARD16 sequenceNumber B16;
Time time B32;
Drawable drawable B32;
XvPortID port B32;
CARD32 padl5 B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} videoNotify;
struct
{
BYTE type;
BYTE padb1;
CARD16 sequenceNumber B16;
Time time B32;
XvPortID port B32;
Atom attribute B32;
INT32 value B32;
CARD32 padl6 B32;
CARD32 padl7 B32;
CARD32 padl8 B32;
} portNotify;
} u;
} xvEvent;
#undef XvPortID
#undef XvEncodingID
#undef ShmSeg
#undef VisualID
#undef Drawable
#undef GContext
#undef Time
#undef Atom
#endif /* XVPROTO_H */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,230 +0,0 @@
/*
* $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $
*
Copyright 1989, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*
* Author: Jim Fulton, MIT The Open Group
*
* Xlib Extension-Writing Utilities
*
* This package contains utilities for writing the client API for various
* protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND
* ARE SUBJECT TO CHANGE!
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.9 2001/12/14 19:53:28 dawes Exp $ */
#ifndef _EXTUTIL_H_
#define _EXTUTIL_H_
#include "SDL_stdinc.h" /* For portable string functions */
#include "./Xext.h"
/*
* We need to keep a list of open displays since the Xlib display list isn't
* public. We also have to per-display info in a separate block since it isn't
* stored directly in the Display structure.
*/
typedef struct _XExtDisplayInfo
{
struct _XExtDisplayInfo *next; /* keep a linked list */
Display *display; /* which display this is */
XExtCodes *codes; /* the extension protocol codes */
XPointer data; /* extra data for extension to use */
} XExtDisplayInfo;
typedef struct _XExtensionInfo
{
XExtDisplayInfo *head; /* start of list */
XExtDisplayInfo *cur; /* most recently used */
int ndisplays; /* number of displays */
} XExtensionInfo;
typedef struct _XExtensionHooks
{
int (*create_gc) (
#if NeedNestedPrototypes
Display * /* display */ ,
GC /* gc */ ,
XExtCodes * /* codes */
#endif
);
int (*copy_gc) (
#if NeedNestedPrototypes
Display * /* display */ ,
GC /* gc */ ,
XExtCodes * /* codes */
#endif
);
int (*flush_gc) (
#if NeedNestedPrototypes
Display * /* display */ ,
GC /* gc */ ,
XExtCodes * /* codes */
#endif
);
int (*free_gc) (
#if NeedNestedPrototypes
Display * /* display */ ,
GC /* gc */ ,
XExtCodes * /* codes */
#endif
);
int (*create_font) (
#if NeedNestedPrototypes
Display * /* display */ ,
XFontStruct * /* fs */ ,
XExtCodes * /* codes */
#endif
);
int (*free_font) (
#if NeedNestedPrototypes
Display * /* display */ ,
XFontStruct * /* fs */ ,
XExtCodes * /* codes */
#endif
);
int (*close_display) (
#if NeedNestedPrototypes
Display * /* display */ ,
XExtCodes * /* codes */
#endif
);
Bool(*wire_to_event) (
#if NeedNestedPrototypes
Display * /* display */ ,
XEvent * /* re */ ,
xEvent * /* event */
#endif
);
Status(*event_to_wire) (
#if NeedNestedPrototypes
Display * /* display */ ,
XEvent * /* re */ ,
xEvent * /* event */
#endif
);
int (*error) (
#if NeedNestedPrototypes
Display * /* display */ ,
xError * /* err */ ,
XExtCodes * /* codes */ ,
int * /* ret_code */
#endif
);
char *(*error_string) (
#if NeedNestedPrototypes
Display * /* display */ ,
int /* code */ ,
XExtCodes * /* codes */ ,
char * /* buffer */ ,
int /* nbytes */
#endif
);
} XExtensionHooks;
extern XExtensionInfo *XextCreateExtension(
#if NeedFunctionPrototypes
void
#endif
);
extern void XextDestroyExtension(
#if NeedFunctionPrototypes
XExtensionInfo * /* info */
#endif
);
extern XExtDisplayInfo *XextAddDisplay(
#if NeedFunctionPrototypes
XExtensionInfo * /* extinfo */ ,
Display * /* dpy */ ,
char * /* ext_name */ ,
XExtensionHooks * /* hooks */ ,
int /* nevents */ ,
XPointer /* data */
#endif
);
extern int XextRemoveDisplay(
#if NeedFunctionPrototypes
XExtensionInfo * /* extinfo */ ,
Display * /* dpy */
#endif
);
extern XExtDisplayInfo *XextFindDisplay(
#if NeedFunctionPrototypes
XExtensionInfo * /* extinfo */ ,
Display * /* dpy */
#endif
);
#define XextHasExtension(i) ((i) && ((i)->codes))
#define XextCheckExtension(dpy,i,name,val) \
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return val; }
#define XextSimpleCheckExtension(dpy,i,name) \
if (!XextHasExtension(i)) { XMissingExtension (dpy, name); return; }
/*
* helper macros to generate code that is common to all extensions; caller
* should prefix it with static if extension source is in one file; this
* could be a utility function, but have to stack 6 unused arguments for
* something that is called many, many times would be bad.
*/
#define XEXT_GENERATE_FIND_DISPLAY(proc,extinfo,extname,hooks,nev,data) \
XExtDisplayInfo *proc (Display *dpy) \
{ \
XExtDisplayInfo *dpyinfo; \
if (!extinfo) { if (!(extinfo = XextCreateExtension())) return NULL; } \
if (!(dpyinfo = XextFindDisplay (extinfo, dpy))) \
dpyinfo = XextAddDisplay (extinfo,dpy,extname,hooks,nev,data); \
return dpyinfo; \
}
#define XEXT_FIND_DISPLAY_PROTO(proc) \
XExtDisplayInfo *proc(Display *dpy)
#define XEXT_GENERATE_CLOSE_DISPLAY(proc,extinfo) \
int proc (Display *dpy, XExtCodes *codes) \
{ \
return XextRemoveDisplay (extinfo, dpy); \
}
#define XEXT_CLOSE_DISPLAY_PROTO(proc) \
int proc(Display *dpy, XExtCodes *codes)
#define XEXT_GENERATE_ERROR_STRING(proc,extname,nerr,errl) \
char *proc (Display *dpy, int code, XExtCodes *codes, char *buf, int n) \
{ \
code -= codes->first_error; \
if (code >= 0 && code < nerr) { \
char tmp[256]; \
SDL_snprintf (tmp, SDL_arraysize(tmp), "%s.%d", extname, code); \
XGetErrorDatabaseText (dpy, "XProtoError", tmp, errl[code], buf, n); \
return buf; \
} \
return (char *)0; \
}
#define XEXT_ERROR_STRING_PROTO(proc) \
char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
#endif
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,56 +0,0 @@
/* $Xorg: panoramiXext.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/*
* PanoramiX definitions
*/
/* $XFree86: xc/include/extensions/panoramiXext.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */
#include "SDL_name.h"
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
#define PANORAMIX_MAJOR_VERSION 1 /* current version number */
#define PANORAMIX_MINOR_VERSION 1
typedef struct
{
Window window; /* PanoramiX window - may not exist */
int screen;
int State; /* PanroamiXOff, PanoramiXOn */
int width; /* width of this screen */
int height; /* height of this screen */
int ScreenCount; /* real physical number of screens */
XID eventMask; /* selected events for this client */
} SDL_NAME(XPanoramiXInfo);
extern
SDL_NAME(XPanoramiXInfo) *
SDL_NAME(XPanoramiXAllocInfo) (
#if NeedFunctionPrototypes
void
#endif
);
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,206 +0,0 @@
/* $Xorg: panoramiXproto.h,v 1.4 2000/08/18 04:05:45 coskrey Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL DAMAGES, OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Digital Equipment Corporation
shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/include/extensions/panoramiXproto.h,v 3.6 2001/01/17 17:53:22 dawes Exp $ */
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */
#ifndef _PANORAMIXPROTO_H_
#define _PANORAMIXPROTO_H_
#define PANORAMIX_PROTOCOL_NAME "XINERAMA"
#define X_PanoramiXQueryVersion 0
#define X_PanoramiXGetState 1
#define X_PanoramiXGetScreenCount 2
#define X_PanoramiXGetScreenSize 3
#define X_XineramaIsActive 4
#define X_XineramaQueryScreens 5
typedef struct _PanoramiXQueryVersion
{
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXQueryVersion */
CARD16 length B16;
CARD8 clientMajor;
CARD8 clientMinor;
CARD16 unused B16;
} xPanoramiXQueryVersionReq;
#define sz_xPanoramiXQueryVersionReq 8
typedef struct
{
CARD8 type; /* must be X_Reply */
CARD8 pad1; /* unused */
CARD16 sequenceNumber B16; /* last sequence number */
CARD32 length B32; /* 0 */
CARD16 majorVersion B16;
CARD16 minorVersion B16;
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
CARD32 pad4 B32; /* unused */
CARD32 pad5 B32; /* unused */
CARD32 pad6 B32; /* unused */
} xPanoramiXQueryVersionReply;
#define sz_xPanoramiXQueryVersionReply 32
typedef struct _PanoramiXGetState
{
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXGetState */
CARD16 length B16;
CARD32 window B32;
} xPanoramiXGetStateReq;
#define sz_xPanoramiXGetStateReq 8
typedef struct
{
BYTE type;
BYTE state;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 window B32;
CARD32 pad1 B32; /* unused */
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
CARD32 pad4 B32; /* unused */
CARD32 pad5 B32; /* unused */
} xPanoramiXGetStateReply;
#define sz_panoramiXGetStateReply 32
typedef struct _PanoramiXGetScreenCount
{
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXGetScreenCount */
CARD16 length B16;
CARD32 window B32;
} xPanoramiXGetScreenCountReq;
#define sz_xPanoramiXGetScreenCountReq 8
typedef struct
{
BYTE type;
BYTE ScreenCount;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 window B32;
CARD32 pad1 B32; /* unused */
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
CARD32 pad4 B32; /* unused */
CARD32 pad5 B32; /* unused */
} xPanoramiXGetScreenCountReply;
#define sz_panoramiXGetScreenCountReply 32
typedef struct _PanoramiXGetScreenSize
{
CARD8 reqType; /* always PanoramiXReqCode */
CARD8 panoramiXReqType; /* always X_PanoramiXGetState */
CARD16 length B16;
CARD32 window B32;
CARD32 screen B32;
} xPanoramiXGetScreenSizeReq;
#define sz_xPanoramiXGetScreenSizeReq 12
typedef struct
{
BYTE type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 width B32;
CARD32 height B32;
CARD32 window B32;
CARD32 screen B32;
CARD32 pad2 B32; /* unused */
CARD32 pad3 B32; /* unused */
} xPanoramiXGetScreenSizeReply;
#define sz_panoramiXGetScreenSizeReply 32
/************ Alternate protocol ******************/
typedef struct
{
CARD8 reqType;
CARD8 panoramiXReqType;
CARD16 length B16;
} xXineramaIsActiveReq;
#define sz_xXineramaIsActiveReq 4
typedef struct
{
BYTE type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 state B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXineramaIsActiveReply;
#define sz_XineramaIsActiveReply 32
typedef struct
{
CARD8 reqType;
CARD8 panoramiXReqType;
CARD16 length B16;
} xXineramaQueryScreensReq;
#define sz_xXineramaQueryScreensReq 4
typedef struct
{
BYTE type;
CARD8 pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 number B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXineramaQueryScreensReply;
#define sz_XineramaQueryScreensReply 32
typedef struct
{
INT16 x_org B16;
INT16 y_org B16;
CARD16 width B16;
CARD16 height B16;
} xXineramaScreenInfo;
#define sz_XineramaScreenInfo 8
#endif
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,221 +0,0 @@
/*
Copyright (c) 1999 XFree86 Inc
*/
/* $XFree86: xc/include/extensions/xf86dga.h,v 3.21 2001/08/01 00:44:36 tsi Exp $ */
#ifndef _XF86DGA_H_
#define _XF86DGA_H_
#include <X11/Xfuncproto.h>
#include "xf86dga1.h"
#include "SDL_name.h"
#define X_XDGAQueryVersion 0
/* 1 through 9 are in xf86dga1.h */
/* 10 and 11 are reserved to avoid conflicts with rogue DGA extensions */
#define X_XDGAQueryModes 12
#define X_XDGASetMode 13
#define X_XDGASetViewport 14
#define X_XDGAInstallColormap 15
#define X_XDGASelectInput 16
#define X_XDGAFillRectangle 17
#define X_XDGACopyArea 18
#define X_XDGACopyTransparentArea 19
#define X_XDGAGetViewportStatus 20
#define X_XDGASync 21
#define X_XDGAOpenFramebuffer 22
#define X_XDGACloseFramebuffer 23
#define X_XDGASetClientVersion 24
#define X_XDGAChangePixmapMode 25
#define X_XDGACreateColormap 26
#define XDGAConcurrentAccess 0x00000001
#define XDGASolidFillRect 0x00000002
#define XDGABlitRect 0x00000004
#define XDGABlitTransRect 0x00000008
#define XDGAPixmap 0x00000010
#define XDGAInterlaced 0x00010000
#define XDGADoublescan 0x00020000
#define XDGAFlipImmediate 0x00000001
#define XDGAFlipRetrace 0x00000002
#define XDGANeedRoot 0x00000001
#define XF86DGANumberEvents 7
#define XDGAPixmapModeLarge 0
#define XDGAPixmapModeSmall 1
#define XF86DGAClientNotLocal 0
#define XF86DGANoDirectVideoMode 1
#define XF86DGAScreenNotActive 2
#define XF86DGADirectNotActivated 3
#define XF86DGAOperationNotSupported 4
#define XF86DGANumberErrors (XF86DGAOperationNotSupported + 1)
typedef struct
{
int num; /* A unique identifier for the mode (num > 0) */
char *name; /* name of mode given in the XF86Config */
float verticalRefresh;
int flags; /* DGA_CONCURRENT_ACCESS, etc... */
int imageWidth; /* linear accessible portion (pixels) */
int imageHeight;
int pixmapWidth; /* Xlib accessible portion (pixels) */
int pixmapHeight; /* both fields ignored if no concurrent access */
int bytesPerScanline;
int byteOrder; /* MSBFirst, LSBFirst */
int depth;
int bitsPerPixel;
unsigned long redMask;
unsigned long greenMask;
unsigned long blueMask;
short visualClass;
int viewportWidth;
int viewportHeight;
int xViewportStep; /* viewport position granularity */
int yViewportStep;
int maxViewportX; /* max viewport origin */
int maxViewportY;
int viewportFlags; /* types of page flipping possible */
int reserved1;
int reserved2;
} SDL_NAME(XDGAMode);
typedef struct
{
SDL_NAME(XDGAMode) mode;
unsigned char *data;
Pixmap pixmap;
} SDL_NAME(XDGADevice);
#ifndef _XF86DGA_SERVER_
_XFUNCPROTOBEGIN typedef struct
{
int type;
unsigned long serial;
Display *display;
int screen;
Time time;
unsigned int state;
unsigned int button;
} SDL_NAME(XDGAButtonEvent);
typedef struct
{
int type;
unsigned long serial;
Display *display;
int screen;
Time time;
unsigned int state;
unsigned int keycode;
} SDL_NAME(XDGAKeyEvent);
typedef struct
{
int type;
unsigned long serial;
Display *display;
int screen;
Time time;
unsigned int state;
int dx;
int dy;
} SDL_NAME(XDGAMotionEvent);
typedef union
{
int type;
SDL_NAME(XDGAButtonEvent) xbutton;
SDL_NAME(XDGAKeyEvent) xkey;
SDL_NAME(XDGAMotionEvent) xmotion;
long pad[24];
} SDL_NAME(XDGAEvent);
Bool SDL_NAME(XDGAQueryExtension) (Display * dpy,
int *eventBase, int *erroBase);
Bool SDL_NAME(XDGAQueryVersion) (Display * dpy,
int *majorVersion, int *minorVersion);
SDL_NAME(XDGAMode) * SDL_NAME(XDGAQueryModes) (Display * dpy,
int screen, int *num);
SDL_NAME(XDGADevice) * SDL_NAME(XDGASetMode) (Display * dpy,
int screen, int mode);
Bool
SDL_NAME(XDGAOpenFramebuffer) (Display * dpy, int screen);
void SDL_NAME(XDGACloseFramebuffer) (Display * dpy, int screen);
void SDL_NAME(XDGASetViewport) (Display * dpy,
int screen, int x, int y, int flags);
void SDL_NAME(XDGAInstallColormap) (Display * dpy,
int screen, Colormap cmap);
Colormap
SDL_NAME(XDGACreateColormap) (Display * dpy,
int screen,
SDL_NAME(XDGADevice) * device, int alloc);
void SDL_NAME(XDGASelectInput) (Display * dpy, int screen,
long event_mask);
void SDL_NAME(XDGAFillRectangle) (Display * dpy,
int screen,
int x,
int y,
unsigned int width,
unsigned int height,
unsigned long color);
void SDL_NAME(XDGACopyArea) (Display * dpy,
int screen,
int srcx,
int srcy,
unsigned int width,
unsigned int height, int dstx, int dsty);
void SDL_NAME(XDGACopyTransparentArea) (Display * dpy,
int screen,
int srcx,
int srcy,
unsigned int width,
unsigned int height,
int dstx,
int dsty, unsigned long key);
int SDL_NAME(XDGAGetViewportStatus) (Display * dpy, int screen);
void SDL_NAME(XDGASync) (Display * dpy, int screen);
Bool
SDL_NAME(XDGASetClientVersion) (Display * dpy);
void SDL_NAME(XDGAChangePixmapMode) (Display * dpy,
int screen, int *x, int *y,
int mode);
void SDL_NAME(XDGAKeyEventToXKeyEvent) (SDL_NAME(XDGAKeyEvent) * dk,
XKeyEvent * xk);
_XFUNCPROTOEND
#endif /* _XF86DGA_SERVER_ */
#endif /* _XF86DGA_H_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,167 +0,0 @@
/* $XFree86: xc/include/extensions/xf86dga1.h,v 1.2 1999/04/17 07:05:41 dawes Exp $ */
/*
Copyright (c) 1995 Jon Tombs
Copyright (c) 1995 XFree86 Inc
*/
/************************************************************************
THIS IS THE OLD DGA API AND IS OBSOLETE. PLEASE DO NOT USE IT ANYMORE
************************************************************************/
#ifndef _XF86DGA1_H_
#define _XF86DGA1_H_
#include <X11/Xfuncproto.h>
#include "SDL_name.h"
#define X_XF86DGAQueryVersion 0
#define X_XF86DGAGetVideoLL 1
#define X_XF86DGADirectVideo 2
#define X_XF86DGAGetViewPortSize 3
#define X_XF86DGASetViewPort 4
#define X_XF86DGAGetVidPage 5
#define X_XF86DGASetVidPage 6
#define X_XF86DGAInstallColormap 7
#define X_XF86DGAQueryDirectVideo 8
#define X_XF86DGAViewPortChanged 9
#define XF86DGADirectPresent 0x0001
#define XF86DGADirectGraphics 0x0002
#define XF86DGADirectMouse 0x0004
#define XF86DGADirectKeyb 0x0008
#define XF86DGAHasColormap 0x0100
#define XF86DGADirectColormap 0x0200
#ifndef _XF86DGA_SERVER_
_XFUNCPROTOBEGIN Bool SDL_NAME(XF86DGAQueryVersion) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int *
/* majorVersion */ ,
int * /* minorVersion */
#endif
);
Bool SDL_NAME(XF86DGAQueryExtension) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int * /* event_base */ ,
int * /* error_base */
#endif
);
Status SDL_NAME(XF86DGAGetVideoLL) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int * /* base addr */ ,
int * /* width */ ,
int * /* bank_size */ ,
int * /* ram_size */
#endif
);
Status SDL_NAME(XF86DGAGetVideo) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
char ** /* base addr */ ,
int * /* width */ ,
int * /* bank_size */ ,
int * /* ram_size */
#endif
);
Status SDL_NAME(XF86DGADirectVideo) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int /* enable */
#endif
);
Status SDL_NAME(XF86DGADirectVideoLL) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int /* enable */
#endif
);
Status SDL_NAME(XF86DGAGetViewPortSize) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int * /* width */ ,
int * /* height */
#endif
);
Status SDL_NAME(XF86DGASetViewPort) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int x /* X */ ,
int y /* Y */
#endif
);
Status SDL_NAME(XF86DGAGetVidPage) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int * /* vid page */
#endif
);
Status SDL_NAME(XF86DGASetVidPage) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int /* vid page */
#endif
);
Status SDL_NAME(XF86DGAInstallColormap) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
Colormap /*Colormap */
#endif
);
int SDL_NAME(XF86DGAForkApp) (
#if NeedFunctionPrototypes
int screen
#endif
);
Status SDL_NAME(XF86DGAQueryDirectVideo) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int * /* flags */
#endif
);
Bool SDL_NAME(XF86DGAViewPortChanged) (
#if NeedFunctionPrototypes
Display * /* dpy */ ,
int /* screen */ ,
int /* n */
#endif
);
_XFUNCPROTOEND
#endif /* _XF86DGA_SERVER_ */
#endif /* _XF86DGA1_H_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,210 +0,0 @@
/* $XFree86: xc/include/extensions/xf86dga1str.h,v 1.2 1999/05/03 12:15:37 dawes Exp $ */
/*
Copyright (c) 1995 Jon Tombs
Copyright (c) 1995 XFree86 Inc.
*/
#ifndef _XF86DGASTR1_H_
#define _XF86DGASTR1_H_
typedef struct _XF86DGAQueryVersion
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_DGAQueryVersion */
CARD16 length B16;
} xXF86DGAQueryVersionReq;
#define sz_xXF86DGAQueryVersionReq 4
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 majorVersion B16; /* major version of DGA protocol */
CARD16 minorVersion B16; /* minor version of DGA protocol */
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86DGAQueryVersionReply;
#define sz_xXF86DGAQueryVersionReply 32
typedef struct _XF86DGAGetVideoLL
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_XF86DGAGetVideoLL */
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
} xXF86DGAGetVideoLLReq;
#define sz_xXF86DGAGetVideoLLReq 8
typedef struct _XF86DGAInstallColormap
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD16 screen B16;
CARD16 pad2;
CARD32 id B32; /* colormap. */
} xXF86DGAInstallColormapReq;
#define sz_xXF86DGAInstallColormapReq 12
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 offset B32;
CARD32 width B32;
CARD32 bank_size B32;
CARD32 ram_size B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86DGAGetVideoLLReply;
#define sz_xXF86DGAGetVideoLLReply 32
typedef struct _XF86DGADirectVideo
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_XF86DGADirectVideo */
CARD16 length B16;
CARD16 screen B16;
CARD16 enable B16;
} xXF86DGADirectVideoReq;
#define sz_xXF86DGADirectVideoReq 8
typedef struct _XF86DGAGetViewPortSize
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_XF86DGAGetViewPort */
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
} xXF86DGAGetViewPortSizeReq;
#define sz_xXF86DGAGetViewPortSizeReq 8
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 width B32;
CARD32 height B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86DGAGetViewPortSizeReply;
#define sz_xXF86DGAGetViewPortSizeReply 32
typedef struct _XF86DGASetViewPort
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_XF86DGASetViewPort */
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
CARD32 x B32;
CARD32 y B32;
} xXF86DGASetViewPortReq;
#define sz_xXF86DGASetViewPortReq 16
typedef struct _XF86DGAGetVidPage
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_XF86DGAGetVidPage */
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
} xXF86DGAGetVidPageReq;
#define sz_xXF86DGAGetVidPageReq 8
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 vpage B32;
CARD32 pad B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86DGAGetVidPageReply;
#define sz_xXF86DGAGetVidPageReply 32
typedef struct _XF86DGASetVidPage
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_XF86DGASetVidPage */
CARD16 length B16;
CARD16 screen B16;
CARD16 vpage B16;
} xXF86DGASetVidPageReq;
#define sz_xXF86DGASetVidPageReq 8
typedef struct _XF86DGAQueryDirectVideo
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_DGAQueryVersion */
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
} xXF86DGAQueryDirectVideoReq;
#define sz_xXF86DGAQueryDirectVideoReq 8
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 flags B32;
CARD32 pad B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86DGAQueryDirectVideoReply;
#define sz_xXF86DGAQueryDirectVideoReply 32
typedef struct _XF86DGAViewPortChanged
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_DGAQueryVersion */
CARD16 length B16;
CARD16 screen B16;
CARD16 n B16;
} xXF86DGAViewPortChangedReq;
#define sz_xXF86DGAViewPortChangedReq 8
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 result B32;
CARD32 pad B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86DGAViewPortChangedReply;
#define sz_xXF86DGAViewPortChangedReply 32
#endif /* _XF86DGASTR1_H_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,372 +0,0 @@
/* $XFree86: xc/include/extensions/xf86dgastr.h,v 3.14 2001/08/01 00:44:36 tsi Exp $ */
/*
Copyright (c) 1995 Jon Tombs
Copyright (c) 1995 XFree86 Inc.
*/
#ifndef _XF86DGASTR_H_
#define _XF86DGASTR_H_
#include "xf86dga1str.h"
#define XF86DGANAME "XFree86-DGA"
#define XDGA_MAJOR_VERSION 2 /* current version numbers */
#define XDGA_MINOR_VERSION 0
typedef struct _XDGAQueryVersion
{
CARD8 reqType; /* always DGAReqCode */
CARD8 dgaReqType; /* always X_DGAQueryVersion */
CARD16 length B16;
} xXDGAQueryVersionReq;
#define sz_xXDGAQueryVersionReq 4
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 majorVersion B16; /* major version of DGA protocol */
CARD16 minorVersion B16; /* minor version of DGA protocol */
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXDGAQueryVersionReply;
#define sz_xXDGAQueryVersionReply 32
typedef struct _XDGAQueryModes
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
} xXDGAQueryModesReq;
#define sz_xXDGAQueryModesReq 8
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 number B32; /* number of modes available */
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXDGAQueryModesReply;
#define sz_xXDGAQueryModesReply 32
typedef struct _XDGASetMode
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD32 mode B32; /* mode number to init */
CARD32 pid B32; /* Pixmap descriptor */
} xXDGASetModeReq;
#define sz_xXDGASetModeReq 16
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 offset B32; /* offset into framebuffer map */
CARD32 flags B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXDGASetModeReply;
#define sz_xXDGASetModeReply 32
typedef struct
{
CARD8 byte_order;
CARD8 depth;
CARD16 num B16;
CARD16 bpp B16;
CARD16 name_size B16;
CARD32 vsync_num B32;
CARD32 vsync_den B32;
CARD32 flags B32;
CARD16 image_width B16;
CARD16 image_height B16;
CARD16 pixmap_width B16;
CARD16 pixmap_height B16;
CARD32 bytes_per_scanline B32;
CARD32 red_mask B32;
CARD32 green_mask B32;
CARD32 blue_mask B32;
CARD16 visual_class B16;
CARD16 pad1 B16;
CARD16 viewport_width B16;
CARD16 viewport_height B16;
CARD16 viewport_xstep B16;
CARD16 viewport_ystep B16;
CARD16 viewport_xmax B16;
CARD16 viewport_ymax B16;
CARD32 viewport_flags B32;
CARD32 reserved1 B32;
CARD32 reserved2 B32;
} xXDGAModeInfo;
#define sz_xXDGAModeInfo 72
typedef struct _XDGAOpenFramebuffer
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
} xXDGAOpenFramebufferReq;
#define sz_xXDGAOpenFramebufferReq 8
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32; /* device name size if there is one */
CARD32 mem1 B32; /* physical memory */
CARD32 mem2 B32; /* spillover for _alpha_ */
CARD32 size B32; /* size of map in bytes */
CARD32 offset B32; /* optional offset into device */
CARD32 extra B32; /* extra info associated with the map */
CARD32 pad2 B32;
} xXDGAOpenFramebufferReply;
#define sz_xXDGAOpenFramebufferReply 32
typedef struct _XDGACloseFramebuffer
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
} xXDGACloseFramebufferReq;
#define sz_xXDGACloseFramebufferReq 8
typedef struct _XDGASetViewport
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD16 x B16;
CARD16 y B16;
CARD32 flags B32;
} xXDGASetViewportReq;
#define sz_xXDGASetViewportReq 16
typedef struct _XDGAInstallColormap
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD32 cmap B32;
} xXDGAInstallColormapReq;
#define sz_xXDGAInstallColormapReq 12
typedef struct _XDGASelectInput
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD32 mask B32;
} xXDGASelectInputReq;
#define sz_xXDGASelectInputReq 12
typedef struct _XDGAFillRectangle
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD16 x B16;
CARD16 y B16;
CARD16 width B16;
CARD16 height B16;
CARD32 color B32;
} xXDGAFillRectangleReq;
#define sz_xXDGAFillRectangleReq 20
typedef struct _XDGACopyArea
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD16 srcx B16;
CARD16 srcy B16;
CARD16 width B16;
CARD16 height B16;
CARD16 dstx B16;
CARD16 dsty B16;
} xXDGACopyAreaReq;
#define sz_xXDGACopyAreaReq 20
typedef struct _XDGACopyTransparentArea
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD16 srcx B16;
CARD16 srcy B16;
CARD16 width B16;
CARD16 height B16;
CARD16 dstx B16;
CARD16 dsty B16;
CARD32 key B32;
} xXDGACopyTransparentAreaReq;
#define sz_xXDGACopyTransparentAreaReq 24
typedef struct _XDGAGetViewportStatus
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
} xXDGAGetViewportStatusReq;
#define sz_xXDGAGetViewportStatusReq 8
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 status B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXDGAGetViewportStatusReply;
#define sz_xXDGAGetViewportStatusReply 32
typedef struct _XDGASync
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
} xXDGASyncReq;
#define sz_xXDGASyncReq 8
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
CARD32 pad7 B32;
} xXDGASyncReply;
#define sz_xXDGASyncReply 32
typedef struct _XDGASetClientVersion
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD16 major B16;
CARD16 minor B16;
} xXDGASetClientVersionReq;
#define sz_xXDGASetClientVersionReq 8
typedef struct
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD16 x B16;
CARD16 y B16;
CARD32 flags B32;
} xXDGAChangePixmapModeReq;
#define sz_xXDGAChangePixmapModeReq 16
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 x B16;
CARD16 y B16;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
CARD32 pad7 B32;
} xXDGAChangePixmapModeReply;
#define sz_xXDGAChangePixmapModeReply 32
typedef struct _XDGACreateColormap
{
CARD8 reqType;
CARD8 dgaReqType;
CARD16 length B16;
CARD32 screen B32;
CARD32 id B32;
CARD32 mode B32;
CARD8 alloc;
CARD8 pad1;
CARD16 pad2;
} xXDGACreateColormapReq;
#define sz_xXDGACreateColormapReq 20
typedef struct
{
union
{
struct
{
BYTE type;
BYTE detail;
CARD16 sequenceNumber B16;
} u;
struct
{
CARD32 pad0 B32;
CARD32 time B32;
INT16 dx B16;
INT16 dy B16;
INT16 screen B16;
CARD16 state B16;
CARD32 pad1 B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
} event;
} u;
} dgaEvent;
#endif /* _XF86DGASTR_H_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,298 +0,0 @@
/* $XFree86: xc/include/extensions/xf86vmode.h,v 3.30 2001/05/07 20:09:50 mvojkovi Exp $ */
/*
Copyright 1995 Kaleb S. KEITHLEY
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Kaleb S. KEITHLEY
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
from Kaleb S. KEITHLEY
*/
/* $Xorg: xf86vmode.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
#ifndef _XF86VIDMODE_H_
#define _XF86VIDMODE_H_
#include <X11/Xfuncproto.h>
#include <X11/Xmd.h>
#include "SDL_name.h"
#define X_XF86VidModeQueryVersion 0
#define X_XF86VidModeGetModeLine 1
#define X_XF86VidModeModModeLine 2
#define X_XF86VidModeSwitchMode 3
#define X_XF86VidModeGetMonitor 4
#define X_XF86VidModeLockModeSwitch 5
#define X_XF86VidModeGetAllModeLines 6
#define X_XF86VidModeAddModeLine 7
#define X_XF86VidModeDeleteModeLine 8
#define X_XF86VidModeValidateModeLine 9
#define X_XF86VidModeSwitchToMode 10
#define X_XF86VidModeGetViewPort 11
#define X_XF86VidModeSetViewPort 12
/* new for version 2.x of this extension */
#define X_XF86VidModeGetDotClocks 13
#define X_XF86VidModeSetClientVersion 14
#define X_XF86VidModeSetGamma 15
#define X_XF86VidModeGetGamma 16
#define X_XF86VidModeGetGammaRamp 17
#define X_XF86VidModeSetGammaRamp 18
#define X_XF86VidModeGetGammaRampSize 19
#define CLKFLAG_PROGRAMABLE 1
#ifdef XF86VIDMODE_EVENTS
#define XF86VidModeNotify 0
#define XF86VidModeNumberEvents (XF86VidModeNotify + 1)
#define XF86VidModeNotifyMask 0x00000001
#define XF86VidModeNonEvent 0
#define XF86VidModeModeChange 1
#else
#define XF86VidModeNumberEvents 0
#endif
#define XF86VidModeBadClock 0
#define XF86VidModeBadHTimings 1
#define XF86VidModeBadVTimings 2
#define XF86VidModeModeUnsuitable 3
#define XF86VidModeExtensionDisabled 4
#define XF86VidModeClientNotLocal 5
#define XF86VidModeZoomLocked 6
#define XF86VidModeNumberErrors (XF86VidModeZoomLocked + 1)
#ifndef _XF86VIDMODE_SERVER_
typedef struct
{
unsigned short hdisplay;
unsigned short hsyncstart;
unsigned short hsyncend;
unsigned short htotal;
unsigned short hskew;
unsigned short vdisplay;
unsigned short vsyncstart;
unsigned short vsyncend;
unsigned short vtotal;
unsigned int flags;
int privsize;
#if defined(__cplusplus) || defined(c_plusplus)
/* private is a C++ reserved word */
INT32 *c_private;
#else
INT32 *private;
#endif
} SDL_NAME(XF86VidModeModeLine);
typedef struct
{
unsigned int dotclock;
unsigned short hdisplay;
unsigned short hsyncstart;
unsigned short hsyncend;
unsigned short htotal;
unsigned short hskew;
unsigned short vdisplay;
unsigned short vsyncstart;
unsigned short vsyncend;
unsigned short vtotal;
unsigned int flags;
int privsize;
#if defined(__cplusplus) || defined(c_plusplus)
/* private is a C++ reserved word */
INT32 *c_private;
#else
INT32 *private;
#endif
} SDL_NAME(XF86VidModeModeInfo);
typedef struct
{
float hi;
float lo;
} SDL_NAME(XF86VidModeSyncRange);
typedef struct
{
char *vendor;
char *model;
float EMPTY;
unsigned char nhsync;
SDL_NAME(XF86VidModeSyncRange) * hsync;
unsigned char nvsync;
SDL_NAME(XF86VidModeSyncRange) * vsync;
} SDL_NAME(XF86VidModeMonitor);
typedef struct
{
int type; /* of event */
unsigned long serial; /* # of last request processed by server */
Bool send_event; /* true if this came from a SendEvent req */
Display *display; /* Display the event was read from */
Window root; /* root window of event screen */
int state; /* What happened */
int kind; /* What happened */
Bool forced; /* extents of new region */
Time time; /* event timestamp */
} SDL_NAME(XF86VidModeNotifyEvent);
typedef struct
{
float red; /* Red Gamma value */
float green; /* Green Gamma value */
float blue; /* Blue Gamma value */
} SDL_NAME(XF86VidModeGamma);
#define SDL_XF86VidModeSelectNextMode(disp, scr) \
SDL_NAME(XF86VidModeSwitchMode)(disp, scr, 1)
#define SDL_XF86VidModeSelectPrevMode(disp, scr) \
SDL_NAME(XF86VidModeSwitchMode)(disp, scr, -1)
_XFUNCPROTOBEGIN Bool SDL_NAME(XF86VidModeQueryVersion) (Display * /* dpy */ ,
int *
/* majorVersion */ ,
int * /* minorVersion */
);
Bool SDL_NAME(XF86VidModeQueryExtension) (Display * /* dpy */ ,
int * /* event_base */ ,
int * /* error_base */
);
Bool SDL_NAME(XF86VidModeSetClientVersion) (Display * /* dpy */
);
Bool SDL_NAME(XF86VidModeGetModeLine) (Display * /* dpy */ ,
int /* screen */ ,
int * /* dotclock */ ,
SDL_NAME(XF86VidModeModeLine) * /* modeline */
);
Bool SDL_NAME(XF86VidModeGetAllModeLines) (Display * /* dpy */ ,
int /* screen */ ,
int * /* modecount */ ,
SDL_NAME(XF86VidModeModeInfo) *** /* modelinesPtr */
);
Bool SDL_NAME(XF86VidModeAddModeLine) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeModeInfo) *
/* new modeline */ ,
SDL_NAME(XF86VidModeModeInfo) * /* after modeline */
);
Bool SDL_NAME(XF86VidModeDeleteModeLine) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeModeInfo) * /* modeline */
);
Bool SDL_NAME(XF86VidModeModModeLine) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeModeLine) * /* modeline */
);
Status SDL_NAME(XF86VidModeValidateModeLine) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeModeInfo) * /* modeline */
);
Bool SDL_NAME(XF86VidModeSwitchMode) (Display * /* dpy */ ,
int /* screen */ ,
int /* zoom */
);
Bool SDL_NAME(XF86VidModeSwitchToMode) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeModeInfo) * /* modeline */
);
Bool SDL_NAME(XF86VidModeLockModeSwitch) (Display * /* dpy */ ,
int /* screen */ ,
int /* lock */
);
Bool SDL_NAME(XF86VidModeGetMonitor) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeMonitor) * /* monitor */
);
Bool SDL_NAME(XF86VidModeGetViewPort) (Display * /* dpy */ ,
int /* screen */ ,
int * /* x return */ ,
int * /* y return */
);
Bool SDL_NAME(XF86VidModeSetViewPort) (Display * /* dpy */ ,
int /* screen */ ,
int /* x */ ,
int /* y */
);
Bool SDL_NAME(XF86VidModeGetDotClocks) (Display * /* dpy */ ,
int /* screen */ ,
int * /* flags return */ ,
int * /* number of clocks return */ ,
int * /* max dot clock return */ ,
int ** /* clocks return */
);
Bool SDL_NAME(XF86VidModeGetGamma) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeGamma) * /* Gamma */
);
Bool SDL_NAME(XF86VidModeSetGamma) (Display * /* dpy */ ,
int /* screen */ ,
SDL_NAME(XF86VidModeGamma) * /* Gamma */
);
Bool SDL_NAME(XF86VidModeSetGammaRamp) (Display * /* dpy */ ,
int /* screen */ ,
int /* size */ ,
unsigned short * /* red array */ ,
unsigned short * /* green array */ ,
unsigned short * /* blue array */
);
Bool SDL_NAME(XF86VidModeGetGammaRamp) (Display * /* dpy */ ,
int /* screen */ ,
int /* size */ ,
unsigned short * /* red array */ ,
unsigned short * /* green array */ ,
unsigned short * /* blue array */
);
Bool SDL_NAME(XF86VidModeGetGammaRampSize) (Display * /* dpy */ ,
int /* screen */ ,
int * /* size */
);
_XFUNCPROTOEND
#endif
#endif
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -1,573 +0,0 @@
/* $XFree86: xc/include/extensions/xf86vmstr.h,v 3.27 2001/08/01 00:44:36 tsi Exp $ */
/*
Copyright 1995 Kaleb S. KEITHLEY
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL Kaleb S. KEITHLEY BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Kaleb S. KEITHLEY
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
from Kaleb S. KEITHLEY
*/
/* $Xorg: xf86vmstr.h,v 1.3 2000/08/18 04:05:46 coskrey Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */
#ifndef _XF86VIDMODESTR_H_
#define _XF86VIDMODESTR_H_
#include "xf86vmode.h"
#define XF86VIDMODENAME "XFree86-VidModeExtension"
#define XF86VIDMODE_MAJOR_VERSION 2 /* current version numbers */
#define XF86VIDMODE_MINOR_VERSION 1
/*
* major version 0 == uses parameter-to-wire functions in XFree86 libXxf86vm.
* major version 1 == uses parameter-to-wire functions hard-coded in xvidtune
* client.
* major version 2 == uses new protocol version in XFree86 4.0.
*/
typedef struct _XF86VidModeQueryVersion
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86VidModeQueryVersion */
CARD16 length B16;
} xXF86VidModeQueryVersionReq;
#define sz_xXF86VidModeQueryVersionReq 4
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 majorVersion B16; /* major version of XF86VidMode */
CARD16 minorVersion B16; /* minor version of XF86VidMode */
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86VidModeQueryVersionReply;
#define sz_xXF86VidModeQueryVersionReply 32
typedef struct _XF86VidModeGetModeLine
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
} xXF86VidModeGetModeLineReq,
xXF86VidModeGetAllModeLinesReq,
xXF86VidModeGetMonitorReq,
xXF86VidModeGetViewPortReq, xXF86VidModeGetDotClocksReq;
#define sz_xXF86VidModeGetModeLineReq 8
#define sz_xXF86VidModeGetAllModeLinesReq 8
#define sz_xXF86VidModeGetMonitorReq 8
#define sz_xXF86VidModeGetViewPortReq 8
#define sz_xXF86VidModeGetDotClocksReq 8
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 hskew B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD16 pad2 B16;
CARD32 flags B32;
CARD32 reserved1 B32;
CARD32 reserved2 B32;
CARD32 reserved3 B32;
CARD32 privsize B32;
} xXF86VidModeGetModeLineReply;
#define sz_xXF86VidModeGetModeLineReply 52
/* 0.x version */
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD32 flags B32;
CARD32 privsize B32;
} xXF86OldVidModeGetModeLineReply;
#define sz_xXF86OldVidModeGetModeLineReply 36
typedef struct
{
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD32 hskew B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD16 pad1 B16;
CARD32 flags B32;
CARD32 reserved1 B32;
CARD32 reserved2 B32;
CARD32 reserved3 B32;
CARD32 privsize B32;
} xXF86VidModeModeInfo;
/* 0.x version */
typedef struct
{
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD32 flags B32;
CARD32 privsize B32;
} xXF86OldVidModeModeInfo;
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 modecount B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86VidModeGetAllModeLinesReply;
#define sz_xXF86VidModeGetAllModeLinesReply 32
typedef struct _XF86VidModeAddModeLine
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */
CARD16 length B16;
CARD32 screen B32; /* could be CARD16 but need the pad */
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 hskew B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD16 pad1 B16;
CARD32 flags B32;
CARD32 reserved1 B32;
CARD32 reserved2 B32;
CARD32 reserved3 B32;
CARD32 privsize B32;
CARD32 after_dotclock B32;
CARD16 after_hdisplay B16;
CARD16 after_hsyncstart B16;
CARD16 after_hsyncend B16;
CARD16 after_htotal B16;
CARD16 after_hskew B16;
CARD16 after_vdisplay B16;
CARD16 after_vsyncstart B16;
CARD16 after_vsyncend B16;
CARD16 after_vtotal B16;
CARD16 pad2 B16;
CARD32 after_flags B32;
CARD32 reserved4 B32;
CARD32 reserved5 B32;
CARD32 reserved6 B32;
} xXF86VidModeAddModeLineReq;
#define sz_xXF86VidModeAddModeLineReq 92
/* 0.x version */
typedef struct _XF86OldVidModeAddModeLine
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86VidModeAddMode */
CARD16 length B16;
CARD32 screen B32; /* could be CARD16 but need the pad */
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD32 flags B32;
CARD32 privsize B32;
CARD32 after_dotclock B32;
CARD16 after_hdisplay B16;
CARD16 after_hsyncstart B16;
CARD16 after_hsyncend B16;
CARD16 after_htotal B16;
CARD16 after_vdisplay B16;
CARD16 after_vsyncstart B16;
CARD16 after_vsyncend B16;
CARD16 after_vtotal B16;
CARD32 after_flags B32;
} xXF86OldVidModeAddModeLineReq;
#define sz_xXF86OldVidModeAddModeLineReq 60
typedef struct _XF86VidModeModModeLine
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86VidModeModModeLine */
CARD16 length B16;
CARD32 screen B32; /* could be CARD16 but need the pad */
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 hskew B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD16 pad1 B16;
CARD32 flags B32;
CARD32 reserved1 B32;
CARD32 reserved2 B32;
CARD32 reserved3 B32;
CARD32 privsize B32;
} xXF86VidModeModModeLineReq;
#define sz_xXF86VidModeModModeLineReq 48
/* 0.x version */
typedef struct _XF86OldVidModeModModeLine
{
CARD8 reqType; /* always XF86OldVidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86OldVidModeModModeLine */
CARD16 length B16;
CARD32 screen B32; /* could be CARD16 but need the pad */
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD32 flags B32;
CARD32 privsize B32;
} xXF86OldVidModeModModeLineReq;
#define sz_xXF86OldVidModeModModeLineReq 32
typedef struct _XF86VidModeValidateModeLine
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD32 screen B32; /* could be CARD16 but need the pad */
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 hskew B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD16 pad1 B16;
CARD32 flags B32;
CARD32 reserved1 B32;
CARD32 reserved2 B32;
CARD32 reserved3 B32;
CARD32 privsize B32;
} xXF86VidModeDeleteModeLineReq,
xXF86VidModeValidateModeLineReq, xXF86VidModeSwitchToModeReq;
#define sz_xXF86VidModeDeleteModeLineReq 52
#define sz_xXF86VidModeValidateModeLineReq 52
#define sz_xXF86VidModeSwitchToModeReq 52
/* 0.x version */
typedef struct _XF86OldVidModeValidateModeLine
{
CARD8 reqType; /* always XF86OldVidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD32 screen B32; /* could be CARD16 but need the pad */
CARD32 dotclock B32;
CARD16 hdisplay B16;
CARD16 hsyncstart B16;
CARD16 hsyncend B16;
CARD16 htotal B16;
CARD16 vdisplay B16;
CARD16 vsyncstart B16;
CARD16 vsyncend B16;
CARD16 vtotal B16;
CARD32 flags B32;
CARD32 privsize B32;
} xXF86OldVidModeDeleteModeLineReq,
xXF86OldVidModeValidateModeLineReq, xXF86OldVidModeSwitchToModeReq;
#define sz_xXF86OldVidModeDeleteModeLineReq 36
#define sz_xXF86OldVidModeValidateModeLineReq 36
#define sz_xXF86OldVidModeSwitchToModeReq 36
typedef struct _XF86VidModeSwitchMode
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSwitchMode */
CARD16 length B16;
CARD16 screen B16;
CARD16 zoom B16;
} xXF86VidModeSwitchModeReq;
#define sz_xXF86VidModeSwitchModeReq 8
typedef struct _XF86VidModeLockModeSwitch
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86VidModeLockModeSwitch */
CARD16 length B16;
CARD16 screen B16;
CARD16 lock B16;
} xXF86VidModeLockModeSwitchReq;
#define sz_xXF86VidModeLockModeSwitchReq 8
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 status B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86VidModeValidateModeLineReply;
#define sz_xXF86VidModeValidateModeLineReply 32
typedef struct
{
BYTE type; /* X_Reply */
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD8 vendorLength;
CARD8 modelLength;
CARD8 nhsync;
CARD8 nvsync;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86VidModeGetMonitorReply;
#define sz_xXF86VidModeGetMonitorReply 32
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 x B32;
CARD32 y B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86VidModeGetViewPortReply;
#define sz_xXF86VidModeGetViewPortReply 32
typedef struct _XF86VidModeSetViewPort
{
CARD8 reqType; /* always VidModeReqCode */
CARD8 xf86vidmodeReqType; /* always X_XF86VidModeSetViewPort */
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
CARD32 x B32;
CARD32 y B32;
} xXF86VidModeSetViewPortReq;
#define sz_xXF86VidModeSetViewPortReq 16
typedef struct
{
BYTE type;
BOOL pad1;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 flags B32;
CARD32 clocks B32;
CARD32 maxclocks B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
} xXF86VidModeGetDotClocksReply;
#define sz_xXF86VidModeGetDotClocksReply 32
typedef struct _XF86VidModeSetClientVersion
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD16 major B16;
CARD16 minor B16;
} xXF86VidModeSetClientVersionReq;
#define sz_xXF86VidModeSetClientVersionReq 8
typedef struct _XF86VidModeGetGamma
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
CARD32 pad1 B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
CARD32 pad6 B32;
} xXF86VidModeGetGammaReq;
#define sz_xXF86VidModeGetGammaReq 32
typedef struct
{
BYTE type;
BOOL pad;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD32 red B32;
CARD32 green B32;
CARD32 blue B32;
CARD32 pad1 B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
} xXF86VidModeGetGammaReply;
#define sz_xXF86VidModeGetGammaReply 32
typedef struct _XF86VidModeSetGamma
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
CARD32 red B32;
CARD32 green B32;
CARD32 blue B32;
CARD32 pad1 B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
} xXF86VidModeSetGammaReq;
#define sz_xXF86VidModeSetGammaReq 32
typedef struct _XF86VidModeSetGammaRamp
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD16 screen B16;
CARD16 size B16;
} xXF86VidModeSetGammaRampReq;
#define sz_xXF86VidModeSetGammaRampReq 8
typedef struct _XF86VidModeGetGammaRamp
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD16 screen B16;
CARD16 size B16;
} xXF86VidModeGetGammaRampReq;
#define sz_xXF86VidModeGetGammaRampReq 8
typedef struct
{
BYTE type;
BOOL pad;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 size B16;
CARD16 pad0 B16;
CARD32 pad1 B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86VidModeGetGammaRampReply;
#define sz_xXF86VidModeGetGammaRampReply 32
typedef struct _XF86VidModeGetGammaRampSize
{
CARD8 reqType; /* always XF86VidModeReqCode */
CARD8 xf86vidmodeReqType;
CARD16 length B16;
CARD16 screen B16;
CARD16 pad B16;
} xXF86VidModeGetGammaRampSizeReq;
#define sz_xXF86VidModeGetGammaRampSizeReq 8
typedef struct
{
BYTE type;
BOOL pad;
CARD16 sequenceNumber B16;
CARD32 length B32;
CARD16 size B16;
CARD16 pad0 B16;
CARD32 pad1 B32;
CARD32 pad2 B32;
CARD32 pad3 B32;
CARD32 pad4 B32;
CARD32 pad5 B32;
} xXF86VidModeGetGammaRampSizeReply;
#define sz_xXF86VidModeGetGammaRampSizeReply 32
#endif /* _XF86VIDMODESTR_H_ */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -46,26 +46,30 @@ typedef struct
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT NULL
#endif
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER NULL
#endif
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR NULL
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA NULL
#endif
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT NULL
#endif
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR NULL
#endif
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS NULL
#endif
#ifndef SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE NULL
#endif
static x11dynlib x11libs[] = {
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS},
{NULL, SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE}
};
static void

View File

@ -35,8 +35,8 @@
#endif
#include <X11/Xproto.h>
#include "../Xext/extensions/Xext.h"
#include "../Xext/extensions/extutil.h"
#include <X11/extensions/Xext.h>
#include <X11/extensions/extutil.h>
#ifndef NO_SHARED_MEMORY
#include <sys/ipc.h>
@ -44,12 +44,23 @@
#include <X11/extensions/XShm.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XINERAMA
#include <X11/extensions/Xinerama.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XINPUT
#include <X11/extensions/XInput.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XRANDR
#include <X11/extensions/Xrandr.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XINPUT
#include <X11/extensions/XInput.h>
#if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
#include <X11/extensions/scrnsaver.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XSHAPE
#include <X11/extensions/shape.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
#include <X11/extensions/xf86vmode.h>
#endif
/*

View File

@ -609,7 +609,7 @@ gnome_screensaver_enable()
void
X11_SuspendScreenSaver(_THIS)
{
#if SDL_VIDEO_DRIVER_X11_SCRNSAVER
#if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
SDL_VideoData *data = (SDL_VideoData *) _this->driverdata;
int dummy;
int major_version, minor_version;

View File

@ -208,9 +208,13 @@ CheckXinerama(Display * display, int *major, int *minor)
return SDL_FALSE;
}
if (!SDL_X11_HAVE_XINERAMA) {
return SDL_FALSE;
}
/* Query the extension version */
if (!SDL_NAME(XineramaQueryExtension) (display, major, minor) ||
!SDL_NAME(XineramaIsActive) (display)) {
if (!XineramaQueryExtension(display, major, minor) ||
!XineramaIsActive(display)) {
return SDL_FALSE;
}
return SDL_TRUE;
@ -244,7 +248,7 @@ CheckXRandR(Display * display, int *major, int *minor)
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
#if SDL_VIDEO_DRIVER_X11_VIDMODE
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
static SDL_bool
CheckVidMode(Display * display, int *major, int *minor)
{
@ -254,30 +258,34 @@ CheckVidMode(Display * display, int *major, int *minor)
*major = *minor = 0;
/* Allow environment override */
env = getenv("SDL_VIDEO_X11_VIDMODE");
env = getenv("SDL_VIDEO_X11_XVIDMODE");
if (env && !SDL_atoi(env)) {
return SDL_FALSE;
}
if (!SDL_X11_HAVE_XVIDMODE) {
return SDL_FALSE;
}
/* Query the extension version */
vm_error = -1;
if (!SDL_NAME(XF86VidModeQueryExtension) (display, &vm_event, &vm_error)
|| !SDL_NAME(XF86VidModeQueryVersion) (display, major, minor)) {
if (!XF86VidModeQueryExtension(display, &vm_event, &vm_error)
|| !XF86VidModeQueryVersion(display, major, minor)) {
return SDL_FALSE;
}
return SDL_TRUE;
}
static
Bool SDL_NAME(XF86VidModeGetModeInfo) (Display * dpy, int scr,
SDL_NAME(XF86VidModeModeInfo) * info)
Bool XF86VidModeGetModeInfo(Display * dpy, int scr,
XF86VidModeModeInfo* info)
{
Bool retval;
int dotclock;
SDL_NAME(XF86VidModeModeLine) l;
XF86VidModeModeLine l;
SDL_zerop(info);
SDL_zero(l);
retval = SDL_NAME(XF86VidModeGetModeLine) (dpy, scr, &dotclock, &l);
retval = XF86VidModeGetModeLine(dpy, scr, &dotclock, &l);
info->dotclock = dotclock;
info->hdisplay = l.hdisplay;
info->hsyncstart = l.hsyncstart;
@ -295,7 +303,7 @@ Bool SDL_NAME(XF86VidModeGetModeInfo) (Display * dpy, int scr,
}
static int
calculate_rate(SDL_NAME(XF86VidModeModeInfo) * info)
calculate_rate(XF86VidModeModeInfo * info)
{
return (info->htotal
&& info->vtotal) ? (1000 * info->dotclock / (info->htotal *
@ -305,33 +313,32 @@ calculate_rate(SDL_NAME(XF86VidModeModeInfo) * info)
static void
save_mode(Display * display, SDL_DisplayData * data)
{
SDL_NAME(XF86VidModeGetModeInfo) (display, data->screen,
&data->saved_mode);
SDL_NAME(XF86VidModeGetViewPort) (display, data->screen,
&data->saved_view.x,
&data->saved_view.y);
XF86VidModeGetModeInfo(display, data->screen,
&data->saved_mode);
XF86VidModeGetViewPort(display, data->screen,
&data->saved_view.x,
&data->saved_view.y);
}
/*
static void
restore_mode(Display * display, SDL_DisplayData * data)
{
SDL_NAME(XF86VidModeModeInfo) mode;
XF86VidModeModeInfo mode;
if (SDL_NAME(XF86VidModeGetModeInfo) (display, data->screen, &mode)) {
if (XF86VidModeGetModeInfo(display, data->screen, &mode)) {
if (SDL_memcmp(&mode, &data->saved_mode, sizeof(mode)) != 0) {
SDL_NAME(XF86VidModeSwitchToMode) (display, data->screen,
&data->saved_mode);
XF86VidModeSwitchToMode(display, data->screen, &data->saved_mode);
}
}
if ((data->saved_view.x != 0) || (data->saved_view.y != 0)) {
SDL_NAME(XF86VidModeSetViewPort) (display, data->screen,
data->saved_view.x,
data->saved_view.y);
XF86VidModeSetViewPort(display, data->screen,
data->saved_view.x,
data->saved_view.y);
}
}
*/
#endif /* SDL_VIDEO_DRIVER_X11_VIDMODE */
#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
void
X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
@ -341,7 +348,7 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
#if SDL_VIDEO_DRIVER_X11_XINERAMA
int xinerama_major, xinerama_minor;
int screens;
SDL_NAME(XineramaScreenInfo) * xinerama;
XineramaScreenInfo * xinerama;
#endif
#if SDL_VIDEO_DRIVER_X11_XRANDR
int xrandr_major, xrandr_minor;
@ -349,10 +356,10 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
XRRScreenSize *sizes;
short *rates;
#endif
#if SDL_VIDEO_DRIVER_X11_VIDMODE
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
int vm_major, vm_minor;
int nmodes;
SDL_NAME(XF86VidModeModeInfo) ** modes;
XF86VidModeModeInfo ** modes;
#endif
int screen_w;
int screen_h;
@ -379,7 +386,7 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
#ifdef X11MODES_DEBUG
printf("X11 detected Xinerama:\n");
#endif
xinerama = SDL_NAME(XineramaQueryScreens) (display, &screens);
xinerama = XineramaQueryScreens(display, &screens);
if (xinerama) {
int i;
for (i = 0; i < screens; i++) {
@ -462,15 +469,14 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
#if SDL_VIDEO_DRIVER_X11_VIDMODE
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
/* XVidMode */
if (!data->use_xrandr &&
#if SDL_VIDEO_DRIVER_X11_XINERAMA
(!data->use_xinerama || data->xinerama_info.screen_number == 0) &&
#endif
CheckVidMode(display, &vm_major, &vm_minor) &&
SDL_NAME(XF86VidModeGetAllModeLines) (display, data->screen, &nmodes,
&modes)) {
XF86VidModeGetAllModeLines(display, data->screen, &nmodes, &modes)) {
int i;
#ifdef X11MODES_DEBUG
@ -492,7 +498,7 @@ X11_GetDisplayModes(_THIS, SDL_VideoDisplay * sdl_display)
data->use_vidmode = vm_major * 100 + vm_minor;
save_mode(display, data);
}
#endif /* SDL_VIDEO_DRIVER_X11_VIDMODE */
#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
if (!data->use_xrandr && !data->use_vidmode) {
mode.w = screen_w;
@ -545,18 +551,18 @@ get_real_resolution(Display * display, SDL_DisplayData * data, int *w, int *h,
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
#if SDL_VIDEO_DRIVER_X11_VIDMODE
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
if (data->use_vidmode) {
SDL_NAME(XF86VidModeModeInfo) mode;
XF86VidModeModeInfo mode;
if (SDL_NAME(XF86VidModeGetModeInfo) (display, data->screen, &mode)) {
if (XF86VidModeGetModeInfo(display, data->screen, &mode)) {
*w = mode.hdisplay;
*h = mode.vdisplay;
*rate = calculate_rate(&mode);
return;
}
}
#endif /* SDL_VIDEO_DRIVER_X11_VIDMODE */
#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
#if SDL_VIDEO_DRIVER_X11_XINERAMA
if (data->use_xinerama) {
@ -642,14 +648,13 @@ set_best_resolution(Display * display, SDL_DisplayData * data, int w, int h,
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
#if SDL_VIDEO_DRIVER_X11_VIDMODE
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
if (data->use_vidmode) {
SDL_NAME(XF86VidModeModeInfo) ** modes;
XF86VidModeModeInfo ** modes;
int i, nmodes;
int best;
if (SDL_NAME(XF86VidModeGetAllModeLines)
(display, data->screen, &nmodes, &modes)) {
if (XF86VidModeGetAllModeLines(display, data->screen, &nmodes, &modes)) {
best = -1;
for (i = 0; i < nmodes; ++i) {
if (modes[i]->hdisplay < w || modes[i]->vdisplay < h) {
@ -684,14 +689,13 @@ set_best_resolution(Display * display, SDL_DisplayData * data, int w, int h,
modes[best]->hdisplay, modes[best]->vdisplay,
calculate_rate(modes[best]));
#endif
SDL_NAME(XF86VidModeSwitchToMode) (display, data->screen,
modes[best]);
XF86VidModeSwitchToMode(display, data->screen, modes[best]);
}
XFree(modes);
}
return;
}
#endif /* SDL_VIDEO_DRIVER_X11_VIDMODE */
#endif /* SDL_VIDEO_DRIVER_X11_XVIDMODE */
}
int

View File

@ -36,7 +36,7 @@ typedef struct
int use_vidmode;
#if SDL_VIDEO_DRIVER_X11_XINERAMA
SDL_NAME(XineramaScreenInfo) xinerama_info;
XineramaScreenInfo xinerama_info;
#endif
#if SDL_VIDEO_DRIVER_X11_XRANDR
XRRScreenConfiguration *screen_config;
@ -44,8 +44,8 @@ typedef struct
Rotation saved_rotation;
short saved_rate;
#endif
#if SDL_VIDEO_DRIVER_X11_VIDMODE
SDL_NAME(XF86VidModeModeInfo) saved_mode;
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
XF86VidModeModeInfo saved_mode;
struct
{
int x, y;

View File

@ -123,7 +123,6 @@ SDL_X11_SYM(unsigned long,_XSetLastRequestRead,(Display* a,xGenericReply* b),(a,
SDL_X11_SYM(SDL_X11_XSynchronizeRetType,XSynchronize,(Display* a,Bool b),(a,b),return)
SDL_X11_SYM(SDL_X11_XESetWireToEventRetType,XESetWireToEvent,(Display* a,int b,SDL_X11_XESetWireToEventRetType c),(a,b,c),return)
SDL_X11_SYM(SDL_X11_XESetEventToWireRetType,XESetEventToWire,(Display* a,int b,SDL_X11_XESetEventToWireRetType c),(a,b,c),return)
SDL_X11_SYM(XExtensionErrorHandler,XSetExtensionErrorHandler,(XExtensionErrorHandler a),(a),return)
#if NeedWidePrototypes
SDL_X11_SYM(KeySym,XKeycodeToKeysym,(Display* a,unsigned int b,int c),(a,b,c),return)
@ -175,17 +174,12 @@ SDL_X11_SYM(int,ipAllocateData,(ChannelPtr a,IPCard b,IPDataPtr * c),(a,b,c),ret
SDL_X11_SYM(int,ipUnallocateAndSendData,(ChannelPtr a,IPCard b),(a,b),return)
#endif
/* Xrandr support. */
#if SDL_VIDEO_DRIVER_X11_XRANDR
SDL_X11_MODULE(XRANDR)
SDL_X11_SYM(Status,XRRQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return)
SDL_X11_SYM(XRRScreenConfiguration *,XRRGetScreenInfo,(Display *dpy,Drawable draw),(dpy,draw),return)
SDL_X11_SYM(SizeID,XRRConfigCurrentConfiguration,(XRRScreenConfiguration *config,Rotation *rotation),(config,rotation),return)
SDL_X11_SYM(short,XRRConfigCurrentRate,(XRRScreenConfiguration *config),(config),return)
SDL_X11_SYM(short *,XRRConfigRates,(XRRScreenConfiguration *config,int sizeID,int *nrates),(config,sizeID,nrates),return)
SDL_X11_SYM(XRRScreenSize *,XRRConfigSizes,(XRRScreenConfiguration *config,int *nsizes),(config,nsizes),return)
SDL_X11_SYM(Status,XRRSetScreenConfigAndRate,(Display *dpy,XRRScreenConfiguration *config,Drawable draw,int size_index,Rotation rotation,short rate,Time timestamp),(dpy,config,draw,size_index,rotation,rate,timestamp),return)
SDL_X11_SYM(void,XRRFreeScreenConfigInfo,(XRRScreenConfiguration *config),(config),)
/* Xinerama support */
#if SDL_VIDEO_DRIVER_X11_XINERAMA
SDL_X11_MODULE(XINERAMA)
SDL_X11_SYM(Bool,XineramaIsActive,(Display *a),(a),)
SDL_X11_SYM(Bool,XineramaQueryExtension,(Display *a,int *b,int *c),(a,b,c),)
SDL_X11_SYM(XineramaScreenInfo*,XineramaQueryScreens,(Display *a, int *b),(a,b),)
#endif
/* XInput support for multiple mice, tablets, etc. */
@ -198,8 +192,21 @@ SDL_X11_SYM(XDevice*,XOpenDevice,(Display *a,XID b),(a,b),return)
SDL_X11_SYM(int,XCloseDevice,(Display* a,XDevice* b),(a,b),return)
#endif
/* XRandR support */
#if SDL_VIDEO_DRIVER_X11_XRANDR
SDL_X11_MODULE(XRANDR)
SDL_X11_SYM(Status,XRRQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return)
SDL_X11_SYM(XRRScreenConfiguration *,XRRGetScreenInfo,(Display *dpy,Drawable draw),(dpy,draw),return)
SDL_X11_SYM(SizeID,XRRConfigCurrentConfiguration,(XRRScreenConfiguration *config,Rotation *rotation),(config,rotation),return)
SDL_X11_SYM(short,XRRConfigCurrentRate,(XRRScreenConfiguration *config),(config),return)
SDL_X11_SYM(short *,XRRConfigRates,(XRRScreenConfiguration *config,int sizeID,int *nrates),(config,sizeID,nrates),return)
SDL_X11_SYM(XRRScreenSize *,XRRConfigSizes,(XRRScreenConfiguration *config,int *nsizes),(config,nsizes),return)
SDL_X11_SYM(Status,XRRSetScreenConfigAndRate,(Display *dpy,XRRScreenConfiguration *config,Drawable draw,int size_index,Rotation rotation,short rate,Time timestamp),(dpy,config,draw,size_index,rotation,rate,timestamp),return)
SDL_X11_SYM(void,XRRFreeScreenConfigInfo,(XRRScreenConfiguration *config),(config),)
#endif
/* MIT-SCREEN-SAVER support */
#if SDL_VIDEO_DRIVER_X11_SCRNSAVER
#if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
SDL_X11_MODULE(XSS)
SDL_X11_SYM(Bool,XScreenSaverQueryExtension,(Display *dpy,int *event_base,int *error_base),(dpy,event_base,error_base),return)
SDL_X11_SYM(Status,XScreenSaverQueryVersion,(Display *dpy,int *major_versionp,int *minor_versionp),(dpy,major_versionp,minor_versionp),return)
@ -211,6 +218,16 @@ SDL_X11_MODULE(XSHAPE)
SDL_X11_SYM(void,XShapeCombineMask,(Display *dpy,Window dest,int dest_kind,int x_off,int y_off,Pixmap src,int op),(dpy,dest,dest_kind,x_off,y_off,src,op),)
#endif
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
SDL_X11_MODULE(XVIDMODE)
SDL_X11_SYM(Bool,XF86VidModeGetAllModeLines,(Display *a,int b,int *c,XF86VidModeModeInfo ***d),(a,b,c,d),)
SDL_X11_SYM(Bool,XF86VidModeGetModeLine,(Display *a,int b,int *c,XF86VidModeModeLine *d),(a,b,c,d),)
SDL_X11_SYM(Bool,XF86VidModeGetViewPort,(Display *a,int b,int *c,int *d),(a,b,c,d),)
SDL_X11_SYM(Bool,XF86VidModeQueryExtension,(Display *a,int *b,int *c),(a,b,c),)
SDL_X11_SYM(Bool,XF86VidModeQueryVersion,(Display *a,int *b,int *c),(a,b,c),)
SDL_X11_SYM(Bool,XF86VidModeSwitchToMode,(Display *a,int b,XF86VidModeModeInfo *c),(a,b,c),)
#endif
/* *INDENT-ON* */
/* vi: set ts=4 sw=4 expandtab: */

View File

@ -33,23 +33,23 @@
#include <X11/Xatom.h>
#if SDL_VIDEO_DRIVER_X11_XINERAMA
#include "../Xext/extensions/Xinerama.h"
#endif
#if SDL_VIDEO_DRIVER_X11_XRANDR
#include <X11/extensions/Xrandr.h>
#endif
#if SDL_VIDEO_DRIVER_X11_VIDMODE
#include "../Xext/extensions/xf86vmode.h"
#include <X11/extensions/Xinerama.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XINPUT
#include <X11/extensions/XInput.h>
#endif
#if SDL_VIDEO_DRIVER_X11_SCRNSAVER
#if SDL_VIDEO_DRIVER_X11_XRANDR
#include <X11/extensions/Xrandr.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XSCRNSAVER
#include <X11/extensions/scrnsaver.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XSHAPE
#include <X11/extensions/shape.h>
#endif
#if SDL_VIDEO_DRIVER_X11_XVIDMODE
#include <X11/extensions/xf86vmode.h>
#endif
#include "SDL_x11dyn.h"