Function SDL_GetWindowProperties

pub unsafe extern "C" fn SDL_GetWindowProperties(
    window: *mut SDL_Window,
) -> u32 
Available on crate feature dep_sdl3 only.
Expand description

Get the properties associated with a window.

The following read-only properties are provided by SDL:

  • SDL_PROP_WINDOW_SHAPE_POINTER: the surface associated with a shaped window
  • SDL_PROP_WINDOW_HDR_ENABLED_BOOLEAN: true if the window has HDR headroom above the SDR white point. This property can change dynamically when [SDL_EVENT_WINDOW_HDR_STATE_CHANGED] is sent.
  • SDL_PROP_WINDOW_SDR_WHITE_LEVEL_FLOAT: the value of SDR white in the SDL_COLORSPACE_SRGB_LINEAR colorspace. On Windows this corresponds to the SDR white level in scRGB colorspace, and on Apple platforms this is always 1.0 for EDR content. This property can change dynamically when [SDL_EVENT_WINDOW_HDR_STATE_CHANGED] is sent.
  • SDL_PROP_WINDOW_HDR_HEADROOM_FLOAT: the additional high dynamic range that can be displayed, in terms of the SDR white point. When HDR is not enabled, this will be 1.0. This property can change dynamically when [SDL_EVENT_WINDOW_HDR_STATE_CHANGED] is sent.

On Android:

On iOS:

On KMS/DRM:

On macOS:

On OpenVR:

On Vivante:

On Windows:

On Wayland:

Note: The xdg_* window objects do not internally persist across window show/hide calls. They will be null if the window is hidden and must be queried each time it is shown.

On X11:

§Parameters

  • window: the window to query.

§Return value

Returns a valid property ID on success or 0 on failure; call SDL_GetError() for more information.

§Thread safety

This function should only be called on the main thread.

§Availability

This function is available since SDL 3.2.0.