00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00029 #ifndef _SDL_syswm_h
00030 #define _SDL_syswm_h
00031
00032 #include "SDL_stdinc.h"
00033 #include "SDL_error.h"
00034 #include "SDL_video.h"
00035 #include "SDL_version.h"
00036
00037 #include "begin_code.h"
00038
00039 #ifdef __cplusplus
00040
00041 extern "C" {
00042
00043 #endif
00044
00045
00046
00047
00048
00049
00050 #ifdef SDL_PROTOTYPES_ONLY
00051 struct SDL_SysWMinfo;
00052 #else
00053
00054
00055 #if defined(SDL_VIDEO_DRIVER_X11)
00056 #if defined(__APPLE__) && defined(__MACH__)
00057
00058 #define Cursor X11Cursor
00059 #endif
00060
00061 #include <X11/Xlib.h>
00062 #include <X11/Xatom.h>
00063
00064 #if defined(__APPLE__) && defined(__MACH__)
00065
00066 #undef Cursor
00067 #endif
00068
00069
00070 typedef enum
00071 {
00072 SDL_SYSWM_X11
00073 } SDL_SYSWM_TYPE;
00074
00075
00076 struct SDL_SysWMmsg
00077 {
00078 SDL_version version;
00079 SDL_SYSWM_TYPE subsystem;
00080 union
00081 {
00082 XEvent xevent;
00083 } event;
00084 };
00085
00086
00087
00088
00089
00090 struct SDL_SysWMinfo
00091 {
00092 SDL_version version;
00093 SDL_SYSWM_TYPE subsystem;
00094 union
00095 {
00096 struct
00097 {
00098 Display *display;
00099 Window window;
00100
00101
00102
00103
00104
00105 void (*lock_func) (void);
00106 void (*unlock_func) (void);
00107
00108
00109 Window fswindow;
00110 Window wmwindow;
00111 } x11;
00112 } info;
00113 };
00114
00115 #elif defined(SDL_VIDEO_DRIVER_NANOX)
00116 #include <microwin/nano-X.h>
00117
00118
00119 struct SDL_SysWMmsg
00120 {
00121 SDL_version version;
00122 int data;
00123 };
00124
00125
00126 struct SDL_SysWMinfo
00127 {
00128 SDL_version version;
00129 GR_WINDOW_ID window;
00130 };
00131
00132 #elif defined(SDL_VIDEO_DRIVER_WIN32)
00133 #define WIN32_LEAN_AND_MEAN
00134 #include <windows.h>
00135
00136
00137 struct SDL_SysWMmsg
00138 {
00139 SDL_version version;
00140 HWND hwnd;
00141 UINT msg;
00142 WPARAM wParam;
00143 LPARAM lParam;
00144 };
00145
00146
00147 struct SDL_SysWMinfo
00148 {
00149 SDL_version version;
00150 HWND window;
00151 };
00152
00153 #elif defined(SDL_VIDEO_DRIVER_RISCOS)
00154
00155
00156 struct SDL_SysWMmsg
00157 {
00158 SDL_version version;
00159 int eventCode;
00160 int pollBlock[64];
00161 };
00162
00163
00164 struct SDL_SysWMinfo
00165 {
00166 SDL_version version;
00167 int wimpVersion;
00168 int taskHandle;
00169 int window;
00170 };
00171
00172 #elif defined(SDL_VIDEO_DRIVER_PHOTON)
00173 #include <sys/neutrino.h>
00174 #include <Ph.h>
00175
00176
00177 struct SDL_SysWMmsg
00178 {
00179 SDL_version version;
00180 int data;
00181 };
00182
00183
00184 struct SDL_SysWMinfo
00185 {
00186 SDL_version version;
00187 int data;
00188 };
00189
00190 #else
00191
00192
00193 struct SDL_SysWMmsg
00194 {
00195 SDL_version version;
00196 int data;
00197 };
00198
00199
00200 struct SDL_SysWMinfo
00201 {
00202 SDL_version version;
00203 int data;
00204 };
00205
00206 #endif
00207
00208 #endif
00209
00210 typedef struct SDL_SysWMinfo SDL_SysWMinfo;
00211
00212
00230 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_WindowID windowID,
00231 SDL_SysWMinfo * info);
00232
00233
00234
00235 #ifdef __cplusplus
00236
00237 }
00238
00239 #endif
00240 #include "close_code.h"
00241
00242 #endif
00243
00244