include/SDL_video.h
changeset 7746 6a05d7352575
parent 7678 286c42d7c5ed
child 7752 0947d51f3d1d
     1.1 --- a/include/SDL_video.h	Fri Sep 27 22:09:51 2013 -0700
     1.2 +++ b/include/SDL_video.h	Fri Sep 20 13:43:00 2013 -0400
     1.3 @@ -107,7 +107,8 @@
     1.4      SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
     1.5      SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
     1.6      SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
     1.7 -    SDL_WINDOW_FOREIGN = 0x00000800             /**< window not created by SDL */
     1.8 +    SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
     1.9 +    SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported */
    1.10  } SDL_WindowFlags;
    1.11  
    1.12  /**
    1.13 @@ -393,10 +394,11 @@
    1.14   *  \param w     The width of the window.
    1.15   *  \param h     The height of the window.
    1.16   *  \param flags The flags for the window, a mask of any of the following:
    1.17 - *               ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL,
    1.18 - *               ::SDL_WINDOW_HIDDEN,     ::SDL_WINDOW_BORDERLESS,
    1.19 - *               ::SDL_WINDOW_RESIZABLE,  ::SDL_WINDOW_MAXIMIZED,
    1.20 - *               ::SDL_WINDOW_MINIMIZED,  ::SDL_WINDOW_INPUT_GRABBED.
    1.21 + *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,
    1.22 + *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,
    1.23 + *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,
    1.24 + *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
    1.25 + *               ::SDL_WINDOW_ALLOW_HIGHDPI.
    1.26   *
    1.27   *  \return The id of the window created, or zero if window creation failed.
    1.28   *
    1.29 @@ -900,6 +902,23 @@
    1.30  extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
    1.31  
    1.32  /**
    1.33 + *  \brief Get the size of a window's underlying drawable (for use with glViewport).
    1.34 + *
    1.35 + *  \param w        Pointer to variable for storing the width, may be NULL
    1.36 + *  \param h        Pointer to variable for storing the height, may be NULL
    1.37 + *
    1.38 + * This may differ from SDL_GetWindowSize if we're rendering to a high-DPI
    1.39 + * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
    1.40 + * platform with high-DPI support (Apple calls this "Retina"), and not disabled
    1.41 + * by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
    1.42 + *
    1.43 + *  \sa SDL_GetWindowSize()
    1.44 + *  \sa SDL_CreateWindow()
    1.45 + */
    1.46 +extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
    1.47 +                                                    int *h);
    1.48 +
    1.49 +/**
    1.50   *  \brief Set the swap interval for the current OpenGL context.
    1.51   *
    1.52   *  \param interval 0 for immediate updates, 1 for updates synchronized with the