src/video/SDL_sysvideo.h
branchSDL-1.3
changeset 1733 0b1070f2f94d
parent 1729 0ef52d56e8bb
child 1734 f7c667ded87d
     1.1 --- a/src/video/SDL_sysvideo.h	Sat Jul 08 20:55:39 2006 +0000
     1.2 +++ b/src/video/SDL_sysvideo.h	Sun Jul 09 09:02:26 2006 +0000
     1.3 @@ -117,14 +117,16 @@
     1.4      int w, h;
     1.5      Uint32 flags;
     1.6  
     1.7 -    Uint16 *gamma;
     1.8 -
     1.9      int display;
    1.10      SDL_Renderer *renderer;
    1.11  
    1.12      void *userdata;
    1.13      void *driverdata;
    1.14  };
    1.15 +#define FULLSCREEN_VISIBLE(W) \
    1.16 +    ((W->flags & SDL_WINDOW_FULLSCREEN) && \
    1.17 +     (W->flags & SDL_WINDOW_SHOWN) && \
    1.18 +     !(W->flags & SDL_WINDOW_MINIMIZED))
    1.19  
    1.20  /* Define the SDL display structure
    1.21     This corresponds to physical monitors attached to the system.
    1.22 @@ -136,8 +138,13 @@
    1.23      SDL_DisplayMode *display_modes;
    1.24      SDL_DisplayMode desktop_mode;
    1.25      SDL_DisplayMode current_mode;
    1.26 +    SDL_DisplayMode desired_mode;
    1.27 +    SDL_DisplayMode *fullscreen_mode;
    1.28      SDL_Palette *palette;
    1.29  
    1.30 +    Uint16 *gamma;
    1.31 +    Uint16 *saved_gamma;        /* (just offset into gamma) */
    1.32 +
    1.33      int num_render_drivers;
    1.34      SDL_RenderDriver *render_drivers;
    1.35  
    1.36 @@ -174,6 +181,12 @@
    1.37      /* * * */
    1.38      /* Display functions
    1.39       */
    1.40 +
    1.41 +    /* Get a list of the available display modes.
    1.42 +     * e.g.  SDL_AddDisplayMode(_this->current_display, mode)
    1.43 +     */
    1.44 +    void (*GetDisplayModes) (_THIS);
    1.45 +
    1.46      /* Setting the display mode is independent of creating windows,
    1.47       * so when the display mode is changed, all existing windows
    1.48       * should have their data updated accordingly, including the
    1.49 @@ -181,12 +194,18 @@
    1.50       */
    1.51      int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
    1.52  
    1.53 -    /* Sets the color entries of the display palette to those in 'colors'.
    1.54 -       The return value is 0 if all entries could be set properly or -1
    1.55 -       otherwise.
    1.56 -     */
    1.57 +    /* Set the color entries of the display palette */
    1.58      int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
    1.59  
    1.60 +    /* Get the color entries of the display palette */
    1.61 +    int (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
    1.62 +
    1.63 +    /* Set the gamma ramp */
    1.64 +    int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
    1.65 +
    1.66 +    /* Get the gamma ramp */
    1.67 +    int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
    1.68 +
    1.69      /* * * */
    1.70      /* Window functions
    1.71       */
    1.72 @@ -214,21 +233,6 @@
    1.73      void (*VideoQuit) (_THIS);
    1.74  
    1.75      /* * * */
    1.76 -    /* Gamma support */
    1.77 -
    1.78 -    /* Set the gamma correction directly (emulated with gamma ramps) */
    1.79 -    int (*SetGamma) (_THIS, float red, float green, float blue);
    1.80 -
    1.81 -    /* Get the gamma correction directly (emulated with gamma ramps) */
    1.82 -    int (*GetGamma) (_THIS, float *red, float *green, float *blue);
    1.83 -
    1.84 -    /* Set the gamma ramp */
    1.85 -    int (*SetGammaRamp) (_THIS, Uint16 * ramp);
    1.86 -
    1.87 -    /* Get the gamma ramp */
    1.88 -    int (*GetGammaRamp) (_THIS, Uint16 * ramp);
    1.89 -
    1.90 -    /* * * */
    1.91      /* OpenGL support */
    1.92  
    1.93      /* Sets the dll to use for OpenGL and loads it */
    1.94 @@ -405,7 +409,6 @@
    1.95  #endif
    1.96  
    1.97  #define SDL_CurrentDisplay	(_this->displays[_this->current_display])
    1.98 -#define SDL_CurrentWindow	(SDL_CurrentDisplay.windows[0])
    1.99  
   1.100  extern SDL_VideoDevice *SDL_GetVideoDevice();
   1.101  extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
   1.102 @@ -418,6 +421,11 @@
   1.103  extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID);
   1.104  extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window);
   1.105  
   1.106 +extern void SDL_OnWindowShown(SDL_Window * window);
   1.107 +extern void SDL_OnWindowHidden(SDL_Window * window);
   1.108 +extern void SDL_OnWindowFocusGained(SDL_Window * window);
   1.109 +extern void SDL_OnWindowFocusLost(SDL_Window * window);
   1.110 +
   1.111  #endif /* _SDL_sysvideo_h */
   1.112  
   1.113  /* vi: set ts=4 sw=4 expandtab: */