SDL 3.0
SDL_syswm.h File Reference

Include file for SDL custom system window manager hooks. More...

+ Include dependency graph for SDL_syswm.h:

Go to the source code of this file.

Data Structures

struct  SDL_SysWMmsg
 
struct  SDL_SysWMinfo
 

Macros

#define SDL_SYSWM_CURRENT_VERSION   1
 SDL_syswm.h.
 
#define SDL_SYSWM_INFO_SIZE_V1   (16 * (sizeof (void *) >= 8 ? sizeof (void *) : sizeof(Uint64)))
 
#define SDL_SYSWM_CURRENT_INFO_SIZE   SDL_SYSWM_INFO_SIZE_V1
 
#define SDL_METALVIEW_TAG   255
 

Enumerations

enum  SDL_SYSWM_TYPE {
  SDL_SYSWM_UNKNOWN ,
  SDL_SYSWM_ANDROID ,
  SDL_SYSWM_COCOA ,
  SDL_SYSWM_HAIKU ,
  SDL_SYSWM_KMSDRM ,
  SDL_SYSWM_RISCOS ,
  SDL_SYSWM_UIKIT ,
  SDL_SYSWM_VIVANTE ,
  SDL_SYSWM_WAYLAND ,
  SDL_SYSWM_WINDOWS ,
  SDL_SYSWM_WINRT ,
  SDL_SYSWM_X11
}
 

Functions

 SDL_COMPILE_TIME_ASSERT (SDL_SysWMinfo_size, sizeof(struct SDL_SysWMinfo)==SDL_SYSWM_CURRENT_INFO_SIZE)
 
int SDL_GetWindowWMInfo (SDL_Window *window, SDL_SysWMinfo *info, Uint32 version)
 

Detailed Description

Include file for SDL custom system window manager hooks.

Definition in file SDL_syswm.h.

Macro Definition Documentation

◆ SDL_METALVIEW_TAG

#define SDL_METALVIEW_TAG   255

Definition at line 196 of file SDL_syswm.h.

◆ SDL_SYSWM_CURRENT_INFO_SIZE

#define SDL_SYSWM_CURRENT_INFO_SIZE   SDL_SYSWM_INFO_SIZE_V1

Definition at line 193 of file SDL_syswm.h.

◆ SDL_SYSWM_CURRENT_VERSION

#define SDL_SYSWM_CURRENT_VERSION   1

SDL_syswm.h.

Your application has access to a special type of event SDL_EVENT_SYSWM, which contains window-manager specific information and arrives whenever an unhandled window event occurs. This event is ignored by default, but you can enable it with SDL_SetEventEnabled(). The available subsystems based on platform Forward declaration of types used by subsystems

Definition at line 191 of file SDL_syswm.h.

◆ SDL_SYSWM_INFO_SIZE_V1

#define SDL_SYSWM_INFO_SIZE_V1   (16 * (sizeof (void *) >= 8 ? sizeof (void *) : sizeof(Uint64)))

Definition at line 192 of file SDL_syswm.h.

Enumeration Type Documentation

◆ SDL_SYSWM_TYPE

These are the various supported windowing subsystems

Enumerator
SDL_SYSWM_UNKNOWN 
SDL_SYSWM_ANDROID 
SDL_SYSWM_COCOA 
SDL_SYSWM_HAIKU 
SDL_SYSWM_KMSDRM 
SDL_SYSWM_RISCOS 
SDL_SYSWM_UIKIT 
SDL_SYSWM_VIVANTE 
SDL_SYSWM_WAYLAND 
SDL_SYSWM_WINDOWS 
SDL_SYSWM_WINRT 
SDL_SYSWM_X11 

Definition at line 202 of file SDL_syswm.h.

203{
SDL_SYSWM_TYPE
Definition SDL_syswm.h:203
@ SDL_SYSWM_X11
Definition SDL_syswm.h:215
@ SDL_SYSWM_RISCOS
Definition SDL_syswm.h:209
@ SDL_SYSWM_UNKNOWN
Definition SDL_syswm.h:204
@ SDL_SYSWM_HAIKU
Definition SDL_syswm.h:207
@ SDL_SYSWM_KMSDRM
Definition SDL_syswm.h:208
@ SDL_SYSWM_WINDOWS
Definition SDL_syswm.h:213
@ SDL_SYSWM_UIKIT
Definition SDL_syswm.h:210
@ SDL_SYSWM_COCOA
Definition SDL_syswm.h:206
@ SDL_SYSWM_WAYLAND
Definition SDL_syswm.h:212
@ SDL_SYSWM_VIVANTE
Definition SDL_syswm.h:211
@ SDL_SYSWM_ANDROID
Definition SDL_syswm.h:205
@ SDL_SYSWM_WINRT
Definition SDL_syswm.h:214

Function Documentation

◆ SDL_COMPILE_TIME_ASSERT()

SDL_COMPILE_TIME_ASSERT ( SDL_SysWMinfo_size  ,
sizeof(struct SDL_SysWMinfo = =SDL_SYSWM_CURRENT_INFO_SIZE 
)

◆ SDL_GetWindowWMInfo()

int SDL_GetWindowWMInfo ( SDL_Window window,
SDL_SysWMinfo info,
Uint32  version 
)
extern

Get driver-specific information about a window.

You must include SDL_syswm.h for the declaration of SDL_SysWMinfo.

Parameters
windowthe window about which information is being requested
infoan SDL_SysWMinfo structure filled in with window information
versionthe version of info being requested, should be SDL_SYSWM_CURRENT_VERSION
Returns
0 on success or a negative error code on failure; call SDL_GetError() for more information.
Since
This function is available since SDL 3.0.0.