7#include <SDL3/SDL_render.h>
8#include <SDL3/SDL_video.h>
9#include "SDL3pp_properties.h"
10#include "SDL3pp_rect.h"
11#include "SDL3pp_surface.h"
68 SDL_ORIENTATION_UNKNOWN;
81 SDL_ORIENTATION_LANDSCAPE_FLIPPED;
84 SDL_ORIENTATION_PORTRAIT;
87 SDL_ORIENTATION_PORTRAIT_FLIPPED;
136 SDL_WINDOW_FULLSCREEN;
152 SDL_WINDOW_BORDERLESS;
155 SDL_WINDOW_RESIZABLE;
158 SDL_WINDOW_MINIMIZED;
161 SDL_WINDOW_MAXIMIZED;
164 SDL_WINDOW_MOUSE_GRABBED;
167 SDL_WINDOW_INPUT_FOCUS;
170 SDL_WINDOW_MOUSE_FOCUS;
188 SDL_WINDOW_MOUSE_RELATIVE_MODE;
191 SDL_WINDOW_ALWAYS_ON_TOP;
211 SDL_WINDOW_KEYBOARD_GRABBED;
220 SDL_WINDOW_TRANSPARENT;
223 SDL_WINDOW_NOT_FOCUSABLE;
249 SDL_FLASH_UNTIL_FOCUSED;
276 SDL_HITTEST_DRAGGABLE;
279 SDL_HITTEST_RESIZE_TOPLEFT;
283 SDL_HITTEST_RESIZE_TOP;
286 SDL_HITTEST_RESIZE_TOPRIGHT;
290 SDL_HITTEST_RESIZE_RIGHT;
296 SDL_HITTEST_RESIZE_BOTTOMRIGHT;
299 SDL_HITTEST_RESIZE_BOTTOM;
302 SDL_HITTEST_RESIZE_BOTTOMLEFT;
306 SDL_HITTEST_RESIZE_LEFT;
401 SDL_DisplayID m_displayID;
409 constexpr Display(SDL_DisplayID displayID = {})
410 : m_displayID(displayID)
432 constexpr operator SDL_DisplayID()
const {
return m_displayID; }
439 constexpr explicit operator bool()
const {
return m_displayID != 0; }
455 auto data =
reinterpret_cast<Display*
>(SDL_GetDisplays(&count));
500 return CheckError(SDL_GetDisplayProperties(m_displayID));
515 const char*
GetName()
const {
return SDL_GetDisplayName(m_displayID); }
536 SDL_GetDisplayBounds(m_displayID, &bounds);
565 CheckError(SDL_GetDisplayUsableBounds(m_displayID, &bounds));
583 return SDL_GetNaturalDisplayOrientation(m_displayID);
600 return SDL_GetCurrentDisplayOrientation(m_displayID);
629 return SDL_GetDisplayContentScale(m_displayID);
658 auto data =
CheckError(SDL_GetFullscreenDisplayModes(m_displayID, &count));
692 bool include_high_density_modes)
const
694 SDL_DisplayMode closest;
695 CheckError(SDL_GetClosestFullscreenDisplayMode(
696 m_displayID, w, h, refresh_rate, include_high_density_modes, &closest));
720 return CheckError(SDL_GetDesktopDisplayMode(m_displayID));
743 return SDL_GetCurrentDisplayMode(m_displayID);
762 return {SDL_GetDisplayForPoint(&point)};
782 return SDL_GetDisplayForRect(&rect);
806namespace prop::Global {
821constexpr auto VIDEO_WAYLAND_WL_DISPLAY_POINTER =
822 SDL_PROP_GLOBAL_VIDEO_WAYLAND_WL_DISPLAY_POINTER;
839 SDL_SYSTEM_THEME_UNKNOWN;
842 SDL_SYSTEM_THEME_LIGHT;
845 SDL_SYSTEM_THEME_DARK;
971 return SDL_GetWindowFullscreenMode(
get());
1508 CheckError(SDL_SetWindowAspectRatio(
get(), min_aspect, max_aspect));
1528 CheckError(SDL_GetWindowAspectRatio(
get(), min_aspect, max_aspect));
1565 CheckError(SDL_GetWindowBordersSize(
get(), top, left, bottom, right));
2081 CheckError(SDL_UpdateWindowSurfaceRects(
get(), rects.data(), rects.size()));
2438 CheckError(SDL_SetWindowHitTest(
get(), callback, callback_data));
2537 static void reset(SDL_Window* resource) { SDL_DestroyWindow(resource); }
2663 const SDL_Point& size,
2731 const SDL_Point& offset,
2732 const SDL_Point& size,
2736 parent, offset.x, offset.y, size.x, size.y, flags)));
2931#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
2943#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK | (X))
2952#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
2961#define SDL_WINDOWPOS_ISUNDEFINED(X) \
2962 (((X) & 0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
2972#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
2984#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK | (X))
2993#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
3002#define SDL_WINDOWPOS_ISCENTERED(X) \
3003 (((X) & 0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
3052 static void reset(SDL_GLContextState* resource)
3404 SDL_GL_RETAINED_BACKING;
3407 SDL_GL_CONTEXT_MAJOR_VERSION;
3410 SDL_GL_CONTEXT_MINOR_VERSION;
3425 SDL_GL_SHARE_WITH_CURRENT_CONTEXT;
3428 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE;
3442 SDL_GL_CONTEXT_RESET_NOTIFICATION;
3445 SDL_GL_CONTEXT_NO_ERROR;
3466 SDL_GL_CONTEXT_PROFILE_CORE;
3469 SDL_GL_CONTEXT_PROFILE_COMPATIBILITY;
3473 SDL_GL_CONTEXT_PROFILE_ES;
3490 SDL_GL_CONTEXT_DEBUG_FLAG;
3493 SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG;
3496 SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG;
3499 SDL_GL_CONTEXT_RESET_ISOLATION_FLAG;
3517 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE;
3520 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH;
3537 SDL_GL_CONTEXT_RESET_NO_NOTIFICATION;
3540 SDL_GL_CONTEXT_RESET_LOSE_CONTEXT;
3578 return SDL_GetVideoDriver(index);
3600 return SDL_GetCurrentVideoDriver();
3614namespace prop::Display {
3616constexpr auto HDR_ENABLED_BOOLEAN = SDL_PROP_DISPLAY_HDR_ENABLED_BOOLEAN;
3618constexpr auto KMSDRM_PANEL_ORIENTATION_NUMBER =
3619 SDL_PROP_DISPLAY_KMSDRM_PANEL_ORIENTATION_NUMBER;
3640namespace prop::Window {
3642constexpr auto CREATE_ALWAYS_ON_TOP_BOOLEAN =
3643 SDL_PROP_WINDOW_CREATE_ALWAYS_ON_TOP_BOOLEAN;
3645constexpr auto CREATE_BORDERLESS_BOOLEAN =
3646 SDL_PROP_WINDOW_CREATE_BORDERLESS_BOOLEAN;
3648constexpr auto CREATE_FOCUSABLE_BOOLEAN =
3649 SDL_PROP_WINDOW_CREATE_FOCUSABLE_BOOLEAN;
3651constexpr auto CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN =
3652 SDL_PROP_WINDOW_CREATE_EXTERNAL_GRAPHICS_CONTEXT_BOOLEAN;
3654constexpr auto CREATE_FLAGS_NUMBER = SDL_PROP_WINDOW_CREATE_FLAGS_NUMBER;
3656constexpr auto CREATE_FULLSCREEN_BOOLEAN =
3657 SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN;
3659constexpr auto CREATE_HEIGHT_NUMBER = SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER;
3661constexpr auto CREATE_HIDDEN_BOOLEAN = SDL_PROP_WINDOW_CREATE_HIDDEN_BOOLEAN;
3663constexpr auto CREATE_HIGH_PIXEL_DENSITY_BOOLEAN =
3664 SDL_PROP_WINDOW_CREATE_HIGH_PIXEL_DENSITY_BOOLEAN;
3666constexpr auto CREATE_MAXIMIZED_BOOLEAN =
3667 SDL_PROP_WINDOW_CREATE_MAXIMIZED_BOOLEAN;
3669constexpr auto CREATE_MENU_BOOLEAN = SDL_PROP_WINDOW_CREATE_MENU_BOOLEAN;
3671constexpr auto CREATE_METAL_BOOLEAN = SDL_PROP_WINDOW_CREATE_METAL_BOOLEAN;
3673constexpr auto CREATE_MINIMIZED_BOOLEAN =
3674 SDL_PROP_WINDOW_CREATE_MINIMIZED_BOOLEAN;
3676constexpr auto CREATE_MODAL_BOOLEAN = SDL_PROP_WINDOW_CREATE_MODAL_BOOLEAN;
3678constexpr auto CREATE_MOUSE_GRABBED_BOOLEAN =
3679 SDL_PROP_WINDOW_CREATE_MOUSE_GRABBED_BOOLEAN;
3681constexpr auto CREATE_OPENGL_BOOLEAN = SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN;
3683constexpr auto CREATE_PARENT_POINTER = SDL_PROP_WINDOW_CREATE_PARENT_POINTER;
3685constexpr auto CREATE_RESIZABLE_BOOLEAN =
3686 SDL_PROP_WINDOW_CREATE_RESIZABLE_BOOLEAN;
3688constexpr auto CREATE_TITLE_STRING = SDL_PROP_WINDOW_CREATE_TITLE_STRING;
3690constexpr auto CREATE_TRANSPARENT_BOOLEAN =
3691 SDL_PROP_WINDOW_CREATE_TRANSPARENT_BOOLEAN;
3693constexpr auto CREATE_TOOLTIP_BOOLEAN = SDL_PROP_WINDOW_CREATE_TOOLTIP_BOOLEAN;
3695constexpr auto CREATE_UTILITY_BOOLEAN = SDL_PROP_WINDOW_CREATE_UTILITY_BOOLEAN;
3697constexpr auto CREATE_VULKAN_BOOLEAN = SDL_PROP_WINDOW_CREATE_VULKAN_BOOLEAN;
3699constexpr auto CREATE_WIDTH_NUMBER = SDL_PROP_WINDOW_CREATE_WIDTH_NUMBER;
3701constexpr auto CREATE_X_NUMBER = SDL_PROP_WINDOW_CREATE_X_NUMBER;
3703constexpr auto CREATE_Y_NUMBER = SDL_PROP_WINDOW_CREATE_Y_NUMBER;
3705constexpr auto CREATE_COCOA_WINDOW_POINTER =
3706 SDL_PROP_WINDOW_CREATE_COCOA_WINDOW_POINTER;
3708constexpr auto CREATE_COCOA_VIEW_POINTER =
3709 SDL_PROP_WINDOW_CREATE_COCOA_VIEW_POINTER;
3711constexpr auto CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN =
3712 SDL_PROP_WINDOW_CREATE_WAYLAND_SURFACE_ROLE_CUSTOM_BOOLEAN;
3714constexpr auto CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN =
3715 SDL_PROP_WINDOW_CREATE_WAYLAND_CREATE_EGL_WINDOW_BOOLEAN;
3717constexpr auto CREATE_WAYLAND_WL_SURFACE_POINTER =
3718 SDL_PROP_WINDOW_CREATE_WAYLAND_WL_SURFACE_POINTER;
3720constexpr auto CREATE_WIN32_HWND_POINTER =
3721 SDL_PROP_WINDOW_CREATE_WIN32_HWND_POINTER;
3723constexpr auto CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER =
3724 SDL_PROP_WINDOW_CREATE_WIN32_PIXEL_FORMAT_HWND_POINTER;
3726constexpr auto CREATE_X11_WINDOW_NUMBER =
3727 SDL_PROP_WINDOW_CREATE_X11_WINDOW_NUMBER;
3729constexpr auto SHAPE_POINTER = SDL_PROP_WINDOW_SHAPE_POINTER;
3731constexpr auto HDR_ENABLED_BOOLEAN = SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN;
3733constexpr auto SDR_WHITE_LEVEL_FLOAT = SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT;
3735constexpr auto HDR_HEADROOM_FLOAT = SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT;
3737constexpr auto ANDROID_WINDOW_POINTER = SDL_PROP_WINDOW_ANDROID_WINDOW_POINTER;
3739constexpr auto ANDROID_SURFACE_POINTER =
3740 SDL_PROP_WINDOW_ANDROID_SURFACE_POINTER;
3742constexpr auto UIKIT_WINDOW_POINTER = SDL_PROP_WINDOW_UIKIT_WINDOW_POINTER;
3744constexpr auto UIKIT_METAL_VIEW_TAG_NUMBER =
3745 SDL_PROP_WINDOW_UIKIT_METAL_VIEW_TAG_NUMBER;
3747constexpr auto UIKIT_OPENGL_FRAMEBUFFER_NUMBER =
3748 SDL_PROP_WINDOW_UIKIT_OPENGL_FRAMEBUFFER_NUMBER;
3750constexpr auto UIKIT_OPENGL_RENDERBUFFER_NUMBER =
3751 SDL_PROP_WINDOW_UIKIT_OPENGL_RENDERBUFFER_NUMBER;
3753constexpr auto UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER =
3754 SDL_PROP_WINDOW_UIKIT_OPENGL_RESOLVE_FRAMEBUFFER_NUMBER;
3756constexpr auto KMSDRM_DEVICE_INDEX_NUMBER =
3757 SDL_PROP_WINDOW_KMSDRM_DEVICE_INDEX_NUMBER;
3759constexpr auto KMSDRM_DRM_FD_NUMBER = SDL_PROP_WINDOW_KMSDRM_DRM_FD_NUMBER;
3761constexpr auto KMSDRM_GBM_DEVICE_POINTER =
3762 SDL_PROP_WINDOW_KMSDRM_GBM_DEVICE_POINTER;
3764constexpr auto COCOA_WINDOW_POINTER = SDL_PROP_WINDOW_COCOA_WINDOW_POINTER;
3766constexpr auto COCOA_METAL_VIEW_TAG_NUMBER =
3767 SDL_PROP_WINDOW_COCOA_METAL_VIEW_TAG_NUMBER;
3769constexpr auto OPENVR_OVERLAY_ID = SDL_PROP_WINDOW_OPENVR_OVERLAY_ID;
3771constexpr auto VIVANTE_DISPLAY_POINTER =
3772 SDL_PROP_WINDOW_VIVANTE_DISPLAY_POINTER;
3774constexpr auto VIVANTE_WINDOW_POINTER = SDL_PROP_WINDOW_VIVANTE_WINDOW_POINTER;
3776constexpr auto VIVANTE_SURFACE_POINTER =
3777 SDL_PROP_WINDOW_VIVANTE_SURFACE_POINTER;
3779constexpr auto WIN32_HWND_POINTER = SDL_PROP_WINDOW_WIN32_HWND_POINTER;
3781constexpr auto WIN32_HDC_POINTER = SDL_PROP_WINDOW_WIN32_HDC_POINTER;
3783constexpr auto WIN32_INSTANCE_POINTER = SDL_PROP_WINDOW_WIN32_INSTANCE_POINTER;
3785constexpr auto WAYLAND_DISPLAY_POINTER =
3786 SDL_PROP_WINDOW_WAYLAND_DISPLAY_POINTER;
3788constexpr auto WAYLAND_SURFACE_POINTER =
3789 SDL_PROP_WINDOW_WAYLAND_SURFACE_POINTER;
3791constexpr auto WAYLAND_VIEWPORT_POINTER =
3792 SDL_PROP_WINDOW_WAYLAND_VIEWPORT_POINTER;
3794constexpr auto WAYLAND_EGL_WINDOW_POINTER =
3795 SDL_PROP_WINDOW_WAYLAND_EGL_WINDOW_POINTER;
3797constexpr auto WAYLAND_XDG_SURFACE_POINTER =
3798 SDL_PROP_WINDOW_WAYLAND_XDG_SURFACE_POINTER;
3800constexpr auto WAYLAND_XDG_TOPLEVEL_POINTER =
3801 SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_POINTER;
3803constexpr auto WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING =
3804 SDL_PROP_WINDOW_WAYLAND_XDG_TOPLEVEL_EXPORT_HANDLE_STRING;
3806constexpr auto WAYLAND_XDG_POPUP_POINTER =
3807 SDL_PROP_WINDOW_WAYLAND_XDG_POPUP_POINTER;
3809constexpr auto WAYLAND_XDG_POSITIONER_POINTER =
3810 SDL_PROP_WINDOW_WAYLAND_XDG_POSITIONER_POINTER;
3812constexpr auto X11_DISPLAY_POINTER = SDL_PROP_WINDOW_X11_DISPLAY_POINTER;
3814constexpr auto X11_SCREEN_NUMBER = SDL_PROP_WINDOW_X11_SCREEN_NUMBER;
3816constexpr auto X11_WINDOW_NUMBER = SDL_PROP_WINDOW_X11_WINDOW_NUMBER;
3823#define SDL_WINDOW_SURFACE_VSYNC_DISABLED 0
3826#define SDL_WINDOW_SURFACE_VSYNC_ADAPTIVE (-1)
3963 return SDL_GL_GetProcAddress(proc);
3985 return SDL_EGL_GetProcAddress(proc);
4022 return SDL_GL_ExtensionSupported(extension);
4059 CheckError(SDL_GL_SetAttribute(attr, value));
4079 CheckError(SDL_GL_GetAttribute(attr, value));
4094 return CheckError(SDL_GL_GetCurrentWindow());
4111 return CheckError(SDL_GL_GetCurrentContext());
4126 return CheckError(SDL_EGL_GetCurrentDisplay());
4141 return CheckError(SDL_EGL_GetCurrentConfig());
4157 return CheckError(SDL_EGL_GetWindowSurface(window));
4186 SDL_EGL_SetAttributeCallbacks(platformAttribCallback,
4187 surfaceAttribCallback,
4188 contextAttribCallback,
4222 CheckError(SDL_GL_SetSwapInterval(interval));
4245 CheckError(SDL_GL_GetSwapInterval(interval));
4277 void* cbHandle = Wrapper::Wrap(
get(), std::move(callback));
4279 [](SDL_Window* win,
const SDL_Point* area,
void* data) {
4285#pragma endregion impl
This is a unique ID for a display for the time it is connected to the system, and is never reused for...
Definition SDL3pp_video.h:400
Rect GetBounds() const
Get the desktop area represented by a display.
Definition SDL3pp_video.h:533
const DisplayMode * GetDesktopMode() const
Get information about the desktop's display mode.
Definition SDL3pp_video.h:718
OwnArray< DisplayMode * > GetFullscreenModes() const
Get a list of fullscreen display modes available on a display.
Definition SDL3pp_video.h:655
static Display GetForPoint(const SDL_Point &point)
Get the display containing a point.
Definition SDL3pp_video.h:760
static Display GetForRect(const SDL_Rect &rect)
Get the display primarily containing a rect.
Definition SDL3pp_video.h:780
PropertiesRef GetProperties() const
Get the properties associated with a display.
Definition SDL3pp_video.h:498
DisplayMode GetClosestFullscreenMode(int w, int h, float refresh_rate, bool include_high_density_modes) const
Get the closest match to the requested display mode.
Definition SDL3pp_video.h:689
float GetContentScale() const
Get the content scale of a display.
Definition SDL3pp_video.h:627
static Display GetForWindow(WindowRef &window)
Get the display associated with a window.
constexpr bool operator==(const Display &other) const =default
Default comparison operator.
const char * GetName() const
Get the name of a display in UTF-8 encoding.
Definition SDL3pp_video.h:515
DisplayOrientation GetNaturalOrientation() const
Get the orientation of a display when it is unrotated.
Definition SDL3pp_video.h:581
static Display GetPrimary()
Return the primary display.
Definition SDL3pp_video.h:471
DisplayOrientation GetCurrentOrientation() const
Get the orientation of a display.
Definition SDL3pp_video.h:598
static OwnArray< Display > GetAll()
Get a list of currently connected displays.
Definition SDL3pp_video.h:452
const DisplayMode * GetCurrentMode() const
Get information about the current display mode.
Definition SDL3pp_video.h:741
Rect GetUsableBounds() const
Get the usable desktop area represented by a display, in screen coordinates.
Definition SDL3pp_video.h:562
constexpr bool operator==(SDL_DisplayID displayID) const
Compares with the underlying type.
Definition SDL3pp_video.h:422
constexpr Display(SDL_DisplayID displayID={})
Wraps Display.
Definition SDL3pp_video.h:409
Optional-like shim for references.
Definition SDL3pp_optionalRef.h:20
Base class for SDL memory allocated array wrap.
Definition SDL3pp_ownPtr.h:43
RESOURCE release()
Returns reference and reset this.
Definition SDL3pp_resource.h:178
Implement shared ownership for a resource.
Definition SDL3pp_resource.h:283
Implement unique ownership for a resource.
Definition SDL3pp_resource.h:226
constexpr ResourceUnique(std::nullptr_t=nullptr)
Default constructor.
Definition SDL3pp_resource.h:231
void reset()
Resets the value, destroying the resource if not nullptr.
Definition SDL3pp_resource.h:265
A dumb pointer to resource.
Definition SDL3pp_resource.h:197
constexpr ResourceUnsafe()=default
Default constructor.
Implement weak ownership for a resource.
Definition SDL3pp_resource.h:328
A SDL managed resource.
Definition SDL3pp_resource.h:29
constexpr Resource(T resource={})
Constructs from the underlying resource.
Definition SDL3pp_resource.h:37
constexpr SDL_Window * get() const
Return contained resource;.
Definition SDL3pp_resource.h:76
span-like for empty-derived structs
Definition SDL3pp_spanRef.h:24
Helpers to use C++ strings parameters.
Definition SDL3pp_strings.h:43
#define SDL_assert_paranoid(condition)
An assertion test that is performed only when built with paranoid settings.
Definition SDL3pp_assert.h:364
constexpr void CheckError(bool result)
Check and throw if returned value from SDL is an error.
Definition SDL3pp_error.h:206
bool IsScreenKeyboardShown() const
Check whether the screen keyboard is shown for given window.
Definition SDL3pp_keyboard.h:643
void StopTextInput()
Stop receiving any text input events in a window.
Definition SDL3pp_keyboard.h:549
void StartTextInput()
Start accepting Unicode text input events in a window.
Definition SDL3pp_keyboard.h:376
void ClearComposition()
Dismiss the composition window/IME without disabling the subsystem.
Definition SDL3pp_keyboard.h:563
void SetTextInputArea(const SDL_Rect &rect, int cursor)
Set the area used to type Unicode text input.
Definition SDL3pp_keyboard.h:587
void GetTextInputArea(Rect *rect, int *cursor)
Get the area used to type Unicode text input.
Definition SDL3pp_keyboard.h:609
bool IsTextInputActive() const
Check whether or not Unicode text input events are enabled for a window.
Definition SDL3pp_keyboard.h:530
void WarpMouse(float x, float y)
Move the mouse cursor to the given position within the window.
Definition SDL3pp_mouse.h:640
bool GetRelativeMouseMode() const
Query whether relative mouse mode is enabled for a window.
Definition SDL3pp_mouse.h:711
void SetRelativeMouseMode(bool enabled)
Set relative mouse mode for a window.
Definition SDL3pp_mouse.h:695
std::unique_ptr< T, PtrDeleter > OwnPtr
Handle to an owned SDL memory allocated pointer.
Definition SDL3pp_ownPtr.h:32
RendererRef GetRenderer() const
Get the renderer associated with a window.
Definition SDL3pp_render.h:3258
SDL_FunctionPointer FunctionPointer
A generic function pointer.
Definition SDL3pp_stdinc.h:5467
void DisableScreenSaver()
Prevent the screen from being blanked by a screen saver.
Definition SDL3pp_video.h:3880
constexpr GLContextFlag GL_CONTEXT_RESET_ISOLATION_FLAG
RESET_ISOLATION_FLAG.
Definition SDL3pp_video.h:3498
SDL_DisplayOrientation DisplayOrientation
Display orientation values; the way a display is rotated.
Definition SDL3pp_video.h:65
constexpr GLAttr GL_CONTEXT_RELEASE_BEHAVIOR
sets context the release behavior.
Definition SDL3pp_video.h:3435
void GL_SetSwapInterval(int interval)
Set the swap interval for the current OpenGL context.
Definition SDL3pp_video.h:4220
constexpr HitTestResult HITTEST_DRAGGABLE
Region can drag entire window.
Definition SDL3pp_video.h:275
constexpr HitTestResult HITTEST_RESIZE_BOTTOMLEFT
Region is the resizable bottom-left corner border.
Definition SDL3pp_video.h:301
SDL_GLAttr GLAttr
An enumeration of OpenGL configuration attributes.
Definition SDL3pp_video.h:3312
SDL_WindowFlags WindowFlags
The flags on a window.
Definition SDL3pp_video.h:133
constexpr FlashOperation FLASH_CANCEL
Cancel any window flash state.
Definition SDL3pp_video.h:242
constexpr SystemTheme SYSTEM_THEME_LIGHT
Light colored system theme.
Definition SDL3pp_video.h:841
constexpr WindowFlags WINDOW_MAXIMIZED
window is maximized
Definition SDL3pp_video.h:160
void EnableScreenSaver()
Allow the screen to be blanked by a screen saver.
Definition SDL3pp_video.h:3860
void GL_GetSwapInterval(int *interval)
Get the swap interval for the current OpenGL context.
Definition SDL3pp_video.h:4243
constexpr GLAttr GL_FRAMEBUFFER_SRGB_CAPABLE
requests sRGB capable visual; defaults to 0.
Definition SDL3pp_video.h:3427
constexpr GLAttr GL_MULTISAMPLESAMPLES
the number of samples used around the current pixel used for multisample anti-aliasing.
Definition SDL3pp_video.h:3395
constexpr SystemTheme SYSTEM_THEME_DARK
Dark colored system theme.
Definition SDL3pp_video.h:844
constexpr WindowFlags WINDOW_UTILITY
window should be treated as a utility window, not showing in the task bar and window list
Definition SDL3pp_video.h:197
constexpr WindowFlags WINDOW_MOUSE_FOCUS
window has mouse focus
Definition SDL3pp_video.h:169
constexpr GLAttr GL_STENCIL_SIZE
the minimum number of bits in the stencil buffer; defaults to 0.
Definition SDL3pp_video.h:3357
Uint32 GLContextReleaseFlag
Possible values to be set for the GL_CONTEXT_RELEASE_BEHAVIOR attribute.
Definition SDL3pp_video.h:3514
constexpr WindowFlags WINDOW_TRANSPARENT
window with transparent buffer
Definition SDL3pp_video.h:219
FunctionPointer EGL_GetProcAddress(StringParam proc)
Get an EGL library function by name.
Definition SDL3pp_video.h:3983
constexpr GLProfile GL_CONTEXT_PROFILE_CORE
OpenGL Core Profile context.
Definition SDL3pp_video.h:3465
constexpr DisplayOrientation ORIENTATION_UNKNOWN
The display orientation can't be determined.
Definition SDL3pp_video.h:67
EGLSurface EGL_GetWindowSurface(WindowRef window)
Get the EGL surface associated with the window.
Definition SDL3pp_video.h:4155
SDL_HitTest HitTest
Callback used for hit-testing.
Definition SDL3pp_video.h:325
constexpr HitTestResult HITTEST_RESIZE_TOPRIGHT
Region is the resizable top-right corner border.
Definition SDL3pp_video.h:285
constexpr GLAttr GL_CONTEXT_MAJOR_VERSION
OpenGL context major version.
Definition SDL3pp_video.h:3406
constexpr HitTestResult HITTEST_NORMAL
Region is normal. No special properties.
Definition SDL3pp_video.h:272
constexpr GLContextFlag GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
FORWARD_COMPATIBLE_FLAG.
Definition SDL3pp_video.h:3492
WindowRef GL_GetCurrentWindow()
Get the currently active OpenGL window.
Definition SDL3pp_video.h:4092
constexpr GLAttr GL_RETAINED_BACKING
not used (deprecated).
Definition SDL3pp_video.h:3403
constexpr HitTestResult HITTEST_RESIZE_RIGHT
Region is the resizable right border.
Definition SDL3pp_video.h:289
constexpr FlashOperation FLASH_BRIEFLY
Flash the window briefly to get attention.
Definition SDL3pp_video.h:245
void GL_UnloadLibrary()
Unload the OpenGL library previously loaded by GL_LoadLibrary().
Definition SDL3pp_video.h:3997
constexpr GLAttr GL_STEREO
whether the output is stereo 3D; defaults to off.
Definition SDL3pp_video.h:3383
constexpr GLAttr GL_CONTEXT_MINOR_VERSION
OpenGL context minor version.
Definition SDL3pp_video.h:3409
constexpr GLAttr GL_CONTEXT_PROFILE_MASK
type of GL context (Core, Compatibility, ES).
Definition SDL3pp_video.h:3422
constexpr GLAttr GL_RED_SIZE
the minimum number of bits for the red channel of the color buffer; defaults to 8.
Definition SDL3pp_video.h:3318
constexpr WindowFlags WINDOW_MOUSE_GRABBED
window has grabbed mouse input
Definition SDL3pp_video.h:163
bool ScreenSaverEnabled()
Check whether the screensaver is currently enabled.
Definition SDL3pp_video.h:3846
GLContextRef GL_GetCurrentContext()
Get the currently active OpenGL context.
Definition SDL3pp_video.h:4109
constexpr GLAttr GL_GREEN_SIZE
the minimum number of bits for the green channel of the color buffer; defaults to 8.
Definition SDL3pp_video.h:3324
FunctionPointer GL_GetProcAddress(StringParam proc)
Get an OpenGL function by name.
Definition SDL3pp_video.h:3961
SDL_EGLAttribArrayCallback EGLAttribArrayCallback
EGL platform attribute initialization callback.
Definition SDL3pp_video.h:3201
constexpr GLAttr GL_CONTEXT_RESET_NOTIFICATION
set context reset notification.
Definition SDL3pp_video.h:3441
constexpr GLProfile GL_CONTEXT_PROFILE_COMPATIBILITY
OpenGL Compatibility Profile context.
Definition SDL3pp_video.h:3468
SDL_DisplayMode DisplayMode
The structure that defines a display mode.
Definition SDL3pp_video.h:114
void EGL_SetAttributeCallbacks(EGLAttribArrayCallback platformAttribCallback, EGLIntArrayCallback surfaceAttribCallback, EGLIntArrayCallback contextAttribCallback, void *userdata)
Sets the callbacks for defining custom EGLAttrib arrays for EGL initialization.
Definition SDL3pp_video.h:4180
SDL_HitTestResult HitTestResult
Possible return values from the HitTest callback.
Definition SDL3pp_video.h:270
constexpr WindowFlags WINDOW_METAL
window usable for Metal view
Definition SDL3pp_video.h:216
constexpr WindowFlags WINDOW_MINIMIZED
window is minimized
Definition SDL3pp_video.h:157
constexpr GLAttr GL_ACCUM_ALPHA_SIZE
the minimum number of bits for the alpha channel of the accumulation buffer; defaults to 0.
Definition SDL3pp_video.h:3381
void GL_SwapWindow(WindowRef window)
Update a window with OpenGL rendering.
Definition SDL3pp_video.h:4265
constexpr DisplayOrientation ORIENTATION_PORTRAIT
The display is in portrait mode.
Definition SDL3pp_video.h:83
constexpr GLAttr GL_ACCUM_RED_SIZE
the minimum number of bits for the red channel of the accumulation buffer; defaults to 0.
Definition SDL3pp_video.h:3363
SDL_SystemTheme SystemTheme
System theme.
Definition SDL3pp_video.h:836
constexpr WindowFlags WINDOW_HIGH_PIXEL_DENSITY
window uses high pixel density back buffer if possible
Definition SDL3pp_video.h:180
constexpr GLAttr GL_CONTEXT_FLAGS
some combination of 0 or more of elements of the GLContextFlag enumeration; defaults to 0.
Definition SDL3pp_video.h:3416
constexpr GLProfile GL_CONTEXT_PROFILE_ES
GLX_CONTEXT_ES2_PROFILE_BIT_EXT.
Definition SDL3pp_video.h:3472
constexpr GLAttr GL_DOUBLEBUFFER
whether the output is single or double buffered; defaults to double buffering on.
Definition SDL3pp_video.h:3347
SDL_DisplayModeData DisplayModeData
Internal display mode data.
Definition SDL3pp_video.h:101
constexpr HitTestResult HITTEST_RESIZE_LEFT
Region is the resizable left border.
Definition SDL3pp_video.h:305
void GL_GetAttribute(GLAttr attr, int *value)
Get the actual value for an attribute from the current context.
Definition SDL3pp_video.h:4077
void GL_SetAttribute(GLAttr attr, int value)
Set an OpenGL window attribute before window creation.
Definition SDL3pp_video.h:4057
const char * GetCurrentVideoDriver()
Get the name of the currently initialized video driver.
Definition SDL3pp_video.h:3598
constexpr GLAttr GL_MULTISAMPLEBUFFERS
the number of buffers used for multisample anti-aliasing; defaults to 0.
Definition SDL3pp_video.h:3389
constexpr GLAttr GL_ALPHA_SIZE
the minimum number of bits for the alpha channel of the color buffer; defaults to 8.
Definition SDL3pp_video.h:3336
constexpr WindowFlags WINDOW_MODAL
window is modal
Definition SDL3pp_video.h:175
int GetNumVideoDrivers()
Get the number of video drivers compiled into SDL.
Definition SDL3pp_video.h:3555
bool GL_ExtensionSupported(StringParam extension)
Check if an OpenGL extension is supported for the current context.
Definition SDL3pp_video.h:4020
constexpr WindowFlags WINDOW_INPUT_FOCUS
window has input focus
Definition SDL3pp_video.h:166
constexpr GLAttr GL_ACCUM_GREEN_SIZE
the minimum number of bits for the green channel of the accumulation buffer; defaults to 0.
Definition SDL3pp_video.h:3369
constexpr GLContextFlag GL_CONTEXT_DEBUG_FLAG
DEBUG_FLAG.
Definition SDL3pp_video.h:3489
Uint32 GLContextFlag
Possible flags to be set for the GL_CONTEXT_FLAGS attribute.
Definition SDL3pp_video.h:3487
SDL_WindowID WindowID
This is a unique ID for a window.
Definition SDL3pp_video.h:804
ResourceShared< GLContext > GLContextShared
Handle to a shared gLContext.
Definition SDL3pp_video.h:377
constexpr HitTestResult HITTEST_RESIZE_TOP
Region is the resizable top border.
Definition SDL3pp_video.h:282
const char * GetVideoDriver(int index)
Get the name of a built in video driver.
Definition SDL3pp_video.h:3576
SDL_EGLSurface EGLSurface
Opaque type for an EGL surface.
Definition SDL3pp_video.h:3162
SDL_FlashOperation FlashOperation
Window flash operation.
Definition SDL3pp_video.h:240
constexpr WindowFlags WINDOW_VULKAN
window usable for Vulkan surface
Definition SDL3pp_video.h:213
constexpr HitTestResult HITTEST_RESIZE_TOPLEFT
Region is the resizable top-left corner border.
Definition SDL3pp_video.h:278
constexpr HitTestResult HITTEST_RESIZE_BOTTOMRIGHT
Region is the resizable bottom-right corner border.
Definition SDL3pp_video.h:295
SDL_EGLConfig EGLConfig
Opaque type for an EGL config.
Definition SDL3pp_video.h:3155
constexpr SystemTheme SYSTEM_THEME_UNKNOWN
Unknown system theme.
Definition SDL3pp_video.h:838
constexpr WindowFlags WINDOW_KEYBOARD_GRABBED
window has grabbed keyboard input
Definition SDL3pp_video.h:210
constexpr GLAttr GL_BLUE_SIZE
the minimum number of bits for the blue channel of the color buffer; defaults to 8.
Definition SDL3pp_video.h:3330
constexpr GLAttr GL_EGL_PLATFORM
GL_EGL_PLATFORM.
Definition SDL3pp_video.h:3449
constexpr WindowFlags WINDOW_BORDERLESS
no window decoration
Definition SDL3pp_video.h:151
SDL_EGLDisplay EGLDisplay
Opaque type for an EGL display.
Definition SDL3pp_video.h:3148
constexpr WindowFlags WINDOW_TOOLTIP
window should be treated as a tooltip and does not get mouse or keyboard focus, requires a parent win...
Definition SDL3pp_video.h:203
constexpr WindowFlags WINDOW_MOUSE_CAPTURE
window has mouse captured (unrelated to MOUSE_GRABBED)
Definition SDL3pp_video.h:185
WindowShared share()
Move this window into a WindowShared.
Definition SDL3pp_video.h:2894
constexpr GLAttr GL_BUFFER_SIZE
the minimum number of bits for frame buffer size; defaults to 0.
Definition SDL3pp_video.h:3341
constexpr DisplayOrientation ORIENTATION_LANDSCAPE
The display is in landscape mode, with the right side up, relative to portrait mode.
Definition SDL3pp_video.h:74
constexpr DisplayOrientation ORIENTATION_PORTRAIT_FLIPPED
The display is in portrait mode, upside down.
Definition SDL3pp_video.h:86
constexpr WindowFlags WINDOW_OPENGL
window usable with OpenGL context
Definition SDL3pp_video.h:138
constexpr GLAttr GL_CONTEXT_NO_ERROR
GL_CONTEXT_NO_ERROR.
Definition SDL3pp_video.h:3444
SDL_EGLint EGLint
An EGL integer attribute, used when creating an EGL surface.
Definition SDL3pp_video.h:3176
constexpr GLContextFlag GL_CONTEXT_ROBUST_ACCESS_FLAG
ROBUST_ACCESS_FLAG.
Definition SDL3pp_video.h:3495
constexpr DisplayOrientation ORIENTATION_LANDSCAPE_FLIPPED
The display is in landscape mode, with the left side up, relative to portrait mode.
Definition SDL3pp_video.h:80
constexpr WindowFlags WINDOW_MOUSE_RELATIVE_MODE
window has relative mode enabled
Definition SDL3pp_video.h:187
std::function< HitTestResult(WindowRef window, const Point &area)> HitTestCB
Callback used for hit-testing.
Definition SDL3pp_video.h:339
constexpr WindowFlags WINDOW_OCCLUDED
window is occluded
Definition SDL3pp_video.h:141
constexpr FlashOperation FLASH_UNTIL_FOCUSED
Flash the window until it gets focus.
Definition SDL3pp_video.h:248
Uint32 GLProfile
Possible values to be set for the GL_CONTEXT_PROFILE_MASK attribute.
Definition SDL3pp_video.h:3463
SystemTheme GetSystemTheme()
Get the current system theme.
Definition SDL3pp_video.h:3612
constexpr WindowFlags WINDOW_NOT_FOCUSABLE
window should not be focusable
Definition SDL3pp_video.h:222
constexpr GLContextResetNotification GL_CONTEXT_RESET_NO_NOTIFICATION
NO_NOTIFICATION.
Definition SDL3pp_video.h:3536
constexpr GLAttr GL_FLOATBUFFERS
GL_FLOATBUFFERS.
Definition SDL3pp_video.h:3447
constexpr WindowFlags WINDOW_RESIZABLE
window can be resized
Definition SDL3pp_video.h:154
OwnArray< WindowRef > GetWindows()
Get a list of valid windows.
Definition SDL3pp_video.h:3633
constexpr WindowFlags WINDOW_POPUP_MENU
window should be treated as a popup menu, requires a parent window
Definition SDL3pp_video.h:208
constexpr GLContextResetNotification GL_CONTEXT_RESET_LOSE_CONTEXT
LOSE_CONTEXT.
Definition SDL3pp_video.h:3539
void GL_ResetAttributes()
Reset all previously set OpenGL context attributes to their default values.
Definition SDL3pp_video.h:4035
Uint32 GLContextResetNotification
Possible values to be set GL_CONTEXT_RESET_NOTIFICATION attribute.
Definition SDL3pp_video.h:3534
constexpr WindowFlags WINDOW_EXTERNAL
window not created by SDL
Definition SDL3pp_video.h:172
constexpr WindowFlags WINDOW_ALWAYS_ON_TOP
window should always be above others
Definition SDL3pp_video.h:190
std::function< SDL_EGLAttrib *()> EGLAttribArrayCB
EGL platform attribute initialization callback.
Definition SDL3pp_video.h:3226
constexpr WindowFlags WINDOW_HIDDEN
window is neither mapped onto the desktop nor shown in the taskbar/dock/window list; WindowRef....
Definition SDL3pp_video.h:149
constexpr GLAttr GL_SHARE_WITH_CURRENT_CONTEXT
OpenGL context sharing; defaults to 0.
Definition SDL3pp_video.h:3424
ResourceShared< Window > WindowShared
Handle to a shared window.
Definition SDL3pp_video.h:349
EGLConfig EGL_GetCurrentConfig()
Get the currently active EGL config.
Definition SDL3pp_video.h:4139
constexpr HitTestResult HITTEST_RESIZE_BOTTOM
Region is the resizable bottom border.
Definition SDL3pp_video.h:298
constexpr GLAttr GL_ACCUM_BLUE_SIZE
the minimum number of bits for the blue channel of the accumulation buffer; defaults to 0.
Definition SDL3pp_video.h:3375
constexpr WindowFlags WINDOW_FULLSCREEN
window is in fullscreen mode
Definition SDL3pp_video.h:135
constexpr GLContextReleaseFlag GL_CONTEXT_RELEASE_BEHAVIOR_NONE
BEHAVIOR_NONE.
Definition SDL3pp_video.h:3516
SDL_EGLAttrib EGLAttrib
An EGL attribute, used when creating an EGL context.
Definition SDL3pp_video.h:3169
void GL_LoadLibrary(StringParam path)
Dynamically load an OpenGL library.
Definition SDL3pp_video.h:3903
constexpr GLAttr GL_DEPTH_SIZE
the minimum number of bits in the depth buffer; defaults to 16.
Definition SDL3pp_video.h:3352
std::function< SDL_EGLint *(SDL_EGLDisplay, SDL_EGLConfig)> EGLIntArrayCB
EGL surface/context attribute initialization callback types.
Definition SDL3pp_video.h:3288
EGLDisplay EGL_GetCurrentDisplay()
Get the currently active EGL display.
Definition SDL3pp_video.h:4124
constexpr GLContextReleaseFlag GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH
BEHAVIOR_FLUSH.
Definition SDL3pp_video.h:3519
GLContextShared share()
Move this gLContext into a GLContextShared.
Definition SDL3pp_video.h:3116
constexpr GLAttr GL_ACCELERATED_VISUAL
set to 1 to require hardware acceleration, set to 0 to force software rendering; defaults to allow ei...
Definition SDL3pp_video.h:3401
SDL_EGLIntArrayCallback EGLIntArrayCallback
EGL surface/context attribute initialization callback types.
Definition SDL3pp_video.h:3257
the main namespace where all SDL3pp public functions and types live
Definition SDL3pp_assert.h:7
An opaque handle to an OpenGL context.
Definition SDL3pp_video.h:3018
static void reset(SDL_GLContextState *resource)
Delete an OpenGL context.
Definition SDL3pp_video.h:3052
void MakeCurrent(WindowRef window)
Set up an OpenGL context for rendering into an OpenGL window.
Definition SDL3pp_video.h:3035
Unsafe Handle to gLContext.
Definition SDL3pp_video.h:3131
constexpr GLContextUnsafe(GLContext &&other)
Constructs GLContextUnsafe from GLContext.
Definition SDL3pp_video.h:3137
Handle to an owned gLContext.
Definition SDL3pp_video.h:3066
static GLContext Create(WindowRef window)
Create an OpenGL context for an OpenGL window, and make it current.
Definition SDL3pp_video.h:3091
void Destroy()
Delete an OpenGL context.
Definition SDL3pp_video.h:3107
Store callbacks by key.
Definition SDL3pp_callbackWrapper.h:222
The structure that defines a point (using integers).
Definition SDL3pp_rect.h:46
SDL properties ID.
Definition SDL3pp_properties.h:209
A rectangle, with the origin at the upper left (using integers).
Definition SDL3pp_rect.h:833
constexpr Point GetTopLeft() const
Get top left corner of the rect.
Definition SDL3pp_rect.h:1100
constexpr Point GetSize() const
Get size of the rect.
Definition SDL3pp_rect.h:1132
A structure representing rendering state.
Definition SDL3pp_render.h:182
A collection of pixels used in software blitting.
Definition SDL3pp_surface.h:153
Represents a handle to a window.
Definition SDL3pp_video.h:860
float GetDisplayScale() const
Get the content display scale relative to a window's pixel size.
Definition SDL3pp_video.h:918
OwnPtr< void > GetICCProfile(size_t *size) const
Get the raw ICC profile data for the screen the window is currently on.
Definition SDL3pp_video.h:985
bool GetMouseGrab() const
Get a window's mouse grab mode.
Definition SDL3pp_video.h:2181
static void reset(SDL_Window *resource)
Destroy a window.
Definition SDL3pp_video.h:2537
static WindowRef GetGrabbed()
Get the window that currently has an input grab enabled.
Definition SDL3pp_video.h:2515
void Raise()
Request that a window be raised above other windows and gain the input focus.
Definition SDL3pp_video.h:1797
void GetSizeInPixels(int *w, int *h) const
Get the size of a window's client area, in pixels.
Definition SDL3pp_video.h:1604
void SetResizable(bool resizable)
Set the user-resizable state of a window.
Definition SDL3pp_video.h:1728
void Sync()
Block until any pending window state is finalized.
Definition SDL3pp_video.h:1945
SurfaceRef GetSurface()
Get the SDL surface associated with the window.
Definition SDL3pp_video.h:1987
void SetMouseRect(const SDL_Rect &rect)
Confines the cursor to the specified area of a window.
Definition SDL3pp_video.h:2201
void GetSize(int *w, int *h) const
Get the size of a window's client area.
Definition SDL3pp_video.h:1440
void UpdateSurface()
Copy the window surface to the screen.
Definition SDL3pp_video.h:2052
void Maximize()
Request that the window be made as large as possible.
Definition SDL3pp_video.h:1829
float GetOpacity() const
Get the opacity of a window.
Definition SDL3pp_video.h:2259
void Flash(FlashOperation operation)
Request a window to demand attention from the user.
Definition SDL3pp_video.h:2480
void SetMaximumSize(const SDL_Point &p)
Set the maximum size of a window's client area.
Definition SDL3pp_video.h:1661
void SetPosition(const SDL_Point &p)
Request that the window's position be set.
Definition SDL3pp_video.h:1304
void SetModal(bool modal)
Toggle the state of the window as modal.
Definition SDL3pp_video.h:2312
void GetPosition(int *x, int *y) const
Get the position of a window.
Definition SDL3pp_video.h:1353
Point GetPosition() const
Get the position of a window.
Definition SDL3pp_video.h:1325
void SetAspectRatio(float min_aspect, float max_aspect)
Request that the aspect ratio of a window's client area be set.
Definition SDL3pp_video.h:1506
Rect GetSafeArea() const
Get the safe area for this window.
Definition SDL3pp_video.h:1462
void SetSize(const SDL_Point &p)
Request that the size of a window's client area be set.
Definition SDL3pp_video.h:1390
void SetFullscreenMode(OptionalRef< const DisplayMode > mode)
Set the display mode to use when a window is visible and fullscreen.
Definition SDL3pp_video.h:951
void SetHitTest(HitTestCB callback)
Provide a callback that decides if a window region has special properties.
Definition SDL3pp_video.h:4274
void ShowSystemMenu(const SDL_Point &p)
Display the system-level window menu.
Definition SDL3pp_video.h:2348
void Hide()
Hide a window.
Definition SDL3pp_video.h:1779
float GetPixelDensity() const
Get the pixel density of a window.
Definition SDL3pp_video.h:895
bool HasSurface() const
Return whether the window has a surface associated with it.
Definition SDL3pp_video.h:1959
void GetMaximumSize(int *w, int *h) const
Get the maximum size of a window's client area.
Definition SDL3pp_video.h:1682
void SetFocusable(bool focusable)
Set whether the window may have input focus.
Definition SDL3pp_video.h:2324
const DisplayMode * GetFullscreenMode() const
Query the display mode to use when a window is visible at fullscreen.
Definition SDL3pp_video.h:969
WindowFlags GetFlags() const
Get the window flags.
Definition SDL3pp_video.h:1177
void SetIcon(SurfaceRef icon)
Set the icon for a window.
Definition SDL3pp_video.h:1232
PropertiesRef GetProperties() const
Get the properties associated with a window.
Definition SDL3pp_video.h:1155
void SetRect(Rect rect)
Request the window's position and size to be set.
Definition SDL3pp_video.h:1248
void SetOpacity(float opacity)
Set the opacity for a window.
Definition SDL3pp_video.h:2239
PixelFormat GetPixelFormat() const
Get the pixel format associated with the window.
Definition SDL3pp_video.h:1000
Point GetSizeInPixels() const
Get the size of a window's client area, in pixels.
Definition SDL3pp_video.h:1581
void GetBordersSize(int *top, int *left, int *bottom, int *right) const
Get the size of a window's borders (decorations) around the client area.
Definition SDL3pp_video.h:1563
void GetMinimumSize(int *w, int *h) const
Get the minimum size of a window's client area.
Definition SDL3pp_video.h:1643
void SetMouseGrab(bool grabbed)
Set a window's mouse grab mode.
Definition SDL3pp_video.h:2149
Display GetDisplay() const
Get the display associated with a window.
Definition SDL3pp_video.h:877
void SetMinimumSize(const SDL_Point &p)
Set the minimum size of a window's client area.
Definition SDL3pp_video.h:1622
static WindowRef FromID(WindowID id)
Get a window from a stored ID.
Definition SDL3pp_video.h:2501
void SetKeyboardGrab(bool grabbed)
Set a window's keyboard grab mode.
Definition SDL3pp_video.h:2127
Rect GetRect() const
Get the position and client size of a window.
Definition SDL3pp_video.h:1267
void Restore()
Request that the size and position of a minimized or maximized window be restored.
Definition SDL3pp_video.h:1884
void Minimize()
Request that the window be minimized to an iconic representation.
Definition SDL3pp_video.h:1856
void UpdateSurfaceRects(SpanRef< const SDL_Rect > rects)
Copy areas of the window surface to the screen.
Definition SDL3pp_video.h:2078
const char * GetTitle() const
Get the title of a window.
Definition SDL3pp_video.h:1210
void Show()
Show a window.
Definition SDL3pp_video.h:1765
void SetBordered(bool bordered)
Set the border state of a window.
Definition SDL3pp_video.h:1705
WindowRef GetParent() const
Get parent of a window.
Definition SDL3pp_video.h:1034
const SDL_Rect * GetMouseRect() const
Get the mouse confinement rectangle of a window.
Definition SDL3pp_video.h:2220
void SetAlwaysOnTop(bool on_top)
Set the window to always be above the others.
Definition SDL3pp_video.h:1748
bool GetKeyboardGrab() const
Get a window's keyboard grab mode.
Definition SDL3pp_video.h:2165
WindowID GetID() const
Get the numeric ID of a window.
Definition SDL3pp_video.h:1020
void GetAspectRatio(float *min_aspect, float *max_aspect) const
Get the size of a window's client area.
Definition SDL3pp_video.h:1526
void SetHitTest(HitTest callback, void *callback_data)
Provide a callback that decides if a window region has special properties.
Definition SDL3pp_video.h:2436
void DestroySurface()
Destroy the surface associated with the window.
Definition SDL3pp_video.h:2096
void SetSurfaceVSync(int vsync)
Toggle VSync for the window surface.
Definition SDL3pp_video.h:2011
int GetSurfaceVSync() const
Get VSync for the window surface.
Definition SDL3pp_video.h:2028
void SetFullscreen(bool fullscreen)
Request that the window's fullscreen state be changed.
Definition SDL3pp_video.h:1914
void SetParent(WindowRef parent)
Set the window as a child of a parent window.
Definition SDL3pp_video.h:2291
void SetTitle(StringParam title)
Set the title of a window.
Definition SDL3pp_video.h:1193
void SetShape(SurfaceRef shape)
Set the shape of a transparent window.
Definition SDL3pp_video.h:2465
Point GetSize() const
Get the size of a window's client area.
Definition SDL3pp_video.h:1414
Unsafe Handle to window.
Definition SDL3pp_video.h:2909
constexpr WindowUnsafe(Window &&other)
Constructs WindowUnsafe from Window.
Definition SDL3pp_video.h:2915
Handle to an owned window.
Definition SDL3pp_video.h:2572
static Window Create(StringParam title, const SDL_Point &size, WindowFlags flags=0)
Create a window with the specified dimensions and flags.
Definition SDL3pp_video.h:2662
void Destroy()
Destroy a window.
Definition SDL3pp_video.h:2885
static Window CreateWithProperties(PropertiesRef props)
Create a window with the specified properties.
Definition SDL3pp_video.h:2862
static Window CreatePopup(WindowRef parent, const SDL_Point &offset, const SDL_Point &size, WindowFlags flags=0)
Create a child popup window of the specified parent window.
Definition SDL3pp_video.h:2730