Added documentation on flags for Overlay. Made core_memleak an author test
[sdlgit/SDL_perl.git] / lib / SDL / Constants.pm
1 #!/usr/bin/env perl
2 #
3 # Constants.pm
4 #
5 # Copyright (C) 2005 David J. Goehrig <dgoehrig@cpan.org>
6 #
7 # ------------------------------------------------------------------------------
8 #
9 # This library is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU Lesser General Public
11 # License as published by the Free Software Foundation; either
12 # version 2.1 of the License, or (at your option) any later version.
13
14 # This library is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # Lesser General Public License for more details.
18
19 # You should have received a copy of the GNU Lesser General Public
20 # License along with this library; if not, write to the Free Software
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
22 #
23 # ------------------------------------------------------------------------------
24 #
25 # Please feel free to send questions, suggestions or improvements to:
26 #
27 #       David J. Goehrig
28 #       dgoehrig@cpan.org
29 #
30
31 package SDL::Constants;
32 use strict;
33 use warnings;
34 use base 'Exporter';
35
36 our @EXPORT=qw(
37         AUDIO_S16
38         AUDIO_S16MSB
39         AUDIO_S8
40         AUDIO_U16
41         AUDIO_U16MSB
42         AUDIO_U8
43         CD_ERROR
44         CD_PAUSED
45         CD_PLAYING
46         CD_STOPPED
47         CD_TRAYEMPTY
48         INADDR_ANY
49         INADDR_NONE
50         KMOD_ALT
51         KMOD_CAPS
52         KMOD_CTRL
53         KMOD_LALT
54         KMOD_LCTRL
55         KMOD_LSHIFT
56         KMOD_NONE
57         KMOD_NUM
58         KMOD_RALT
59         KMOD_RCTRL
60         KMOD_RSHIFT
61         KMOD_SHIFT
62         MIX_DEFAULT_CHANNELS
63         MIX_DEFAULT_FORMAT
64         MIX_DEFAULT_FREQUENCY
65         MIX_FADING_IN
66         MIX_FADING_OUT
67         MIX_MAX_VOLUME
68         MIX_NO_FADING
69         SDLK_0
70         SDLK_1
71         SDLK_2
72         SDLK_3
73         SDLK_4
74         SDLK_5
75         SDLK_6
76         SDLK_7
77         SDLK_8
78         SDLK_9
79         SDLK_AMPERSAND
80         SDLK_ASTERISK
81         SDLK_AT
82         SDLK_BACKQUOTE
83         SDLK_BACKSLASH
84         SDLK_BACKSPACE
85         SDLK_BREAK
86         SDLK_CAPSLOCK
87         SDLK_CARET
88         SDLK_CLEAR
89         SDLK_COLON
90         SDLK_COMMA
91         SDLK_DELETE
92         SDLK_DOLLAR
93         SDLK_DOWN
94         SDLK_END
95         SDLK_EQUALS
96         SDLK_ESCAPE
97         SDLK_EURO
98         SDLK_EXCLAIM
99         SDLK_F1
100         SDLK_F10
101         SDLK_F11
102         SDLK_F12
103         SDLK_F13
104         SDLK_F14
105         SDLK_F15
106         SDLK_F2
107         SDLK_F3
108         SDLK_F4
109         SDLK_F5
110         SDLK_F6
111         SDLK_F7
112         SDLK_F8
113         SDLK_F9
114         SDLK_GREATER
115         SDLK_HASH
116         SDLK_HELP
117         SDLK_HOME
118         SDLK_INSERT
119         SDLK_KP0
120         SDLK_KP1
121         SDLK_KP2
122         SDLK_KP3
123         SDLK_KP4
124         SDLK_KP5
125         SDLK_KP6
126         SDLK_KP7
127         SDLK_KP8
128         SDLK_KP9
129         SDLK_KP_DIVIDE
130         SDLK_KP_ENTER
131         SDLK_KP_EQUALS
132         SDLK_KP_MINUS
133         SDLK_KP_MULTIPLY
134         SDLK_KP_PERIOD
135         SDLK_KP_PLUS
136         SDLK_LALT
137         SDLK_LCTRL
138         SDLK_LEFT
139         SDLK_LEFTBRACKET
140         SDLK_LEFTPAREN
141         SDLK_LESS
142         SDLK_LMETA
143         SDLK_LSHIFT
144         SDLK_LSUPER
145         SDLK_MENU
146         SDLK_MINUS
147         SDLK_MODE
148         SDLK_NUMLOCK
149         SDLK_PAGEDOWN
150         SDLK_PAGEUP
151         SDLK_PAUSE
152         SDLK_PERIOD
153         SDLK_PLUS
154         SDLK_POWER
155         SDLK_PRINT
156         SDLK_QUESTION
157         SDLK_QUOTE
158         SDLK_QUOTEDBL
159         SDLK_RALT
160         SDLK_RCTRL
161         SDLK_RETURN
162         SDLK_RIGHT
163         SDLK_RIGHTBRACKET
164         SDLK_RIGHTPAREN
165         SDLK_RMETA
166         SDLK_RSHIFT
167         SDLK_RSUPER
168         SDLK_SCROLLOCK
169         SDLK_SEMICOLON
170         SDLK_SLASH
171         SDLK_SPACE
172         SDLK_SYSREQ
173         SDLK_TAB
174         SDLK_UNDERSCORE
175         SDLK_UP
176         SDLK_a
177         SDLK_b
178         SDLK_c
179         SDLK_d
180         SDLK_e
181         SDLK_f
182         SDLK_g
183         SDLK_h
184         SDLK_i
185         SDLK_j
186         SDLK_k
187         SDLK_l
188         SDLK_m
189         SDLK_n
190         SDLK_o
191         SDLK_p
192         SDLK_q
193         SDLK_r
194         SDLK_s
195         SDLK_t
196         SDLK_u
197         SDLK_v
198         SDLK_w
199         SDLK_x
200         SDLK_y
201         SDLK_z
202         SDL_ACTIVEEVENT
203         SDL_ANYFORMAT
204         SDL_APPACTIVE
205         SDL_APPINPUTFOCUS
206         SDL_APPMOUSEFOCUS
207         SDL_ASYNCBLIT
208         SDL_AUDIO_PAUSED
209         SDL_AUDIO_PLAYING
210         SDL_AUDIO_STOPPED
211         SDL_BUTTON_LEFT
212         SDL_BUTTON_MIDDLE
213         SDL_BUTTON_RIGHT
214         SDL_BUTTON_WHEELUP
215         SDL_BUTTON_WHEELDOWN
216         SDL_DOUBLEBUF
217         SDL_ENABLE
218         SDL_FULLSCREEN
219         SDL_GL_ACCUM_ALPHA_SIZE
220         SDL_GL_ACCUM_BLUE_SIZE
221         SDL_GL_ACCUM_GREEN_SIZE
222         SDL_GL_ACCUM_RED_SIZE
223         SDL_GL_ALPHA_SIZE
224         SDL_GL_BLUE_SIZE
225         SDL_GL_BUFFER_SIZE
226         SDL_GL_DEPTH_SIZE
227         SDL_GL_DOUBLEBUFFER
228         SDL_GL_GREEN_SIZE
229         SDL_GL_RED_SIZE
230         SDL_GL_STENCIL_SIZE
231         SDL_GRAB_OFF
232         SDL_GRAB_ON
233         SDL_GRAB_QUERY
234         SDL_HAT_CENTERED
235         SDL_HAT_DOWN
236         SDL_HAT_LEFT
237         SDL_HAT_LEFTDOWN
238         SDL_HAT_LEFTUP
239         SDL_HAT_RIGHT
240         SDL_HAT_RIGHTDOWN
241         SDL_HAT_RIGHTUP
242         SDL_HAT_UP
243         SDL_HWACCEL
244         SDL_HWPALETTE
245         SDL_HWSURFACE
246         SDL_IGNORE
247         SDL_INIT_AUDIO
248         SDL_INIT_CDROM
249         SDL_INIT_EVERYTHING
250         SDL_INIT_JOYSTICK
251         SDL_INIT_NOPARACHUTE
252         SDL_INIT_TIMER
253         SDL_INIT_VIDEO
254         SDL_IYUV_OVERLAY
255         SDL_JOYAXISMOTION
256         SDL_JOYBALLMOTION
257         SDL_JOYBUTTONDOWN
258         SDL_JOYBUTTONUP
259         SDL_JOYHATMOTION
260         SDL_KEYDOWN
261         SDL_KEYUP
262         SDL_MIX_MAXVOLUME
263         SDL_MOUSEBUTTONDOWN
264         SDL_MOUSEBUTTONUP
265         SDL_MOUSEMOTION
266         SDL_OPENGL
267         SDL_OPENGLBLIT
268         SDL_PREALLOC
269         SDL_PRESSED
270         SDL_QUERY
271         SDL_QUIT
272         SDL_RELEASED
273         SDL_RESIZABLE
274         SDL_RLEACCEL
275         SDL_RLEACCELOK
276         SDL_SRCALPHA
277         SDL_SRCCOLORKEY
278         SDL_SWSURFACE
279         SDL_SYSWMEVENT
280         SDL_UYVY_OVERLAY
281         SDL_VIDEOEXPOSE
282         SDL_VIDEORESIZE
283         SDL_YUY2_OVERLAY
284         SDL_YV12_OVERLAY
285         SDL_YVYU_OVERLAY
286         SMPEG_ERROR
287         SMPEG_PLAYING
288         SMPEG_STOPPED
289         TEXT_BLENDED
290         TEXT_SHADED
291         TEXT_SOLID
292         TTF_STYLE_BOLD
293         TTF_STYLE_ITALIC
294         TTF_STYLE_NORMAL
295         TTF_STYLE_UNDERLINE
296         UNICODE_BLENDED
297         UNICODE_SHADED
298         UNICODE_SOLID
299         UTF8_BLENDED
300         UTF8_SHADED
301         UTF8_SOLID
302         SDL_SVG_FLAG_DIRECT
303         SDL_SVG_FLAG_COMPOSITE
304         SDL_SAMPLEFLAG_NONE
305         SDL_SAMPLEFLAG_CANSEEK
306         SDL_SAMPLEFLAG_EOF
307         SDL_SAMPLEFLAG_ERROR
308         SDL_SAMPLEFLAG_EAGAIN
309 );
310
311 use constant {
312     AUDIO_S16    => 32784,
313     AUDIO_S16MSB => 36880,
314     AUDIO_S8     => 32776,
315     AUDIO_U16    => 16,
316     AUDIO_U16MSB => 4112,
317     AUDIO_U8     => 8,
318     
319     CD_ERROR     => -1,
320     CD_PAUSED    => 3,
321     CD_PLAYING   => 2,
322     CD_STOPPED   => 1,
323     CD_TRAYEMPTY => 0,
324     
325     INADDR_ANY  => 0,
326     INADDR_NONE => -1,
327     
328     KMOD_ALT    => 768,
329     KMOD_CAPS   => 8192,
330     KMOD_CTRL   => 192,
331     KMOD_LALT   => 256,
332     KMOD_LCTRL  => 64,
333     KMOD_LSHIFT => 1,
334     KMOD_NONE   => 0,
335     KMOD_NUM    => 4096,
336     KMOD_RALT   => 512,
337     KMOD_RCTRL  => 128,
338     KMOD_RSHIFT => 2,
339     KMOD_SHIFT  => 3,
340     
341     MIX_DEFAULT_CHANNELS  => 2,
342     MIX_DEFAULT_FORMAT    => 32784,
343     MIX_DEFAULT_FREQUENCY => 22050,
344     MIX_FADING_IN         => 2,
345     MIX_FADING_OUT        => 1,
346     MIX_MAX_VOLUME        => 128,
347     MIX_NO_FADING         => 0,
348     
349     SDLK_0            => 48,
350     SDLK_1            => 49,
351     SDLK_2            => 50,
352     SDLK_3            => 51,
353     SDLK_4            => 52,
354     SDLK_5            => 53,
355     SDLK_6            => 54,
356     SDLK_7            => 55,
357     SDLK_8            => 56,
358     SDLK_9            => 57,
359     SDLK_AMPERSAND    => 38,
360     SDLK_ASTERISK     => 42,
361     SDLK_AT           => 64,
362     SDLK_BACKQUOTE    => 96,
363     SDLK_BACKSLASH    => 92,
364     SDLK_BACKSPACE    => 8,
365     SDLK_BREAK        => 318,
366     SDLK_CAPSLOCK     => 301,
367     SDLK_CARET        => 94,
368     SDLK_CLEAR        => 12,
369     SDLK_COLON        => 58,
370     SDLK_COMMA        => 44,
371     SDLK_DELETE       => 127,
372     SDLK_DOLLAR       => 36,
373     SDLK_DOWN         => 274,
374     SDLK_END          => 279,
375     SDLK_EQUALS       => 61,
376     SDLK_ESCAPE       => 27,
377     SDLK_EURO         => 321,
378     SDLK_EXCLAIM      => 33,
379     SDLK_F1           => 282,
380     SDLK_F10          => 291,
381     SDLK_F11          => 292,
382     SDLK_F12          => 293,
383     SDLK_F13          => 294,
384     SDLK_F14          => 295,
385     SDLK_F15          => 296,
386     SDLK_F2           => 283,
387     SDLK_F3           => 284,
388     SDLK_F4           => 285,
389     SDLK_F5           => 286,
390     SDLK_F6           => 287,
391     SDLK_F7           => 288,
392     SDLK_F8           => 289,
393     SDLK_F9           => 290,
394     SDLK_GREATER      => 62,
395     SDLK_HASH         => 35,
396     SDLK_HELP         => 315,
397     SDLK_HOME         => 278,
398     SDLK_INSERT       => 277,
399     SDLK_KP0          => 256,
400     SDLK_KP1          => 257,
401     SDLK_KP2          => 258,
402     SDLK_KP3          => 259,
403     SDLK_KP4          => 260,
404     SDLK_KP5          => 261,
405     SDLK_KP6          => 262,
406     SDLK_KP7          => 263,
407     SDLK_KP8          => 264,
408     SDLK_KP9          => 265,
409     SDLK_KP_DIVIDE    => 267,
410     SDLK_KP_ENTER     => 271,
411     SDLK_KP_EQUALS    => 272,
412     SDLK_KP_MINUS     => 269,
413     SDLK_KP_MULTIPLY  => 268,
414     SDLK_KP_PERIOD    => 266,
415     SDLK_KP_PLUS      => 270,
416     SDLK_LALT         => 308,
417     SDLK_LCTRL        => 306,
418     SDLK_LEFT         => 276,
419     SDLK_LEFTBRACKET  => 91,
420     SDLK_LEFTPAREN    => 40,
421     SDLK_LESS         => 60,
422     SDLK_LMETA        => 310,
423     SDLK_LSHIFT       => 304,
424     SDLK_LSUPER       => 311,
425     SDLK_MENU         => 319,
426     SDLK_MINUS        => 45,
427     SDLK_MODE         => 313,
428     SDLK_NUMLOCK      => 300,
429     SDLK_PAGEDOWN     => 281,
430     SDLK_PAGEUP       => 280,
431     SDLK_PAUSE        => 19,
432     SDLK_PERIOD       => 46,
433     SDLK_PLUS         => 43,
434     SDLK_POWER        => 320,
435     SDLK_PRINT        => 316,
436     SDLK_QUESTION     => 63,
437     SDLK_QUOTE        => 39,
438     SDLK_QUOTEDBL     => 34,
439     SDLK_RALT         => 307,
440     SDLK_RCTRL        => 305,
441     SDLK_RETURN       => 13,
442     SDLK_RIGHT        => 275,
443     SDLK_RIGHTBRACKET => 93,
444     SDLK_RIGHTPAREN   => 41,
445     SDLK_RMETA        => 309,
446     SDLK_RSHIFT       => 303,
447     SDLK_RSUPER       => 312,
448     SDLK_SCROLLOCK    => 302,
449     SDLK_SEMICOLON    => 59,
450     SDLK_SLASH        => 47,
451     SDLK_SPACE        => 32,
452     SDLK_SYSREQ       => 317,
453     SDLK_TAB          => 9,
454     SDLK_UNDERSCORE   => 95,
455     SDLK_UP           => 273,
456     SDLK_a            => 97,
457     SDLK_b            => 98,
458     SDLK_c            => 99,
459     SDLK_d            => 100,
460     SDLK_e            => 101,
461     SDLK_f            => 102,
462     SDLK_g            => 103,
463     SDLK_h            => 104,
464     SDLK_i            => 105,
465     SDLK_j            => 106,
466     SDLK_k            => 107,
467     SDLK_l            => 108,
468     SDLK_m            => 109,
469     SDLK_n            => 110,
470     SDLK_o            => 111,
471     SDLK_p            => 112,
472     SDLK_q            => 113,
473     SDLK_r            => 114,
474     SDLK_s            => 115,
475     SDLK_t            => 116,
476     SDLK_u            => 117,
477     SDLK_v            => 118,
478     SDLK_w            => 119,
479     SDLK_x            => 120,
480     SDLK_y            => 121,
481     SDLK_z            => 122,
482     
483     SDL_ACTIVEEVENT => 1,
484     SDL_ANYFORMAT => 268435456,
485     SDL_APPACTIVE => 4,
486     SDL_APPINPUTFOCUS => 2,
487     SDL_APPMOUSEFOCUS => 1,
488     SDL_ASYNCBLIT => 4,
489     
490     SDL_AUDIO_PAUSED  => 2,
491     SDL_AUDIO_PLAYING => 1,
492     SDL_AUDIO_STOPPED => 0,
493     
494     SDL_BUTTON_LEFT      => 1,
495     SDL_BUTTON_MIDDLE    => 2,
496     SDL_BUTTON_RIGHT     => 4,
497     SDL_BUTTON_WHEELUP   => 8,
498     SDL_BUTTON_WHEELDOWN => 16,
499     
500     SDL_DOUBLEBUF => 1073741824,
501     SDL_ENABLE => 1,
502     SDL_FULLSCREEN => -2147483648,
503     
504     SDL_GL_ACCUM_ALPHA_SIZE => 11,
505     SDL_GL_ACCUM_BLUE_SIZE  => 10,
506     SDL_GL_ACCUM_GREEN_SIZE => 9,
507     SDL_GL_ACCUM_RED_SIZE   => 8,
508     SDL_GL_ALPHA_SIZE       => 3,
509     SDL_GL_BLUE_SIZE        => 2,
510     SDL_GL_BUFFER_SIZE      => 4,
511     SDL_GL_DEPTH_SIZE       => 6,
512     SDL_GL_DOUBLEBUFFER     => 5,
513     SDL_GL_GREEN_SIZE       => 1,
514     SDL_GL_RED_SIZE         => 0,
515     SDL_GL_STENCIL_SIZE     => 7,
516     
517     SDL_GRAB_OFF   => 0,
518     SDL_GRAB_ON    => 1,
519     SDL_GRAB_QUERY => -1,
520     
521     SDL_HAT_CENTERED  => 0,
522     SDL_HAT_DOWN      => 4,
523     SDL_HAT_LEFT      => 8,
524     SDL_HAT_LEFTDOWN  => 12,
525     SDL_HAT_LEFTUP    => 9,
526     SDL_HAT_RIGHT     => 2,
527     SDL_HAT_RIGHTDOWN => 6,
528     SDL_HAT_RIGHTUP   => 3,
529     SDL_HAT_UP        => 1,
530     
531     SDL_HWACCEL   => 256,
532     SDL_HWPALETTE => 536870912,
533     SDL_HWSURFACE => 1,
534     
535     SDL_IGNORE => 0,
536     
537     SDL_INIT_AUDIO       => 16,
538     SDL_INIT_CDROM       => 256,
539     SDL_INIT_EVERYTHING  => 65535,
540     SDL_INIT_JOYSTICK    => 512,
541     SDL_INIT_NOPARACHUTE => 1048576,
542     SDL_INIT_TIMER       => 1,
543     SDL_INIT_VIDEO       => 32,
544     
545     SDL_IYUV_OVERLAY => 1448433993,
546     
547     SDL_JOYAXISMOTION => 7,
548     SDL_JOYBALLMOTION => 8,
549     SDL_JOYBUTTONDOWN => 10,
550     SDL_JOYBUTTONUP   => 11,
551     SDL_JOYHATMOTION  => 9,
552     
553     SDL_KEYDOWN => 2,
554     SDL_KEYUP   => 3,
555     
556     SDL_MIX_MAXVOLUME => 128,
557     
558     SDL_MOUSEBUTTONDOWN => 5,
559     SDL_MOUSEBUTTONUP   => 6,
560     SDL_MOUSEMOTION     => 4,
561     
562     SDL_OPENGL     => 2,
563     SDL_OPENGLBLIT => 10,
564     
565     SDL_PREALLOC => 16777216,
566     SDL_PRESSED => 1,
567     SDL_QUERY => -1,
568     SDL_QUIT => 12,
569     SDL_RELEASED => 0,
570     SDL_RESIZABLE => 16,
571     SDL_RLEACCEL => 16384,
572     SDL_RLEACCELOK => 8192,
573     SDL_SRCALPHA => 65536,
574     SDL_SRCCOLORKEY => 4096,
575     SDL_SWSURFACE => 0,
576     SDL_SYSWMEVENT => 13,
577     SDL_UYVY_OVERLAY => 1498831189,
578     SDL_VIDEOEXPOSE => 17,
579     SDL_VIDEORESIZE => 16,
580     SDL_YUY2_OVERLAY => 844715353,
581     SDL_YV12_OVERLAY => 842094169,
582     SDL_YVYU_OVERLAY => 1431918169,
583     
584     SMPEG_ERROR   => -1,
585     SMPEG_PLAYING => 1,
586     SMPEG_STOPPED => 0,
587     
588     TEXT_BLENDED => 4,
589     TEXT_SHADED  => 2,
590     TEXT_SOLID   => 1,
591     
592     TTF_STYLE_BOLD      => 1,
593     TTF_STYLE_ITALIC    => 2,
594     TTF_STYLE_NORMAL    => 0,
595     TTF_STYLE_UNDERLINE => 4,
596     
597     UNICODE_BLENDED => 256,
598     UNICODE_SHADED  => 128,
599     UNICODE_SOLID   => 64,
600     
601     UTF8_BLENDED => 32,
602     UTF8_SHADED  => 16,
603     UTF8_SOLID   => 8,
604     
605     SDL_SVG_FLAG_DIRECT    => 0,
606     SDL_SVG_FLAG_COMPOSITE => 1,
607     
608     SDL_SAMPLEFLAG_NONE    => 0,
609     SDL_SAMPLEFLAG_CANSEEK => 1,
610     SDL_SAMPLEFLAG_EOF     => 1<<29,
611     SDL_SAMPLEFLAG_ERROR   => 1<<30,
612     SDL_SAMPLEFLAG_EAGAIN  => 1<<31,
613 };
614
615 1;