annotate src/video/x11/SDL_x11video.h @ 1945:3182150b470f

PicoGUI is no longer maintained by the author.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 26 Jul 2006 03:55:56 +0000
parents c121d94672cb
children
rev   line source
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
1 /*
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
2 SDL - Simple DirectMedia Layer
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1306
diff changeset
3 Copyright (C) 1997-2006 Sam Lantinga
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
4
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
5 This library is free software; you can redistribute it and/or
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1306
diff changeset
6 modify it under the terms of the GNU Lesser General Public
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
7 License as published by the Free Software Foundation; either
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1306
diff changeset
8 version 2.1 of the License, or (at your option) any later version.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
9
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
10 This library is distributed in the hope that it will be useful,
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1306
diff changeset
13 Lesser General Public License for more details.
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
14
1312
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1306
diff changeset
15 You should have received a copy of the GNU Lesser General Public
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1306
diff changeset
16 License along with this library; if not, write to the Free Software
c9b51268668f Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents: 1306
diff changeset
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
18
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
19 Sam Lantinga
252
e8157fcb3114 Updated the source with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents: 242
diff changeset
20 slouken@libsdl.org
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
21 */
1402
d910939febfa Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents: 1361
diff changeset
22 #include "SDL_config.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
23
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
24 #ifndef _SDL_x11video_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
25 #define _SDL_x11video_h
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
26
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
27 #include <X11/Xlib.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
28 #include <X11/Xutil.h>
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
29 #include <X11/Xatom.h>
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 769
diff changeset
30
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
31 #include "SDL_mouse.h"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
32 #include "../SDL_sysvideo.h"
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
33
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
34 #if SDL_VIDEO_DRIVER_X11_DGAMOUSE
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
35 #include "../Xext/extensions/xf86dga.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
36 #endif
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
37 #if SDL_VIDEO_DRIVER_X11_XINERAMA
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
38 #include "../Xext/extensions/Xinerama.h"
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
39 #endif
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
40 #if SDL_VIDEO_DRIVER_X11_XRANDR
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
41 #include <X11/extensions/Xrandr.h>
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
42 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
43 #if SDL_VIDEO_DRIVER_X11_VIDMODE
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
44 #include "../Xext/extensions/xf86vmode.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
45 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
46 #if SDL_VIDEO_DRIVER_X11_XME
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
47 #include "../Xext/extensions/xme.h"
242
4bcb29d3769c Added support for Xi Graphics XME fullscreen extension
Sam Lantinga <slouken@libsdl.org>
parents: 227
diff changeset
48 #endif
1783
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
49 #if SDL_VIDEO_DRIVER_X11_DPMS
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
50 #include <X11/extensions/dpms.h>
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
51 #endif
227
24878c14b391 Added X11 Xinerama support - fullscreen starts on screen 0
Sam Lantinga <slouken@libsdl.org>
parents: 0
diff changeset
52
1168
045f186426e1 Dynamically load X11 libraries like we currently do for alsa, esd, etc.
Ryan C. Gordon <icculus@icculus.org>
parents: 769
diff changeset
53 #include "SDL_x11dyn.h"
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
54
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
55 /* Hidden "this" pointer for the video functions */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
56 #define _THIS SDL_VideoDevice *this
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
57
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
58 /* Private display data */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
59 struct SDL_PrivateVideoData
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
60 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
61 int local_X11; /* Flag: true if local display */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
62 Display *X11_Display; /* Used for events and window management */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
63 Display *GFX_Display; /* Used for graphics and colormap stuff */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
64 Visual *SDL_Visual; /* The visual used by our window */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
65 Window WMwindow; /* Input window, managed by window manager */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
66 Window FSwindow; /* Fullscreen window, completely unmanaged */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
67 Window SDL_Window; /* Shared by both displays (no X security?) */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
68 Atom WM_DELETE_WINDOW; /* "close-window" protocol atom */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
69 WMcursor *BlankCursor; /* The invisible cursor */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
70 XIM X11_IM; /* Used to communicate with the input method (IM) server */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
71 XIC X11_IC; /* Used for retaining the state, properties, and semantics of communication with the input method (IM) server */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
72
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
73 char *SDL_windowid; /* Flag: true if we have been passed a window */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
74
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
75 /* Direct Graphics Access extension information */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
76 int using_dga;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
77
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
78 #ifndef NO_SHARED_MEMORY
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
79 /* MIT shared memory extension information */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
80 int use_mitshm;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
81 XShmSegmentInfo shminfo;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
82 #endif
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
83
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
84 /* The variables used for displaying graphics */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
85 XImage *Ximage; /* The X image for our window */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
86 GC gc; /* The graphic context for drawing */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
87
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
88 /* The current width and height of the fullscreen mode */
1545
8d9bb0cf2c2a Added current_w and current_h to the SDL_VideoInfo structure, which is set to the desktop resolution during video intialization, and then set to the current resolution when a video mode is set.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
89 int window_w;
8d9bb0cf2c2a Added current_w and current_h to the SDL_VideoInfo structure, which is set to the desktop resolution during video intialization, and then set to the current resolution when a video mode is set.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
90 int window_h;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
91
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
92 /* Support for internal mouse warping */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
93 struct
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
94 {
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
95 int x;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
96 int y;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
97 } mouse_last;
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
98 struct
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
99 {
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
100 int numerator;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
101 int denominator;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
102 int threshold;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
103 } mouse_accel;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
104 int mouse_relative;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
105
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
106 /* available visuals of interest to us, sorted deepest first */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
107 struct
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
108 {
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
109 Visual *visual;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
110 int depth; /* number of significant bits/pixel */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
111 int bpp; /* pixel quantum in bits */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
112 } visuals[2 * 5]; /* at most 2 entries for 8, 15, 16, 24, 32 */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
113 int nvisuals;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
114
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
115 Visual *vis; /* current visual in use */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
116 int depth; /* current visual depth (not bpp) */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
117
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
118 /* Variables used by the X11 video mode code */
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
119 #if SDL_VIDEO_DRIVER_X11_XINERAMA
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
120 SDL_NAME(XineramaScreenInfo) * xinerama;
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
121 #endif
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
122 #if SDL_VIDEO_DRIVER_X11_XRANDR
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
123 XRRScreenConfiguration *screen_config;
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
124 int saved_size_id;
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
125 Rotation saved_rotation;
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
126 #endif
1361
19418e4422cb New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents: 1336
diff changeset
127 #if SDL_VIDEO_DRIVER_X11_VIDMODE
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
128 SDL_NAME(XF86VidModeModeInfo) saved_mode;
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
129 struct
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
130 {
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
131 int x, y;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
132 } saved_view;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
133 #endif
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
134 #if SDL_VIDEO_DRIVER_X11_XME /* XiG XME fullscreen */
242
4bcb29d3769c Added support for Xi Graphics XME fullscreen extension
Sam Lantinga <slouken@libsdl.org>
parents: 227
diff changeset
135 XiGMiscResolutionInfo saved_res;
4bcb29d3769c Added support for Xi Graphics XME fullscreen extension
Sam Lantinga <slouken@libsdl.org>
parents: 227
diff changeset
136 #endif
4bcb29d3769c Added support for Xi Graphics XME fullscreen extension
Sam Lantinga <slouken@libsdl.org>
parents: 227
diff changeset
137
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
138 int use_xinerama;
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
139 int use_xrandr;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
140 int use_vidmode;
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
141 int use_xme;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
142 int currently_fullscreen;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
143
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
144 /* Automatic mode switching support (entering/leaving fullscreen) */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
145 Uint32 switch_waiting;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
146 Uint32 switch_time;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
147
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
148 /* Prevent too many XSync() calls */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
149 int blit_queued;
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
150
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
151 /* Colormap handling */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
152 Colormap DisplayColormap; /* The default display colormap */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
153 Colormap XColorMap; /* The current window colormap */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
154 int *XPixels; /* pixels value allocation counts */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
155 float gamma_saved[3]; /* Saved gamma values for VidMode gamma */
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
156 int gamma_changed; /* flag: has VidMode gamma been modified? */
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
157
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
158 short *iconcolors; /* List of colors used by the icon */
1783
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
159
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
160 /* Screensaver settings */
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
161 int screensaver_timeout;
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
162 BOOL dpms_enabled;
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
163 };
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
164
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
165 /* Old variable names */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
166 #define local_X11 (this->hidden->local_X11)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
167 #define SDL_Display (this->hidden->X11_Display)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
168 #define GFX_Display (this->hidden->GFX_Display)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
169 #define SDL_Screen DefaultScreen(this->hidden->X11_Display)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
170 #define SDL_Visual (this->hidden->vis)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
171 #define SDL_Root RootWindow(SDL_Display, SDL_Screen)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
172 #define WMwindow (this->hidden->WMwindow)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
173 #define FSwindow (this->hidden->FSwindow)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
174 #define SDL_Window (this->hidden->SDL_Window)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
175 #define WM_DELETE_WINDOW (this->hidden->WM_DELETE_WINDOW)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
176 #define SDL_BlankCursor (this->hidden->BlankCursor)
1327
d12a63a8d95a Resolved bug #130
Sam Lantinga <slouken@libsdl.org>
parents: 1312
diff changeset
177 #define SDL_IM (this->hidden->X11_IM)
d12a63a8d95a Resolved bug #130
Sam Lantinga <slouken@libsdl.org>
parents: 1312
diff changeset
178 #define SDL_IC (this->hidden->X11_IC)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
179 #define SDL_windowid (this->hidden->SDL_windowid)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
180 #define using_dga (this->hidden->using_dga)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
181 #define use_mitshm (this->hidden->use_mitshm)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
182 #define shminfo (this->hidden->shminfo)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
183 #define SDL_Ximage (this->hidden->Ximage)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
184 #define SDL_GC (this->hidden->gc)
1545
8d9bb0cf2c2a Added current_w and current_h to the SDL_VideoInfo structure, which is set to the desktop resolution during video intialization, and then set to the current resolution when a video mode is set.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
185 #define window_w (this->hidden->window_w)
8d9bb0cf2c2a Added current_w and current_h to the SDL_VideoInfo structure, which is set to the desktop resolution during video intialization, and then set to the current resolution when a video mode is set.
Sam Lantinga <slouken@libsdl.org>
parents: 1402
diff changeset
186 #define window_h (this->hidden->window_h)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
187 #define mouse_last (this->hidden->mouse_last)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
188 #define mouse_accel (this->hidden->mouse_accel)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
189 #define mouse_relative (this->hidden->mouse_relative)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
190 #define SDL_modelist (this->hidden->modelist)
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
191 #define xinerama (this->hidden->xinerama)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
192 #define saved_mode (this->hidden->saved_mode)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
193 #define saved_view (this->hidden->saved_view)
242
4bcb29d3769c Added support for Xi Graphics XME fullscreen extension
Sam Lantinga <slouken@libsdl.org>
parents: 227
diff changeset
194 #define saved_res (this->hidden->saved_res)
1589
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1545
diff changeset
195 #define screen_config (this->hidden->screen_config)
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1545
diff changeset
196 #define saved_size_id (this->hidden->saved_size_id)
34cca785be57 Xrandr support in the X11 target.
Ryan C. Gordon <icculus@icculus.org>
parents: 1545
diff changeset
197 #define saved_rotation (this->hidden->saved_rotation)
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
198 #define use_xinerama (this->hidden->use_xinerama)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
199 #define use_vidmode (this->hidden->use_vidmode)
1765
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
200 #define use_xrandr (this->hidden->use_xrandr)
c2c6ff414ef5 Fixed bug #45
Sam Lantinga <slouken@libsdl.org>
parents: 1589
diff changeset
201 #define use_xme (this->hidden->use_xme)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
202 #define currently_fullscreen (this->hidden->currently_fullscreen)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
203 #define switch_waiting (this->hidden->switch_waiting)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
204 #define switch_time (this->hidden->switch_time)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
205 #define blit_queued (this->hidden->blit_queued)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
206 #define SDL_DisplayColormap (this->hidden->DisplayColormap)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
207 #define SDL_PrivateColormap (this->hidden->PrivateColormap)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
208 #define SDL_XColorMap (this->hidden->XColorMap)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
209 #define SDL_XPixels (this->hidden->XPixels)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
210 #define gamma_saved (this->hidden->gamma_saved)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
211 #define gamma_changed (this->hidden->gamma_changed)
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
212 #define SDL_iconcolors (this->hidden->iconcolors)
1783
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
213 #define screensaver_timeout (this->hidden->screensaver_timeout)
c546353b1ad4 Fixed bug #203
Sam Lantinga <slouken@libsdl.org>
parents: 1765
diff changeset
214 #define dpms_enabled (this->hidden->dpms_enabled)
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
215 /* Some versions of XFree86 have bugs - detect if this is one of them */
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
216 #define BUGGY_XFREE86(condition, buggy_version) \
1336
3692456e7b0f Use SDL_ prefixed versions of C library functions.
Sam Lantinga <slouken@libsdl.org>
parents: 1327
diff changeset
217 ((SDL_strcmp(ServerVendor(SDL_Display), "The XFree86 Project, Inc") == 0) && \
0
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
218 (VendorRelease(SDL_Display) condition buggy_version))
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
219
74212992fb08 Initial revision
Sam Lantinga <slouken@lokigames.com>
parents:
diff changeset
220 #endif /* _SDL_x11video_h */
1895
c121d94672cb SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents: 1791
diff changeset
221 /* vi: set ts=4 sw=4 expandtab: */