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
SysWMMsgWinObj = object hwnd*: HWND ## The window for the message msg*: WINUINT ## The type of message wParam*: WPARAM ## WORD message parameter lParam*: LPARAM ## LONG message parameter
- when defined(SDL_VIDEO_DRIVER_WINDOWS)
SysWMMsgKindObj = object win*: SysWMMsgWinObj
- when defined(SDL_VIDEO_DRIVER_WINDOWS)
SysWMMsg = ptr SysWMMsgObj
SysWMMsgObj = object version*: Version subsystem*: SysWMKind msg*: SysWMMsgKindObj
- The custom event structure.
SysWMinfoWinObj = object window*: HWND ## The window handle hdc*: HDC ## The window device context hinstance*: HINSTANCE ## The instance handle
- when defined(SDL_VIDEO_DRIVER_WINDOWS)
SysWMinfoKindObj = object win*: SysWMinfoWinObj
- when defined(SDL_VIDEO_DRIVER_WINDOWS)
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))" ...