include/SDL_video.h
changeset 11365 a9bd2625fa01
parent 11346 4d2bf1b340cd
child 11445 8d0fb04ecb13
equal deleted inserted replaced
11364:ec27c4fd6880 11365:a9bd2625fa01
   231 {
   231 {
   232     SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
   232     SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
   233     SDL_GL_CONTEXT_RESET_LOSE_CONTEXT    = 0x0001
   233     SDL_GL_CONTEXT_RESET_LOSE_CONTEXT    = 0x0001
   234 } SDL_GLContextResetNotification;
   234 } SDL_GLContextResetNotification;
   235 
   235 
   236 
       
   237 /* Function prototypes */
   236 /* Function prototypes */
   238 
   237 
   239 /**
   238 /**
   240  *  \brief Get the number of video drivers compiled into SDL
   239  *  \brief Get the number of video drivers compiled into SDL
   241  *
   240  *
   455  *  \param flags The flags for the window, a mask of any of the following:
   454  *  \param flags The flags for the window, a mask of any of the following:
   456  *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,
   455  *               ::SDL_WINDOW_FULLSCREEN,    ::SDL_WINDOW_OPENGL,
   457  *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,
   456  *               ::SDL_WINDOW_HIDDEN,        ::SDL_WINDOW_BORDERLESS,
   458  *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,
   457  *               ::SDL_WINDOW_RESIZABLE,     ::SDL_WINDOW_MAXIMIZED,
   459  *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
   458  *               ::SDL_WINDOW_MINIMIZED,     ::SDL_WINDOW_INPUT_GRABBED,
   460  *               ::SDL_WINDOW_ALLOW_HIGHDPI.
   459  *               ::SDL_WINDOW_ALLOW_HIGHDPI, ::SDL_WINDOW_VULKAN.
   461  *
   460  *
   462  *  \return The created window, or NULL if window creation failed.
   461  *  \return The created window, or NULL if window creation failed.
   463  *
   462  *
   464  *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
   463  *  If the window is created with the SDL_WINDOW_ALLOW_HIGHDPI flag, its size
   465  *  in pixels may differ from its size in screen coordinates on platforms with
   464  *  in pixels may differ from its size in screen coordinates on platforms with
   466  *  high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query
   465  *  high-DPI support (e.g. iOS and Mac OS X). Use SDL_GetWindowSize() to query
   467  *  the client area's size in screen coordinates, and SDL_GL_GetDrawableSize()
   466  *  the client area's size in screen coordinates, and SDL_GL_GetDrawableSize(),
   468  *  or SDL_GetRendererOutputSize() to query the drawable size in pixels.
   467  *  SDL_Vulkan_GetDrawableSize(), or SDL_GetRendererOutputSize() to query the
       
   468  *  drawable size in pixels.
       
   469  *
       
   470  *  If the window is created with any of the SDL_WINDOW_OPENGL or
       
   471  *  SDL_WINDOW_VULKAN flags, then the corresponding LoadLibrary function
       
   472  *  (SDL_GL_LoadLibrary or SDL_Vulkan_LoadLibrary) is called and the
       
   473  *  corrensponding UnloadLibrary function is called by SDL_DestroyWindow().
       
   474  *
       
   475  *  If SDL_WINDOW_VULKAN is specified and there isn't a working Vulkan driver,
       
   476  *  SDL_CreateWindow() will fail because SDL_Vulkan_LoadLibrary() will fail.
       
   477  *
       
   478  *  \note On non-Apple devices, SDL requires you to either not link to the
       
   479  *        Vulkan loader or link to a dynamic library version. This limitation
       
   480  *        may be removed in a future version of SDL.
   469  *
   481  *
   470  *  \sa SDL_DestroyWindow()
   482  *  \sa SDL_DestroyWindow()
       
   483  *  \sa SDL_GL_LoadLibrary()
       
   484  *  \sa SDL_Vulkan_LoadLibrary()
   471  */
   485  */
   472 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
   486 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
   473                                                       int x, int y, int w,
   487                                                       int x, int y, int w,
   474                                                       int h, Uint32 flags);
   488                                                       int h, Uint32 flags);
   475 
   489 
   877  *  \brief Set the opacity for a window
   891  *  \brief Set the opacity for a window
   878  *
   892  *
   879  *  \param window The window which will be made transparent or opaque
   893  *  \param window The window which will be made transparent or opaque
   880  *  \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
   894  *  \param opacity Opacity (0.0f - transparent, 1.0f - opaque) This will be
   881  *                 clamped internally between 0.0f and 1.0f.
   895  *                 clamped internally between 0.0f and 1.0f.
   882  * 
   896  *
   883  *  \return 0 on success, or -1 if setting the opacity isn't supported.
   897  *  \return 0 on success, or -1 if setting the opacity isn't supported.
   884  *
   898  *
   885  *  \sa SDL_GetWindowOpacity()
   899  *  \sa SDL_GetWindowOpacity()
   886  */
   900  */
   887 extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
   901 extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
   904 /**
   918 /**
   905  *  \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
   919  *  \brief Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
   906  *
   920  *
   907  *  \param modal_window The window that should be modal
   921  *  \param modal_window The window that should be modal
   908  *  \param parent_window The parent window
   922  *  \param parent_window The parent window
   909  * 
   923  *
   910  *  \return 0 on success, or -1 otherwise.
   924  *  \return 0 on success, or -1 otherwise.
   911  */
   925  */
   912 extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
   926 extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
   913 
   927 
   914 /**
   928 /**
   917  *  You almost certainly want SDL_RaiseWindow() instead of this function. Use
   931  *  You almost certainly want SDL_RaiseWindow() instead of this function. Use
   918  *  this with caution, as you might give focus to a window that's completely
   932  *  this with caution, as you might give focus to a window that's completely
   919  *  obscured by other windows.
   933  *  obscured by other windows.
   920  *
   934  *
   921  *  \param window The window that should get the input focus
   935  *  \param window The window that should get the input focus
   922  * 
   936  *
   923  *  \return 0 on success, or -1 otherwise.
   937  *  \return 0 on success, or -1 otherwise.
   924  *  \sa SDL_RaiseWindow()
   938  *  \sa SDL_RaiseWindow()
   925  */
   939  */
   926 extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
   940 extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
   927 
   941