Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11video.h @ 1659:14717b52abc0 SDL-1.3
Merge trunk-1.3-3
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 17 May 2006 08:18:28 +0000 |
parents | 34cca785be57 |
children | 782fd950bd46 |
comparison
equal
deleted
inserted
replaced
1658:e49147870aac | 1659:14717b52abc0 |
---|---|
32 #include "../SDL_sysvideo.h" | 32 #include "../SDL_sysvideo.h" |
33 | 33 |
34 #if SDL_VIDEO_DRIVER_X11_DGAMOUSE | 34 #if SDL_VIDEO_DRIVER_X11_DGAMOUSE |
35 #include "../Xext/extensions/xf86dga.h" | 35 #include "../Xext/extensions/xf86dga.h" |
36 #endif | 36 #endif |
37 #if SDL_VIDEO_DRIVER_X11_XINERAMA | |
38 #include "../Xext/extensions/Xinerama.h" | |
39 #endif | |
40 #if SDL_VIDEO_DRIVER_X11_XRANDR | |
41 #include <X11/extensions/Xrandr.h> | |
42 #endif | |
37 #if SDL_VIDEO_DRIVER_X11_VIDMODE | 43 #if SDL_VIDEO_DRIVER_X11_VIDMODE |
38 #include "../Xext/extensions/xf86vmode.h" | 44 #include "../Xext/extensions/xf86vmode.h" |
39 #endif | 45 #endif |
40 #if SDL_VIDEO_DRIVER_X11_XME | 46 #if SDL_VIDEO_DRIVER_X11_XME |
41 #include "../Xext/extensions/xme.h" | 47 #include "../Xext/extensions/xme.h" |
42 #endif | 48 #endif |
43 #if SDL_VIDEO_DRIVER_X11_XRANDR | 49 #if SDL_VIDEO_DRIVER_X11_DPMS |
44 #include <X11/extensions/Xrandr.h> | 50 #include <X11/extensions/dpms.h> |
45 #endif | 51 #endif |
46 | 52 |
47 #include "SDL_x11dyn.h" | 53 #include "SDL_x11dyn.h" |
48 | 54 |
49 /* Hidden "this" pointer for the video functions */ | 55 /* Hidden "this" pointer for the video functions */ |
107 | 113 |
108 Visual *vis; /* current visual in use */ | 114 Visual *vis; /* current visual in use */ |
109 int depth; /* current visual depth (not bpp) */ | 115 int depth; /* current visual depth (not bpp) */ |
110 | 116 |
111 /* Variables used by the X11 video mode code */ | 117 /* Variables used by the X11 video mode code */ |
112 #if SDL_VIDEO_DRIVER_X11_VIDMODE | 118 #if SDL_VIDEO_DRIVER_X11_XINERAMA |
113 SDL_NAME(XF86VidModeModeInfo) saved_mode; | 119 SDL_NAME(XineramaScreenInfo) xinerama_info; |
114 struct { | |
115 int x, y; | |
116 } saved_view; | |
117 #endif | |
118 #if SDL_VIDEO_DRIVER_X11_XME /* XiG XME fullscreen */ | |
119 int use_xme; | |
120 XiGMiscResolutionInfo saved_res; | |
121 #endif | 120 #endif |
122 #if SDL_VIDEO_DRIVER_X11_XRANDR | 121 #if SDL_VIDEO_DRIVER_X11_XRANDR |
123 XRRScreenConfiguration* screen_config; | 122 XRRScreenConfiguration* screen_config; |
124 int saved_size_id; | 123 int saved_size_id; |
125 Rotation saved_rotation; | 124 Rotation saved_rotation; |
126 #endif | 125 #endif |
127 | 126 #if SDL_VIDEO_DRIVER_X11_VIDMODE |
128 int xinerama_x; | 127 SDL_NAME(XF86VidModeModeInfo) saved_mode; |
129 int xinerama_y; | 128 struct { |
129 int x, y; | |
130 } saved_view; | |
131 #endif | |
132 #if SDL_VIDEO_DRIVER_X11_XME /* XiG XME fullscreen */ | |
133 XiGMiscResolutionInfo saved_res; | |
134 #endif | |
135 | |
136 int use_xinerama; | |
137 int use_xrandr; | |
130 int use_vidmode; | 138 int use_vidmode; |
131 int use_xrandr; | 139 int use_xme; |
132 int currently_fullscreen; | 140 int currently_fullscreen; |
133 | 141 |
134 /* Automatic mode switching support (entering/leaving fullscreen) */ | 142 /* Automatic mode switching support (entering/leaving fullscreen) */ |
135 Uint32 switch_waiting; | 143 Uint32 switch_waiting; |
136 Uint32 switch_time; | 144 Uint32 switch_time; |
144 int *XPixels; /* pixels value allocation counts */ | 152 int *XPixels; /* pixels value allocation counts */ |
145 float gamma_saved[3]; /* Saved gamma values for VidMode gamma */ | 153 float gamma_saved[3]; /* Saved gamma values for VidMode gamma */ |
146 int gamma_changed; /* flag: has VidMode gamma been modified? */ | 154 int gamma_changed; /* flag: has VidMode gamma been modified? */ |
147 | 155 |
148 short *iconcolors; /* List of colors used by the icon */ | 156 short *iconcolors; /* List of colors used by the icon */ |
157 | |
158 /* Screensaver settings */ | |
159 int screensaver_timeout; | |
160 BOOL dpms_enabled; | |
149 }; | 161 }; |
150 | 162 |
151 /* Old variable names */ | 163 /* Old variable names */ |
152 #define local_X11 (this->hidden->local_X11) | 164 #define local_X11 (this->hidden->local_X11) |
153 #define SDL_Display (this->hidden->X11_Display) | 165 #define SDL_Display (this->hidden->X11_Display) |
172 #define window_h (this->hidden->window_h) | 184 #define window_h (this->hidden->window_h) |
173 #define mouse_last (this->hidden->mouse_last) | 185 #define mouse_last (this->hidden->mouse_last) |
174 #define mouse_accel (this->hidden->mouse_accel) | 186 #define mouse_accel (this->hidden->mouse_accel) |
175 #define mouse_relative (this->hidden->mouse_relative) | 187 #define mouse_relative (this->hidden->mouse_relative) |
176 #define SDL_modelist (this->hidden->modelist) | 188 #define SDL_modelist (this->hidden->modelist) |
189 #define xinerama_info (this->hidden->xinerama_info) | |
177 #define saved_mode (this->hidden->saved_mode) | 190 #define saved_mode (this->hidden->saved_mode) |
178 #define saved_view (this->hidden->saved_view) | 191 #define saved_view (this->hidden->saved_view) |
179 #define use_xme (this->hidden->use_xme) | |
180 #define saved_res (this->hidden->saved_res) | 192 #define saved_res (this->hidden->saved_res) |
181 #define use_xrandr (this->hidden->use_xrandr) | |
182 #define screen_config (this->hidden->screen_config) | 193 #define screen_config (this->hidden->screen_config) |
183 #define saved_size_id (this->hidden->saved_size_id) | 194 #define saved_size_id (this->hidden->saved_size_id) |
184 #define saved_rotation (this->hidden->saved_rotation) | 195 #define saved_rotation (this->hidden->saved_rotation) |
185 #define xinerama_x (this->hidden->xinerama_x) | 196 #define use_xinerama (this->hidden->use_xinerama) |
186 #define xinerama_y (this->hidden->xinerama_y) | |
187 #define use_vidmode (this->hidden->use_vidmode) | 197 #define use_vidmode (this->hidden->use_vidmode) |
198 #define use_xrandr (this->hidden->use_xrandr) | |
199 #define use_xme (this->hidden->use_xme) | |
188 #define currently_fullscreen (this->hidden->currently_fullscreen) | 200 #define currently_fullscreen (this->hidden->currently_fullscreen) |
189 #define switch_waiting (this->hidden->switch_waiting) | 201 #define switch_waiting (this->hidden->switch_waiting) |
190 #define switch_time (this->hidden->switch_time) | 202 #define switch_time (this->hidden->switch_time) |
191 #define blit_queued (this->hidden->blit_queued) | 203 #define blit_queued (this->hidden->blit_queued) |
192 #define SDL_DisplayColormap (this->hidden->DisplayColormap) | 204 #define SDL_DisplayColormap (this->hidden->DisplayColormap) |
194 #define SDL_XColorMap (this->hidden->XColorMap) | 206 #define SDL_XColorMap (this->hidden->XColorMap) |
195 #define SDL_XPixels (this->hidden->XPixels) | 207 #define SDL_XPixels (this->hidden->XPixels) |
196 #define gamma_saved (this->hidden->gamma_saved) | 208 #define gamma_saved (this->hidden->gamma_saved) |
197 #define gamma_changed (this->hidden->gamma_changed) | 209 #define gamma_changed (this->hidden->gamma_changed) |
198 #define SDL_iconcolors (this->hidden->iconcolors) | 210 #define SDL_iconcolors (this->hidden->iconcolors) |
211 #define screensaver_timeout (this->hidden->screensaver_timeout) | |
212 #define dpms_enabled (this->hidden->dpms_enabled) | |
199 /* Some versions of XFree86 have bugs - detect if this is one of them */ | 213 /* Some versions of XFree86 have bugs - detect if this is one of them */ |
200 #define BUGGY_XFREE86(condition, buggy_version) \ | 214 #define BUGGY_XFREE86(condition, buggy_version) \ |
201 ((SDL_strcmp(ServerVendor(SDL_Display), "The XFree86 Project, Inc") == 0) && \ | 215 ((SDL_strcmp(ServerVendor(SDL_Display), "The XFree86 Project, Inc") == 0) && \ |
202 (VendorRelease(SDL_Display) condition buggy_version)) | 216 (VendorRelease(SDL_Display) condition buggy_version)) |
203 | 217 |