include/SDL_video.h
changeset 5246 58265e606e4e
parent 5244 762e40fb8e28
child 5262 b530ef003506
     1.1 --- a/include/SDL_video.h	Thu Feb 10 14:36:09 2011 -0800
     1.2 +++ b/include/SDL_video.h	Thu Feb 10 14:44:25 2011 -0800
     1.3 @@ -113,12 +113,20 @@
     1.4  /**
     1.5   *  \brief Used to indicate that you don't care what the window position is.
     1.6   */
     1.7 -#define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF
     1.8 +#define SDL_WINDOWPOS_UNDEFINED_MASK    0x1FFF0000
     1.9 +#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X)  (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
    1.10 +#define SDL_WINDOWPOS_UNDEFINED         SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
    1.11 +#define SDL_WINDOWPOS_ISUNDEFINED(X)    \
    1.12 +            (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
    1.13  
    1.14  /**
    1.15   *  \brief Used to indicate that the window position should be centered.
    1.16   */
    1.17 -#define SDL_WINDOWPOS_CENTERED  0x7FFFFFE
    1.18 +#define SDL_WINDOWPOS_CENTERED_MASK    0x2FFF0000
    1.19 +#define SDL_WINDOWPOS_CENTERED_DISPLAY(X)  (SDL_WINDOWPOS_CENTERED_MASK|(X))
    1.20 +#define SDL_WINDOWPOS_CENTERED         SDL_WINDOWPOS_CENTERED_DISPLAY(0)
    1.21 +#define SDL_WINDOWPOS_ISCENTERED(X)    \
    1.22 +            (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
    1.23  
    1.24  /**
    1.25   *  \brief Event subtype for window events
    1.26 @@ -304,6 +312,14 @@
    1.27  extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
    1.28  
    1.29  /**
    1.30 + *  \brief Get the display index associated with a window.
    1.31 + *  
    1.32 + *  \return the display index of the display containing the center of the
    1.33 + *          window, or -1 on error.
    1.34 + */
    1.35 +extern DECLSPEC int SDLCALL SDL_GetWindowDisplay(SDL_Window * window);
    1.36 +
    1.37 +/**
    1.38   *  \brief Set the display mode used when a fullscreen window is visible.
    1.39   *
    1.40   *  By default the window's dimensions and the desktop format and refresh rate
    1.41 @@ -531,7 +547,7 @@
    1.42   *  \sa SDL_GetWindowDisplayMode()
    1.43   */
    1.44  extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
    1.45 -                                                    int fullscreen);
    1.46 +                                                    SDL_bool fullscreen);
    1.47  
    1.48  /**
    1.49   *  \brief Get an SDL surface associated with the window.