mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-05 07:09:32 +00:00
SDL_WINDOW_FULLSCREEN and SDL_WINDOW_FULLSCREEN_DESKTOP are now distinct flags
This commit is contained in:
@@ -415,6 +415,7 @@
|
||||
#define SDL_GetDisplayDPI SDL_GetDisplayPhysicalDPI
|
||||
#define SDL_GetPointDisplayIndex SDL_GetDisplayIndexForPoint
|
||||
#define SDL_GetRectDisplayIndex SDL_GetDisplayIndexForRect
|
||||
#define SDL_WINDOW_FULLSCREEN SDL_WINDOW_FULLSCREEN_EXCLUSIVE
|
||||
|
||||
#elif !defined(SDL_DISABLE_OLD_NAMES)
|
||||
|
||||
@@ -795,6 +796,7 @@
|
||||
#define SDL_GetDisplayDPI SDL_GetDisplayDPI_renamed_SDL_GetDisplayPhysicalDPI
|
||||
#define SDL_GetPointDisplayIndex SDL_GetPointDisplayIndex_renamed_SDL_GetDisplayIndexForPoint
|
||||
#define SDL_GetRectDisplayIndex SDL_GetRectDisplayIndex_renamed_SDL_GetDisplayIndexForRect
|
||||
#define SDL_WINDOW_FULLSCREEN SDL_WINDOW_FULLSCREEN_renamed_SDL_WINDOW_FULLSCREEN_EXCLUSIVE
|
||||
|
||||
#endif /* SDL_ENABLE_OLD_NAMES */
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ extern "C" {
|
||||
* ::SDL_WINDOW_INPUT_GRABBED, ::SDL_WINDOW_HIDDEN,
|
||||
* ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
|
||||
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_BORDERLESS is always set,
|
||||
* and ::SDL_WINDOW_FULLSCREEN is always unset.
|
||||
* and ::SDL_WINDOW_FULLSCREEN_MASK is always unset.
|
||||
* \return the window created, or NULL if window creation failed.
|
||||
*
|
||||
* \since This function is available since SDL 3.0.0.
|
||||
|
||||
@@ -107,33 +107,35 @@ typedef struct SDL_Window SDL_Window;
|
||||
*/
|
||||
typedef enum
|
||||
{
|
||||
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window */
|
||||
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
|
||||
SDL_WINDOW_FULLSCREEN_EXCLUSIVE = 0x00000001, /**< window is in fullscreen exclusive mode */
|
||||
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
|
||||
/* 0x00000004 was SDL_WINDOW_SHOWN in SDL2, please reserve this bit for sdl2-compat. */
|
||||
SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */
|
||||
SDL_WINDOW_BORDERLESS = 0x00000010, /**< no window decoration */
|
||||
SDL_WINDOW_RESIZABLE = 0x00000020, /**< window can be resized */
|
||||
SDL_WINDOW_MINIMIZED = 0x00000040, /**< window is minimized */
|
||||
SDL_WINDOW_MAXIMIZED = 0x00000080, /**< window is maximized */
|
||||
SDL_WINDOW_MOUSE_GRABBED = 0x00000100, /**< window has grabbed mouse input */
|
||||
SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
|
||||
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
||||
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
|
||||
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
||||
SDL_WINDOW_HIDDEN = 0x00000008, /**< window is not visible */
|
||||
SDL_WINDOW_BORDERLESS = 0x00000010, /**< no window decoration */
|
||||
SDL_WINDOW_RESIZABLE = 0x00000020, /**< window can be resized */
|
||||
SDL_WINDOW_MINIMIZED = 0x00000040, /**< window is minimized */
|
||||
SDL_WINDOW_MAXIMIZED = 0x00000080, /**< window is maximized */
|
||||
SDL_WINDOW_MOUSE_GRABBED = 0x00000100, /**< window has grabbed mouse input */
|
||||
SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
|
||||
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
||||
SDL_WINDOW_FULLSCREEN_DESKTOP = 0x00001000, /**< window is in fullscreen desktop mode */
|
||||
SDL_WINDOW_FOREIGN = 0x00000800, /**< window not created by SDL */
|
||||
/* 0x00002000 was SDL_WINDOW_ALLOW_HIGHDPI in SDL2, please reserve this bit for sdl2-compat. */
|
||||
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
|
||||
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
||||
SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
|
||||
SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
|
||||
SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
|
||||
SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
|
||||
SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000, /**< window has grabbed keyboard input */
|
||||
SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
|
||||
SDL_WINDOW_METAL = 0x20000000, /**< window usable for Metal view */
|
||||
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000, /**< window has mouse captured (unrelated to MOUSE_GRABBED) */
|
||||
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000, /**< window should always be above others */
|
||||
SDL_WINDOW_SKIP_TASKBAR = 0x00010000, /**< window should not be added to the taskbar */
|
||||
SDL_WINDOW_UTILITY = 0x00020000, /**< window should be treated as a utility window */
|
||||
SDL_WINDOW_TOOLTIP = 0x00040000, /**< window should be treated as a tooltip */
|
||||
SDL_WINDOW_POPUP_MENU = 0x00080000, /**< window should be treated as a popup menu */
|
||||
SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000, /**< window has grabbed keyboard input */
|
||||
SDL_WINDOW_VULKAN = 0x10000000, /**< window usable for Vulkan surface */
|
||||
SDL_WINDOW_METAL = 0x20000000, /**< window usable for Metal view */
|
||||
|
||||
SDL_WINDOW_INPUT_GRABBED = SDL_WINDOW_MOUSE_GRABBED /**< equivalent to SDL_WINDOW_MOUSE_GRABBED for compatibility */
|
||||
} SDL_WindowFlags;
|
||||
|
||||
#define SDL_WINDOW_FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_EXCLUSIVE | SDL_WINDOW_FULLSCREEN_DESKTOP)
|
||||
|
||||
/**
|
||||
* \brief Used to indicate that you don't care what the window position is.
|
||||
*/
|
||||
@@ -646,7 +648,7 @@ extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window *window);
|
||||
*
|
||||
* `flags` may be any of the following OR'd together:
|
||||
*
|
||||
* - `SDL_WINDOW_FULLSCREEN`: fullscreen window
|
||||
* - `SDL_WINDOW_FULLSCREEN_EXCLUSIVE`: fullscreen window, switching display mode to the closest fullscreen resolution
|
||||
* - `SDL_WINDOW_FULLSCREEN_DESKTOP`: fullscreen window at desktop resolution
|
||||
* - `SDL_WINDOW_OPENGL`: window usable with an OpenGL context
|
||||
* - `SDL_WINDOW_VULKAN`: window usable with a Vulkan instance
|
||||
@@ -1157,12 +1159,12 @@ extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window *window);
|
||||
/**
|
||||
* Set a window's fullscreen state.
|
||||
*
|
||||
* `flags` may be `SDL_WINDOW_FULLSCREEN`, for "real" fullscreen with a
|
||||
* `flags` may be `SDL_WINDOW_FULLSCREEN_EXCLUSIVE`, for "real" fullscreen with a
|
||||
* videomode change; `SDL_WINDOW_FULLSCREEN_DESKTOP` for "fake" fullscreen
|
||||
* that takes the size of the desktop; and 0 for windowed mode.
|
||||
*
|
||||
* \param window the window to change
|
||||
* \param flags `SDL_WINDOW_FULLSCREEN`, `SDL_WINDOW_FULLSCREEN_DESKTOP` or 0
|
||||
* \param flags `SDL_WINDOW_FULLSCREEN_EXCLUSIVE`, `SDL_WINDOW_FULLSCREEN_DESKTOP` or 0
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user