#[repr(transparent)]pub struct SDL_WindowFlags(pub Uint64);Expand description
The flags on a window.
These cover a lot of true/false, or on/off, window state. Some of it is
immutable after being set through SDL_CreateWindow(), some of it can be
changed on existing windows by the app, and some of it might be altered by
the user or system outside of the app’s control.
When creating windows with SDL_WINDOW_RESIZABLE, SDL will constrain
resizable windows to the dimensions recommended by the compositor to fit it
within the usable desktop space, although some compositors will do this
automatically without intervention as well. Use SDL_SetWindowResizable
after creation instead if you wish to create a window with a specific size.
§Availability
This datatype is available since SDL 3.2.0.
§See also
§Known values (sdl3-sys)
| Associated constant | Global constant | Description |
|---|---|---|
FULLSCREEN | SDL_WINDOW_FULLSCREEN | window is in fullscreen mode |
OPENGL | SDL_WINDOW_OPENGL | window usable with OpenGL context |
OCCLUDED | SDL_WINDOW_OCCLUDED | window is occluded |
HIDDEN | SDL_WINDOW_HIDDEN | window is neither mapped onto the desktop nor shown in the taskbar/dock/window list; SDL_ShowWindow() is required for it to become visible |
BORDERLESS | SDL_WINDOW_BORDERLESS | no window decoration |
RESIZABLE | SDL_WINDOW_RESIZABLE | window can be resized |
MINIMIZED | SDL_WINDOW_MINIMIZED | window is minimized |
MAXIMIZED | SDL_WINDOW_MAXIMIZED | window is maximized |
MOUSE_GRABBED | SDL_WINDOW_MOUSE_GRABBED | window has grabbed mouse input |
INPUT_FOCUS | SDL_WINDOW_INPUT_FOCUS | window has input focus |
MOUSE_FOCUS | SDL_WINDOW_MOUSE_FOCUS | window has mouse focus |
EXTERNAL | SDL_WINDOW_EXTERNAL | window not created by SDL |
MODAL | SDL_WINDOW_MODAL | window is modal |
HIGH_PIXEL_DENSITY | SDL_WINDOW_HIGH_PIXEL_DENSITY | window uses high pixel density back buffer if possible |
MOUSE_CAPTURE | SDL_WINDOW_MOUSE_CAPTURE | window has mouse captured (unrelated to MOUSE_GRABBED) |
MOUSE_RELATIVE_MODE | SDL_WINDOW_MOUSE_RELATIVE_MODE | window has relative mode enabled |
ALWAYS_ON_TOP | SDL_WINDOW_ALWAYS_ON_TOP | window should always be above others |
UTILITY | SDL_WINDOW_UTILITY | window should be treated as a utility window, not showing in the task bar and window list |
TOOLTIP | SDL_WINDOW_TOOLTIP | window should be treated as a tooltip and does not get mouse or keyboard focus, requires a parent window |
POPUP_MENU | SDL_WINDOW_POPUP_MENU | window should be treated as a popup menu, requires a parent window |
KEYBOARD_GRABBED | SDL_WINDOW_KEYBOARD_GRABBED | window has grabbed keyboard input |
FILL_DOCUMENT | SDL_WINDOW_FILL_DOCUMENT | window is in fill-document mode (Emscripten only), since SDL 3.4.0 |
VULKAN | SDL_WINDOW_VULKAN | window usable for Vulkan surface |
METAL | SDL_WINDOW_METAL | window usable for Metal view |
TRANSPARENT | SDL_WINDOW_TRANSPARENT | window with transparent buffer |
NOT_FOCUSABLE | SDL_WINDOW_NOT_FOCUSABLE | window should not be focusable |
Tuple Fields§
§0: Uint64Implementations§
Source§impl SDL_WindowFlags
impl SDL_WindowFlags
Sourcepub const FULLSCREEN: Self
pub const FULLSCREEN: Self
window is in fullscreen mode
Sourcepub const HIDDEN: Self
pub const HIDDEN: Self
window is neither mapped onto the desktop nor shown in the taskbar/dock/window list; SDL_ShowWindow() is required for it to become visible
Sourcepub const BORDERLESS: Self
pub const BORDERLESS: Self
no window decoration
Sourcepub const MOUSE_GRABBED: Self
pub const MOUSE_GRABBED: Self
window has grabbed mouse input
Sourcepub const INPUT_FOCUS: Self
pub const INPUT_FOCUS: Self
window has input focus
Sourcepub const MOUSE_FOCUS: Self
pub const MOUSE_FOCUS: Self
window has mouse focus
Sourcepub const HIGH_PIXEL_DENSITY: Self
pub const HIGH_PIXEL_DENSITY: Self
window uses high pixel density back buffer if possible
Sourcepub const MOUSE_CAPTURE: Self
pub const MOUSE_CAPTURE: Self
window has mouse captured (unrelated to MOUSE_GRABBED)
Sourcepub const MOUSE_RELATIVE_MODE: Self
pub const MOUSE_RELATIVE_MODE: Self
window has relative mode enabled
Sourcepub const ALWAYS_ON_TOP: Self
pub const ALWAYS_ON_TOP: Self
window should always be above others
Sourcepub const UTILITY: Self
pub const UTILITY: Self
window should be treated as a utility window, not showing in the task bar and window list
Sourcepub const TOOLTIP: Self
pub const TOOLTIP: Self
window should be treated as a tooltip and does not get mouse or keyboard focus, requires a parent window
Sourcepub const POPUP_MENU: Self
pub const POPUP_MENU: Self
window should be treated as a popup menu, requires a parent window
Sourcepub const KEYBOARD_GRABBED: Self
pub const KEYBOARD_GRABBED: Self
window has grabbed keyboard input
Sourcepub const FILL_DOCUMENT: Self
pub const FILL_DOCUMENT: Self
window is in fill-document mode (Emscripten only), since SDL 3.4.0
Sourcepub const TRANSPARENT: Self
pub const TRANSPARENT: Self
window with transparent buffer
Sourcepub const NOT_FOCUSABLE: Self
pub const NOT_FOCUSABLE: Self
window should not be focusable
Trait Implementations§
Source§impl BitAnd for SDL_WindowFlags
impl BitAnd for SDL_WindowFlags
Source§impl BitAndAssign for SDL_WindowFlags
impl BitAndAssign for SDL_WindowFlags
Source§fn bitand_assign(&mut self, rhs: Self)
fn bitand_assign(&mut self, rhs: Self)
&= operation. Read moreSource§impl BitOr for SDL_WindowFlags
impl BitOr for SDL_WindowFlags
Source§impl BitOrAssign for SDL_WindowFlags
impl BitOrAssign for SDL_WindowFlags
Source§fn bitor_assign(&mut self, rhs: Self)
fn bitor_assign(&mut self, rhs: Self)
|= operation. Read moreSource§impl BitXor for SDL_WindowFlags
impl BitXor for SDL_WindowFlags
Source§impl BitXorAssign for SDL_WindowFlags
impl BitXorAssign for SDL_WindowFlags
Source§fn bitxor_assign(&mut self, rhs: Self)
fn bitxor_assign(&mut self, rhs: Self)
^= operation. Read moreSource§impl Clone for SDL_WindowFlags
impl Clone for SDL_WindowFlags
Source§fn clone(&self) -> SDL_WindowFlags
fn clone(&self) -> SDL_WindowFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SDL_WindowFlags
Available on crate feature debug-impls only.
impl Debug for SDL_WindowFlags
debug-impls only.Source§impl Default for SDL_WindowFlags
impl Default for SDL_WindowFlags
Source§fn default() -> SDL_WindowFlags
fn default() -> SDL_WindowFlags
Source§impl From<SDL_WindowFlags> for Uint64
impl From<SDL_WindowFlags> for Uint64
Source§fn from(value: SDL_WindowFlags) -> Self
fn from(value: SDL_WindowFlags) -> Self
Source§impl GroupMetadata for SDL_WindowFlags
Available on crate feature metadata only.
impl GroupMetadata for SDL_WindowFlags
metadata only.