SDL Wiki
(This is the legacy documentation for stable SDL2, the current stable version; SDL3 is the current development version.)

SDL_SysWMmsg

The custom event structure.

Header File

Defined in [SDL_syswm.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_syswm.h), but apps should _only_ `#include "SDL.h"`!

Syntax

struct SDL_SysWMmsg
{
    SDL_version version;
    SDL_SYSWM_TYPE subsystem;
    union
    {
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
        struct {
            HWND hwnd;                  /**< The window for the message */
            UINT msg;                   /**< The type of message */
            WPARAM wParam;              /**< WORD message parameter */
            LPARAM lParam;              /**< LONG message parameter */
        } win;
#endif
#if defined(SDL_VIDEO_DRIVER_X11)
        struct {
            XEvent event;
        } x11;
#endif
#if defined(SDL_VIDEO_DRIVER_DIRECTFB)
        struct {
            DFBEvent event;
        } dfb;
#endif
#if defined(SDL_VIDEO_DRIVER_COCOA)
        struct
        {
            /* Latest version of Xcode clang complains about empty structs in C v. C++:
                 error: empty struct has size 0 in C, size 1 in C++
             */
            int dummy;
            /* No Cocoa window events yet */
        } cocoa;
#endif
#if defined(SDL_VIDEO_DRIVER_UIKIT)
        struct
        {
            int dummy;
            /* No UIKit window events yet */
        } uikit;
#endif
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
        struct
        {
            int dummy;
            /* No Vivante window events yet */
        } vivante;
#endif
#if defined(SDL_VIDEO_DRIVER_OS2)
        struct
        {
            BOOL fFrame;                /**< TRUE if hwnd is a frame window */
            HWND hwnd;                  /**< The window receiving the message */
            ULONG msg;                  /**< The message identifier */
            MPARAM mp1;                 /**< The first first message parameter */
            MPARAM mp2;                 /**< The second first message parameter */
        } os2;
#endif
        /* Can't have an empty union */
        int dummy;
    } msg;
};

Data Fields

<bgcolor="#EDEDED">All Subsystems

SDL_version

version

an SDL_version structure that contains the current SDL version

SDL_SYSWM_TYPE

subsystem

the windowing system type; see Remarks for details

<style="color: #808080;">int

<style="color: #808080;">dummy

<style="color: #808080;">unused (to help compilers when no specific system is available)

<bgcolor="#EDEDED">SDL_SYSWM_WINDOWS

HWND

win.hwnd

the window for the message

UINT

win.msg

the type of message

WPARAM

win.wParam

WORD message parameter

LPARAM

win.lParam

LONG message parameter

<bgcolor="#EDEDED">SDL_SYSWM_X11

XEvent

x11.event

the native x11 event structure

<bgcolor="#EDEDED">SDL_SYSWM_DIRECTFB

DFBEvent

dfb.event

the DirectFB event

<bgcolor="#EDEDED">SDL_SYSWM_COCOA

<style="color: #808080;">int

<style="color: #808080;">cocoa.dummy

<style="color: #808080;">unused (>= SDL 2.0.4)

<bgcolor="#EDEDED">SDL_SYSWM_UIKIT

<style="color: #808080;">int

<style="color: #808080;">uikit.dummy

<style="color: #808080;">unused (>= SDL 2.0.4)

<bgcolor="#EDEDED">SDL_SYSWM_VIVANTE

<style="color: #808080;">int

<style="color: #808080;">vivante.dummy

<style="color: #808080;">unused (>= SDL 2.0.5)

SDL_SYSWM_TYPE
SDL_version

CategoryAPI, CategoryAPIStruct, CategoryStruct, CategorySWM


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.