include/SDL_video.h
changeset 7746 6a05d7352575
parent 7678 286c42d7c5ed
child 7752 0947d51f3d1d
equal deleted inserted replaced
7745:c52d519d104a 7746:6a05d7352575
   105     SDL_WINDOW_MAXIMIZED = 0x00000080,          /**< window is maximized */
   105     SDL_WINDOW_MAXIMIZED = 0x00000080,          /**< window is maximized */
   106     SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */
   106     SDL_WINDOW_INPUT_GRABBED = 0x00000100,      /**< window has grabbed input focus */
   107     SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
   107     SDL_WINDOW_INPUT_FOCUS = 0x00000200,        /**< window has input focus */
   108     SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
   108     SDL_WINDOW_MOUSE_FOCUS = 0x00000400,        /**< window has mouse focus */
   109     SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
   109     SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
   110     SDL_WINDOW_FOREIGN = 0x00000800             /**< window not created by SDL */
   110     SDL_WINDOW_FOREIGN = 0x00000800,            /**< window not created by SDL */
       
   111     SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,      /**< window should be created in high-DPI mode if supported */
   111 } SDL_WindowFlags;
   112 } SDL_WindowFlags;
   112 
   113 
   113 /**
   114 /**
   114  *  \brief Used to indicate that you don't care what the window position is.
   115  *  \brief Used to indicate that you don't care what the window position is.
   115  */
   116  */
   391  *  \param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
   392  *  \param y     The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
   392  *               ::SDL_WINDOWPOS_UNDEFINED.
   393  *               ::SDL_WINDOWPOS_UNDEFINED.
   393  *  \param w     The width of the window.
   394  *  \param w     The width of the window.
   394  *  \param h     The height of the window.
   395  *  \param h     The height of the window.
   395  *  \param flags The flags for the window, a mask of any of the following:
   396  *  \param flags The flags for the window, a mask of any of the following:
   396  *               ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL,
   397  *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,
   397  *               ::SDL_WINDOW_HIDDEN,     ::SDL_WINDOW_BORDERLESS,
   398  *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,
   398  *               ::SDL_WINDOW_RESIZABLE,  ::SDL_WINDOW_MAXIMIZED,
   399  *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,
   399  *               ::SDL_WINDOW_MINIMIZED,  ::SDL_WINDOW_INPUT_GRABBED.
   400  *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
       
   401  *               ::SDL_WINDOW_ALLOW_HIGHDPI.
   400  *
   402  *
   401  *  \return The id of the window created, or zero if window creation failed.
   403  *  \return The id of the window created, or zero if window creation failed.
   402  *
   404  *
   403  *  \sa SDL_DestroyWindow()
   405  *  \sa SDL_DestroyWindow()
   404  */
   406  */
   898  *  \brief Get the currently active OpenGL context.
   900  *  \brief Get the currently active OpenGL context.
   899  */
   901  */
   900 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
   902 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
   901 
   903 
   902 /**
   904 /**
       
   905  *  \brief Get the size of a window's underlying drawable (for use with glViewport).
       
   906  *
       
   907  *  \param w        Pointer to variable for storing the width, may be NULL
       
   908  *  \param h        Pointer to variable for storing the height, may be NULL
       
   909  *
       
   910  * This may differ from SDL_GetWindowSize if we're rendering to a high-DPI
       
   911  * drawable, i.e. the window was created with SDL_WINDOW_ALLOW_HIGHDPI on a
       
   912  * platform with high-DPI support (Apple calls this "Retina"), and not disabled
       
   913  * by the SDL_HINT_VIDEO_HIGHDPI_DISABLED hint.
       
   914  *
       
   915  *  \sa SDL_GetWindowSize()
       
   916  *  \sa SDL_CreateWindow()
       
   917  */
       
   918 extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
       
   919                                                     int *h);
       
   920 
       
   921 /**
   903  *  \brief Set the swap interval for the current OpenGL context.
   922  *  \brief Set the swap interval for the current OpenGL context.
   904  *
   923  *
   905  *  \param interval 0 for immediate updates, 1 for updates synchronized with the
   924  *  \param interval 0 for immediate updates, 1 for updates synchronized with the
   906  *                  vertical retrace. If the system supports it, you may
   925  *                  vertical retrace. If the system supports it, you may
   907  *                  specify -1 to allow late swaps to happen immediately
   926  *                  specify -1 to allow late swaps to happen immediately