Mercurial > sdl-ios-xcode
comparison include/SDL_syswm.h @ 4217:4c4113c2162c SDL-1.2
Fixed bug #706
Ken Bull 2009-02-25 13:22:02 PST
Adds Doxygen support for all headers (except config and boilerplate headers) in
the include folder for SDL-1.2 revision 4446.
While in general SDL is quite thoroughly commented, none of these comments are
correctly formatted for Doxygen and are generally inconsistent in their
formatting.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 21 Sep 2009 09:38:10 +0000 |
parents | a1b03ba2fcd0 |
children | 3f2d351d8274 |
comparison
equal
deleted
inserted
replaced
4216:5b99971a27b4 | 4217:4c4113c2162c |
---|---|
18 | 18 |
19 Sam Lantinga | 19 Sam Lantinga |
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 */ | 21 */ |
22 | 22 |
23 /* Include file for SDL custom system window manager hooks */ | 23 /** @file SDL_syswm.h |
24 * Include file for SDL custom system window manager hooks | |
25 */ | |
24 | 26 |
25 #ifndef _SDL_syswm_h | 27 #ifndef _SDL_syswm_h |
26 #define _SDL_syswm_h | 28 #define _SDL_syswm_h |
27 | 29 |
28 #include "SDL_stdinc.h" | 30 #include "SDL_stdinc.h" |
33 /* Set up for C function definitions, even when using C++ */ | 35 /* Set up for C function definitions, even when using C++ */ |
34 #ifdef __cplusplus | 36 #ifdef __cplusplus |
35 extern "C" { | 37 extern "C" { |
36 #endif | 38 #endif |
37 | 39 |
38 /* Your application has access to a special type of event 'SDL_SYSWMEVENT', | 40 /** @file SDL_syswm.h |
39 which contains window-manager specific information and arrives whenever | 41 * Your application has access to a special type of event 'SDL_SYSWMEVENT', |
40 an unhandled window event occurs. This event is ignored by default, but | 42 * which contains window-manager specific information and arrives whenever |
41 you can enable it with SDL_EventState() | 43 * an unhandled window event occurs. This event is ignored by default, but |
42 */ | 44 * you can enable it with SDL_EventState() |
45 */ | |
43 #ifdef SDL_PROTOTYPES_ONLY | 46 #ifdef SDL_PROTOTYPES_ONLY |
44 struct SDL_SysWMinfo; | 47 struct SDL_SysWMinfo; |
45 typedef struct SDL_SysWMinfo SDL_SysWMinfo; | 48 typedef struct SDL_SysWMinfo SDL_SysWMinfo; |
46 #else | 49 #else |
47 | 50 |
58 #if defined(__APPLE__) && defined(__MACH__) | 61 #if defined(__APPLE__) && defined(__MACH__) |
59 /* matches the re-define above */ | 62 /* matches the re-define above */ |
60 #undef Cursor | 63 #undef Cursor |
61 #endif | 64 #endif |
62 | 65 |
63 /* These are the various supported subsystems under UNIX */ | 66 /** These are the various supported subsystems under UNIX */ |
64 typedef enum { | 67 typedef enum { |
65 SDL_SYSWM_X11 | 68 SDL_SYSWM_X11 |
66 } SDL_SYSWM_TYPE; | 69 } SDL_SYSWM_TYPE; |
67 | 70 |
68 /* The UNIX custom event structure */ | 71 /** The UNIX custom event structure */ |
69 struct SDL_SysWMmsg { | 72 struct SDL_SysWMmsg { |
70 SDL_version version; | 73 SDL_version version; |
71 SDL_SYSWM_TYPE subsystem; | 74 SDL_SYSWM_TYPE subsystem; |
72 union { | 75 union { |
73 XEvent xevent; | 76 XEvent xevent; |
74 } event; | 77 } event; |
75 }; | 78 }; |
76 | 79 |
77 /* The UNIX custom window manager information structure. | 80 /** The UNIX custom window manager information structure. |
78 When this structure is returned, it holds information about which | 81 * When this structure is returned, it holds information about which |
79 low level system it is using, and will be one of SDL_SYSWM_TYPE. | 82 * low level system it is using, and will be one of SDL_SYSWM_TYPE. |
80 */ | 83 */ |
81 typedef struct SDL_SysWMinfo { | 84 typedef struct SDL_SysWMinfo { |
82 SDL_version version; | 85 SDL_version version; |
83 SDL_SYSWM_TYPE subsystem; | 86 SDL_SYSWM_TYPE subsystem; |
84 union { | 87 union { |
85 struct { | 88 struct { |
86 Display *display; /* The X11 display */ | 89 Display *display; /**< The X11 display */ |
87 Window window; /* The X11 display window */ | 90 Window window; /**< The X11 display window */ |
88 /* These locking functions should be called around | 91 /** These locking functions should be called around |
89 any X11 functions using the display variable, | 92 * any X11 functions using the display variable, |
90 but not the gfxdisplay variable. | 93 * but not the gfxdisplay variable. |
91 They lock the event thread, so should not be | 94 * They lock the event thread, so should not be |
92 called around event functions or from event filters. | 95 * called around event functions or from event filters. |
93 */ | 96 */ |
97 /*@{*/ | |
94 void (*lock_func)(void); | 98 void (*lock_func)(void); |
95 void (*unlock_func)(void); | 99 void (*unlock_func)(void); |
96 | 100 /*@}*/ |
97 /* Introduced in SDL 1.0.2 */ | 101 |
98 Window fswindow; /* The X11 fullscreen window */ | 102 /** @name Introduced in SDL 1.0.2 */ |
99 Window wmwindow; /* The X11 managed input window */ | 103 /*@{*/ |
100 | 104 Window fswindow; /**< The X11 fullscreen window */ |
101 /* Introduced in SDL 1.2.12 */ | 105 Window wmwindow; /**< The X11 managed input window */ |
102 Display *gfxdisplay; /* The X11 display to which rendering is done */ | 106 /*@}*/ |
107 | |
108 /** @name Introduced in SDL 1.2.12 */ | |
109 /*@{*/ | |
110 Display *gfxdisplay; /**< The X11 display to which rendering is done */ | |
111 /*@}*/ | |
103 } x11; | 112 } x11; |
104 } info; | 113 } info; |
105 } SDL_SysWMinfo; | 114 } SDL_SysWMinfo; |
106 | 115 |
107 #elif defined(SDL_VIDEO_DRIVER_NANOX) | 116 #elif defined(SDL_VIDEO_DRIVER_NANOX) |
108 #include <microwin/nano-X.h> | 117 #include <microwin/nano-X.h> |
109 | 118 |
110 /* The generic custom event structure */ | 119 /** The generic custom event structure */ |
111 struct SDL_SysWMmsg { | 120 struct SDL_SysWMmsg { |
112 SDL_version version; | 121 SDL_version version; |
113 int data; | 122 int data; |
114 }; | 123 }; |
115 | 124 |
116 /* The windows custom window manager information structure */ | 125 /** The windows custom window manager information structure */ |
117 typedef struct SDL_SysWMinfo { | 126 typedef struct SDL_SysWMinfo { |
118 SDL_version version ; | 127 SDL_version version ; |
119 GR_WINDOW_ID window ; /* The display window */ | 128 GR_WINDOW_ID window ; /* The display window */ |
120 } SDL_SysWMinfo; | 129 } SDL_SysWMinfo; |
121 | 130 |
122 #elif defined(SDL_VIDEO_DRIVER_WINDIB) || defined(SDL_VIDEO_DRIVER_DDRAW) || defined(SDL_VIDEO_DRIVER_GAPI) | 131 #elif defined(SDL_VIDEO_DRIVER_WINDIB) || defined(SDL_VIDEO_DRIVER_DDRAW) || defined(SDL_VIDEO_DRIVER_GAPI) |
123 #define WIN32_LEAN_AND_MEAN | 132 #define WIN32_LEAN_AND_MEAN |
124 #include <windows.h> | 133 #include <windows.h> |
125 | 134 |
126 /* The windows custom event structure */ | 135 /** The windows custom event structure */ |
127 struct SDL_SysWMmsg { | 136 struct SDL_SysWMmsg { |
128 SDL_version version; | 137 SDL_version version; |
129 HWND hwnd; /* The window for the message */ | 138 HWND hwnd; /**< The window for the message */ |
130 UINT msg; /* The type of message */ | 139 UINT msg; /**< The type of message */ |
131 WPARAM wParam; /* WORD message parameter */ | 140 WPARAM wParam; /**< WORD message parameter */ |
132 LPARAM lParam; /* LONG message parameter */ | 141 LPARAM lParam; /**< LONG message parameter */ |
133 }; | 142 }; |
134 | 143 |
135 /* The windows custom window manager information structure */ | 144 /** The windows custom window manager information structure */ |
136 typedef struct SDL_SysWMinfo { | 145 typedef struct SDL_SysWMinfo { |
137 SDL_version version; | 146 SDL_version version; |
138 HWND window; /* The Win32 display window */ | 147 HWND window; /**< The Win32 display window */ |
139 HGLRC hglrc; /* The OpenGL context, if any */ | 148 HGLRC hglrc; /**< The OpenGL context, if any */ |
140 } SDL_SysWMinfo; | 149 } SDL_SysWMinfo; |
141 | 150 |
142 #elif defined(SDL_VIDEO_DRIVER_RISCOS) | 151 #elif defined(SDL_VIDEO_DRIVER_RISCOS) |
143 | 152 |
144 /* RISC OS custom event structure */ | 153 /** RISC OS custom event structure */ |
145 struct SDL_SysWMmsg { | 154 struct SDL_SysWMmsg { |
146 SDL_version version; | 155 SDL_version version; |
147 int eventCode; /* The window for the message */ | 156 int eventCode; /**< The window for the message */ |
148 int pollBlock[64]; | 157 int pollBlock[64]; |
149 }; | 158 }; |
150 | 159 |
151 /* The RISC OS custom window manager information structure */ | 160 /** The RISC OS custom window manager information structure */ |
152 typedef struct SDL_SysWMinfo { | 161 typedef struct SDL_SysWMinfo { |
153 SDL_version version; | 162 SDL_version version; |
154 int wimpVersion; /* Wimp version running under */ | 163 int wimpVersion; /**< Wimp version running under */ |
155 int taskHandle; /* The RISC OS task handle */ | 164 int taskHandle; /**< The RISC OS task handle */ |
156 int window; /* The RISC OS display window */ | 165 int window; /**< The RISC OS display window */ |
157 } SDL_SysWMinfo; | 166 } SDL_SysWMinfo; |
158 | 167 |
159 #elif defined(SDL_VIDEO_DRIVER_PHOTON) | 168 #elif defined(SDL_VIDEO_DRIVER_PHOTON) |
160 #include <sys/neutrino.h> | 169 #include <sys/neutrino.h> |
161 #include <Ph.h> | 170 #include <Ph.h> |
162 | 171 |
163 /* The QNX custom event structure */ | 172 /** The QNX custom event structure */ |
164 struct SDL_SysWMmsg { | 173 struct SDL_SysWMmsg { |
165 SDL_version version; | 174 SDL_version version; |
166 int data; | 175 int data; |
167 }; | 176 }; |
168 | 177 |
169 /* The QNX custom window manager information structure */ | 178 /** The QNX custom window manager information structure */ |
170 typedef struct SDL_SysWMinfo { | 179 typedef struct SDL_SysWMinfo { |
171 SDL_version version; | 180 SDL_version version; |
172 int data; | 181 int data; |
173 } SDL_SysWMinfo; | 182 } SDL_SysWMinfo; |
174 | 183 |
175 #else | 184 #else |
176 | 185 |
177 /* The generic custom event structure */ | 186 /** The generic custom event structure */ |
178 struct SDL_SysWMmsg { | 187 struct SDL_SysWMmsg { |
179 SDL_version version; | 188 SDL_version version; |
180 int data; | 189 int data; |
181 }; | 190 }; |
182 | 191 |
183 /* The generic custom window manager information structure */ | 192 /** The generic custom window manager information structure */ |
184 typedef struct SDL_SysWMinfo { | 193 typedef struct SDL_SysWMinfo { |
185 SDL_version version; | 194 SDL_version version; |
186 int data; | 195 int data; |
187 } SDL_SysWMinfo; | 196 } SDL_SysWMinfo; |
188 | 197 |
189 #endif /* video driver type */ | 198 #endif /* video driver type */ |
190 | 199 |
191 #endif /* SDL_PROTOTYPES_ONLY */ | 200 #endif /* SDL_PROTOTYPES_ONLY */ |
192 | 201 |
193 /* Function prototypes */ | 202 /* Function prototypes */ |
194 /* | 203 /** |
195 * This function gives you custom hooks into the window manager information. | 204 * This function gives you custom hooks into the window manager information. |
196 * It fills the structure pointed to by 'info' with custom information and | 205 * It fills the structure pointed to by 'info' with custom information and |
197 * returns 1 if the function is implemented. If it's not implemented, or | 206 * returns 1 if the function is implemented. If it's not implemented, or |
198 * the version member of the 'info' structure is invalid, it returns 0. | 207 * the version member of the 'info' structure is invalid, it returns 0. |
199 * | 208 * |
200 * You typically use this function like this: | 209 * You typically use this function like this: |
210 * @code | |
201 * SDL_SysWMInfo info; | 211 * SDL_SysWMInfo info; |
202 * SDL_VERSION(&info.version); | 212 * SDL_VERSION(&info.version); |
203 * if ( SDL_GetWMInfo(&info) ) { ... } | 213 * if ( SDL_GetWMInfo(&info) ) { ... } |
214 * @endcode | |
204 */ | 215 */ |
205 extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo *info); | 216 extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo *info); |
206 | 217 |
207 | 218 |
208 /* Ends C function definitions when using C++ */ | 219 /* Ends C function definitions when using C++ */ |