SDL Wiki

SDL_WindowFlags

An enumeration of window states.

Values

SDL_WINDOW_ALWAYS_ON_TOP

window should always be above others

SDL_WINDOW_BORDERLESS

no window decoration

SDL_WINDOW_FOREIGN

window not created by SDL

SDL_WINDOW_FULLSCREEN

fullscreen window

SDL_WINDOW_HIDDEN

window is not visible

SDL_WINDOW_INPUT_FOCUS

window has input focus

SDL_WINDOW_KEYBOARD_GRABBED

window has grabbed keyboard focus

SDL_WINDOW_MAXIMIZED

window is maximized

SDL_WINDOW_METAL

window usable with a Metal view

SDL_WINDOW_MINIMIZED

window is minimized

SDL_WINDOW_MOUSE_CAPTURE

window has mouse captured

SDL_WINDOW_MOUSE_FOCUS

window has mouse focus

SDL_WINDOW_MOUSE_GRABBED

window has grabbed mouse focus

SDL_WINDOW_OPENGL

window usable with OpenGL context

SDL_WINDOW_POPUP_MENU

window should be treated as a popup menu (X11 only)

SDL_WINDOW_RESIZABLE

window can be resized

SDL_WINDOW_TOOLTIP

window should be treated as a tooltip (X11 only)

SDL_WINDOW_UTILITY

window should be treated as a utility window (X11 only)

SDL_WINDOW_VULKAN

window usable with a Vulkan instance

Code Examples

Uint32 flags = SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN;
SDL_Window * window = SDL_CreateWindow(
    /* ... */
    flags
);

Remarks

The SDL_WINDOW_OPENGL flag prepares your window for use with OpenGL, but you will still need to create an OpenGL context using SDL_GL_CreateContext() after window creation, before calling any OpenGL functions.

On Apple's OS X you must set the NSHighResolutionCapable Info.plist property to YES, otherwise you will not receive a High DPI OpenGL canvas.

Version

This enumeration is available since SDL 2.0.0.

SDL_CreateWindow
SDL_GetWindowFlags
SDL_HideWindow
SDL_MaximizeWindow
SDL_MinimizeWindow
SDL_SetWindowFullscreen
SDL_SetWindowGrab
SDL_ShowWindow

CategoryEnum, CategoryVideo


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.