The custom window manager information structure.
Defined in SDL_syswm.h
struct SDL_SysWMinfo
{
SDL_version version;
SDL_SYSWM_TYPE subsystem;union
{#if defined(SDL_VIDEO_DRIVER_WINDOWS)
struct
{/**< The window handle */
HWND window; /**< The window device context */
HDC hdc; /**< The instance handle */
HINSTANCE hinstance;
} win;#endif
#if defined(SDL_VIDEO_DRIVER_WINRT)
struct
{/**< The WinRT CoreWindow */
IInspectable * window;
} winrt;#endif
#if defined(SDL_VIDEO_DRIVER_X11)
struct
{/**< The X11 display */
Display *display; /**< The X11 window */
Window window;
} x11;#endif
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
struct
{/**< The directfb main interface */
IDirectFB *dfb; /**< The directfb window handle */
IDirectFBWindow *window; /**< The directfb client surface */
IDirectFBSurface *surface;
} dfb;#endif
#if defined(SDL_VIDEO_DRIVER_COCOA)
struct
{#if defined(__OBJC__) && defined(__has_feature)
#if __has_feature(objc_arc)
/**< The Cocoa window */
NSWindow __unsafe_unretained *window; #else
/**< The Cocoa window */
NSWindow *window; #endif
#else
/**< The Cocoa window */
NSWindow *window; #endif
} cocoa;#endif
#if defined(SDL_VIDEO_DRIVER_UIKIT)
struct
{#if defined(__OBJC__) && defined(__has_feature)
#if __has_feature(objc_arc)
/**< The UIKit window */
UIWindow __unsafe_unretained *window; #else
/**< The UIKit window */
UIWindow *window; #endif
#else
/**< The UIKit window */
UIWindow *window; #endif
/**< The GL view's Framebuffer Object. It must be bound when rendering to the screen using GL. */
GLuint framebuffer; /**< The GL view's color Renderbuffer Object. It must be bound when SDL_GL_SwapWindow is called. */
GLuint colorbuffer; /**< The Framebuffer Object which holds the resolve color Renderbuffer, when MSAA is used. */
GLuint resolveFramebuffer;
} uikit;#endif
#if defined(SDL_VIDEO_DRIVER_WAYLAND)
struct
{struct wl_display *display; /**< Wayland display */
struct wl_surface *surface; /**< Wayland surface */
void *shell_surface; /**< DEPRECATED Wayland shell_surface (window manager handle) */
struct wl_egl_window *egl_window; /**< Wayland EGL window (native window) */
struct xdg_surface *xdg_surface; /**< Wayland xdg surface (window manager handle) */
struct xdg_toplevel *xdg_toplevel; /**< Wayland xdg toplevel role */
struct xdg_popup *xdg_popup; /**< Wayland xdg popup role */
struct xdg_positioner *xdg_positioner; /**< Wayland xdg positioner, for popup */
} wl;#endif
#if defined(SDL_VIDEO_DRIVER_MIR) /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
struct
{void *connection; /**< Mir display server connection */
void *surface; /**< Mir surface */
} mir;#endif
#if defined(SDL_VIDEO_DRIVER_ANDROID)
struct
{
ANativeWindow *window;
EGLSurface surface;
} android;#endif
#if defined(SDL_VIDEO_DRIVER_OS2)
struct
{/**< The window handle */
HWND hwnd; /**< The frame window handle */
HWND hwndFrame;
} os2;#endif
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
struct
{
EGLNativeDisplayType display;
EGLNativeWindowType window;
} vivante;#endif
#if defined(SDL_VIDEO_DRIVER_KMSDRM)
struct
{int dev_index; /**< Device index (ex: the X in /dev/dri/cardX) */
int drm_fd; /**< DRM FD (unavailable on Vulkan windows) */
struct gbm_device *gbm_dev; /**< GBM device (unavailable on Vulkan windows) */
} kmsdrm;#endif
/* Make sure this union is always 64 bytes (8 64-bit pointers). */
/* Be careful not to overflow this if you add a new target! */
64];
Uint8 dummy[
} info; };
When this structure is returned, it holds information about which low level system it is using, and will be one of SDL_SYSWM_TYPE.