1 [CCode (cprefix="SDL_", cheader_filename="SDL.h")]
6 [Flags, CCode (cname="int", cprefix="SDL_INIT_", has_type_id = false)]
8 TIMER, AUDIO, VIDEO, CDROM, JOYSTICK,
9 NOPARACHUTE, EVENTTHREAD, EVERYTHING
12 [CCode (cname="SDL_Init")]
13 public static int init(uint32 flags = SDL.InitFlag.EVERYTHING);
15 [CCode (cname="SDL_InitSubSystem")]
16 public static int init_subsystem(uint32 flags);
18 [CCode (cname="SDL_WasInit")]
19 public static uint32 get_initialized(uint32 flags);
21 [CCode (cname="SDL_Quit")]
22 public static void quit();
24 [CCode (cname="SDL_QuitSubSystem")]
25 public static void quit_subsystem(uint32 flags);
27 [CCode (type_id="SDL_version", cheader_filename="SDL_version.h", cname="SDL_version")]
28 public class Version {
33 [CCode (cheader_filename="SDL_version.h", cname="SDL_Linked_Version")]
34 public static unowned Version linked();
41 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
43 ENOMEM, EFREAD, EFWRITE, EFSEEK,
44 UNSUPPORTED, LASTERROR
47 [CCode (cname="SDL_SetError")]
48 public static void set_error(string format, ...);
50 [CCode (cname="SDL_GetError")]
51 public static unowned string get_error();
53 [CCode (cname="SDL_ClearError")]
54 public static void clear_error();
56 [CCode (cname="SDL_Error")]
57 public static void error(Error code);
63 [CCode (cname="int", cprefix="SDL_ALPHA_", has_type_id = false)]
70 [CCode (cname="SDL_VideoDriverName")]
71 public static unowned string? driver_name(string namebuf, int maxlen);
73 [CCode (cname="SDL_SetGamma")]
74 public static int set_gamma(float red, float green, float blue);
76 [CCode (cname="SDL_SetGammaRamp")]
77 public static int set_gamma_ramp(uint16* red, uint16* green, uint16* blue);
79 [CCode (cname="SDL_GetGammaRamp")]
80 public static int get_gamma_ramp(uint16* red, uint16* green, uint16* blue);
82 [CCode (cname="SDL_ListModes")]
83 public static void* _list_modes(PixelFormat? format, uint32 flags);
85 [CCode (array_length = false, array_null_terminated = true)]
86 public static unowned SDL.Rect*[]? list_modes(SDL.PixelFormat? format, uint32 flags, out bool any) {
87 var p = SDL.Video._list_modes (format, flags);
88 any = ((int) p == -1);
89 return any ? null : (SDL.Rect*[]?) p;
93 [Flags, CCode (cname="int", cprefix="SDL_", has_type_id = false)]
94 public enum SurfaceFlag {
95 SWSURFACE, HWSURFACE, ASYNCBLIT, ANYFORMAT, HWPALETTE, DOUBLEBUF,
96 FULLSCREEN, OPENGL, OPENGLBLIT, RESIZABLE, NOFRAME, HWACCEL,
97 SRCCOLORKEY, RLEACCEL, SRCALPHA
100 [CCode (cname="SDL_Surface", free_function="SDL_FreeSurface", copy_function="SDL_DisplayFormat")]
102 public class Surface {
104 public PixelFormat? format;
109 public int ref_count;
111 [CCode (cname="SDL_CreateRGBSurface")]
112 public Surface.RGB(uint32 flags, int width, int height, int depth,
113 uint32 rmask, uint32 gmask, uint32 bmask, uint32 amask);
115 [CCode (cname="SDL_CreateRGBSurfaceFrom")]
116 public Surface.from_RGB(void* pixels, int width, int height, int depth,
117 int pitch, uint32 rmask, uint32 gmask, uint32 bmask, uint32 amask);
119 [CCode (cname="SDL_LoadBMP_RW")]
120 public static Surface.load(RWops src, int freesrc=0);
123 [CCode (cname="SDL_UpdateRects")]
124 public void update_rects ([CCode (array_length_pos=0.9)] Rect[] rects);
126 [CCode (cname="SDL_UpdateRect")]
127 public void update_rect (int32 x, int32 y, uint32 w, uint32 h);
129 [CCode (cname="SDL_Flip")]
132 [CCode (cname="SDL_SetColors")]
133 public int set_colors ([CCode (array_length_pos=-1)] Color[] colors, int firstcolor = 0);
135 [CCode (cname="SDL_SetPalette")]
136 public int set_palette (PaletteFlags flags, [CCode (array_length_pos=-1)] Color[] colors, int firstcolor = 0);
138 [CCode (cname="SDL_LockSurface")]
139 public int do_lock();
141 [CCode (cname="SDL_UnlockSurface")]
142 public void unlock();
144 [CCode (cname="SDL_SaveBMP_RW")]
145 public int save(RWops dst, int freedst=0);
147 [CCode (cname="SDL_SetColorKey")]
148 public int set_colorkey(uint32 flag, uint32 key);
150 [CCode (cname="SDL_SetAlpha")]
151 public int set_alpha(uint32 flag, uchar alpha);
153 [CCode (cname="SDL_SetClipRect")]
154 public bool set_cliprect(Rect? rect);
156 [CCode (cname="SDL_GetClipRect")]
157 public void get_cliprect(out Rect rect);
159 [CCode (cname="SDL_ConvertSurface")]
160 public Surface? convert(PixelFormat? fmt, uint32 flags);
162 [CCode (cname="SDL_UpperBlit")]
163 public int blit(Rect? srcrect, Surface dst, Rect? dstrect);
165 [CCode (cname="SDL_FillRect")]
166 public int fill(Rect? dst, uint32 color);
169 [CCode (cname="SDL_Surface")]
171 public class Screen : Surface {
172 [CCode (cname="SDL_GetVideoSurface")]
173 public static unowned Screen instance();
175 [CCode (cname="SDL_SetVideoMode")]
176 public static unowned Screen? set_video_mode(int width, int height, int bpp, uint32 flags);
178 [CCode (cname="SDL_VideoModeOK")]
179 public static int check_video_mode(int width, int height, int bpp, uint32 flags);
182 [CCode (cname="SDL_PixelFormat", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
183 public struct PixelFormat {
184 public Palette? palette;
185 public uchar BitsPerPixel;
186 public uchar BytesPerPixel;
200 public uint32 colorkey;
203 [CCode (cname="SDL_MapRGB")]
204 public uint32 map_rgb(uchar r, uchar g, uchar b);
206 [CCode (cname="SDL_MapRGBA")]
207 public uint32 map_rgba(uchar r, uchar g, uchar b, uchar a);
209 [CCode (cname="SDL_GetRGB", instance_pos=1.2)]
210 public void get_rgb (uint32 pixel, ref uchar r, ref uchar g, ref uchar b);
212 [CCode (cname="SDL_GetRGBA", instance_pos=1.2)]
213 public void get_rgba (uint32 pixel, ref uchar r, ref uchar g, ref uchar b, ref uchar a);
216 [CCode (cname="SDL_Rect", has_type_id=false)]
224 [CCode (cname="SDL_Color", has_type_id=false)]
226 public struct Color {
233 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
234 public enum PaletteFlags {
238 [CCode (cname="SDL_Palette", has_copy_function = false, has_destroy_function = false, has_type_id = false)]
239 public struct Palette {
240 [CCode (array_length_cname="ncolors")]
241 public Color[] colors;
244 [CCode (cname="SDL_VideoInfo")]
246 public class VideoInfo {
247 public uint32 hw_available ;
248 public uint32 wm_available ;
249 public uint32 UnusedBits1 ;
250 public uint32 UnusedBits2 ;
251 public uint32 blit_hw ;
252 public uint32 bliw_hw_CC ;
253 public uint32 blit_hw_A ;
254 public uint32 blit_sw ;
255 public uint32 blit_sw_CC ;
256 public uint32 blit_sw_A ;
257 public uint32 blit_fill ;
258 public uint32 UnusedBits3 ;
260 public uint32 video_mem;
261 public PixelFormat? vfmt;
262 public int current_w;
263 public int current_h;
265 [CCode (cname="SDL_GetVideoInfo")]
266 public static unowned VideoInfo get();
269 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
270 public enum OverlayFormat {
271 YV12_OVERLAY, IYUV_OVERLAY, YUY2_OVERLAY,
272 UYVY_OVERLAY, YVYU_OVERLAY
275 [CCode (cname="SDL_Overlay", free_function="SDL_FreeYUVOverlay")]
277 public class Overlay {
278 public uint32 format;
288 [CCode (cname="SDL_CreateYUVOverlay")]
289 public Overlay(int width, int height, OverlayFormat format, Surface display);
291 [CCode (cname="SDL_LockYUVOverlay")]
292 public int do_lock();
294 [CCode (cname="SDL_UnlockYUVOverlay")]
295 public void unlock();
297 [CCode (cname="SDL_DisplayYUVOverlay")]
298 public void display(Rect dst);
305 [CCode (cname="SDL_RWops", free_function="SDL_FreeRW")]
308 [CCode (cname="SDL_RWFromFile")]
309 public RWops.from_file(string file, string mode);
311 [CCode (cname="SDL_RWFromMem")]
312 public RWops.from_mem(void* mem, int size);
319 [CCode (cname="int", cprefix="SDL_GL_", has_type_id = false)]
321 RED_SIZE, GREEN_SIZE, BLUE_SIZE, ALPHA_SIZE,
322 BUFFER_SIZE, DOUBLEBUFFER, DEPTH_SIZE, STENCIL_SIZE,
323 ACCUM_RED_SIZE, ACCUM_GREEN_SIZE, ACCUM_BLUE_SIZE,
324 ACCUM_ALPHA_SIZE, STEREO, MULTISAMPLEBUFFERS,
325 MULTISAMPLESAMPLES, ACCELERATED_VISUAL, SWAP_CONTROL
328 [CCode (cprefix="SDL_GL_", cheader_filename="SDL.h")]
331 [CCode (cname="SDL_GL_LoadLibrary")]
332 public static int load_library(string path);
334 [CCode (cname="SDL_GL_GetProcAddress")]
335 public static void* get_proc_address(string proc);
337 [CCode (cname="SDL_GL_SetAttribute")]
338 public static int set_attribute(GLattr attr, int val);
340 [CCode (cname="SDL_GL_GetAttribute")]
341 public static int get_attribute(GLattr attr, ref int val);
343 [CCode (cname="SDL_GL_SwapBuffers")]
344 public static void swap_buffers();
351 [CCode (cname="int", cprefix="SDL_GRAB_", has_type_id = false)]
352 public enum GrabMode {
356 [CCode (cprefix="SDL_WM_", cheader_filename="SDL.h")]
358 public class WindowManager {
359 [CCode (cname="SDL_WM_SetCaption")]
360 public static void set_caption(string title, string icon);
362 [CCode (cname="SDL_WM_GetCaption")]
363 public static void get_caption(out string title, out string icon);
365 [CCode (cname="SDL_WM_SetIcon")]
366 public static void set_icon(Surface icon, uchar* mask);
368 [CCode (cname="SDL_WM_IconifyWindow")]
369 public static int iconify();
371 [CCode (cname="SDL_WM_ToggleFullScreen")]
372 public static int toggle_fullscreen(Surface surface);
374 [CCode (cname="SDL_WM_GrabInput")]
375 public static GrabMode grab_input(GrabMode mode);
382 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
383 public enum EventType {
384 NOEVENT, ACTIVEEVENT, KEYDOWN, KEYUP, MOUSEMOTION,
385 MOUSEBUTTONDOWN, MOUSEBUTTONUP, JOYAXISMOTION,
386 JOYBALLMOTION, JOYHATMOTION, JOYBUTTONDOWN, JOYBUTTONUP,
387 QUIT, SYSWMEVENT, VIDEORESIZE, VIDEOEXPOSE, USEREVENT,
391 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
392 public enum EventMask {
393 ACTIVEEVENTMASK, KEYDOWNMASK, KEYUPMASK, KEYEVENTMASK,
394 MOUSEMOTIONMASK, MOUSEBUTTONDOWNMASK, MOUSEBUTTONUPMASK,
395 MOUSEEVENTMASK, JOYAXISMOTIONMASK, JOYBALLMOTIONMASK,
396 JOYHATMOTIONMASK, JOYBUTTONDOWNMASK, JOYBUTTONUPMASK,
397 JOYEVENTMASK, VIDEORESIZEMASK, VIDEOEXPOSEMASK, QUITMASK,
401 [CCode (cname="SDL_MouseButtonEvent", has_type_id=false)]
402 public struct MouseButtonEvent {
411 [CCode (cheader_filename="SDL_active.h", cname="int", cprefix="SDL_APP", has_type_id = false)]
412 public enum ActiveState {
418 [CCode (cname="SDL_ActiveEvent", has_type_id=false)]
419 public struct ActiveEvent {
425 [CCode (cname="SDL_KeyboardEvent", has_type_id=false)]
426 public struct KeyboardEvent {
433 [CCode (cname="SDL_MouseMotionEvent", has_type_id=false)]
434 public struct MouseMotionEvent {
444 [CCode (cname="SDL_JoyAxisEvent", has_type_id=false)]
445 public struct JoyAxisEvent {
449 public uint16 @value;
452 [CCode (cname="SDL_JoyBallEvent", has_type_id=false)]
453 public struct JoyBallEvent {
461 [CCode (cname="SDL_JoyHatEvent", has_type_id=false)]
462 public struct JoyHatEvent {
469 [CCode (cname="SDL_JoyButtonEvent", has_type_id=false)]
470 public struct JoyButtonEvent {
477 [CCode (cname="SDL_ResizeEvent", has_type_id=false)]
478 public struct ResizeEvent {
484 [CCode (cname="SDL_ExposeEvent", has_type_id=false)]
485 public struct ExposeEvent {
489 [CCode (cname="SDL_QuitEvent", has_type_id=false)]
490 public struct QuitEvent {
494 [CCode (cname="SDL_UserEvent", has_type_id=false)]
495 public struct UserEvent {
502 [CCode (cname="SDL_SysWMEvent", has_type_id=false)]
503 public struct SysWMEvent {
505 public weak SysWMmsg msg;
508 [CCode (cname="SDL_SysWMmsg", cheader_filename="SDL_syswm.h")]
509 public class SysWMmsg {
512 [CCode (cname="SDL_Event", has_type_id=false)]
513 public struct Event {
515 public ActiveEvent active;
516 public KeyboardEvent key;
517 public MouseMotionEvent motion;
518 public MouseButtonEvent button;
519 public JoyAxisEvent jaxis;
520 public JoyBallEvent jball;
521 public JoyHatEvent jhat;
522 public JoyButtonEvent jbutton;
523 public ResizeEvent resize;
524 public ExposeEvent expose;
525 public QuitEvent quit;
526 public UserEvent user;
527 public SysWMEvent syswm;
529 [CCode (cname="SDL_PumpEvents")]
530 public static void pump();
532 [CCode (cname="SDL_PeepEvents")]
533 public static void peep(Event* events, int numevents,
534 EventAction action, EventMask mask);
536 [CCode (cname="SDL_PollEvent")]
537 public static int poll(out Event ev);
539 [CCode (cname="SDL_WaitEvent")]
540 public static int wait(out Event ev);
542 [CCode (cname="SDL_PushEvent")]
543 public static int push(Event ev);
545 [CCode (cname="SDL_EventState")]
546 public static uchar state(uchar type, EventState state);
549 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
550 public enum EventAction {
551 ADDEVENT, PEEKEVENT, GETEVENT
554 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
555 public enum EventState {
556 QUERY, IGNORE, DISABLE, ENABLE
563 [CCode (cname="int", cprefix="SDL_", has_type_id = false)]
564 public enum ButtonState {
568 [CCode (cname="SDL_keysym", has_type_id=false)]
570 public uchar scancode;
571 public KeySymbol sym;
572 public KeyModifier mod;
573 public uint16 unicode;
575 [CCode (cname="SDL_EnableUNICODE")]
576 public static int enable_unicode(int enable);
578 [CCode (cname="SDL_EnableKeyRepeat")]
579 public static int set_repeat(int delay, int interval);
581 [CCode (cname="SDL_GetKeyRepeat")]
582 public static void get_repeat(ref int delay, ref int interval);
584 [CCode (cname="SDL_GetKeyState")]
585 public static unowned uchar[] get_keys();
587 [CCode (cname="SDL_GetModState")]
588 public static KeyModifier get_modifiers();
590 [CCode (cname="SDL_SetModState")]
591 public static void set_modifiers(KeyModifier modstate);
593 [CCode (cname="SDL_GetKeyName")]
594 public static unowned string get_name(KeySymbol key);
597 [CCode (cname="int", cprefix="SDLK_", cheader_filename="SDL_keysym.h", has_type_id = false)]
598 public enum KeySymbol {
640 Skip uppercase letters
675 /* End of ASCII mapped keysyms */
677 /* International keyboard syms */
794 /* Arrows + Home/End pad */
822 /* Key state modifier keys */
834 LSUPER, /* Left "Windows" key */
835 RSUPER, /* Right "Windows" key */
836 MODE, /* "Alt Gr" key */
837 COMPOSE, /* Multi-key compose key */
839 /* Miscellaneous function keys */
845 POWER, /* Power Macintosh power key */
846 EURO, /* Some european keyboards */
847 UNDO, /* Atari keyboard has Undo */
849 /* Add any other keys here */
854 [CCode (cname="int", cprefix="KMOD_", cheader_filename="SDL_keysym.h", has_type_id = false)]
855 public enum KeyModifier {
875 [CCode (cname="int", cprefix="SDL_BUTTON_", has_type_id = false)]
876 public enum MouseButton {
877 LEFT, MIDDLE, RIGHT, WHEELUP, WHEELDOWN
880 [CCode (cname="SDL_Cursor", free_function="SDL_FreeCursor")]
882 public class Cursor {
890 [CCode (cname="SDL_GetMouseState")]
891 public static uchar get_state(ref int x, ref int y);
893 [CCode (cname="SDL_GetRelativeMouseState")]
894 public static uchar get_relative_state(ref int x, ref int y);
896 [CCode (cname="SDL_WarpMouse")]
897 public static void warp(uint16 x, uint16 y);
899 [CCode (cname="SDL_CreateCursor")]
900 public Cursor(uchar* data, uchar* mask, int w, int h,
901 int hot_x, int hot_y);
903 [CCode (cname="SDL_GetCursor")]
904 public static Cursor get();
906 [CCode (cname="SDL_SetCursor")]
907 public static void set(Cursor cursor);
909 [CCode (cname="SDL_ShowCursor")]
910 public static int show(int toggle);
913 [CCode (cname="int", cprefix="SDL_HAT_", has_type_id = false)]
914 public enum HatValue {
915 CENTERED, UP, RIGHT, DOWN, LEFT,
916 RIGHTUP, RIGHTDOWN, LEFTUP, LEFTDOWN
919 [CCode (cname="SDL_Joystick", free_function="SDL_JoystickClose")]
921 public class Joystick {
922 [CCode (cname="SDL_JoystickName")]
923 public static unowned string get_name(int device_index);
925 [CCode (cname="SDL_JoystickOpened")]
926 public static int is_open(int device_index);
928 [CCode (cname="SDL_JoystickUpdate")]
929 public static void update_all();
931 [CCode (cname="SDL_JoystickEventState")]
932 public static int event_state(EventState state);
934 [CCode (cname="SDL_NumJoysticks")]
935 public static int count();
937 [CCode (cname="SDL_JoystickOpen")]
938 public Joystick(int device_index);
940 [CCode (cname="SDL_JoystickIndex")]
943 [CCode (cname="SDL_JoystickNumAxes")]
944 public int num_axes();
946 [CCode (cname="SDL_JoystickNumBalls")]
947 public int num_balls();
949 [CCode (cname="SDL_JoystickNumHats")]
950 public int num_hats();
952 [CCode (cname="SDL_JoystickNumButtons")]
953 public int num_buttons();
955 [CCode (cname="SDL_JoystickGetAxis")]
956 public int16 get_axis(int axis);
958 [CCode (cname="SDL_JoystickGetHat")]
959 public HatValue get_hat(int hat);
961 [CCode (cname="SDL_JoystickGetBall")]
962 public HatValue get_ball(int ball, ref int dx, ref int dy);
964 [CCode (cname="SDL_JoystickGetButton")]
965 public ButtonState get_button(int button);
972 [CCode (cname="int", cprefix="AUDIO_", has_type_id = false)]
973 public enum AudioFormat {
974 U8, S8, U16LSB, S16LSB, U16MSB, S16MSB, U16, S16,
978 [CCode (cname="int", cprefix="SDL_AUDIO_", has_type_id = false)]
979 public enum AudioStatus {
980 STOPPED, PLAYING, PAUSED
983 [CCode (instance_pos = 0.1)]
984 public delegate void AudioCallback(uint8[] stream);
986 [CCode (cname="SDL_AudioSpec", has_type_id = false)]
987 public struct AudioSpec {
989 public AudioFormat format;
990 public uchar channels;
991 public uchar silence;
992 public uint16 samples;
993 public uint16 padding;
995 [CCode (delegate_target_cname = "userdata")]
996 public unowned AudioCallback callback;
999 [CCode (cname="SDL_AudioCVT")]
1001 public class AudioConverter {
1003 public AudioFormat src_format;
1004 public AudioFormat dst_format;
1005 public double rate_incr;
1010 public int len_mult;
1011 public double len_ratio;
1012 public int filter_index;
1014 [CCode (cname="SDL_BuildAudioCVT")]
1015 public static int build(AudioConverter cvt, AudioFormat src_format,
1016 uchar src_channels, int src_rate, AudioFormat dst_format,
1017 uchar dst_channels, int dst_rate);
1019 [CCode (cname="SDL_ConvertAudio")]
1020 public int convert();
1024 public class Audio {
1025 [CCode (cname="SDL_MIX_MAXVOLUME")]
1026 public const int MIX_MAXVOLUME;
1028 [CCode (cname="SDL_AudioDriverName")]
1029 public static unowned string driver_name(string namebuf, int maxlen);
1031 [CCode (cname="SDL_OpenAudio")]
1032 public static int open(AudioSpec desired, out AudioSpec obtained);
1034 [CCode (cname="SDL_GetAudioStatus")]
1035 public static AudioStatus status();
1037 [CCode (cname="SDL_PauseAudio")]
1038 public static void pause(int pause_on);
1040 [CCode (cname="SDL_LoadWAV_RW")]
1041 public static unowned AudioSpec? load(RWops src, int freesrc, ref AudioSpec spec, out uint8[] audio_buf);
1043 [CCode (cname="SDL_FreeWAV")]
1044 public static void free(uchar* audio_buf);
1046 [CCode (cname="SDL_MixAudio")]
1047 public static void mix([CCode (array_length = false)] uchar[] dst, [CCode (array_length = false)] uchar[] src, uint32 len, int volume);
1049 [CCode (cname="SDL_LockAudio")]
1050 public static void do_lock();
1052 [CCode (cname="SDL_UnlockAudio")]
1053 public static void unlock();
1055 [CCode (cname="SDL_CloseAudio")]
1056 public static void close();
1063 public delegate int ThreadFunc ();
1065 [CCode (cname="SDL_Thread", ref_function="", unref_function="")]
1067 public class Thread {
1068 [CCode (cname="SDL_ThreadID")]
1069 public static uint32 id();
1071 [CCode (cname="SDL_CreateThread")]
1072 public Thread (ThreadFunc f);
1074 [CCode (cname="SDL_WaitThread")]
1075 public void wait (out int status = null);
1078 [CCode (cname="SDL_mutex", free_function="SDL_DestroyMutex")]
1080 public class Mutex {
1081 [CCode (cname="SDL_CreateMutex")]
1084 [CCode (cname="SDL_mutexP")]
1085 public int do_lock();
1087 [CCode (cname="SDL_mutexV")]
1088 public int unlock();
1091 [CCode (cname="SDL_sem", free_function="SDL_DestroySemaphore")]
1093 public class Semaphore {
1094 [CCode (cname="SDL_CreateSemaphore")]
1095 public Semaphore(uint32 initial_value);
1097 [CCode (cname="SDL_SemWait")]
1100 [CCode (cname="SDL_SemTryWait")]
1101 public int try_wait();
1103 [CCode (cname="SDL_SemWaitTimeout")]
1104 public int wait_timeout(uint32 ms);
1106 [CCode (cname="SDL_SemPost")]
1109 [CCode (cname="SDL_SemValue")]
1110 public uint32 count();
1113 [CCode (cname="SDL_cond", free_function="SDL_DestroyCond")]
1115 public class Condition {
1116 [CCode (cname="SDL_CreateCond")]
1119 [CCode (cname="SDL_CondSignal")]
1120 public int @signal();
1122 [CCode (cname="SDL_CondBroadcast")]
1123 public int broadcast();
1125 [CCode (cname="SDL_CondWait")]
1126 public int wait(Mutex mut);
1128 [CCode (cname="SDL_CondWaitTimeout")]
1129 public int wait_timeout(Mutex mut, uint32 ms);
1136 public delegate uint32 TimerCallback (uint32 interval);
1138 [CCode (cname="struct _SDL_TimerID", ref_function="", unref_function="")]
1140 public class Timer {
1141 [CCode (cname="SDL_RemoveTimer")]
1142 public bool remove ();
1144 [CCode (cname="SDL_GetTicks")]
1145 public static uint32 get_ticks();
1147 [CCode (cname="SDL_Delay")]
1148 public static void delay(uint32 ms);
1150 [CCode (cname="SDL_AddTimer")]
1151 public Timer (uint32 interval, TimerCallback callback);