syswm.nim
Include file for SDL custom system window manager hooks.
Your application has access to a special type of event 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 eventState().
Types
SysWMKind {...}{.size: 4.} = enum SYSWM_UNKNOWN, SYSWM_WINDOWS, SYSWM_X11, SYSWM_DIRECTFB, SYSWM_COCOA, SYSWM_UIKIT, SYSWM_WAYLAND, SYSWM_MIR, SYSWM_WINRT, SYSWM_ANDROID, SYSWM_VIVANTE, SYSWM_OS2, SYSWM_HAIKU
- These are the various supported windowing subsystems
SysWMMsgX11Obj = object event*: TXEvent
- when defined(SDL_VIDEO_DRIVER_X11)
SysWMMsgKindObj = object x11*: SysWMMsgX11Obj
- when defined(SDL_VIDEO_DRIVER_X11)
SysWMMsg = ptr SysWMMsgObj
SysWMMsgObj = object version*: Version subsystem*: SysWMKind msg*: SysWMMsgKindObj
- The custom event structure.
SysWMinfoX11Obj = object display*: ptr xlib.TXDisplay ## The X11 display window*: x.TWindow ## The X11 window
- when defined(SDL_VIDEO_DRIVER_X11)
SysWMinfoKindObj = object x11*: SysWMinfoX11Obj
- when defined(SDL_VIDEO_DRIVER_X11)
SysWMinfo = object version*: Version subsystem*: SysWMKind info*: SysWMinfoKindObj
-
The custom window manager information structure.
When this structure is returned, it holds information about which low level system it is using, and will be one of SysWMKind.
Procs
proc getWindowWMInfo(window: Window; info: ptr SysWMinfo): bool {...}{.cdecl, importc: "SDL_GetWindowWMInfo", dynlib: SDL2_LIB.}
-
This procedure allows access to driver-dependent window information.
window The window about which information is being requested
info This object must be initialized with the SDL version, and is then filled in with information about the given window.
Return true if the procedure is implemented and the version member of the info object is valid, false otherwise.
You typically use this procedure like this:
var info: SysWMinfo version(info.version); if getWindowWMInfo(window, addr(info))" ...