comparison src/video/SDL_sysvideo.h @ 3502:98a819296cdc

Whenever a window becomes fullscreen, shown, unminimized, and has input focus it will change the display to the corresponding fullscreen video mode. If it loses any of those properties the desktop mode will be restored.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 01 Dec 2009 08:56:12 +0000
parents 467e67d301f3
children 42cfa69e351b
comparison
equal deleted inserted replaced
3501:467e67d301f3 3502:98a819296cdc
145 void *driverdata; 145 void *driverdata;
146 }; 146 };
147 #define FULLSCREEN_VISIBLE(W) \ 147 #define FULLSCREEN_VISIBLE(W) \
148 (((W)->flags & SDL_WINDOW_FULLSCREEN) && \ 148 (((W)->flags & SDL_WINDOW_FULLSCREEN) && \
149 ((W)->flags & SDL_WINDOW_SHOWN) && \ 149 ((W)->flags & SDL_WINDOW_SHOWN) && \
150 ((W)->flags & SDL_WINDOW_INPUT_FOCUS) && \
150 !((W)->flags & SDL_WINDOW_MINIMIZED)) 151 !((W)->flags & SDL_WINDOW_MINIMIZED))
151 152
152 /* 153 /*
153 * Define the SDL display structure This corresponds to physical monitors 154 * Define the SDL display structure This corresponds to physical monitors
154 * attached to the system. 155 * attached to the system.
158 int max_display_modes; 159 int max_display_modes;
159 int num_display_modes; 160 int num_display_modes;
160 SDL_DisplayMode *display_modes; 161 SDL_DisplayMode *display_modes;
161 SDL_DisplayMode desktop_mode; 162 SDL_DisplayMode desktop_mode;
162 SDL_DisplayMode current_mode; 163 SDL_DisplayMode current_mode;
164 SDL_bool updating_fullscreen;
163 SDL_Palette *palette; 165 SDL_Palette *palette;
164 166
165 Uint16 *gamma; 167 Uint16 *gamma;
166 Uint16 *saved_gamma; /* (just offset into gamma) */ 168 Uint16 *saved_gamma; /* (just offset into gamma) */
167 169
424 extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window); 426 extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window);
425 427
426 extern void SDL_OnWindowShown(SDL_Window * window); 428 extern void SDL_OnWindowShown(SDL_Window * window);
427 extern void SDL_OnWindowHidden(SDL_Window * window); 429 extern void SDL_OnWindowHidden(SDL_Window * window);
428 extern void SDL_OnWindowResized(SDL_Window * window); 430 extern void SDL_OnWindowResized(SDL_Window * window);
431 extern void SDL_OnWindowMinimized(SDL_Window * window);
432 extern void SDL_OnWindowRestored(SDL_Window * window);
429 extern void SDL_OnWindowFocusGained(SDL_Window * window); 433 extern void SDL_OnWindowFocusGained(SDL_Window * window);
430 extern void SDL_OnWindowFocusLost(SDL_Window * window); 434 extern void SDL_OnWindowFocusLost(SDL_Window * window);
431 extern SDL_WindowID SDL_GetFocusWindow(void); 435 extern SDL_WindowID SDL_GetFocusWindow(void);
432 436
433 #endif /* _SDL_sysvideo_h */ 437 #endif /* _SDL_sysvideo_h */