SDLRuby 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +29 -22
  3. data/LICENSE.txt +21 -21
  4. data/README.md +31 -31
  5. data/Rakefile +12 -12
  6. data/SDLRuby.gemspec +38 -0
  7. data/examples/alert.rb +8 -0
  8. data/examples/window.rb +7 -0
  9. data/lib/SDLRuby/event/accessor.rb +2 -2
  10. data/lib/SDLRuby/event.rb +101 -101
  11. data/lib/SDLRuby/image/include/SDL_image.h.rb +61 -61
  12. data/lib/SDLRuby/mixer/include/SDL_mixer.h.rb +95 -95
  13. data/lib/SDLRuby/rw_ops/rw_object.rb +34 -34
  14. data/lib/SDLRuby/rw_ops.rb +91 -91
  15. data/lib/SDLRuby/sdl/include/SDL.h.rb +44 -44
  16. data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +160 -160
  17. data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +30 -30
  18. data/lib/SDLRuby/sdl/include/SDL_clipboard.h.rb +10 -10
  19. data/lib/SDLRuby/sdl/include/SDL_config.h.rb +13 -13
  20. data/lib/SDLRuby/sdl/include/SDL_cpuinfo.h.rb +27 -27
  21. data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +12 -12
  22. data/lib/SDLRuby/sdl/include/SDL_error.h.rb +28 -28
  23. data/lib/SDLRuby/sdl/include/SDL_events.h.rb +472 -472
  24. data/lib/SDLRuby/sdl/include/SDL_filesystem.h.rb +6 -6
  25. data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +147 -147
  26. data/lib/SDLRuby/sdl/include/SDL_gesture.h.rb +12 -12
  27. data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +13 -13
  28. data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +199 -199
  29. data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +131 -131
  30. data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +35 -35
  31. data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +292 -292
  32. data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +13 -13
  33. data/lib/SDLRuby/sdl/include/SDL_main.h.rb +3 -3
  34. data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +58 -58
  35. data/lib/SDLRuby/sdl/include/SDL_misc.h.rb +5 -5
  36. data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +57 -57
  37. data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +285 -285
  38. data/lib/SDLRuby/sdl/include/SDL_platform.h.rb +3 -3
  39. data/lib/SDLRuby/sdl/include/SDL_power.h.rb +6 -6
  40. data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +46 -46
  41. data/lib/SDLRuby/sdl/include/SDL_render.h.rb +131 -131
  42. data/lib/SDLRuby/sdl/include/SDL_revision.h.rb +2 -2
  43. data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +78 -78
  44. data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +252 -252
  45. data/lib/SDLRuby/sdl/include/SDL_sensor.h.rb +25 -25
  46. data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +40 -40
  47. data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +62 -62
  48. data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +100 -100
  49. data/lib/SDLRuby/sdl/include/SDL_system.h.rb +6 -6
  50. data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +10 -10
  51. data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +21 -21
  52. data/lib/SDLRuby/sdl/include/SDL_touch.h.rb +15 -15
  53. data/lib/SDLRuby/sdl/include/SDL_types.h.rb +3 -3
  54. data/lib/SDLRuby/sdl/include/SDL_version.h.rb +14 -14
  55. data/lib/SDLRuby/sdl/include/SDL_video.h.rb +264 -264
  56. data/lib/SDLRuby/sdl.rb +218 -218
  57. data/lib/SDLRuby/ttf/include/SDL_ttf.h.rb +54 -54
  58. data/lib/SDLRuby/version.rb +5 -5
  59. data/lib/SDLRuby/window/surfacer.rb +37 -37
  60. data/lib/SDLRuby.rb +32 -16
  61. data/sig/SDLRuby.rbs +4 -4
  62. data/sig/lib/SDLRuby/event/accessor.rbs +157 -157
  63. data/sig/lib/SDLRuby/event/type.rbs +67 -67
  64. data/sig/lib/SDLRuby/event.rbs +47 -47
  65. data/sig/lib/SDLRuby/keyboard.rbs +25 -25
  66. data/sig/lib/SDLRuby/mouse.rbs +35 -35
  67. data/sig/lib/SDLRuby/sdl.rbs +655 -655
  68. data/sig/lib/SDLRuby/timer.rbs +7 -7
  69. metadata +6 -3
@@ -1,62 +1,62 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_config.h"
3
-
4
- def self.SDL_static_cast(type, expression)
5
- expression
6
- end
7
- def self.SDL_FOURCC(a, b, c, d)
8
- ((SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (a))) << 0) |
9
- (SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (b))) << 8) |
10
- (SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (c))) << 16) |
11
- (SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (d))) << 24))
12
- end
13
-
14
- SDL_FALSE = 0
15
- SDL_TRUE = 1
16
- typealias "SDL_bool", "int"
17
-
18
- SDL_MAX_SINT8 = (0x7F)
19
- SDL_MIN_SINT8 = ((~0x7F))
20
- typealias "Sint8", "int8_t"
21
-
22
- SDL_MAX_UINT8 = (0xFF)
23
- SDL_MIN_UINT8 = (0x00)
24
- typealias "Uint8", "uint8_t"
25
-
26
- SDL_MAX_SINT16 = (0x7FFF)
27
- SDL_MIN_SINT16 = ((~0x7FFF))
28
- typealias "Sint16", "int16_t"
29
-
30
- SDL_MAX_UINT16 = (0xFFFF)
31
- SDL_MIN_UINT16 = (0x0000)
32
- typealias "Uint16", "uint16_t"
33
-
34
- SDL_MAX_SINT32 = (0x7FFFFFFF)
35
- SDL_MIN_SINT32 = ((~0x7FFFFFFF))
36
- typealias "Sint32", "int32_t"
37
-
38
- SDL_MAX_UINT32 = (0xFFFFFFFF)
39
- SDL_MIN_UINT32 = (0x00000000)
40
- typealias "Uint32", "uint32_t"
41
-
42
- SDL_MAX_SINT64 = (0x7FFFFFFFFFFFFFFF)
43
- SDL_MIN_SINT64 = ((~0x7FFFFFFFFFFFFFFF))
44
- typealias "Sint64", "int64_t"
45
-
46
- SDL_MAX_UINT64 = (0xFFFFFFFFFFFFFFFF)
47
- SDL_MIN_UINT64 = ((0x0000000000000000))
48
- typealias "Uint64", "uint64_t"
49
-
50
- extern "void * SDL_malloc(size_t size)"
51
- extern "void * SDL_calloc(size_t nmemb, size_t size)"
52
- extern "void * SDL_realloc(void *mem, size_t size)"
53
- extern "void SDL_free(void *mem)"
54
- typealias "SDL_malloc_func", "void*"
55
- typealias "SDL_calloc_func", "void*"
56
- typealias "SDL_realloc_func", "void*"
57
- typealias "SDL_free_func", "void"
58
- extern "void SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func)"
59
- extern "void SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func)"
60
- extern "int SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, SDL_calloc_func calloc_func, SDL_realloc_func realloc_func, SDL_free_func free_func)"
61
- extern "int SDL_GetNumAllocations(void)"
62
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_config.h"
3
+
4
+ def self.SDL_static_cast(type, expression)
5
+ expression
6
+ end
7
+ def self.SDL_FOURCC(a, b, c, d)
8
+ ((SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (a))) << 0) |
9
+ (SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (b))) << 8) |
10
+ (SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (c))) << 16) |
11
+ (SDL_static_cast(:Uint32, SDL_static_cast(:Uint8, (d))) << 24))
12
+ end
13
+
14
+ SDL_FALSE = 0
15
+ SDL_TRUE = 1
16
+ typealias "SDL_bool", "int"
17
+
18
+ SDL_MAX_SINT8 = (0x7F)
19
+ SDL_MIN_SINT8 = ((~0x7F))
20
+ typealias "Sint8", "int8_t"
21
+
22
+ SDL_MAX_UINT8 = (0xFF)
23
+ SDL_MIN_UINT8 = (0x00)
24
+ typealias "Uint8", "uint8_t"
25
+
26
+ SDL_MAX_SINT16 = (0x7FFF)
27
+ SDL_MIN_SINT16 = ((~0x7FFF))
28
+ typealias "Sint16", "int16_t"
29
+
30
+ SDL_MAX_UINT16 = (0xFFFF)
31
+ SDL_MIN_UINT16 = (0x0000)
32
+ typealias "Uint16", "uint16_t"
33
+
34
+ SDL_MAX_SINT32 = (0x7FFFFFFF)
35
+ SDL_MIN_SINT32 = ((~0x7FFFFFFF))
36
+ typealias "Sint32", "int32_t"
37
+
38
+ SDL_MAX_UINT32 = (0xFFFFFFFF)
39
+ SDL_MIN_UINT32 = (0x00000000)
40
+ typealias "Uint32", "uint32_t"
41
+
42
+ SDL_MAX_SINT64 = (0x7FFFFFFFFFFFFFFF)
43
+ SDL_MIN_SINT64 = ((~0x7FFFFFFFFFFFFFFF))
44
+ typealias "Sint64", "int64_t"
45
+
46
+ SDL_MAX_UINT64 = (0xFFFFFFFFFFFFFFFF)
47
+ SDL_MIN_UINT64 = ((0x0000000000000000))
48
+ typealias "Uint64", "uint64_t"
49
+
50
+ extern "void * SDL_malloc(size_t size)"
51
+ extern "void * SDL_calloc(size_t nmemb, size_t size)"
52
+ extern "void * SDL_realloc(void *mem, size_t size)"
53
+ extern "void SDL_free(void *mem)"
54
+ typealias "SDL_malloc_func", "void*"
55
+ typealias "SDL_calloc_func", "void*"
56
+ typealias "SDL_realloc_func", "void*"
57
+ typealias "SDL_free_func", "void"
58
+ extern "void SDL_GetOriginalMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func)"
59
+ extern "void SDL_GetMemoryFunctions(SDL_malloc_func *malloc_func, SDL_calloc_func *calloc_func, SDL_realloc_func *realloc_func, SDL_free_func *free_func)"
60
+ extern "int SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, SDL_calloc_func calloc_func, SDL_realloc_func realloc_func, SDL_free_func free_func)"
61
+ extern "int SDL_GetNumAllocations(void)"
62
+ end
@@ -1,100 +1,100 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
- require_relative "SDL_pixels.h"
4
- require_relative "SDL_rect.h"
5
- require_relative "SDL_blendmode.h"
6
- require_relative "SDL_rwops.h"
7
-
8
- SDL_SWSURFACE = 0
9
- SDL_PREALLOC = 0x00000001
10
- SDL_RLEACCEL = 0x00000002
11
- SDL_DONTFREE = 0x00000004
12
- SDL_SIMD_ALIGNED = 0x00000008
13
-
14
- def self.SDL_MUSTLOCK(s)
15
- (((s).flags & SDL_RLEACCEL) != 0)
16
- end
17
-
18
- SDL_Surface = struct(
19
- [
20
- "Uint32 flags",
21
- "SDL_PixelFormat *format",
22
- "int w",
23
- "int h",
24
- "int pitch",
25
- "void *pixels",
26
- "void *userdata",
27
- "int locked",
28
- "void *list_blitmap",
29
- { clip_rect: SDL_Rect },
30
- "SDL_BlitMap *map",
31
- "int refcount",
32
- ]
33
- )
34
-
35
- typealias "SDL_blit", "void*"
36
-
37
- SDL_YUV_CONVERSION_JPEG = 0
38
- SDL_YUV_CONVERSION_BT601 = 1
39
- SDL_YUV_CONVERSION_BT709 = 2
40
- SDL_YUV_CONVERSION_AUTOMATIC = 3
41
- typealias "SDL_YUV_CONVERSION_MODE", "int"
42
-
43
- extern "SDL_Surface * SDL_CreateRGBSurface (Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)"
44
- extern "SDL_Surface * SDL_CreateRGBSurfaceWithFormat (Uint32 flags, int width, int height, int depth, Uint32 format)"
45
- extern "SDL_Surface * SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)"
46
- extern "SDL_Surface * SDL_CreateRGBSurfaceWithFormatFrom (void *pixels, int width, int height, int depth, int pitch, Uint32 format)"
47
- extern "void SDL_FreeSurface(SDL_Surface * surface)"
48
- extern "int SDL_SetSurfacePalette(SDL_Surface * surface, SDL_Palette * palette)"
49
- extern "int SDL_LockSurface(SDL_Surface * surface)"
50
- extern "void SDL_UnlockSurface(SDL_Surface * surface)"
51
- extern "SDL_Surface * SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)"
52
-
53
- def self.SDL_LoadBMP(file)
54
- SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
55
- end
56
-
57
- extern "int SDL_SaveBMP_RW (SDL_Surface * surface, SDL_RWops * dst, int freedst)"
58
-
59
- def self.SDL_SaveBMP(surface, file)
60
- SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
61
- end
62
-
63
- extern "int SDL_SetSurfaceRLE(SDL_Surface * surface, int flag)"
64
- extern "SDL_bool SDL_HasSurfaceRLE(SDL_Surface * surface)"
65
- extern "int SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)"
66
- extern "SDL_bool SDL_HasColorKey(SDL_Surface * surface)"
67
- extern "int SDL_GetColorKey(SDL_Surface * surface, Uint32 * key)"
68
- extern "int SDL_SetSurfaceColorMod(SDL_Surface * surface, Uint8 r, Uint8 g, Uint8 b)"
69
- extern "int SDL_GetSurfaceColorMod(SDL_Surface * surface, Uint8 * r, Uint8 * g, Uint8 * b)"
70
- extern "int SDL_SetSurfaceAlphaMod(SDL_Surface * surface, Uint8 alpha)"
71
- extern "int SDL_GetSurfaceAlphaMod(SDL_Surface * surface, Uint8 * alpha)"
72
- extern "int SDL_SetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode blendMode)"
73
- extern "int SDL_GetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode *blendMode)"
74
- extern "SDL_bool SDL_SetClipRect(SDL_Surface * surface, const SDL_Rect * rect)"
75
- extern "void SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect)"
76
- extern "SDL_Surface * SDL_DuplicateSurface(SDL_Surface * surface)"
77
- extern "SDL_Surface * SDL_ConvertSurface (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags)"
78
- extern "SDL_Surface * SDL_ConvertSurfaceFormat (SDL_Surface * src, Uint32 pixel_format, Uint32 flags)"
79
- extern "int SDL_ConvertPixels(int width, int height, Uint32 src_format, const void * src, int src_pitch, Uint32 dst_format, void * dst, int dst_pitch)"
80
- extern "int SDL_PremultiplyAlpha(int width, int height, Uint32 src_format, const void * src, int src_pitch, Uint32 dst_format, void * dst, int dst_pitch)"
81
- extern "int SDL_FillRect (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color)"
82
- extern "int SDL_FillRects (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color)"
83
- extern "int SDL_UpperBlit (SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
84
- class << self
85
- alias SDL_BlitSurface SDL_UpperBlit
86
- end
87
- alias SDL_BlitSurface SDL_UpperBlit
88
- extern "int SDL_LowerBlit (SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
89
- extern "int SDL_SoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, const SDL_Rect * dstrect)"
90
- extern "int SDL_SoftStretchLinear(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, const SDL_Rect * dstrect)"
91
- extern "int SDL_UpperBlitScaled (SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
92
- class << self
93
- alias SDL_BlitScaled SDL_UpperBlitScaled
94
- end
95
- alias SDL_BlitScaled SDL_UpperBlitScaled
96
- extern "int SDL_LowerBlitScaled (SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
97
- extern "void SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode)"
98
- extern "SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionMode(void)"
99
- extern "SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionModeForResolution(int width, int height)"
100
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_pixels.h"
4
+ require_relative "SDL_rect.h"
5
+ require_relative "SDL_blendmode.h"
6
+ require_relative "SDL_rwops.h"
7
+
8
+ SDL_SWSURFACE = 0
9
+ SDL_PREALLOC = 0x00000001
10
+ SDL_RLEACCEL = 0x00000002
11
+ SDL_DONTFREE = 0x00000004
12
+ SDL_SIMD_ALIGNED = 0x00000008
13
+
14
+ def self.SDL_MUSTLOCK(s)
15
+ (((s).flags & SDL_RLEACCEL) != 0)
16
+ end
17
+
18
+ SDL_Surface = struct(
19
+ [
20
+ "Uint32 flags",
21
+ "SDL_PixelFormat *format",
22
+ "int w",
23
+ "int h",
24
+ "int pitch",
25
+ "void *pixels",
26
+ "void *userdata",
27
+ "int locked",
28
+ "void *list_blitmap",
29
+ { clip_rect: SDL_Rect },
30
+ "SDL_BlitMap *map",
31
+ "int refcount",
32
+ ]
33
+ )
34
+
35
+ typealias "SDL_blit", "void*"
36
+
37
+ SDL_YUV_CONVERSION_JPEG = 0
38
+ SDL_YUV_CONVERSION_BT601 = 1
39
+ SDL_YUV_CONVERSION_BT709 = 2
40
+ SDL_YUV_CONVERSION_AUTOMATIC = 3
41
+ typealias "SDL_YUV_CONVERSION_MODE", "int"
42
+
43
+ extern "SDL_Surface * SDL_CreateRGBSurface (Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)"
44
+ extern "SDL_Surface * SDL_CreateRGBSurfaceWithFormat (Uint32 flags, int width, int height, int depth, Uint32 format)"
45
+ extern "SDL_Surface * SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)"
46
+ extern "SDL_Surface * SDL_CreateRGBSurfaceWithFormatFrom (void *pixels, int width, int height, int depth, int pitch, Uint32 format)"
47
+ extern "void SDL_FreeSurface(SDL_Surface * surface)"
48
+ extern "int SDL_SetSurfacePalette(SDL_Surface * surface, SDL_Palette * palette)"
49
+ extern "int SDL_LockSurface(SDL_Surface * surface)"
50
+ extern "void SDL_UnlockSurface(SDL_Surface * surface)"
51
+ extern "SDL_Surface * SDL_LoadBMP_RW(SDL_RWops * src, int freesrc)"
52
+
53
+ def self.SDL_LoadBMP(file)
54
+ SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1)
55
+ end
56
+
57
+ extern "int SDL_SaveBMP_RW (SDL_Surface * surface, SDL_RWops * dst, int freedst)"
58
+
59
+ def self.SDL_SaveBMP(surface, file)
60
+ SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1)
61
+ end
62
+
63
+ extern "int SDL_SetSurfaceRLE(SDL_Surface * surface, int flag)"
64
+ extern "SDL_bool SDL_HasSurfaceRLE(SDL_Surface * surface)"
65
+ extern "int SDL_SetColorKey(SDL_Surface * surface, int flag, Uint32 key)"
66
+ extern "SDL_bool SDL_HasColorKey(SDL_Surface * surface)"
67
+ extern "int SDL_GetColorKey(SDL_Surface * surface, Uint32 * key)"
68
+ extern "int SDL_SetSurfaceColorMod(SDL_Surface * surface, Uint8 r, Uint8 g, Uint8 b)"
69
+ extern "int SDL_GetSurfaceColorMod(SDL_Surface * surface, Uint8 * r, Uint8 * g, Uint8 * b)"
70
+ extern "int SDL_SetSurfaceAlphaMod(SDL_Surface * surface, Uint8 alpha)"
71
+ extern "int SDL_GetSurfaceAlphaMod(SDL_Surface * surface, Uint8 * alpha)"
72
+ extern "int SDL_SetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode blendMode)"
73
+ extern "int SDL_GetSurfaceBlendMode(SDL_Surface * surface, SDL_BlendMode *blendMode)"
74
+ extern "SDL_bool SDL_SetClipRect(SDL_Surface * surface, const SDL_Rect * rect)"
75
+ extern "void SDL_GetClipRect(SDL_Surface * surface, SDL_Rect * rect)"
76
+ extern "SDL_Surface * SDL_DuplicateSurface(SDL_Surface * surface)"
77
+ extern "SDL_Surface * SDL_ConvertSurface (SDL_Surface * src, const SDL_PixelFormat * fmt, Uint32 flags)"
78
+ extern "SDL_Surface * SDL_ConvertSurfaceFormat (SDL_Surface * src, Uint32 pixel_format, Uint32 flags)"
79
+ extern "int SDL_ConvertPixels(int width, int height, Uint32 src_format, const void * src, int src_pitch, Uint32 dst_format, void * dst, int dst_pitch)"
80
+ extern "int SDL_PremultiplyAlpha(int width, int height, Uint32 src_format, const void * src, int src_pitch, Uint32 dst_format, void * dst, int dst_pitch)"
81
+ extern "int SDL_FillRect (SDL_Surface * dst, const SDL_Rect * rect, Uint32 color)"
82
+ extern "int SDL_FillRects (SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color)"
83
+ extern "int SDL_UpperBlit (SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
84
+ class << self
85
+ alias SDL_BlitSurface SDL_UpperBlit
86
+ end
87
+ alias SDL_BlitSurface SDL_UpperBlit
88
+ extern "int SDL_LowerBlit (SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
89
+ extern "int SDL_SoftStretch(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, const SDL_Rect * dstrect)"
90
+ extern "int SDL_SoftStretchLinear(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, const SDL_Rect * dstrect)"
91
+ extern "int SDL_UpperBlitScaled (SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
92
+ class << self
93
+ alias SDL_BlitScaled SDL_UpperBlitScaled
94
+ end
95
+ alias SDL_BlitScaled SDL_UpperBlitScaled
96
+ extern "int SDL_LowerBlitScaled (SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)"
97
+ extern "void SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode)"
98
+ extern "SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionMode(void)"
99
+ extern "SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionModeForResolution(int width, int height)"
100
+ end
@@ -1,6 +1,6 @@
1
- module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_keyboard.h.rb'
4
- require_relative 'SDL_render.h.rb'
5
- require_relative 'SDL_video.h.rb'
6
- end
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_keyboard.h.rb'
4
+ require_relative 'SDL_render.h.rb'
5
+ require_relative 'SDL_video.h.rb'
6
+ end
@@ -1,10 +1,10 @@
1
- module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_error.h.rb'
4
- require_relative 'SDL_video.h.rb'
5
- require_relative 'SDL_version.h.rb'
6
-
7
- typealias "SDL_SysWMinfo", "struct SDL_SysWMinfo"
8
-
9
- extern "SDL_bool SDL_GetWindowWMInfo(SDL_Window *window, SDL_SysWMinfo *info)"
10
- end
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+ require_relative 'SDL_video.h.rb'
5
+ require_relative 'SDL_version.h.rb'
6
+
7
+ typealias "SDL_SysWMinfo", "struct SDL_SysWMinfo"
8
+
9
+ extern "SDL_bool SDL_GetWindowWMInfo(SDL_Window *window, SDL_SysWMinfo *info)"
10
+ end
@@ -1,21 +1,21 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
- require_relative "SDL_error.h"
4
-
5
- extern "Uint32 SDL_GetTicks(void)"
6
- extern "Uint64 SDL_GetTicks64(void)"
7
-
8
- def self.SDL_TICKS_PASSED(a, b)
9
- (((b) - (a)) <= 0)
10
- end
11
-
12
- extern "Uint64 SDL_GetPerformanceCounter(void)"
13
- extern "Uint64 SDL_GetPerformanceFrequency(void)"
14
- extern "void SDL_Delay(Uint32 ms)"
15
-
16
- typealias "SDL_TimerCallback", "void*"
17
- typealias "SDL_TimerID", "int"
18
-
19
- extern "SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)"
20
- extern "SDL_bool SDL_RemoveTimer(SDL_TimerID id)"
21
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+
5
+ extern "Uint32 SDL_GetTicks(void)"
6
+ extern "Uint64 SDL_GetTicks64(void)"
7
+
8
+ def self.SDL_TICKS_PASSED(a, b)
9
+ (((b) - (a)) <= 0)
10
+ end
11
+
12
+ extern "Uint64 SDL_GetPerformanceCounter(void)"
13
+ extern "Uint64 SDL_GetPerformanceFrequency(void)"
14
+ extern "void SDL_Delay(Uint32 ms)"
15
+
16
+ typealias "SDL_TimerCallback", "void*"
17
+ typealias "SDL_TimerID", "int"
18
+
19
+ extern "SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)"
20
+ extern "SDL_bool SDL_RemoveTimer(SDL_TimerID id)"
21
+ end
@@ -1,15 +1,15 @@
1
- module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_error.h.rb'
4
- require_relative 'SDL_video.h.rb'
5
-
6
- typealias "SDL_TouchID", "Sint64"
7
- typealias "SDL_FingerID", "Sint64"
8
- typealias "SDL_TouchDeviceType", "int"
9
- extern "int SDL_GetNumTouchDevices(void)"
10
- extern "SDL_TouchID SDL_GetTouchDevice(int index)"
11
- extern "const char* SDL_GetTouchName(int index)"
12
- extern "SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID touchID)"
13
- extern "int SDL_GetNumTouchFingers(SDL_TouchID touchID)"
14
- extern "SDL_Finger * SDL_GetTouchFinger(SDL_TouchID touchID, int index)"
15
- end
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+ require_relative 'SDL_video.h.rb'
5
+
6
+ typealias "SDL_TouchID", "Sint64"
7
+ typealias "SDL_FingerID", "Sint64"
8
+ typealias "SDL_TouchDeviceType", "int"
9
+ extern "int SDL_GetNumTouchDevices(void)"
10
+ extern "SDL_TouchID SDL_GetTouchDevice(int index)"
11
+ extern "const char* SDL_GetTouchName(int index)"
12
+ extern "SDL_TouchDeviceType SDL_GetTouchDeviceType(SDL_TouchID touchID)"
13
+ extern "int SDL_GetNumTouchFingers(SDL_TouchID touchID)"
14
+ extern "SDL_Finger * SDL_GetTouchFinger(SDL_TouchID touchID, int index)"
15
+ end
@@ -1,3 +1,3 @@
1
- module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- end
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ end
@@ -1,14 +1,14 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
-
4
- SDL_version = struct(
5
- [
6
- "Uint8 major",
7
- "Uint8 minor",
8
- "Uint8 patch",
9
- ]
10
- )
11
-
12
- extern "void SDL_GetVersion(SDL_version * ver)"
13
- extern "const char * SDL_GetRevision(void)"
14
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+
4
+ SDL_version = struct(
5
+ [
6
+ "Uint8 major",
7
+ "Uint8 minor",
8
+ "Uint8 patch",
9
+ ]
10
+ )
11
+
12
+ extern "void SDL_GetVersion(SDL_version * ver)"
13
+ extern "const char * SDL_GetRevision(void)"
14
+ end