SDL  2.0
SDL_syswm.h File Reference
#include "SDL_stdinc.h"
#include "SDL_error.h"
#include "SDL_video.h"
#include "SDL_version.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include "begin_code.h"
#include "close_code.h"
+ Include dependency graph for SDL_syswm.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  SDL_SysWMmsg
 
struct  SDL_SysWMinfo
 

Enumerations

enum  SDL_SYSWM_TYPE {
  SDL_SYSWM_UNKNOWN,
  SDL_SYSWM_WINDOWS,
  SDL_SYSWM_X11,
  SDL_SYSWM_DIRECTFB,
  SDL_SYSWM_COCOA,
  SDL_SYSWM_UIKIT,
  SDL_SYSWM_WAYLAND,
  SDL_SYSWM_MIR,
  SDL_SYSWM_WINRT,
  SDL_SYSWM_ANDROID,
  SDL_SYSWM_VIVANTE,
  SDL_SYSWM_OS2
}
 

Functions

SDL_bool SDL_GetWindowWMInfo (SDL_Window *window, SDL_SysWMinfo *info)
 This function allows access to driver-dependent window information. More...
 

Detailed Description

Include file for SDL custom system window manager hooks.

Your application has access to a special type of event SDL_SYSWMEVENT, 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_EventState().

Definition in file SDL_syswm.h.

Enumeration Type Documentation

◆ SDL_SYSWM_TYPE

These are the various supported windowing subsystems

Enumerator
SDL_SYSWM_UNKNOWN 
SDL_SYSWM_WINDOWS 
SDL_SYSWM_X11 
SDL_SYSWM_DIRECTFB 
SDL_SYSWM_COCOA 
SDL_SYSWM_UIKIT 
SDL_SYSWM_WAYLAND 
SDL_SYSWM_MIR 
SDL_SYSWM_WINRT 
SDL_SYSWM_ANDROID 
SDL_SYSWM_VIVANTE 
SDL_SYSWM_OS2 

Definition at line 116 of file SDL_syswm.h.

Function Documentation

◆ SDL_GetWindowWMInfo()

SDL_bool SDL_GetWindowWMInfo ( SDL_Window window,
SDL_SysWMinfo info 
)

This function allows access to driver-dependent window information.

Parameters
windowThe window about which information is being requested
infoThis structure must be initialized with the SDL version, and is then filled in with information about the given window.
Returns
SDL_TRUE if the function is implemented and the version member of the info struct is valid, SDL_FALSE otherwise.

You typically use this function like this:

if ( SDL_GetWindowWMInfo(window, &info) ) { ... }

Definition at line 3712 of file SDL_video.c.

3713 {
3715 
3716  if (!info) {
3717  SDL_InvalidParamError("info");
3718  return SDL_FALSE;
3719  }
3720  info->subsystem = SDL_SYSWM_UNKNOWN;
3721 
3722  if (!_this->GetWindowWMInfo) {
3723  SDL_Unsupported();
3724  return SDL_FALSE;
3725  }
3726  return (_this->GetWindowWMInfo(_this, window, info));
3727 }

References _this, CHECK_WINDOW_MAGIC, SDL_VideoDevice::GetWindowWMInfo, SDL_FALSE, SDL_InvalidParamError, SDL_SYSWM_UNKNOWN, SDL_Unsupported, and SDL_SysWMinfo::subsystem.

Referenced by SDL_MessageboxValidForDriver().

SDL_SYSWM_UNKNOWN
@ SDL_SYSWM_UNKNOWN
Definition: SDL_syswm.h:118
SDL_SYSWM_WINRT
@ SDL_SYSWM_WINRT
Definition: SDL_syswm.h:126
SDL_SYSWM_DIRECTFB
@ SDL_SYSWM_DIRECTFB
Definition: SDL_syswm.h:121
SDL_VERSION
#define SDL_VERSION(x)
Macro to determine SDL version program was compiled against.
Definition: SDL_version.h:79
SDL_SysWMinfo
Definition: SDL_syswm.h:195
SDL_SYSWM_TYPE
SDL_SYSWM_TYPE
Definition: SDL_syswm.h:117
SDL_InvalidParamError
#define SDL_InvalidParamError(param)
Definition: SDL_error.h:54
SDL_SYSWM_ANDROID
@ SDL_SYSWM_ANDROID
Definition: SDL_syswm.h:127
SDL_VideoDevice::GetWindowWMInfo
SDL_bool(* GetWindowWMInfo)(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
Definition: SDL_sysvideo.h:248
SDL_SYSWM_WAYLAND
@ SDL_SYSWM_WAYLAND
Definition: SDL_syswm.h:124
_this
static SDL_VideoDevice * _this
Definition: SDL_video.c:121
SDL_SYSWM_COCOA
@ SDL_SYSWM_COCOA
Definition: SDL_syswm.h:122
SDL_SysWMinfo::subsystem
SDL_SYSWM_TYPE subsystem
Definition: SDL_syswm.h:197
window
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
SDL_SYSWM_X11
@ SDL_SYSWM_X11
Definition: SDL_syswm.h:120
SDL_SYSWM_UIKIT
@ SDL_SYSWM_UIKIT
Definition: SDL_syswm.h:123
SDL_GetWindowWMInfo
#define SDL_GetWindowWMInfo
Definition: SDL_dynapi_overrides.h:473
SDL_SysWMinfo::version
SDL_version version
Definition: SDL_syswm.h:196
SDL_FALSE
@ SDL_FALSE
Definition: SDL_stdinc.h:163
SDL_Unsupported
#define SDL_Unsupported()
Definition: SDL_error.h:53
SDL_SYSWM_MIR
@ SDL_SYSWM_MIR
Definition: SDL_syswm.h:125
CHECK_WINDOW_MAGIC
#define CHECK_WINDOW_MAGIC(window, retval)
Definition: SDL_video.c:123
SDL_SYSWM_VIVANTE
@ SDL_SYSWM_VIVANTE
Definition: SDL_syswm.h:128
SDL_SYSWM_OS2
@ SDL_SYSWM_OS2
Definition: SDL_syswm.h:129
SDL_SYSWM_WINDOWS
@ SDL_SYSWM_WINDOWS
Definition: SDL_syswm.h:119