SDLRuby 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
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,46 +1,46 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
- require_relative "SDL_error.h"
4
- require_relative "SDL_pixels.h"
5
- require_relative "SDL_rwops.h"
6
-
7
- SDL_Point = struct(
8
- [
9
- "int x",
10
- "int y",
11
- ]
12
- )
13
- SDL_FPoint = struct(
14
- [
15
- "float x",
16
- "float y",
17
- ]
18
- )
19
- SDL_Rect = struct(
20
- [
21
- "int x",
22
- "int y",
23
- "int w",
24
- "int h",
25
- ]
26
- )
27
- SDL_FRect = struct(
28
- [
29
- "float x",
30
- "float y",
31
- "float w",
32
- "float h",
33
- ]
34
- )
35
-
36
- extern "SDL_bool SDL_HasIntersection(const SDL_Rect * A, const SDL_Rect * B)"
37
- extern "SDL_bool SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)"
38
- extern "void SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)"
39
- extern "SDL_bool SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip, SDL_Rect * result)"
40
- extern "SDL_bool SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2, int *Y2)"
41
- extern "SDL_bool SDL_HasIntersectionF(const SDL_FRect * A, const SDL_FRect * B)"
42
- extern "SDL_bool SDL_IntersectFRect(const SDL_FRect * A, const SDL_FRect * B, SDL_FRect * result)"
43
- extern "void SDL_UnionFRect(const SDL_FRect * A, const SDL_FRect * B, SDL_FRect * result)"
44
- extern "SDL_bool SDL_EncloseFPoints(const SDL_FPoint * points, int count, const SDL_FRect * clip, SDL_FRect * result)"
45
- extern "SDL_bool SDL_IntersectFRectAndLine(const SDL_FRect * rect, float *X1, float *Y1, float *X2, float *Y2)"
46
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+ require_relative "SDL_pixels.h"
5
+ require_relative "SDL_rwops.h"
6
+
7
+ SDL_Point = struct(
8
+ [
9
+ "int x",
10
+ "int y",
11
+ ]
12
+ )
13
+ SDL_FPoint = struct(
14
+ [
15
+ "float x",
16
+ "float y",
17
+ ]
18
+ )
19
+ SDL_Rect = struct(
20
+ [
21
+ "int x",
22
+ "int y",
23
+ "int w",
24
+ "int h",
25
+ ]
26
+ )
27
+ SDL_FRect = struct(
28
+ [
29
+ "float x",
30
+ "float y",
31
+ "float w",
32
+ "float h",
33
+ ]
34
+ )
35
+
36
+ extern "SDL_bool SDL_HasIntersection(const SDL_Rect * A, const SDL_Rect * B)"
37
+ extern "SDL_bool SDL_IntersectRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)"
38
+ extern "void SDL_UnionRect(const SDL_Rect * A, const SDL_Rect * B, SDL_Rect * result)"
39
+ extern "SDL_bool SDL_EnclosePoints(const SDL_Point * points, int count, const SDL_Rect * clip, SDL_Rect * result)"
40
+ extern "SDL_bool SDL_IntersectRectAndLine(const SDL_Rect * rect, int *X1, int *Y1, int *X2, int *Y2)"
41
+ extern "SDL_bool SDL_HasIntersectionF(const SDL_FRect * A, const SDL_FRect * B)"
42
+ extern "SDL_bool SDL_IntersectFRect(const SDL_FRect * A, const SDL_FRect * B, SDL_FRect * result)"
43
+ extern "void SDL_UnionFRect(const SDL_FRect * A, const SDL_FRect * B, SDL_FRect * result)"
44
+ extern "SDL_bool SDL_EncloseFPoints(const SDL_FPoint * points, int count, const SDL_FRect * clip, SDL_FRect * result)"
45
+ extern "SDL_bool SDL_IntersectFRectAndLine(const SDL_FRect * rect, float *X1, float *Y1, float *X2, float *Y2)"
46
+ end
@@ -1,131 +1,131 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
- require_relative "SDL_rect.h"
4
- require_relative "SDL_video.h"
5
-
6
- SDL_RENDERER_SOFTWARE = 0x00000001,
7
- SDL_RENDERER_ACCELERATED = 0x00000002,
8
- SDL_RENDERER_PRESENTVSYNC = 0x00000004,
9
- SDL_RENDERER_TARGETTEXTURE = 0x00000008
10
- typealias "SDL_RendererFlags", "int"
11
-
12
- SDL_RendererInfo = struct(
13
- [
14
- "const char *name",
15
- "Uint32 flags",
16
- "Uint32 num_texture_formats",
17
- "Uint32 texture_formats[16]",
18
- "int max_texture_width",
19
- "int max_texture_height",
20
- ]
21
- )
22
- SDL_Vertex = struct(
23
- [
24
- position: SDL_FPoint,
25
- color: SDL_Color,
26
- tex_coord: SDL_FPoint,
27
- ]
28
- )
29
-
30
- SDL_ScaleModeNearest = 0
31
- SDL_ScaleModeLinear = 1
32
- SDL_ScaleModeBest = 2
33
- typealias "SDL_ScaleMode", "int"
34
-
35
- SDL_TEXTUREACCESS_STATIC = 0
36
- SDL_TEXTUREACCESS_STREAMING = 1
37
- SDL_TEXTUREACCESS_TARGET = 2
38
- typealias "SDL_TextureAccess", "int"
39
-
40
- SDL_TEXTUREMODULATE_NONE = 0x00000000
41
- SDL_TEXTUREMODULATE_COLOR = 0x00000001
42
- SDL_TEXTUREMODULATE_ALPHA = 0x00000002
43
- typealias "SDL_TextureModulate", "int"
44
-
45
- SDL_FLIP_NONE = 0x00000000
46
- SDL_FLIP_HORIZONTAL = 0x00000001
47
- SDL_FLIP_VERTICAL = 0x00000002
48
- typealias "SDL_RendererFlip", "int"
49
-
50
- extern "int SDL_GetNumRenderDrivers(void)"
51
- extern "int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info)"
52
- extern "int SDL_CreateWindowAndRenderer( int width, int height, Uint32 window_flags, SDL_Window **window, SDL_Renderer **renderer)"
53
- extern "SDL_Renderer * SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)"
54
- extern "SDL_Renderer * SDL_CreateSoftwareRenderer(SDL_Surface * surface)"
55
- extern "SDL_Renderer * SDL_GetRenderer(SDL_Window * window)"
56
- extern "SDL_Window * SDL_RenderGetWindow(SDL_Renderer *renderer)"
57
- extern "int SDL_GetRendererInfo(SDL_Renderer * renderer, SDL_RendererInfo * info)"
58
- extern "int SDL_GetRendererOutputSize(SDL_Renderer * renderer, int *w, int *h)"
59
- extern "SDL_Texture * SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int h)"
60
- extern "SDL_Texture * SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)"
61
- extern "int SDL_QueryTexture(SDL_Texture * texture, Uint32 * format, int *access, int *w, int *h)"
62
- extern "int SDL_SetTextureColorMod(SDL_Texture * texture, Uint8 r, Uint8 g, Uint8 b)"
63
- extern "int SDL_GetTextureColorMod(SDL_Texture * texture, Uint8 * r, Uint8 * g, Uint8 * b)"
64
- extern "int SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha)"
65
- extern "int SDL_GetTextureAlphaMod(SDL_Texture * texture, Uint8 * alpha)"
66
- extern "int SDL_SetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode blendMode)"
67
- extern "int SDL_GetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode *blendMode)"
68
- extern "int SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)"
69
- extern "int SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode)"
70
- extern "int SDL_SetTextureUserData(SDL_Texture * texture, void *userdata)"
71
- extern "void * SDL_GetTextureUserData(SDL_Texture * texture)"
72
- extern "int SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch)"
73
- extern "int SDL_UpdateYUVTexture(SDL_Texture * texture, const SDL_Rect * rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch)"
74
- extern "int SDL_UpdateNVTexture(SDL_Texture * texture, const SDL_Rect * rect, const Uint8 *Yplane, int Ypitch, const Uint8 *UVplane, int UVpitch)"
75
- extern "int SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch)"
76
- extern "int SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, SDL_Surface **surface)"
77
- extern "void SDL_UnlockTexture(SDL_Texture * texture)"
78
- extern "SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)"
79
- extern "int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)"
80
- extern "SDL_Texture * SDL_GetRenderTarget(SDL_Renderer *renderer)"
81
- extern "int SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h)"
82
- extern "void SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h)"
83
- extern "int SDL_RenderSetIntegerScale(SDL_Renderer * renderer, SDL_bool enable)"
84
- extern "SDL_bool SDL_RenderGetIntegerScale(SDL_Renderer * renderer)"
85
- extern "int SDL_RenderSetViewport(SDL_Renderer * renderer, const SDL_Rect * rect)"
86
- extern "void SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect)"
87
- extern "int SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect)"
88
- extern "void SDL_RenderGetClipRect(SDL_Renderer * renderer, SDL_Rect * rect)"
89
- extern "SDL_bool SDL_RenderIsClipEnabled(SDL_Renderer * renderer)"
90
- extern "int SDL_RenderSetScale(SDL_Renderer * renderer, float scaleX, float scaleY)"
91
- extern "void SDL_RenderGetScale(SDL_Renderer * renderer, float *scaleX, float *scaleY)"
92
- extern "void SDL_RenderWindowToLogical(SDL_Renderer * renderer, int windowX, int windowY, float *logicalX, float *logicalY)"
93
- extern "void SDL_RenderLogicalToWindow(SDL_Renderer * renderer, float logicalX, float logicalY, int *windowX, int *windowY)"
94
- extern "int SDL_SetRenderDrawColor(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a)"
95
- extern "int SDL_GetRenderDrawColor(SDL_Renderer * renderer, Uint8 * r, Uint8 * g, Uint8 * b, Uint8 * a)"
96
- extern "int SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)"
97
- extern "int SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode *blendMode)"
98
- extern "int SDL_RenderClear(SDL_Renderer * renderer)"
99
- extern "int SDL_RenderDrawPoint(SDL_Renderer * renderer, int x, int y)"
100
- extern "int SDL_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points, int count)"
101
- extern "int SDL_RenderDrawLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)"
102
- extern "int SDL_RenderDrawLines(SDL_Renderer * renderer, const SDL_Point * points, int count)"
103
- extern "int SDL_RenderDrawRect(SDL_Renderer * renderer, const SDL_Rect * rect)"
104
- extern "int SDL_RenderDrawRects(SDL_Renderer * renderer, const SDL_Rect * rects, int count)"
105
- extern "int SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)"
106
- extern "int SDL_RenderFillRects(SDL_Renderer * renderer, const SDL_Rect * rects, int count)"
107
- extern "int SDL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect)"
108
- extern "int SDL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect, const double angle, const SDL_Point *center, const SDL_RendererFlip flip)"
109
- extern "int SDL_RenderDrawPointF(SDL_Renderer * renderer, float x, float y)"
110
- extern "int SDL_RenderDrawPointsF(SDL_Renderer * renderer, const SDL_FPoint * points, int count)"
111
- extern "int SDL_RenderDrawLineF(SDL_Renderer * renderer, float x1, float y1, float x2, float y2)"
112
- extern "int SDL_RenderDrawLinesF(SDL_Renderer * renderer, const SDL_FPoint * points, int count)"
113
- extern "int SDL_RenderDrawRectF(SDL_Renderer * renderer, const SDL_FRect * rect)"
114
- extern "int SDL_RenderDrawRectsF(SDL_Renderer * renderer, const SDL_FRect * rects, int count)"
115
- extern "int SDL_RenderFillRectF(SDL_Renderer * renderer, const SDL_FRect * rect)"
116
- extern "int SDL_RenderFillRectsF(SDL_Renderer * renderer, const SDL_FRect * rects, int count)"
117
- extern "int SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect)"
118
- extern "int SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect, const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip)"
119
- extern "int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices)"
120
- extern "int SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices)"
121
- extern "int SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 format, void *pixels, int pitch)"
122
- extern "void SDL_RenderPresent(SDL_Renderer * renderer)"
123
- extern "void SDL_DestroyTexture(SDL_Texture * texture)"
124
- extern "void SDL_DestroyRenderer(SDL_Renderer * renderer)"
125
- extern "int SDL_RenderFlush(SDL_Renderer * renderer)"
126
- extern "int SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh)"
127
- extern "int SDL_GL_UnbindTexture(SDL_Texture *texture)"
128
- extern "void * SDL_RenderGetMetalLayer(SDL_Renderer * renderer)"
129
- extern "void * SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer)"
130
- extern "int SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync)"
131
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_rect.h"
4
+ require_relative "SDL_video.h"
5
+
6
+ SDL_RENDERER_SOFTWARE = 0x00000001,
7
+ SDL_RENDERER_ACCELERATED = 0x00000002,
8
+ SDL_RENDERER_PRESENTVSYNC = 0x00000004,
9
+ SDL_RENDERER_TARGETTEXTURE = 0x00000008
10
+ typealias "SDL_RendererFlags", "int"
11
+
12
+ SDL_RendererInfo = struct(
13
+ [
14
+ "const char *name",
15
+ "Uint32 flags",
16
+ "Uint32 num_texture_formats",
17
+ "Uint32 texture_formats[16]",
18
+ "int max_texture_width",
19
+ "int max_texture_height",
20
+ ]
21
+ )
22
+ SDL_Vertex = struct(
23
+ [
24
+ position: SDL_FPoint,
25
+ color: SDL_Color,
26
+ tex_coord: SDL_FPoint,
27
+ ]
28
+ )
29
+
30
+ SDL_ScaleModeNearest = 0
31
+ SDL_ScaleModeLinear = 1
32
+ SDL_ScaleModeBest = 2
33
+ typealias "SDL_ScaleMode", "int"
34
+
35
+ SDL_TEXTUREACCESS_STATIC = 0
36
+ SDL_TEXTUREACCESS_STREAMING = 1
37
+ SDL_TEXTUREACCESS_TARGET = 2
38
+ typealias "SDL_TextureAccess", "int"
39
+
40
+ SDL_TEXTUREMODULATE_NONE = 0x00000000
41
+ SDL_TEXTUREMODULATE_COLOR = 0x00000001
42
+ SDL_TEXTUREMODULATE_ALPHA = 0x00000002
43
+ typealias "SDL_TextureModulate", "int"
44
+
45
+ SDL_FLIP_NONE = 0x00000000
46
+ SDL_FLIP_HORIZONTAL = 0x00000001
47
+ SDL_FLIP_VERTICAL = 0x00000002
48
+ typealias "SDL_RendererFlip", "int"
49
+
50
+ extern "int SDL_GetNumRenderDrivers(void)"
51
+ extern "int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info)"
52
+ extern "int SDL_CreateWindowAndRenderer( int width, int height, Uint32 window_flags, SDL_Window **window, SDL_Renderer **renderer)"
53
+ extern "SDL_Renderer * SDL_CreateRenderer(SDL_Window * window, int index, Uint32 flags)"
54
+ extern "SDL_Renderer * SDL_CreateSoftwareRenderer(SDL_Surface * surface)"
55
+ extern "SDL_Renderer * SDL_GetRenderer(SDL_Window * window)"
56
+ extern "SDL_Window * SDL_RenderGetWindow(SDL_Renderer *renderer)"
57
+ extern "int SDL_GetRendererInfo(SDL_Renderer * renderer, SDL_RendererInfo * info)"
58
+ extern "int SDL_GetRendererOutputSize(SDL_Renderer * renderer, int *w, int *h)"
59
+ extern "SDL_Texture * SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int h)"
60
+ extern "SDL_Texture * SDL_CreateTextureFromSurface(SDL_Renderer * renderer, SDL_Surface * surface)"
61
+ extern "int SDL_QueryTexture(SDL_Texture * texture, Uint32 * format, int *access, int *w, int *h)"
62
+ extern "int SDL_SetTextureColorMod(SDL_Texture * texture, Uint8 r, Uint8 g, Uint8 b)"
63
+ extern "int SDL_GetTextureColorMod(SDL_Texture * texture, Uint8 * r, Uint8 * g, Uint8 * b)"
64
+ extern "int SDL_SetTextureAlphaMod(SDL_Texture * texture, Uint8 alpha)"
65
+ extern "int SDL_GetTextureAlphaMod(SDL_Texture * texture, Uint8 * alpha)"
66
+ extern "int SDL_SetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode blendMode)"
67
+ extern "int SDL_GetTextureBlendMode(SDL_Texture * texture, SDL_BlendMode *blendMode)"
68
+ extern "int SDL_SetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode scaleMode)"
69
+ extern "int SDL_GetTextureScaleMode(SDL_Texture * texture, SDL_ScaleMode *scaleMode)"
70
+ extern "int SDL_SetTextureUserData(SDL_Texture * texture, void *userdata)"
71
+ extern "void * SDL_GetTextureUserData(SDL_Texture * texture)"
72
+ extern "int SDL_UpdateTexture(SDL_Texture * texture, const SDL_Rect * rect, const void *pixels, int pitch)"
73
+ extern "int SDL_UpdateYUVTexture(SDL_Texture * texture, const SDL_Rect * rect, const Uint8 *Yplane, int Ypitch, const Uint8 *Uplane, int Upitch, const Uint8 *Vplane, int Vpitch)"
74
+ extern "int SDL_UpdateNVTexture(SDL_Texture * texture, const SDL_Rect * rect, const Uint8 *Yplane, int Ypitch, const Uint8 *UVplane, int UVpitch)"
75
+ extern "int SDL_LockTexture(SDL_Texture * texture, const SDL_Rect * rect, void **pixels, int *pitch)"
76
+ extern "int SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, SDL_Surface **surface)"
77
+ extern "void SDL_UnlockTexture(SDL_Texture * texture)"
78
+ extern "SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)"
79
+ extern "int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)"
80
+ extern "SDL_Texture * SDL_GetRenderTarget(SDL_Renderer *renderer)"
81
+ extern "int SDL_RenderSetLogicalSize(SDL_Renderer * renderer, int w, int h)"
82
+ extern "void SDL_RenderGetLogicalSize(SDL_Renderer * renderer, int *w, int *h)"
83
+ extern "int SDL_RenderSetIntegerScale(SDL_Renderer * renderer, SDL_bool enable)"
84
+ extern "SDL_bool SDL_RenderGetIntegerScale(SDL_Renderer * renderer)"
85
+ extern "int SDL_RenderSetViewport(SDL_Renderer * renderer, const SDL_Rect * rect)"
86
+ extern "void SDL_RenderGetViewport(SDL_Renderer * renderer, SDL_Rect * rect)"
87
+ extern "int SDL_RenderSetClipRect(SDL_Renderer * renderer, const SDL_Rect * rect)"
88
+ extern "void SDL_RenderGetClipRect(SDL_Renderer * renderer, SDL_Rect * rect)"
89
+ extern "SDL_bool SDL_RenderIsClipEnabled(SDL_Renderer * renderer)"
90
+ extern "int SDL_RenderSetScale(SDL_Renderer * renderer, float scaleX, float scaleY)"
91
+ extern "void SDL_RenderGetScale(SDL_Renderer * renderer, float *scaleX, float *scaleY)"
92
+ extern "void SDL_RenderWindowToLogical(SDL_Renderer * renderer, int windowX, int windowY, float *logicalX, float *logicalY)"
93
+ extern "void SDL_RenderLogicalToWindow(SDL_Renderer * renderer, float logicalX, float logicalY, int *windowX, int *windowY)"
94
+ extern "int SDL_SetRenderDrawColor(SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a)"
95
+ extern "int SDL_GetRenderDrawColor(SDL_Renderer * renderer, Uint8 * r, Uint8 * g, Uint8 * b, Uint8 * a)"
96
+ extern "int SDL_SetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode blendMode)"
97
+ extern "int SDL_GetRenderDrawBlendMode(SDL_Renderer * renderer, SDL_BlendMode *blendMode)"
98
+ extern "int SDL_RenderClear(SDL_Renderer * renderer)"
99
+ extern "int SDL_RenderDrawPoint(SDL_Renderer * renderer, int x, int y)"
100
+ extern "int SDL_RenderDrawPoints(SDL_Renderer * renderer, const SDL_Point * points, int count)"
101
+ extern "int SDL_RenderDrawLine(SDL_Renderer * renderer, int x1, int y1, int x2, int y2)"
102
+ extern "int SDL_RenderDrawLines(SDL_Renderer * renderer, const SDL_Point * points, int count)"
103
+ extern "int SDL_RenderDrawRect(SDL_Renderer * renderer, const SDL_Rect * rect)"
104
+ extern "int SDL_RenderDrawRects(SDL_Renderer * renderer, const SDL_Rect * rects, int count)"
105
+ extern "int SDL_RenderFillRect(SDL_Renderer * renderer, const SDL_Rect * rect)"
106
+ extern "int SDL_RenderFillRects(SDL_Renderer * renderer, const SDL_Rect * rects, int count)"
107
+ extern "int SDL_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect)"
108
+ extern "int SDL_RenderCopyEx(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_Rect * dstrect, const double angle, const SDL_Point *center, const SDL_RendererFlip flip)"
109
+ extern "int SDL_RenderDrawPointF(SDL_Renderer * renderer, float x, float y)"
110
+ extern "int SDL_RenderDrawPointsF(SDL_Renderer * renderer, const SDL_FPoint * points, int count)"
111
+ extern "int SDL_RenderDrawLineF(SDL_Renderer * renderer, float x1, float y1, float x2, float y2)"
112
+ extern "int SDL_RenderDrawLinesF(SDL_Renderer * renderer, const SDL_FPoint * points, int count)"
113
+ extern "int SDL_RenderDrawRectF(SDL_Renderer * renderer, const SDL_FRect * rect)"
114
+ extern "int SDL_RenderDrawRectsF(SDL_Renderer * renderer, const SDL_FRect * rects, int count)"
115
+ extern "int SDL_RenderFillRectF(SDL_Renderer * renderer, const SDL_FRect * rect)"
116
+ extern "int SDL_RenderFillRectsF(SDL_Renderer * renderer, const SDL_FRect * rects, int count)"
117
+ extern "int SDL_RenderCopyF(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect)"
118
+ extern "int SDL_RenderCopyExF(SDL_Renderer * renderer, SDL_Texture * texture, const SDL_Rect * srcrect, const SDL_FRect * dstrect, const double angle, const SDL_FPoint *center, const SDL_RendererFlip flip)"
119
+ extern "int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices)"
120
+ extern "int SDL_RenderGeometryRaw(SDL_Renderer *renderer, SDL_Texture *texture, const float *xy, int xy_stride, const SDL_Color *color, int color_stride, const float *uv, int uv_stride, int num_vertices, const void *indices, int num_indices, int size_indices)"
121
+ extern "int SDL_RenderReadPixels(SDL_Renderer * renderer, const SDL_Rect * rect, Uint32 format, void *pixels, int pitch)"
122
+ extern "void SDL_RenderPresent(SDL_Renderer * renderer)"
123
+ extern "void SDL_DestroyTexture(SDL_Texture * texture)"
124
+ extern "void SDL_DestroyRenderer(SDL_Renderer * renderer)"
125
+ extern "int SDL_RenderFlush(SDL_Renderer * renderer)"
126
+ extern "int SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh)"
127
+ extern "int SDL_GL_UnbindTexture(SDL_Texture *texture)"
128
+ extern "void * SDL_RenderGetMetalLayer(SDL_Renderer * renderer)"
129
+ extern "void * SDL_RenderGetMetalCommandEncoder(SDL_Renderer * renderer)"
130
+ extern "int SDL_RenderSetVSync(SDL_Renderer* renderer, int vsync)"
131
+ end
@@ -1,2 +1,2 @@
1
- module SDLRuby::SDL
2
- end
1
+ module SDLRuby::SDL
2
+ end
@@ -1,78 +1,78 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
- require_relative "SDL_error.h"
4
-
5
- SDL_RWOPS_UNKNOWN = 0
6
- SDL_RWOPS_WINFILE = 1
7
- SDL_RWOPS_STDFILE = 2
8
- SDL_RWOPS_JNIFILE = 3
9
- SDL_RWOPS_MEMORY = 4
10
- SDL_RWOPS_MEMORY_RO = 5
11
-
12
- SDL_RWops = struct(
13
- [
14
- "void *size",
15
- "void *seek",
16
- "void *read",
17
- "void *write",
18
- "void *close",
19
- "Uint32 type",
20
- { hidden: union(
21
- [
22
- # if defined(__ANDROID__)
23
- { androidio: struct(["void *asset"]) },
24
- # elsif defined(__WIN32__) || defined(__GDK__)
25
- { windowsio: struct([
26
- "SDL_bool append",
27
- "void *h",
28
- { buffer: struct(["void *data", "size_t size", "size_t left"]) }
29
- ]) },
30
- # end
31
- # if defined(HAVE_STDIO_H)
32
- { stdio: struct(["SDL_bool autoclose", "FILE *fp"]) },
33
- # end
34
- { mem: struct(["Uint8 *base", "Uint8 *here", "Uint8 *stop"]) },
35
- { unknown: struct(["void *data1", "void *data2"]) }
36
- ]
37
- ) }
38
- ]
39
- )
40
-
41
- extern "SDL_RWops * SDL_RWFromFile(const char *file, const char *mode)"
42
- # if defined(HAVE_STDIO_H)
43
- # extern "SDL_RWops * SDL_RWFromFP(FILE * fp, SDL_bool autoclose)"
44
- # else
45
- # extern "SDL_RWops * SDL_RWFromFP(void * fp, SDL_bool autoclose)"
46
- # end
47
- extern "SDL_RWops * SDL_RWFromMem(void *mem, int size)"
48
- extern "SDL_RWops * SDL_RWFromConstMem(const void *mem, int size)"
49
- extern "SDL_RWops * SDL_AllocRW(void)"
50
- extern "void SDL_FreeRW(SDL_RWops * area)"
51
-
52
- RW_SEEK_SET = 0
53
- RW_SEEK_CUR = 1
54
- RW_SEEK_END = 2
55
-
56
- extern "Sint64 SDL_RWsize(SDL_RWops *context)"
57
- extern "Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)"
58
- extern "Sint64 SDL_RWtell(SDL_RWops *context)"
59
- extern "size_t SDL_RWread(SDL_RWops *context, void *ptr, size_t size, size_t maxnum)"
60
- extern "size_t SDL_RWwrite(SDL_RWops *context, const void *ptr, size_t size, size_t num)"
61
- extern "int SDL_RWclose(SDL_RWops *context)"
62
- extern "void * SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)"
63
- extern "void * SDL_LoadFile(const char *file, size_t *datasize)"
64
- extern "Uint8 SDL_ReadU8(SDL_RWops * src)"
65
- extern "Uint16 SDL_ReadLE16(SDL_RWops * src)"
66
- extern "Uint16 SDL_ReadBE16(SDL_RWops * src)"
67
- extern "Uint32 SDL_ReadLE32(SDL_RWops * src)"
68
- extern "Uint32 SDL_ReadBE32(SDL_RWops * src)"
69
- extern "Uint64 SDL_ReadLE64(SDL_RWops * src)"
70
- extern "Uint64 SDL_ReadBE64(SDL_RWops * src)"
71
- extern "size_t SDL_WriteU8(SDL_RWops * dst, Uint8 value)"
72
- extern "size_t SDL_WriteLE16(SDL_RWops * dst, Uint16 value)"
73
- extern "size_t SDL_WriteBE16(SDL_RWops * dst, Uint16 value)"
74
- extern "size_t SDL_WriteLE32(SDL_RWops * dst, Uint32 value)"
75
- extern "size_t SDL_WriteBE32(SDL_RWops * dst, Uint32 value)"
76
- extern "size_t SDL_WriteLE64(SDL_RWops * dst, Uint64 value)"
77
- extern "size_t SDL_WriteBE64(SDL_RWops * dst, Uint64 value)"
78
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+
5
+ SDL_RWOPS_UNKNOWN = 0
6
+ SDL_RWOPS_WINFILE = 1
7
+ SDL_RWOPS_STDFILE = 2
8
+ SDL_RWOPS_JNIFILE = 3
9
+ SDL_RWOPS_MEMORY = 4
10
+ SDL_RWOPS_MEMORY_RO = 5
11
+
12
+ SDL_RWops = struct(
13
+ [
14
+ "void *size",
15
+ "void *seek",
16
+ "void *read",
17
+ "void *write",
18
+ "void *close",
19
+ "Uint32 type",
20
+ { hidden: union(
21
+ [
22
+ # if defined(__ANDROID__)
23
+ { androidio: struct(["void *asset"]) },
24
+ # elsif defined(__WIN32__) || defined(__GDK__)
25
+ { windowsio: struct([
26
+ "SDL_bool append",
27
+ "void *h",
28
+ { buffer: struct(["void *data", "size_t size", "size_t left"]) }
29
+ ]) },
30
+ # end
31
+ # if defined(HAVE_STDIO_H)
32
+ { stdio: struct(["SDL_bool autoclose", "FILE *fp"]) },
33
+ # end
34
+ { mem: struct(["Uint8 *base", "Uint8 *here", "Uint8 *stop"]) },
35
+ { unknown: struct(["void *data1", "void *data2"]) }
36
+ ]
37
+ ) }
38
+ ]
39
+ )
40
+
41
+ extern "SDL_RWops * SDL_RWFromFile(const char *file, const char *mode)"
42
+ # if defined(HAVE_STDIO_H)
43
+ # extern "SDL_RWops * SDL_RWFromFP(FILE * fp, SDL_bool autoclose)"
44
+ # else
45
+ # extern "SDL_RWops * SDL_RWFromFP(void * fp, SDL_bool autoclose)"
46
+ # end
47
+ extern "SDL_RWops * SDL_RWFromMem(void *mem, int size)"
48
+ extern "SDL_RWops * SDL_RWFromConstMem(const void *mem, int size)"
49
+ extern "SDL_RWops * SDL_AllocRW(void)"
50
+ extern "void SDL_FreeRW(SDL_RWops * area)"
51
+
52
+ RW_SEEK_SET = 0
53
+ RW_SEEK_CUR = 1
54
+ RW_SEEK_END = 2
55
+
56
+ extern "Sint64 SDL_RWsize(SDL_RWops *context)"
57
+ extern "Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)"
58
+ extern "Sint64 SDL_RWtell(SDL_RWops *context)"
59
+ extern "size_t SDL_RWread(SDL_RWops *context, void *ptr, size_t size, size_t maxnum)"
60
+ extern "size_t SDL_RWwrite(SDL_RWops *context, const void *ptr, size_t size, size_t num)"
61
+ extern "int SDL_RWclose(SDL_RWops *context)"
62
+ extern "void * SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)"
63
+ extern "void * SDL_LoadFile(const char *file, size_t *datasize)"
64
+ extern "Uint8 SDL_ReadU8(SDL_RWops * src)"
65
+ extern "Uint16 SDL_ReadLE16(SDL_RWops * src)"
66
+ extern "Uint16 SDL_ReadBE16(SDL_RWops * src)"
67
+ extern "Uint32 SDL_ReadLE32(SDL_RWops * src)"
68
+ extern "Uint32 SDL_ReadBE32(SDL_RWops * src)"
69
+ extern "Uint64 SDL_ReadLE64(SDL_RWops * src)"
70
+ extern "Uint64 SDL_ReadBE64(SDL_RWops * src)"
71
+ extern "size_t SDL_WriteU8(SDL_RWops * dst, Uint8 value)"
72
+ extern "size_t SDL_WriteLE16(SDL_RWops * dst, Uint16 value)"
73
+ extern "size_t SDL_WriteBE16(SDL_RWops * dst, Uint16 value)"
74
+ extern "size_t SDL_WriteLE32(SDL_RWops * dst, Uint32 value)"
75
+ extern "size_t SDL_WriteBE32(SDL_RWops * dst, Uint32 value)"
76
+ extern "size_t SDL_WriteLE64(SDL_RWops * dst, Uint64 value)"
77
+ extern "size_t SDL_WriteBE64(SDL_RWops * dst, Uint64 value)"
78
+ end