diff src/video/SDL_sysvideo.h @ 3500:4b594623401b

Work in progress on multi-display support: * Added display parameter to many internal functions so video modes can be set on displays that aren't the public current one. * The fullscreen mode is associated with fullscreen windows - not displays, so different windows more naturally have a mode associated with them based on their width and height. It's no longer necessary to specify a fullscreen mode, a default one will be picked automatically for fullscreen windows.
author Sam Lantinga <slouken@libsdl.org>
date Tue, 01 Dec 2009 05:57:15 +0000
parents 9f62f47d989b
children 467e67d301f3
line wrap: on
line diff
--- a/src/video/SDL_sysvideo.h	Mon Nov 30 21:04:25 2009 +0000
+++ b/src/video/SDL_sysvideo.h	Tue Dec 01 05:57:15 2009 +0000
@@ -139,6 +139,8 @@
     int display;
     SDL_Renderer *renderer;
 
+    SDL_DisplayMode fullscreen_mode;
+
     void *userdata;
     void *driverdata;
 };
@@ -158,7 +160,6 @@
     SDL_DisplayMode *display_modes;
     SDL_DisplayMode desktop_mode;
     SDL_DisplayMode current_mode;
-    SDL_DisplayMode fullscreen_mode;
     SDL_Palette *palette;
 
     Uint16 *gamma;
@@ -213,7 +214,7 @@
      * Get a list of the available display modes. e.g.
      * SDL_AddDisplayMode(_this->current_display, mode)
      */
-    void (*GetDisplayModes) (_THIS);
+    void (*GetDisplayModes) (_THIS, SDL_VideoDisplay * display);
 
     /*
      * Setting the display mode is independent of creating windows, so
@@ -221,19 +222,19 @@
      * their data updated accordingly, including the display surfaces
      * associated with them.
      */
-    int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
+    int (*SetDisplayMode) (_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode);
 
     /* Set the color entries of the display palette */
-    int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
+    int (*SetDisplayPalette) (_THIS, SDL_VideoDisplay * display, SDL_Palette * palette);
 
     /* Get the color entries of the display palette */
-    int (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
+    int (*GetDisplayPalette) (_THIS, SDL_VideoDisplay * display, SDL_Palette * palette);
 
     /* Set the gamma ramp */
-    int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
+    int (*SetDisplayGammaRamp) (_THIS, SDL_VideoDisplay * display, Uint16 * ramp);
 
     /* Get the gamma ramp */
-    int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
+    int (*GetDisplayGammaRamp) (_THIS, SDL_VideoDisplay * display, Uint16 * ramp);
 
     /* * * */
     /*
@@ -405,10 +406,19 @@
 extern SDL_VideoDevice *SDL_GetVideoDevice();
 extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
 extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
-extern SDL_bool
-SDL_AddDisplayMode(int displayIndex, const SDL_DisplayMode * mode);
-extern void
-SDL_AddRenderDriver(int displayIndex, const SDL_RenderDriver * driver);
+extern SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode * mode);
+extern int SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay * display);
+extern int SDL_GetDisplayModeForDisplay(SDL_VideoDisplay * display, int index, SDL_DisplayMode * mode);
+extern int SDL_GetDesktopDisplayModeForDisplay(SDL_VideoDisplay * display, SDL_DisplayMode * mode);
+extern int SDL_GetCurrentDisplayModeForDisplay(SDL_VideoDisplay * display, SDL_DisplayMode * mode);
+extern SDL_DisplayMode * SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
+extern int SDL_SetDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode);
+extern int SDL_SetDisplayPaletteForDisplay(SDL_VideoDisplay * display, const SDL_Color * colors, int firstcolor, int ncolors);
+extern int SDL_GetDisplayPaletteForDisplay(SDL_VideoDisplay * display, SDL_Color * colors, int firstcolor, int ncolors);
+extern void SDL_AddRenderDriver(SDL_VideoDisplay *display, const SDL_RenderDriver * driver);
+
+extern int SDL_SetGammaRampForDisplay(SDL_VideoDisplay * display, const Uint16 * red, const Uint16 * green, const Uint16 * blue);
+extern int SDL_GetGammaRampForDisplay(SDL_VideoDisplay * display, Uint16 * red, Uint16 * green, Uint16 * blue);
 
 extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
 extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID);