00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00027 #ifndef _SDL_syswm_h
00028 #define _SDL_syswm_h
00029
00030 #include "SDL_stdinc.h"
00031 #include "SDL_error.h"
00032 #include "SDL_version.h"
00033
00034 #include "begin_code.h"
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00046 #ifdef SDL_PROTOTYPES_ONLY
00047 struct SDL_SysWMinfo;
00048 typedef struct SDL_SysWMinfo SDL_SysWMinfo;
00049 #else
00050
00051
00052 #if defined(SDL_VIDEO_DRIVER_X11)
00053 #if defined(__APPLE__) && defined(__MACH__)
00054
00055 #define Cursor X11Cursor
00056 #endif
00057
00058 #include <X11/Xlib.h>
00059 #include <X11/Xatom.h>
00060
00061 #if defined(__APPLE__) && defined(__MACH__)
00062
00063 #undef Cursor
00064 #endif
00065
00067 typedef enum {
00068 SDL_SYSWM_X11
00069 } SDL_SYSWM_TYPE;
00070
00072 struct SDL_SysWMmsg {
00073 SDL_version version;
00074 SDL_SYSWM_TYPE subsystem;
00075 union {
00076 XEvent xevent;
00077 } event;
00078 };
00079
00084 typedef struct SDL_SysWMinfo {
00085 SDL_version version;
00086 SDL_SYSWM_TYPE subsystem;
00087 union {
00088 struct {
00089 Display *display;
00090 Window window;
00098 void (*lock_func)(void);
00099 void (*unlock_func)(void);
00104 Window fswindow;
00105 Window wmwindow;
00107
00110 Display *gfxdisplay;
00112 } x11;
00113 } info;
00114 } SDL_SysWMinfo;
00115
00116 #elif defined(SDL_VIDEO_DRIVER_NANOX)
00117 #include <microwin/nano-X.h>
00118
00120 struct SDL_SysWMmsg {
00121 SDL_version version;
00122 int data;
00123 };
00124
00126 typedef struct SDL_SysWMinfo {
00127 SDL_version version ;
00128 GR_WINDOW_ID window ;
00129 } SDL_SysWMinfo;
00130
00131 #elif defined(SDL_VIDEO_DRIVER_WINDIB) || defined(SDL_VIDEO_DRIVER_DDRAW) || defined(SDL_VIDEO_DRIVER_GAPI)
00132 #define WIN32_LEAN_AND_MEAN
00133 #include <windows.h>
00134
00136 struct SDL_SysWMmsg {
00137 SDL_version version;
00138 HWND hwnd;
00139 UINT msg;
00140 WPARAM wParam;
00141 LPARAM lParam;
00142 };
00143
00145 typedef struct SDL_SysWMinfo {
00146 SDL_version version;
00147 HWND window;
00148 HGLRC hglrc;
00149 } SDL_SysWMinfo;
00150
00151 #elif defined(SDL_VIDEO_DRIVER_RISCOS)
00152
00154 struct SDL_SysWMmsg {
00155 SDL_version version;
00156 int eventCode;
00157 int pollBlock[64];
00158 };
00159
00161 typedef struct SDL_SysWMinfo {
00162 SDL_version version;
00163 int wimpVersion;
00164 int taskHandle;
00165 int window;
00166 } SDL_SysWMinfo;
00167
00168 #elif defined(SDL_VIDEO_DRIVER_PHOTON)
00169 #include <sys/neutrino.h>
00170 #include <Ph.h>
00171
00173 struct SDL_SysWMmsg {
00174 SDL_version version;
00175 int data;
00176 };
00177
00179 typedef struct SDL_SysWMinfo {
00180 SDL_version version;
00181 int data;
00182 } SDL_SysWMinfo;
00183
00184 #else
00185
00187 struct SDL_SysWMmsg {
00188 SDL_version version;
00189 int data;
00190 };
00191
00193 typedef struct SDL_SysWMinfo {
00194 SDL_version version;
00195 int data;
00196 } SDL_SysWMinfo;
00197
00198 #endif
00199
00200 #endif
00201
00202
00216 extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo *info);
00217
00218
00219
00220 #ifdef __cplusplus
00221 }
00222 #endif
00223 #include "close_code.h"
00224
00225 #endif