root/trunk/dmpp/SDL.d

Revision 164, 15.8 kB (checked in by FeepingCreature, 1 year ago)
  • Added DMPP
Line 
1 module SDL;
2
3 extern (C) :
4 struct SDL_ActiveEvent { ubyte type, gain, state; }
5 struct SDL_KeyboardEvent { ubyte type, which, state; SDL_keysym keysym; }
6 struct SDL_MouseMotionEvent { ubyte type, which, state; ushort x, y; short xrel, yrel; }
7 struct SDL_MouseButtonEvent { ubyte type, which, button, state; ushort x, y; }
8 struct SDL_JoyAxisEvent { ubyte type, which, axis; short value; }
9 struct SDL_JoyBallEvent { ubyte type, which, ball; short xrel, yrel; }
10 struct SDL_JoyHatEvent { ubyte type, which, hat, value; }
11 struct SDL_JoyButtonEvent { ubyte type, which, button, state; }
12 struct SDL_ResizeEvent { ubyte type; int w, h; }
13 struct SDL_ExposeEvent { ubyte type; }
14 struct SDL_QuitEvent { ubyte type; }
15 struct SDL_UserEvent { ubyte type; int code; void *data1, data2; }
16 struct SDL_SysWMEvent { ubyte type; void *msg; }
17
18 struct SDL_Color { ubyte r,g,b,unused;}
19 struct SDL_Palette { int ncolors; SDL_Color *colors; }
20 struct SDL_PixelFormat { SDL_Palette *palette; ubyte BitsPerPixel, BytesPerPixel, Rloss, Gloss, Bloss, Aloss,
21     Rshift, Gshift, Bshift, Ashift; uint Rmask, Gmask, Bmask, Amask, colorkey; ubyte alpha;
22 }
23 struct SDL_Surface { uint flags; SDL_PixelFormat *format; int w, h; ushort pitch; void *pixels; int offset;
24     void *hwdata; SDL_Rect clip_rect; uint unused; uint locked; void *map; uint format_version; int refcount;
25 }
26 struct SDL_Rect { short x, y; ushort w, h; }
27 struct SDL_VideoInfo { uint hw_available, wm_available, UnusedBits1, UnusedBits2, blit_hw, blit_hw_CC, blit_hw_A,
28     blit_sw, blit_sw_CC, blit_sw_A, blit_fill, UnusedBits3, video_mem; SDL_PixelFormat *vfmt; int current_w, current_h; }
29
30 union SDL_Event {
31     ubyte type;
32     SDL_ActiveEvent active;
33     SDL_KeyboardEvent key;
34     SDL_MouseMotionEvent motion;
35     SDL_MouseButtonEvent button;
36     SDL_JoyAxisEvent jaxis;
37     SDL_JoyBallEvent jball;
38     SDL_JoyHatEvent jhat;
39     SDL_JoyButtonEvent jbutton;
40     SDL_ResizeEvent resize;
41     SDL_ExposeEvent expose;
42     SDL_QuitEvent quit;
43     SDL_UserEvent user;
44     SDL_SysWMEvent syswm;
45 }
46
47 enum SDL_EventType {
48        SDL_NOEVENT = 0,         /* Unused (do not remove) */
49        SDL_ACTIVEEVENT,         /* Application loses/gains visibility */
50        SDL_KEYDOWN,         /* Keys pressed */
51        SDL_KEYUP,           /* Keys released */
52        SDL_MOUSEMOTION,         /* Mouse moved */
53        SDL_MOUSEBUTTONDOWN,     /* Mouse button pressed */
54        SDL_MOUSEBUTTONUP,       /* Mouse button released */
55        SDL_JOYAXISMOTION,       /* Joystick axis motion */
56        SDL_JOYBALLMOTION,       /* Joystick trackball motion */
57        SDL_JOYHATMOTION,        /* Joystick hat position change */
58        SDL_JOYBUTTONDOWN,       /* Joystick button pressed */
59        SDL_JOYBUTTONUP,         /* Joystick button released */
60        SDL_QUIT,            /* User-requested quit */
61        SDL_SYSWMEVENT,          /* System specific event */
62        SDL_EVENT_RESERVEDA,     /* Reserved for future use.. */
63        SDL_EVENT_RESERVEDB,     /* Reserved for future use.. */
64        SDL_VIDEORESIZE,         /* User resized video mode */
65        SDL_VIDEOEXPOSE,         /* Screen needs to be redrawn */
66        SDL_EVENT_RESERVED2,     /* Reserved for future use.. */
67        SDL_EVENT_RESERVED3,     /* Reserved for future use.. */
68        SDL_EVENT_RESERVED4,     /* Reserved for future use.. */
69        SDL_EVENT_RESERVED5,     /* Reserved for future use.. */
70        SDL_EVENT_RESERVED6,     /* Reserved for future use.. */
71        SDL_EVENT_RESERVED7,     /* Reserved for future use.. */
72        /* Events SDL_USEREVENT through SDL_MAXEVENTS-1 are for your use */
73        SDL_USEREVENT = 24,
74        /* This last event is only for bounding internal arrays
75       It is the number of bits in the event mask datatype -- Uint32
76         */
77        SDL_NUMEVENTS = 32
78 };
79
80 enum SDLKey {
81     /* The keyboard syms have been cleverly chosen to map to ASCII */
82     SDLK_UNKNOWN        = 0,
83     SDLK_FIRST      = 0,
84     SDLK_BACKSPACE      = 8,
85     SDLK_TAB        = 9,
86     SDLK_CLEAR      = 12,
87     SDLK_RETURN     = 13,
88     SDLK_PAUSE      = 19,
89     SDLK_ESCAPE     = 27,
90     SDLK_SPACE      = 32,
91     SDLK_EXCLAIM        = 33,
92     SDLK_QUOTEDBL       = 34,
93     SDLK_HASH       = 35,
94     SDLK_DOLLAR     = 36,
95     SDLK_AMPERSAND      = 38,
96     SDLK_QUOTE      = 39,
97     SDLK_LEFTPAREN      = 40,
98     SDLK_RIGHTPAREN     = 41,
99     SDLK_ASTERISK       = 42,
100     SDLK_PLUS       = 43,
101     SDLK_COMMA      = 44,
102     SDLK_MINUS      = 45,
103     SDLK_PERIOD     = 46,
104     SDLK_SLASH      = 47,
105     SDLK_0          = 48,
106     SDLK_1          = 49,
107     SDLK_2          = 50,
108     SDLK_3          = 51,
109     SDLK_4          = 52,
110     SDLK_5          = 53,
111     SDLK_6          = 54,
112     SDLK_7          = 55,
113     SDLK_8          = 56,
114     SDLK_9          = 57,
115     SDLK_COLON      = 58,
116     SDLK_SEMICOLON      = 59,
117     SDLK_LESS       = 60,
118     SDLK_EQUALS     = 61,
119     SDLK_GREATER        = 62,
120     SDLK_QUESTION       = 63,
121     SDLK_AT         = 64,
122     /*
123        Skip uppercase letters
124      */
125     SDLK_LEFTBRACKET    = 91,
126     SDLK_BACKSLASH      = 92,
127     SDLK_RIGHTBRACKET   = 93,
128     SDLK_CARET      = 94,
129     SDLK_UNDERSCORE     = 95,
130     SDLK_BACKQUOTE      = 96,
131     SDLK_a          = 97,
132     SDLK_b          = 98,
133     SDLK_c          = 99,
134     SDLK_d          = 100,
135     SDLK_e          = 101,
136     SDLK_f          = 102,
137     SDLK_g          = 103,
138     SDLK_h          = 104,
139     SDLK_i          = 105,
140     SDLK_j          = 106,
141     SDLK_k          = 107,
142     SDLK_l          = 108,
143     SDLK_m          = 109,
144     SDLK_n          = 110,
145     SDLK_o          = 111,
146     SDLK_p          = 112,
147     SDLK_q          = 113,
148     SDLK_r          = 114,
149     SDLK_s          = 115,
150     SDLK_t          = 116,
151     SDLK_u          = 117,
152     SDLK_v          = 118,
153     SDLK_w          = 119,
154     SDLK_x          = 120,
155     SDLK_y          = 121,
156     SDLK_z          = 122,
157     SDLK_DELETE     = 127,
158     /* End of ASCII mapped keysyms */
159
160     /* International keyboard syms */
161     SDLK_WORLD_0        = 160,      /* 0xA0 */
162     SDLK_WORLD_1        = 161,
163     SDLK_WORLD_2        = 162,
164     SDLK_WORLD_3        = 163,
165     SDLK_WORLD_4        = 164,
166     SDLK_WORLD_5        = 165,
167     SDLK_WORLD_6        = 166,
168     SDLK_WORLD_7        = 167,
169     SDLK_WORLD_8        = 168,
170     SDLK_WORLD_9        = 169,
171     SDLK_WORLD_10       = 170,
172     SDLK_WORLD_11       = 171,
173     SDLK_WORLD_12       = 172,
174     SDLK_WORLD_13       = 173,
175     SDLK_WORLD_14       = 174,
176     SDLK_WORLD_15       = 175,
177     SDLK_WORLD_16       = 176,
178     SDLK_WORLD_17       = 177,
179     SDLK_WORLD_18       = 178,
180     SDLK_WORLD_19       = 179,
181     SDLK_WORLD_20       = 180,
182     SDLK_WORLD_21       = 181,
183     SDLK_WORLD_22       = 182,
184     SDLK_WORLD_23       = 183,
185     SDLK_WORLD_24       = 184,
186     SDLK_WORLD_25       = 185,
187     SDLK_WORLD_26       = 186,
188     SDLK_WORLD_27       = 187,
189     SDLK_WORLD_28       = 188,
190     SDLK_WORLD_29       = 189,
191     SDLK_WORLD_30       = 190,
192     SDLK_WORLD_31       = 191,
193     SDLK_WORLD_32       = 192,
194     SDLK_WORLD_33       = 193,
195     SDLK_WORLD_34       = 194,
196     SDLK_WORLD_35       = 195,
197     SDLK_WORLD_36       = 196,
198     SDLK_WORLD_37       = 197,
199     SDLK_WORLD_38       = 198,
200     SDLK_WORLD_39       = 199,
201     SDLK_WORLD_40       = 200,
202     SDLK_WORLD_41       = 201,
203     SDLK_WORLD_42       = 202,
204     SDLK_WORLD_43       = 203,
205     SDLK_WORLD_44       = 204,
206     SDLK_WORLD_45       = 205,
207     SDLK_WORLD_46       = 206,
208     SDLK_WORLD_47       = 207,
209     SDLK_WORLD_48       = 208,
210     SDLK_WORLD_49       = 209,
211     SDLK_WORLD_50       = 210,
212     SDLK_WORLD_51       = 211,
213     SDLK_WORLD_52       = 212,
214     SDLK_WORLD_53       = 213,
215     SDLK_WORLD_54       = 214,
216     SDLK_WORLD_55       = 215,
217     SDLK_WORLD_56       = 216,
218     SDLK_WORLD_57       = 217,
219     SDLK_WORLD_58       = 218,
220     SDLK_WORLD_59       = 219,
221     SDLK_WORLD_60       = 220,
222     SDLK_WORLD_61       = 221,
223     SDLK_WORLD_62       = 222,
224     SDLK_WORLD_63       = 223,
225     SDLK_WORLD_64       = 224,
226     SDLK_WORLD_65       = 225,
227     SDLK_WORLD_66       = 226,
228     SDLK_WORLD_67       = 227,
229     SDLK_WORLD_68       = 228,
230     SDLK_WORLD_69       = 229,
231     SDLK_WORLD_70       = 230,
232     SDLK_WORLD_71       = 231,
233     SDLK_WORLD_72       = 232,
234     SDLK_WORLD_73       = 233,
235     SDLK_WORLD_74       = 234,
236     SDLK_WORLD_75       = 235,
237     SDLK_WORLD_76       = 236,
238     SDLK_WORLD_77       = 237,
239     SDLK_WORLD_78       = 238,
240     SDLK_WORLD_79       = 239,
241     SDLK_WORLD_80       = 240,
242     SDLK_WORLD_81       = 241,
243     SDLK_WORLD_82       = 242,
244     SDLK_WORLD_83       = 243,
245     SDLK_WORLD_84       = 244,
246     SDLK_WORLD_85       = 245,
247     SDLK_WORLD_86       = 246,
248     SDLK_WORLD_87       = 247,
249     SDLK_WORLD_88       = 248,
250     SDLK_WORLD_89       = 249,
251     SDLK_WORLD_90       = 250,
252     SDLK_WORLD_91       = 251,
253     SDLK_WORLD_92       = 252,
254     SDLK_WORLD_93       = 253,
255     SDLK_WORLD_94       = 254,
256     SDLK_WORLD_95       = 255,      /* 0xFF */
257
258     /* Numeric keypad */
259     SDLK_KP0        = 256,
260     SDLK_KP1        = 257,
261     SDLK_KP2        = 258,
262     SDLK_KP3        = 259,
263     SDLK_KP4        = 260,
264     SDLK_KP5        = 261,
265     SDLK_KP6        = 262,
266     SDLK_KP7        = 263,
267     SDLK_KP8        = 264,
268     SDLK_KP9        = 265,
269     SDLK_KP_PERIOD      = 266,
270     SDLK_KP_DIVIDE      = 267,
271     SDLK_KP_MULTIPLY    = 268,
272     SDLK_KP_MINUS       = 269,
273     SDLK_KP_PLUS        = 270,
274     SDLK_KP_ENTER       = 271,
275     SDLK_KP_EQUALS      = 272,
276
277     /* Arrows + Home/End pad */
278     SDLK_UP         = 273,
279     SDLK_DOWN       = 274,
280     SDLK_RIGHT      = 275,
281     SDLK_LEFT       = 276,
282     SDLK_INSERT     = 277,
283     SDLK_HOME       = 278,
284     SDLK_END        = 279,
285     SDLK_PAGEUP     = 280,
286     SDLK_PAGEDOWN       = 281,
287
288     /* Function keys */
289     SDLK_F1         = 282,
290     SDLK_F2         = 283,
291     SDLK_F3         = 284,
292     SDLK_F4         = 285,
293     SDLK_F5         = 286,
294     SDLK_F6         = 287,
295     SDLK_F7         = 288,
296     SDLK_F8         = 289,
297     SDLK_F9         = 290,
298     SDLK_F10        = 291,
299     SDLK_F11        = 292,
300     SDLK_F12        = 293,
301     SDLK_F13        = 294,
302     SDLK_F14        = 295,
303     SDLK_F15        = 296,
304
305     /* Key state modifier keys */
306     SDLK_NUMLOCK        = 300,
307     SDLK_CAPSLOCK       = 301,
308     SDLK_SCROLLOCK      = 302,
309     SDLK_RSHIFT     = 303,
310     SDLK_LSHIFT     = 304,
311     SDLK_RCTRL      = 305,
312     SDLK_LCTRL      = 306,
313     SDLK_RALT       = 307,
314     SDLK_LALT       = 308,
315     SDLK_RMETA      = 309,
316     SDLK_LMETA      = 310,
317     SDLK_LSUPER     = 311,      /* Left "Windows" key */
318     SDLK_RSUPER     = 312,      /* Right "Windows" key */
319     SDLK_MODE       = 313,      /* "Alt Gr" key */
320     SDLK_COMPOSE        = 314,      /* Multi-key compose key */
321
322     /* Miscellaneous function keys */
323     SDLK_HELP       = 315,
324     SDLK_PRINT      = 316,
325     SDLK_SYSREQ     = 317,
326     SDLK_BREAK      = 318,
327     SDLK_MENU       = 319,
328     SDLK_POWER      = 320,      /* Power Macintosh power key */
329     SDLK_EURO       = 321,      /* Some european keyboards */
330     SDLK_UNDO       = 322,      /* Atari keyboard has Undo */
331
332     /* Add any other keys here */
333
334     SDLK_LAST
335 };
336
337 enum SDLMod {
338     KMOD_NONE  = 0x0000,
339     KMOD_LSHIFT= 0x0001,
340     KMOD_RSHIFT= 0x0002,
341     KMOD_LCTRL = 0x0040,
342     KMOD_RCTRL = 0x0080,
343     KMOD_CTRL  = 0x00C0,
344     KMOD_LALT  = 0x0100,
345     KMOD_RALT  = 0x0200,
346     KMOD_ALT   = 0x0300,
347     KMOD_LMETA = 0x0400,
348     KMOD_RMETA = 0x0800,
349     KMOD_NUM   = 0x1000,
350     KMOD_CAPS  = 0x2000,
351     KMOD_MODE  = 0x4000,
352     KMOD_RESERVED = 0x8000
353 };
354 enum SDL_GrabMode { SDL_GRAB_QUERY=-1, SDL_GRAB_OFF=0, SDL_GRAB_ON=1, SDL_GRAB_FULLSCREEN }
355 enum SDL_GLattr {
356     SDL_GL_RED_SIZE,
357     SDL_GL_GREEN_SIZE,
358     SDL_GL_BLUE_SIZE,
359     SDL_GL_ALPHA_SIZE,
360     SDL_GL_BUFFER_SIZE,
361     SDL_GL_DOUBLEBUFFER,
362     SDL_GL_DEPTH_SIZE,
363     SDL_GL_STENCIL_SIZE,
364     SDL_GL_ACCUM_RED_SIZE,
365     SDL_GL_ACCUM_GREEN_SIZE,
366     SDL_GL_ACCUM_BLUE_SIZE,
367     SDL_GL_ACCUM_ALPHA_SIZE,
368     SDL_GL_STEREO,
369     SDL_GL_MULTISAMPLEBUFFERS,
370     SDL_GL_MULTISAMPLESAMPLES,
371     SDL_GL_ACCELERATED_VISUAL,
372     SDL_GL_SWAP_CONTROL
373 };
374 struct SDL_keysym { ubyte scancode; SDLKey sym; SDLMod mod; ushort unicode; }
375 SDL_VideoInfo *SDL_GetVideoInfo();
376 SDL_Surface * SDL_GetVideoSurface();
377 int SDL_WM_ToggleFullScreen(SDL_Surface *surface);
378 SDL_GrabMode SDL_WM_GrabInput(SDL_GrabMode mode);
379 int SDL_WM_IconifyWindow();
380 void SDL_WM_SetCaption(char *title, char *icon);
381 char *SDL_GetKeyName(SDLKey key);
382 int SDL_GL_SetAttribute(SDL_GLattr attr, int value);
383 int SDL_GL_GetAttribute(SDL_GLattr attr, int* value);
384 SDL_Surface * SDL_SetVideoMode(int width, int height, int bpp, uint flags);
385 void SDL_Quit();
386 char *SDL_GetError();
387 void SDL_GL_SwapBuffers();
388 int SDL_Init(uint flags);
389 uint SDL_GetTicks();
390 void SDL_ClearError();
391 void SDL_Delay(uint ms);
392 int SDL_PollEvent(SDL_Event *event);
393 int SDL_Flip(SDL_Surface *);
394 int SDL_LockSurface(SDL_Surface *);
395 void SDL_UnlockSurface(SDL_Surface *);
396 int SDL_UpperBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect);
397 alias SDL_UpperBlit SDL_BlitSurface;
398 void SDL_UpdateRects (SDL_Surface *screen, int numrects, SDL_Rect *rects);
399 void SDL_UpdateRect (SDL_Surface *screen, int x, int y, uint w, uint h);
400 int SDL_FillRect (SDL_Surface *dst, SDL_Rect *dstrect, uint color);
401 uint SDL_MapRGB(SDL_PixelFormat *format, ubyte r, ubyte g, ubyte b);
402 void SDL_GetRGB(uint pixel, SDL_PixelFormat *fmt, ubyte *r, ubyte *g, ubyte *b);
403 uint SDL_MapRGBA(SDL_PixelFormat *format, ubyte r, ubyte g, ubyte b, ubyte a);
404 void SDL_GetRGBA(uint pixel, SDL_PixelFormat *fmt, ubyte *r, ubyte *g, ubyte *b, ubyte *a);
405
406 const ubyte SDL_APPMOUSEFOCUS=0x01;
407 const ubyte SDL_APPINPUTFOCUS=0x02;
408 const ubyte SDL_APPACTIVE=0x04;
409 const uint SDL_INIT_TIMER=0x00000001;
410 const uint SDL_INIT_AUDIO=0x00000010;
411 const uint SDL_INIT_VIDEO=0x00000020;
412 const uint SDL_INIT_CDROM=0x00000100;
413 const uint SDL_INIT_JOYSTICK=0x00000200;
414 const uint SDL_INIT_NOPARACHUTE=0x00100000;
415 const uint SDL_INIT_EVENTTHREAD=0x01000000;
416 const uint SDL_INIT_EVERYTHING=0x0000FFFF;
417
418 const uint SDL_SWSURFACE=0x00000000;
419 const uint SDL_HWSURFACE=0x00000001;
420 const uint SDL_ASYNCBLIT=0x00000004;
421 const uint SDL_ANYFORMAT=0x10000000;
422 const uint SDL_HWPALETTE=0x20000000;
423 const uint SDL_DOUBLEBUF=0x40000000;
424 const uint SDL_FULLSCREEN=0x80000000;
425 const uint SDL_OPENGL=0x00000002;
426 const uint SDL_OPENGLBLIT=0x0000000A;
427 const uint SDL_RESIZABLE=0x00000010;
428 const uint SDL_NOFRAME=0x00000020;
429 const uint SDL_HWACCEL=0x00000100; /* Blit uses hardware acceleration */
430 const uint SDL_SRCCOLORKEY=0x00001000; /* Blit uses a source color key */
431 const uint SDL_RLEACCELOK=0x00002000; /* Private flag */
432 const uint SDL_RLEACCEL=0x00004000; /* Surface is RLE encoded */
433 const uint SDL_SRCALPHA=0x00010000; /* Blit uses source alpha blending */
434 const uint SDL_PREALLOC=0x01000000; /* Surface uses preallocated memory */
435
436 const SDL_BUTTON_LEFT=1;
437 const SDL_BUTTON_MIDDLE=2;
438 const SDL_BUTTON_RIGHT=3;
439 const SDL_BUTTON_WHEELUP=4;
440 const SDL_BUTTON_WHEELDOWN=5;
441
442 struct SDL_RWops {
443     /* Seek to 'offset' relative to whence, one of stdio's whence values:
444         SEEK_SET, SEEK_CUR, SEEK_END
445        Returns the final offset in the data source.
446   */
447   int function(SDL_RWops *context, int offset, int whence) seek;
448     /* Read up to 'num' objects each of size 'objsize' from the data
449        source to the area pointed at by 'ptr'.
450        Returns the number of objects read, or -1 if the read failed.
451     */
452   int function(SDL_RWops *context, void *ptr, int size, int maxnum) read;
453     /* Write exactly 'num' objects each of size 'objsize' from the area
454        pointed at by 'ptr' to data source.
455        Returns 'num', or -1 if the write failed.
456   */
457   int function(SDL_RWops *context, void *ptr, int size, int num) write;
458     /* Close and free an allocated SDL_FSops structure */
459     int function(SDL_RWops *context) close;
460     uint type;
461     union hidden {
462     struct {
463       ubyte *base;
464       ubyte *here;
465       ubyte *stop;
466     }
467     struct unknown {
468       void *data1;
469     }
470     };
471 }
472 SDL_RWops *SDL_RWFromFile(char *file, char *mode);
473 SDL_RWops *SDL_RWFromMem(void *mem, int size);
474 int SDL_SaveBMP_RW(SDL_Surface *surface, SDL_RWops *dst, int freedst);
475 SDL_Surface *SDL_LoadBMP_RW(SDL_RWops *src, int freesrc);
476 SDL_Surface *SDL_CreateRGBSurface(uint flags, int width, int height, int depth, uint Rmask, uint Gmask, uint Bmask, uint Amask);
477 void SDL_FreeSurface(SDL_Surface*);
478
479
480 /// SDL audio
481 struct SDL_AudioSpec {
482     int freq;       /* DSP frequency -- samples per second -- 44100? */
483     ushort format;      /* Audio data format */
484     ubyte  channels;    /* Number of channels: 1 mono, 2 stereo */
485     ubyte  silence;     /* Audio buffer silence value (calculated) */
486     ushort samples;     /* Audio buffer size in samples (power of 2) */
487     ushort padding;     /* Necessary for some compile environments */
488     uint size;      /* Audio buffer size in bytes (calculated) */
489     /* This function is called when the audio device needs more data.
490        'stream' is a pointer to the audio data buffer
491        'len' is the length of that buffer in bytes.
492        Once the callback returns, the buffer will no longer be valid.
493        Stereo samples are stored in a LRLRLR ordering.
494     */
495     void function(void *userdata, ubyte *stream, int len) callback;
496     void *userdata;
497 }
498 int SDL_OpenAudio(SDL_AudioSpec *desired, SDL_AudioSpec *obtained);
499 void SDL_PauseAudio(int pause_on);
500 const AUDIO_U8=0x0008;
501 const AUDIO_S8=0x8008;
502 const AUDIO_U16LSB=0x0010;
503 const AUDIO_S16LSB=0x8010;
504 const AUDIO_U16MSB=0x1010;
505 const AUDIO_S16MSB=0x9010;
506 alias AUDIO_U16LSB AUDIO_U16;
507 alias AUDIO_S16LSB AUDIO_S16;
508
509 struct SDL_Cursor {
510     SDL_Rect area;          /* The area of the mouse cursor */
511     short hot_x, hot_y;     /* The "tip" of the cursor */
512     ubyte *data;            /* B/W cursor data */
513     ubyte *mask;            /* B/W cursor mask */
514     ubyte *save[2];         /* Place to save cursor area */
515     void *wm_cursor;        /* Window-manager cursor */
516 }
517 void *SDL_SetCursor(SDL_Cursor *);
Note: See TracBrowser for help on using the browser.