comparison include/SDL_compat.h @ 3407:d3baf5ac4e37

Partial fix for bug #859 Header file update from Ken for improved doxygen output
author Sam Lantinga <slouken@libsdl.org>
date Mon, 19 Oct 2009 13:31:58 +0000
parents c5b2884c26b4
children 0267b8b1595c
comparison
equal deleted inserted replaced
3406:8ae607392409 3407:d3baf5ac4e37
18 18
19 Sam Lantinga 19 Sam Lantinga
20 slouken@libsdl.org 20 slouken@libsdl.org
21 */ 21 */
22 22
23 /* This file contains functions for backwards compatibility with SDL 1.2 */ 23 /**
24 24 * \defgroup Compatibility SDL 1.2 Compatibility API
25 /* 25 */
26 #define SDL_NO_COMPAT to prevent SDL_compat.h from being included. 26 /*@{*/
27 SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to 27
28 SDL 1.3/2.0 28 /**
29 */ 29 * \file SDL_compat.h
30 *
31 * This file contains functions for backwards compatibility with SDL 1.2.
32 */
33
34 /**
35 * \def SDL_NO_COMPAT
36 *
37 * #define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
38 * SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
39 * SDL 1.3/2.0.
40 */
41
42 /*@}*/
30 43
31 #ifdef SDL_NO_COMPAT 44 #ifdef SDL_NO_COMPAT
32 #define _SDL_compat_h 45 #define _SDL_compat_h
33 #endif 46 #endif
34 47
44 /* *INDENT-OFF* */ 57 /* *INDENT-OFF* */
45 extern "C" { 58 extern "C" {
46 /* *INDENT-ON* */ 59 /* *INDENT-ON* */
47 #endif 60 #endif
48 61
49 #define SDL_SWSURFACE 0x00000000 /* Not used */ 62 /**
63 * \addtogroup Compatibility
64 */
65 /*@{*/
66
67 /**
68 * \name Surface flags
69 */
70 /*@{*/
71 #define SDL_SWSURFACE 0x00000000 /**< \note Not used */
50 #define SDL_SRCALPHA 0x00010000 72 #define SDL_SRCALPHA 0x00010000
51 #define SDL_SRCCOLORKEY 0x00020000 73 #define SDL_SRCCOLORKEY 0x00020000
52 #define SDL_ANYFORMAT 0x00100000 74 #define SDL_ANYFORMAT 0x00100000
53 #define SDL_HWPALETTE 0x00200000 75 #define SDL_HWPALETTE 0x00200000
54 #define SDL_DOUBLEBUF 0x00400000 76 #define SDL_DOUBLEBUF 0x00400000
55 #define SDL_FULLSCREEN 0x00800000 77 #define SDL_FULLSCREEN 0x00800000
56 #define SDL_RESIZABLE 0x01000000 78 #define SDL_RESIZABLE 0x01000000
57 #define SDL_NOFRAME 0x02000000 79 #define SDL_NOFRAME 0x02000000
58 #define SDL_OPENGL 0x04000000 80 #define SDL_OPENGL 0x04000000
59 #define SDL_HWSURFACE 0x08000001 /* Not used */ 81 #define SDL_HWSURFACE 0x08000001 /**< \note Not used */
60 #define SDL_ASYNCBLIT 0x08000000 /* Not used */ 82 #define SDL_ASYNCBLIT 0x08000000 /**< \note Not used */
61 #define SDL_RLEACCELOK 0x08000000 /* Not used */ 83 #define SDL_RLEACCELOK 0x08000000 /**< \note Not used */
62 #define SDL_HWACCEL 0x08000000 /* Not used */ 84 #define SDL_HWACCEL 0x08000000 /**< \note Not used */
85 /*@}*//*Surface flags*/
63 86
64 #define SDL_APPMOUSEFOCUS 0x01 87 #define SDL_APPMOUSEFOCUS 0x01
65 #define SDL_APPINPUTFOCUS 0x02 88 #define SDL_APPINPUTFOCUS 0x02
66 #define SDL_APPACTIVE 0x04 89 #define SDL_APPACTIVE 0x04
67 90
101 124
102 int current_w; 125 int current_w;
103 int current_h; 126 int current_h;
104 } SDL_VideoInfo; 127 } SDL_VideoInfo;
105 128
106 /* The most common video overlay formats. 129 /**
107 For an explanation of these pixel formats, see: 130 * \name Overlay formats
108 http://www.webartz.com/fourcc/indexyuv.htm 131 *
109 132 * The most common video overlay formats.
110 For information on the relationship between color spaces, see: 133 *
111 http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html 134 * For an explanation of these pixel formats, see:
112 */ 135 * http://www.webartz.com/fourcc/indexyuv.htm
113 #define SDL_YV12_OVERLAY 0x32315659 /* Planar mode: Y + V + U (3 planes) */ 136 *
114 #define SDL_IYUV_OVERLAY 0x56555949 /* Planar mode: Y + U + V (3 planes) */ 137 * For information on the relationship between color spaces, see:
115 #define SDL_YUY2_OVERLAY 0x32595559 /* Packed mode: Y0+U0+Y1+V0 (1 plane) */ 138 * http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
116 #define SDL_UYVY_OVERLAY 0x59565955 /* Packed mode: U0+Y0+V0+Y1 (1 plane) */ 139 */
117 #define SDL_YVYU_OVERLAY 0x55595659 /* Packed mode: Y0+V0+Y1+U0 (1 plane) */ 140 /*@{*/
118 141 #define SDL_YV12_OVERLAY 0x32315659 /**< Planar mode: Y + V + U (3 planes) */
119 /* The YUV hardware video overlay */ 142 #define SDL_IYUV_OVERLAY 0x56555949 /**< Planar mode: Y + U + V (3 planes) */
143 #define SDL_YUY2_OVERLAY 0x32595559 /**< Packed mode: Y0+U0+Y1+V0 (1 plane) */
144 #define SDL_UYVY_OVERLAY 0x59565955 /**< Packed mode: U0+Y0+V0+Y1 (1 plane) */
145 #define SDL_YVYU_OVERLAY 0x55595659 /**< Packed mode: Y0+V0+Y1+U0 (1 plane) */
146 /*@}*//*Overlay formats*/
147
148 /**
149 * The YUV hardware video overlay.
150 */
120 typedef struct SDL_Overlay 151 typedef struct SDL_Overlay
121 { 152 {
122 Uint32 format; /* Read-only */ 153 Uint32 format; /**< Read-only */
123 int w, h; /* Read-only */ 154 int w, h; /**< Read-only */
124 int planes; /* Read-only */ 155 int planes; /**< Read-only */
125 Uint16 *pitches; /* Read-only */ 156 Uint16 *pitches; /**< Read-only */
126 Uint8 **pixels; /* Read-write */ 157 Uint8 **pixels; /**< Read-write */
127 158
128 /* Hardware-specific surface info */ 159 /**
160 * \name Hardware-specific surface info
161 */
162 /*@{*/
129 struct private_yuvhwfuncs *hwfuncs; 163 struct private_yuvhwfuncs *hwfuncs;
130 struct private_yuvhwdata *hwdata; 164 struct private_yuvhwdata *hwdata;
131 165 /*@}*//*Hardware-specific surface info*/
132 /* Special flags */ 166
133 Uint32 hw_overlay:1; /* Flag: This overlay hardware accelerated? */ 167 /**
168 * \name Special flags
169 */
170 /*@{*/
171 Uint32 hw_overlay:1; /**< Flag: This overlay hardware accelerated? */
134 Uint32 UnusedBits:31; 172 Uint32 UnusedBits:31;
173 /*@}*//*Special flags*/
135 } SDL_Overlay; 174 } SDL_Overlay;
136 175
137 typedef enum 176 typedef enum
138 { 177 {
139 SDL_GRAB_QUERY = -1, 178 SDL_GRAB_QUERY = -1,
141 SDL_GRAB_ON = 1 180 SDL_GRAB_ON = 1
142 } SDL_GrabMode; 181 } SDL_GrabMode;
143 182
144 struct SDL_SysWMinfo; 183 struct SDL_SysWMinfo;
145 184
146 /* Obsolete or renamed key codes */ 185 /**
147 186 * \name Obsolete or renamed key codes
148 /* These key constants were renamed for clarity or consistency. */ 187 */
188 /*@{*/
189
190 /**
191 * \name Renamed keys
192 *
193 * These key constants were renamed for clarity or consistency.
194 */
195 /*@{*/
149 #define SDLK_0 '0' 196 #define SDLK_0 '0'
150 #define SDLK_1 '1' 197 #define SDLK_1 '1'
151 #define SDLK_2 '2' 198 #define SDLK_2 '2'
152 #define SDLK_3 '3' 199 #define SDLK_3 '3'
153 #define SDLK_4 '4' 200 #define SDLK_4 '4'
212 #define SDLK_KP8 SDLK_KP_8 259 #define SDLK_KP8 SDLK_KP_8
213 #define SDLK_KP9 SDLK_KP_9 260 #define SDLK_KP9 SDLK_KP_9
214 #define SDLK_NUMLOCK SDLK_NUMLOCKCLEAR 261 #define SDLK_NUMLOCK SDLK_NUMLOCKCLEAR
215 #define SDLK_SCROLLOCK SDLK_SCROLLLOCK 262 #define SDLK_SCROLLOCK SDLK_SCROLLLOCK
216 #define SDLK_PRINT SDLK_PRINTSCREEN 263 #define SDLK_PRINT SDLK_PRINTSCREEN
217 264 /*@}*//*Renamed keys*/
218 /* The META modifier is equivalent to the GUI modifier from the USB standard */ 265
266 /**
267 * \name META modifier
268 *
269 * The META modifier is equivalent to the GUI modifier from the USB standard.
270 */
271 /*@{*/
219 #define KMOD_LMETA KMOD_LGUI 272 #define KMOD_LMETA KMOD_LGUI
220 #define KMOD_RMETA KMOD_RGUI 273 #define KMOD_RMETA KMOD_RGUI
221 #define KMOD_META KMOD_GUI 274 #define KMOD_META KMOD_GUI
222 275 /*@}*//*META modifier*/
223 /* These keys don't appear in the USB specification (or at least not under those names). I'm unsure if the following assignments make sense or if these codes should be defined as actual additional SDLK_ constants. */ 276
277 /**
278 * \name Not in USB
279 *
280 * These keys don't appear in the USB specification (or at least not under
281 * those names). I'm unsure if the following assignments make sense or if these
282 * codes should be defined as actual additional SDLK_ constants.
283 */
284 /*@{*/
224 #define SDLK_LSUPER SDLK_LMETA 285 #define SDLK_LSUPER SDLK_LMETA
225 #define SDLK_RSUPER SDLK_RMETA 286 #define SDLK_RSUPER SDLK_RMETA
226 #define SDLK_COMPOSE SDLK_APPLICATION 287 #define SDLK_COMPOSE SDLK_APPLICATION
227 #define SDLK_BREAK SDLK_STOP 288 #define SDLK_BREAK SDLK_STOP
228 #define SDLK_EURO SDLK_2 289 #define SDLK_EURO SDLK_2
229 290 /*@}*//*Not in USB*/
291
292 /*@}*//*Obsolete or renamed key codes*/
230 293
231 #define SDL_SetModuleHandle(x) 294 #define SDL_SetModuleHandle(x)
232 #define SDL_AllocSurface SDL_CreateRGBSurface 295 #define SDL_AllocSurface SDL_CreateRGBSurface
233 296
234 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void); 297 extern DECLSPEC const SDL_version *SDLCALL SDL_Linked_Version(void);
285 extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void); 348 extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
286 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval); 349 extern DECLSPEC int SDLCALL SDL_EnableKeyRepeat(int delay, int interval);
287 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval); 350 extern DECLSPEC void SDLCALL SDL_GetKeyRepeat(int *delay, int *interval);
288 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable); 351 extern DECLSPEC int SDLCALL SDL_EnableUNICODE(int enable);
289 352
353 /*@}*//*Compatibility*/
354
290 /* Ends C function definitions when using C++ */ 355 /* Ends C function definitions when using C++ */
291 #ifdef __cplusplus 356 #ifdef __cplusplus
292 /* *INDENT-OFF* */ 357 /* *INDENT-OFF* */
293 } 358 }
294 /* *INDENT-ON* */ 359 /* *INDENT-ON* */