SDLRuby 0.1.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/lib/SDLRuby/event/accessor.rb +62 -63
- data/lib/SDLRuby/event/type.rb +1 -1
- data/lib/SDLRuby/event.rb +101 -80
- data/lib/SDLRuby/sdl/include/SDL.h.rb +11 -0
- data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +125 -14
- data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +24 -0
- data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +10 -1
- data/lib/SDLRuby/sdl/include/SDL_error.h.rb +21 -2
- data/lib/SDLRuby/sdl/include/SDL_events.h.rb +458 -18
- data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +92 -11
- data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +10 -4
- data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +186 -1
- data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +72 -10
- data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +13 -4
- data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +287 -2
- data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +9 -2
- data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +50 -2
- data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +39 -8
- data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +271 -11
- data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +43 -14
- data/lib/SDLRuby/sdl/include/SDL_render.h.rb +112 -75
- data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +63 -19
- data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +248 -1
- data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +33 -6
- data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +42 -4
- data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +92 -29
- data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +1 -7
- data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +11 -3
- data/lib/SDLRuby/sdl/include/SDL_version.h.rb +10 -2
- data/lib/SDLRuby/sdl/include/SDL_video.h.rb +221 -74
- data/lib/SDLRuby/sdl/sdl.rb +0 -50
- data/lib/SDLRuby/sdl.rb +7 -8
- data/lib/SDLRuby/version.rb +1 -1
- data/sig/lib/SDLRuby/event/accessor.rbs +157 -0
- data/sig/lib/SDLRuby/event/type.rbs +67 -0
- data/sig/lib/SDLRuby/event.rbs +47 -0
- data/sig/lib/SDLRuby/sdl.rbs +655 -0
- metadata +6 -22
- data/lib/SDLRuby/sdl/sdl_audio.rb +0 -75
- data/lib/SDLRuby/sdl/sdl_blendmode.rb +0 -10
- data/lib/SDLRuby/sdl/sdl_error.rb +0 -5
- data/lib/SDLRuby/sdl/sdl_events.rb +0 -470
- data/lib/SDLRuby/sdl/sdl_hints.rb +0 -9
- data/lib/SDLRuby/sdl/sdl_keyboard.rb +0 -12
- data/lib/SDLRuby/sdl/sdl_locale.rb +0 -8
- data/lib/SDLRuby/sdl/sdl_message_box.rb +0 -7
- data/lib/SDLRuby/sdl/sdl_mouse.rb +0 -32
- data/lib/SDLRuby/sdl/sdl_palette.rb +0 -12
- data/lib/SDLRuby/sdl/sdl_pixels.rb +0 -138
- data/lib/SDLRuby/sdl/sdl_rect.rb +0 -11
- data/lib/SDLRuby/sdl/sdl_render.rb +0 -35
- data/lib/SDLRuby/sdl/sdl_rw_ops.rb +0 -29
- data/lib/SDLRuby/sdl/sdl_scancode.rb +0 -255
- data/lib/SDLRuby/sdl/sdl_surface.rb +0 -27
- data/lib/SDLRuby/sdl/sdl_version.rb +0 -5
- data/lib/SDLRuby/sdl/sdl_video.rb +0 -104
- data/sig/SDLRuby/event.rbs +0 -104
- data/sig/SDLRuby/sdl.rbs +0 -606
@@ -1,94 +1,131 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
|
-
require_relative
|
3
|
-
require_relative
|
4
|
-
require_relative
|
2
|
+
require_relative "SDL_stdinc.h"
|
3
|
+
require_relative "SDL_rect.h"
|
4
|
+
require_relative "SDL_video.h"
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
SDL_RENDERER_SOFTWARE = 0x00000001,
|
7
|
+
SDL_RENDERER_ACCELERATED = 0x00000002,
|
8
|
+
SDL_RENDERER_PRESENTVSYNC = 0x00000004,
|
9
|
+
SDL_RENDERER_TARGETTEXTURE = 0x00000008
|
8
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
|
9
33
|
typealias "SDL_ScaleMode", "int"
|
34
|
+
|
35
|
+
SDL_TEXTUREACCESS_STATIC = 0
|
36
|
+
SDL_TEXTUREACCESS_STREAMING = 1
|
37
|
+
SDL_TEXTUREACCESS_TARGET = 2
|
10
38
|
typealias "SDL_TextureAccess", "int"
|
39
|
+
|
40
|
+
SDL_TEXTUREMODULATE_NONE = 0x00000000
|
41
|
+
SDL_TEXTUREMODULATE_COLOR = 0x00000001
|
42
|
+
SDL_TEXTUREMODULATE_ALPHA = 0x00000002
|
11
43
|
typealias "SDL_TextureModulate", "int"
|
44
|
+
|
45
|
+
SDL_FLIP_NONE = 0x00000000
|
46
|
+
SDL_FLIP_HORIZONTAL = 0x00000001
|
47
|
+
SDL_FLIP_VERTICAL = 0x00000002
|
12
48
|
typealias "SDL_RendererFlip", "int"
|
49
|
+
|
13
50
|
extern "int SDL_GetNumRenderDrivers(void)"
|
14
|
-
extern "int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo *info)"
|
51
|
+
extern "int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo * info)"
|
15
52
|
extern "int SDL_CreateWindowAndRenderer( int width, int height, Uint32 window_flags, SDL_Window **window, SDL_Renderer **renderer)"
|
16
|
-
extern "SDL_Renderer * SDL_CreateRenderer(SDL_Window *window, int index, Uint32 flags)"
|
17
|
-
extern "SDL_Renderer * SDL_CreateSoftwareRenderer(SDL_Surface *surface)"
|
18
|
-
extern "SDL_Renderer * SDL_GetRenderer(SDL_Window *window)"
|
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)"
|
19
56
|
extern "SDL_Window * SDL_RenderGetWindow(SDL_Renderer *renderer)"
|
20
|
-
extern "int SDL_GetRendererInfo(SDL_Renderer *renderer, SDL_RendererInfo *info)"
|
21
|
-
extern "int SDL_GetRendererOutputSize(SDL_Renderer *renderer, int *w, int *h)"
|
22
|
-
extern "SDL_Texture * SDL_CreateTexture(SDL_Renderer *renderer, Uint32 format, int access, int w, int h)"
|
23
|
-
extern "SDL_Texture * SDL_CreateTextureFromSurface(SDL_Renderer *renderer, SDL_Surface *surface)"
|
24
|
-
extern "int SDL_QueryTexture(SDL_Texture *texture, Uint32 *format, int *access, int *w, int *h)"
|
25
|
-
extern "int SDL_SetTextureColorMod(SDL_Texture *texture, Uint8 r, Uint8 g, Uint8 b)"
|
26
|
-
extern "int SDL_GetTextureColorMod(SDL_Texture *texture, Uint8 *r, Uint8 *g, Uint8 *b)"
|
27
|
-
extern "int SDL_SetTextureAlphaMod(SDL_Texture *texture, Uint8 alpha)"
|
28
|
-
extern "int SDL_GetTextureAlphaMod(SDL_Texture *texture, Uint8 *alpha)"
|
29
|
-
extern "int SDL_SetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode blendMode)"
|
30
|
-
extern "int SDL_GetTextureBlendMode(SDL_Texture *texture, SDL_BlendMode *blendMode)"
|
31
|
-
extern "int SDL_SetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode scaleMode)"
|
32
|
-
extern "int SDL_GetTextureScaleMode(SDL_Texture *texture, SDL_ScaleMode *scaleMode)"
|
33
|
-
extern "int SDL_SetTextureUserData(SDL_Texture *texture, void *userdata)"
|
34
|
-
extern "void * SDL_GetTextureUserData(SDL_Texture *texture)"
|
35
|
-
extern "int SDL_UpdateTexture(SDL_Texture *texture, const SDL_Rect *rect, const void *pixels, int pitch)"
|
36
|
-
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)"
|
37
|
-
extern "int SDL_UpdateNVTexture(SDL_Texture *texture, const SDL_Rect *rect, const Uint8 *Yplane, int Ypitch, const Uint8 *UVplane, int UVpitch)"
|
38
|
-
extern "int SDL_LockTexture(SDL_Texture *texture, const SDL_Rect *rect, void **pixels, int *pitch)"
|
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)"
|
39
76
|
extern "int SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, SDL_Surface **surface)"
|
40
|
-
extern "void SDL_UnlockTexture(SDL_Texture *texture)"
|
77
|
+
extern "void SDL_UnlockTexture(SDL_Texture * texture)"
|
41
78
|
extern "SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)"
|
42
79
|
extern "int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)"
|
43
80
|
extern "SDL_Texture * SDL_GetRenderTarget(SDL_Renderer *renderer)"
|
44
|
-
extern "int SDL_RenderSetLogicalSize(SDL_Renderer *renderer, int w, int h)"
|
45
|
-
extern "void SDL_RenderGetLogicalSize(SDL_Renderer *renderer, int *w, int *h)"
|
46
|
-
extern "int SDL_RenderSetIntegerScale(SDL_Renderer *renderer, SDL_bool enable)"
|
47
|
-
extern "SDL_bool SDL_RenderGetIntegerScale(SDL_Renderer *renderer)"
|
48
|
-
extern "int SDL_RenderSetViewport(SDL_Renderer *renderer, const SDL_Rect *rect)"
|
49
|
-
extern "void SDL_RenderGetViewport(SDL_Renderer *renderer, SDL_Rect *rect)"
|
50
|
-
extern "int SDL_RenderSetClipRect(SDL_Renderer *renderer, const SDL_Rect *rect)"
|
51
|
-
extern "void SDL_RenderGetClipRect(SDL_Renderer *renderer, SDL_Rect *rect)"
|
52
|
-
extern "SDL_bool SDL_RenderIsClipEnabled(SDL_Renderer *renderer)"
|
53
|
-
extern "int SDL_RenderSetScale(SDL_Renderer *renderer, float scaleX, float scaleY)"
|
54
|
-
extern "void SDL_RenderGetScale(SDL_Renderer *renderer, float *scaleX, float *scaleY)"
|
55
|
-
extern "void SDL_RenderWindowToLogical(SDL_Renderer *renderer, int windowX, int windowY, float *logicalX, float *logicalY)"
|
56
|
-
extern "void SDL_RenderLogicalToWindow(SDL_Renderer *renderer, float logicalX, float logicalY, int *windowX, int *windowY)"
|
57
|
-
extern "int SDL_SetRenderDrawColor(SDL_Renderer *renderer, Uint8 r, Uint8 g, Uint8 b, Uint8 a)"
|
58
|
-
extern "int SDL_GetRenderDrawColor(SDL_Renderer *renderer, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)"
|
59
|
-
extern "int SDL_SetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode blendMode)"
|
60
|
-
extern "int SDL_GetRenderDrawBlendMode(SDL_Renderer *renderer, SDL_BlendMode *blendMode)"
|
61
|
-
extern "int SDL_RenderClear(SDL_Renderer *renderer)"
|
62
|
-
extern "int SDL_RenderDrawPoint(SDL_Renderer *renderer, int x, int y)"
|
63
|
-
extern "int SDL_RenderDrawPoints(SDL_Renderer *renderer, const SDL_Point *points, int count)"
|
64
|
-
extern "int SDL_RenderDrawLine(SDL_Renderer *renderer, int x1, int y1, int x2, int y2)"
|
65
|
-
extern "int SDL_RenderDrawLines(SDL_Renderer *renderer, const SDL_Point *points, int count)"
|
66
|
-
extern "int SDL_RenderDrawRect(SDL_Renderer *renderer, const SDL_Rect *rect)"
|
67
|
-
extern "int SDL_RenderDrawRects(SDL_Renderer *renderer, const SDL_Rect *rects, int count)"
|
68
|
-
extern "int SDL_RenderFillRect(SDL_Renderer *renderer, const SDL_Rect *rect)"
|
69
|
-
extern "int SDL_RenderFillRects(SDL_Renderer *renderer, const SDL_Rect *rects, int count)"
|
70
|
-
extern "int SDL_RenderCopy(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_Rect *dstrect)"
|
71
|
-
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)"
|
72
|
-
extern "int SDL_RenderDrawPointF(SDL_Renderer *renderer, float x, float y)"
|
73
|
-
extern "int SDL_RenderDrawPointsF(SDL_Renderer *renderer, const SDL_FPoint *points, int count)"
|
74
|
-
extern "int SDL_RenderDrawLineF(SDL_Renderer *renderer, float x1, float y1, float x2, float y2)"
|
75
|
-
extern "int SDL_RenderDrawLinesF(SDL_Renderer *renderer, const SDL_FPoint *points, int count)"
|
76
|
-
extern "int SDL_RenderDrawRectF(SDL_Renderer *renderer, const SDL_FRect *rect)"
|
77
|
-
extern "int SDL_RenderDrawRectsF(SDL_Renderer *renderer, const SDL_FRect *rects, int count)"
|
78
|
-
extern "int SDL_RenderFillRectF(SDL_Renderer *renderer, const SDL_FRect *rect)"
|
79
|
-
extern "int SDL_RenderFillRectsF(SDL_Renderer *renderer, const SDL_FRect *rects, int count)"
|
80
|
-
extern "int SDL_RenderCopyF(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Rect *srcrect, const SDL_FRect *dstrect)"
|
81
|
-
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)"
|
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)"
|
82
119
|
extern "int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices)"
|
83
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)"
|
84
|
-
extern "int SDL_RenderReadPixels(SDL_Renderer *renderer, const SDL_Rect *rect, Uint32 format, void *pixels, int pitch)"
|
85
|
-
extern "void SDL_RenderPresent(SDL_Renderer *renderer)"
|
86
|
-
extern "void SDL_DestroyTexture(SDL_Texture *texture)"
|
87
|
-
extern "void SDL_DestroyRenderer(SDL_Renderer *renderer)"
|
88
|
-
extern "int SDL_RenderFlush(SDL_Renderer *renderer)"
|
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)"
|
89
126
|
extern "int SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh)"
|
90
127
|
extern "int SDL_GL_UnbindTexture(SDL_Texture *texture)"
|
91
|
-
extern "void * SDL_RenderGetMetalLayer(SDL_Renderer *renderer)"
|
92
|
-
extern "void * SDL_RenderGetMetalCommandEncoder(SDL_Renderer *renderer)"
|
93
|
-
extern "int SDL_RenderSetVSync(SDL_Renderer*renderer, int vsync)"
|
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)"
|
94
131
|
end
|
@@ -1,14 +1,58 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
|
-
require_relative
|
3
|
-
require_relative
|
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
|
+
)
|
4
40
|
|
5
41
|
extern "SDL_RWops * SDL_RWFromFile(const char *file, const char *mode)"
|
6
|
-
|
7
|
-
extern "SDL_RWops * SDL_RWFromFP(
|
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
|
8
47
|
extern "SDL_RWops * SDL_RWFromMem(void *mem, int size)"
|
9
48
|
extern "SDL_RWops * SDL_RWFromConstMem(const void *mem, int size)"
|
10
49
|
extern "SDL_RWops * SDL_AllocRW(void)"
|
11
|
-
extern "void SDL_FreeRW(SDL_RWops *area)"
|
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
|
+
|
12
56
|
extern "Sint64 SDL_RWsize(SDL_RWops *context)"
|
13
57
|
extern "Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)"
|
14
58
|
extern "Sint64 SDL_RWtell(SDL_RWops *context)"
|
@@ -17,18 +61,18 @@ module SDLRuby::SDL
|
|
17
61
|
extern "int SDL_RWclose(SDL_RWops *context)"
|
18
62
|
extern "void * SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)"
|
19
63
|
extern "void * SDL_LoadFile(const char *file, size_t *datasize)"
|
20
|
-
extern "Uint8 SDL_ReadU8(SDL_RWops *src)"
|
21
|
-
extern "Uint16 SDL_ReadLE16(SDL_RWops *src)"
|
22
|
-
extern "Uint16 SDL_ReadBE16(SDL_RWops *src)"
|
23
|
-
extern "Uint32 SDL_ReadLE32(SDL_RWops *src)"
|
24
|
-
extern "Uint32 SDL_ReadBE32(SDL_RWops *src)"
|
25
|
-
extern "Uint64 SDL_ReadLE64(SDL_RWops *src)"
|
26
|
-
extern "Uint64 SDL_ReadBE64(SDL_RWops *src)"
|
27
|
-
extern "size_t SDL_WriteU8(SDL_RWops *dst, Uint8 value)"
|
28
|
-
extern "size_t SDL_WriteLE16(SDL_RWops *dst, Uint16 value)"
|
29
|
-
extern "size_t SDL_WriteBE16(SDL_RWops *dst, Uint16 value)"
|
30
|
-
extern "size_t SDL_WriteLE32(SDL_RWops *dst, Uint32 value)"
|
31
|
-
extern "size_t SDL_WriteBE32(SDL_RWops *dst, Uint32 value)"
|
32
|
-
extern "size_t SDL_WriteLE64(SDL_RWops *dst, Uint64 value)"
|
33
|
-
extern "size_t SDL_WriteBE64(SDL_RWops *dst, Uint64 value)"
|
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)"
|
34
78
|
end
|
@@ -1,5 +1,252 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
2
|
require_relative 'SDL_stdinc.h.rb'
|
3
|
-
|
3
|
+
SDL_SCANCODE_UNKNOWN = 0
|
4
|
+
SDL_SCANCODE_A = 4
|
5
|
+
SDL_SCANCODE_B = 5
|
6
|
+
SDL_SCANCODE_C = 6
|
7
|
+
SDL_SCANCODE_D = 7
|
8
|
+
SDL_SCANCODE_E = 8
|
9
|
+
SDL_SCANCODE_F = 9
|
10
|
+
SDL_SCANCODE_G = 10
|
11
|
+
SDL_SCANCODE_H = 11
|
12
|
+
SDL_SCANCODE_I = 12
|
13
|
+
SDL_SCANCODE_J = 13
|
14
|
+
SDL_SCANCODE_K = 14
|
15
|
+
SDL_SCANCODE_L = 15
|
16
|
+
SDL_SCANCODE_M = 16
|
17
|
+
SDL_SCANCODE_N = 17
|
18
|
+
SDL_SCANCODE_O = 18
|
19
|
+
SDL_SCANCODE_P = 19
|
20
|
+
SDL_SCANCODE_Q = 20
|
21
|
+
SDL_SCANCODE_R = 21
|
22
|
+
SDL_SCANCODE_S = 22
|
23
|
+
SDL_SCANCODE_T = 23
|
24
|
+
SDL_SCANCODE_U = 24
|
25
|
+
SDL_SCANCODE_V = 25
|
26
|
+
SDL_SCANCODE_W = 26
|
27
|
+
SDL_SCANCODE_X = 27
|
28
|
+
SDL_SCANCODE_Y = 28
|
29
|
+
SDL_SCANCODE_Z = 29
|
30
|
+
SDL_SCANCODE_1 = 30
|
31
|
+
SDL_SCANCODE_2 = 31
|
32
|
+
SDL_SCANCODE_3 = 32
|
33
|
+
SDL_SCANCODE_4 = 33
|
34
|
+
SDL_SCANCODE_5 = 34
|
35
|
+
SDL_SCANCODE_6 = 35
|
36
|
+
SDL_SCANCODE_7 = 36
|
37
|
+
SDL_SCANCODE_8 = 37
|
38
|
+
SDL_SCANCODE_9 = 38
|
39
|
+
SDL_SCANCODE_0 = 39
|
40
|
+
SDL_SCANCODE_RETURN = 40
|
41
|
+
SDL_SCANCODE_ESCAPE = 41
|
42
|
+
SDL_SCANCODE_BACKSPACE = 42
|
43
|
+
SDL_SCANCODE_TAB = 43
|
44
|
+
SDL_SCANCODE_SPACE = 44
|
45
|
+
SDL_SCANCODE_MINUS = 45
|
46
|
+
SDL_SCANCODE_EQUALS = 46
|
47
|
+
SDL_SCANCODE_LEFTBRACKET = 47
|
48
|
+
SDL_SCANCODE_RIGHTBRACKET = 48
|
49
|
+
SDL_SCANCODE_BACKSLASH = 49
|
50
|
+
SDL_SCANCODE_NONUSHASH = 50
|
51
|
+
SDL_SCANCODE_SEMICOLON = 51
|
52
|
+
SDL_SCANCODE_APOSTROPHE = 52
|
53
|
+
SDL_SCANCODE_GRAVE = 53
|
54
|
+
SDL_SCANCODE_COMMA = 54
|
55
|
+
SDL_SCANCODE_PERIOD = 55
|
56
|
+
SDL_SCANCODE_SLASH = 56
|
57
|
+
SDL_SCANCODE_CAPSLOCK = 57
|
58
|
+
SDL_SCANCODE_F1 = 58
|
59
|
+
SDL_SCANCODE_F2 = 59
|
60
|
+
SDL_SCANCODE_F3 = 60
|
61
|
+
SDL_SCANCODE_F4 = 61
|
62
|
+
SDL_SCANCODE_F5 = 62
|
63
|
+
SDL_SCANCODE_F6 = 63
|
64
|
+
SDL_SCANCODE_F7 = 64
|
65
|
+
SDL_SCANCODE_F8 = 65
|
66
|
+
SDL_SCANCODE_F9 = 66
|
67
|
+
SDL_SCANCODE_F10 = 67
|
68
|
+
SDL_SCANCODE_F11 = 68
|
69
|
+
SDL_SCANCODE_F12 = 69
|
70
|
+
SDL_SCANCODE_PRINTSCREEN = 70
|
71
|
+
SDL_SCANCODE_SCROLLLOCK = 71
|
72
|
+
SDL_SCANCODE_PAUSE = 72
|
73
|
+
SDL_SCANCODE_INSERT = 73
|
74
|
+
SDL_SCANCODE_HOME = 74
|
75
|
+
SDL_SCANCODE_PAGEUP = 75
|
76
|
+
SDL_SCANCODE_DELETE = 76
|
77
|
+
SDL_SCANCODE_END = 77
|
78
|
+
SDL_SCANCODE_PAGEDOWN = 78
|
79
|
+
SDL_SCANCODE_RIGHT = 79
|
80
|
+
SDL_SCANCODE_LEFT = 80
|
81
|
+
SDL_SCANCODE_DOWN = 81
|
82
|
+
SDL_SCANCODE_UP = 82
|
83
|
+
SDL_SCANCODE_NUMLOCKCLEAR = 83
|
84
|
+
SDL_SCANCODE_KP_DIVIDE = 84
|
85
|
+
SDL_SCANCODE_KP_MULTIPLY = 85
|
86
|
+
SDL_SCANCODE_KP_MINUS = 86
|
87
|
+
SDL_SCANCODE_KP_PLUS = 87
|
88
|
+
SDL_SCANCODE_KP_ENTER = 88
|
89
|
+
SDL_SCANCODE_KP_1 = 89
|
90
|
+
SDL_SCANCODE_KP_2 = 90
|
91
|
+
SDL_SCANCODE_KP_3 = 91
|
92
|
+
SDL_SCANCODE_KP_4 = 92
|
93
|
+
SDL_SCANCODE_KP_5 = 93
|
94
|
+
SDL_SCANCODE_KP_6 = 94
|
95
|
+
SDL_SCANCODE_KP_7 = 95
|
96
|
+
SDL_SCANCODE_KP_8 = 96
|
97
|
+
SDL_SCANCODE_KP_9 = 97
|
98
|
+
SDL_SCANCODE_KP_0 = 98
|
99
|
+
SDL_SCANCODE_KP_PERIOD = 99
|
100
|
+
SDL_SCANCODE_NONUSBACKSLASH = 100
|
101
|
+
SDL_SCANCODE_APPLICATION = 101
|
102
|
+
SDL_SCANCODE_POWER = 102
|
103
|
+
SDL_SCANCODE_KP_EQUALS = 103
|
104
|
+
SDL_SCANCODE_F13 = 104
|
105
|
+
SDL_SCANCODE_F14 = 105
|
106
|
+
SDL_SCANCODE_F15 = 106
|
107
|
+
SDL_SCANCODE_F16 = 107
|
108
|
+
SDL_SCANCODE_F17 = 108
|
109
|
+
SDL_SCANCODE_F18 = 109
|
110
|
+
SDL_SCANCODE_F19 = 110
|
111
|
+
SDL_SCANCODE_F20 = 111
|
112
|
+
SDL_SCANCODE_F21 = 112
|
113
|
+
SDL_SCANCODE_F22 = 113
|
114
|
+
SDL_SCANCODE_F23 = 114
|
115
|
+
SDL_SCANCODE_F24 = 115
|
116
|
+
SDL_SCANCODE_EXECUTE = 116
|
117
|
+
SDL_SCANCODE_HELP = 117
|
118
|
+
SDL_SCANCODE_MENU = 118
|
119
|
+
SDL_SCANCODE_SELECT = 119
|
120
|
+
SDL_SCANCODE_STOP = 120
|
121
|
+
SDL_SCANCODE_AGAIN = 121
|
122
|
+
SDL_SCANCODE_UNDO = 122
|
123
|
+
SDL_SCANCODE_CUT = 123
|
124
|
+
SDL_SCANCODE_COPY = 124
|
125
|
+
SDL_SCANCODE_PASTE = 125
|
126
|
+
SDL_SCANCODE_FIND = 126
|
127
|
+
SDL_SCANCODE_MUTE = 127
|
128
|
+
SDL_SCANCODE_VOLUMEUP = 128
|
129
|
+
SDL_SCANCODE_VOLUMEDOWN = 129
|
130
|
+
SDL_SCANCODE_KP_COMMA = 133
|
131
|
+
SDL_SCANCODE_KP_EQUALSAS400 = 134
|
132
|
+
SDL_SCANCODE_INTERNATIONAL1 = 135
|
133
|
+
SDL_SCANCODE_INTERNATIONAL2 = 136
|
134
|
+
SDL_SCANCODE_INTERNATIONAL3 = 137
|
135
|
+
SDL_SCANCODE_INTERNATIONAL4 = 138
|
136
|
+
SDL_SCANCODE_INTERNATIONAL5 = 139
|
137
|
+
SDL_SCANCODE_INTERNATIONAL6 = 140
|
138
|
+
SDL_SCANCODE_INTERNATIONAL7 = 141
|
139
|
+
SDL_SCANCODE_INTERNATIONAL8 = 142
|
140
|
+
SDL_SCANCODE_INTERNATIONAL9 = 143
|
141
|
+
SDL_SCANCODE_LANG1 = 144
|
142
|
+
SDL_SCANCODE_LANG2 = 145
|
143
|
+
SDL_SCANCODE_LANG3 = 146
|
144
|
+
SDL_SCANCODE_LANG4 = 147
|
145
|
+
SDL_SCANCODE_LANG5 = 148
|
146
|
+
SDL_SCANCODE_LANG6 = 149
|
147
|
+
SDL_SCANCODE_LANG7 = 150
|
148
|
+
SDL_SCANCODE_LANG8 = 151
|
149
|
+
SDL_SCANCODE_LANG9 = 152
|
150
|
+
SDL_SCANCODE_ALTERASE = 153
|
151
|
+
SDL_SCANCODE_SYSREQ = 154
|
152
|
+
SDL_SCANCODE_CANCEL = 155
|
153
|
+
SDL_SCANCODE_CLEAR = 156
|
154
|
+
SDL_SCANCODE_PRIOR = 157
|
155
|
+
SDL_SCANCODE_RETURN2 = 158
|
156
|
+
SDL_SCANCODE_SEPARATOR = 159
|
157
|
+
SDL_SCANCODE_OUT = 160
|
158
|
+
SDL_SCANCODE_OPER = 161
|
159
|
+
SDL_SCANCODE_CLEARAGAIN = 162
|
160
|
+
SDL_SCANCODE_CRSEL = 163
|
161
|
+
SDL_SCANCODE_EXSEL = 164
|
162
|
+
SDL_SCANCODE_KP_00 = 176
|
163
|
+
SDL_SCANCODE_KP_000 = 177
|
164
|
+
SDL_SCANCODE_THOUSANDSSEPARATOR = 178
|
165
|
+
SDL_SCANCODE_DECIMALSEPARATOR = 179
|
166
|
+
SDL_SCANCODE_CURRENCYUNIT = 180
|
167
|
+
SDL_SCANCODE_CURRENCYSUBUNIT = 181
|
168
|
+
SDL_SCANCODE_KP_LEFTPAREN = 182
|
169
|
+
SDL_SCANCODE_KP_RIGHTPAREN = 183
|
170
|
+
SDL_SCANCODE_KP_LEFTBRACE = 184
|
171
|
+
SDL_SCANCODE_KP_RIGHTBRACE = 185
|
172
|
+
SDL_SCANCODE_KP_TAB = 186
|
173
|
+
SDL_SCANCODE_KP_BACKSPACE = 187
|
174
|
+
SDL_SCANCODE_KP_A = 188
|
175
|
+
SDL_SCANCODE_KP_B = 189
|
176
|
+
SDL_SCANCODE_KP_C = 190
|
177
|
+
SDL_SCANCODE_KP_D = 191
|
178
|
+
SDL_SCANCODE_KP_E = 192
|
179
|
+
SDL_SCANCODE_KP_F = 193
|
180
|
+
SDL_SCANCODE_KP_XOR = 194
|
181
|
+
SDL_SCANCODE_KP_POWER = 195
|
182
|
+
SDL_SCANCODE_KP_PERCENT = 196
|
183
|
+
SDL_SCANCODE_KP_LESS = 197
|
184
|
+
SDL_SCANCODE_KP_GREATER = 198
|
185
|
+
SDL_SCANCODE_KP_AMPERSAND = 199
|
186
|
+
SDL_SCANCODE_KP_DBLAMPERSAND = 200
|
187
|
+
SDL_SCANCODE_KP_VERTICALBAR = 201
|
188
|
+
SDL_SCANCODE_KP_DBLVERTICALBAR = 202
|
189
|
+
SDL_SCANCODE_KP_COLON = 203
|
190
|
+
SDL_SCANCODE_KP_HASH = 204
|
191
|
+
SDL_SCANCODE_KP_SPACE = 205
|
192
|
+
SDL_SCANCODE_KP_AT = 206
|
193
|
+
SDL_SCANCODE_KP_EXCLAM = 207
|
194
|
+
SDL_SCANCODE_KP_MEMSTORE = 208
|
195
|
+
SDL_SCANCODE_KP_MEMRECALL = 209
|
196
|
+
SDL_SCANCODE_KP_MEMCLEAR = 210
|
197
|
+
SDL_SCANCODE_KP_MEMADD = 211
|
198
|
+
SDL_SCANCODE_KP_MEMSUBTRACT = 212
|
199
|
+
SDL_SCANCODE_KP_MEMMULTIPLY = 213
|
200
|
+
SDL_SCANCODE_KP_MEMDIVIDE = 214
|
201
|
+
SDL_SCANCODE_KP_PLUSMINUS = 215
|
202
|
+
SDL_SCANCODE_KP_CLEAR = 216
|
203
|
+
SDL_SCANCODE_KP_CLEARENTRY = 217
|
204
|
+
SDL_SCANCODE_KP_BINARY = 218
|
205
|
+
SDL_SCANCODE_KP_OCTAL = 219
|
206
|
+
SDL_SCANCODE_KP_DECIMAL = 220
|
207
|
+
SDL_SCANCODE_KP_HEXADECIMAL = 221
|
208
|
+
SDL_SCANCODE_LCTRL = 224
|
209
|
+
SDL_SCANCODE_LSHIFT = 225
|
210
|
+
SDL_SCANCODE_LALT = 226
|
211
|
+
SDL_SCANCODE_LGUI = 227
|
212
|
+
SDL_SCANCODE_RCTRL = 228
|
213
|
+
SDL_SCANCODE_RSHIFT = 229
|
214
|
+
SDL_SCANCODE_RALT = 230
|
215
|
+
SDL_SCANCODE_RGUI = 231
|
216
|
+
SDL_SCANCODE_MODE = 257
|
217
|
+
SDL_SCANCODE_AUDIONEXT = 258
|
218
|
+
SDL_SCANCODE_AUDIOPREV = 259
|
219
|
+
SDL_SCANCODE_AUDIOSTOP = 260
|
220
|
+
SDL_SCANCODE_AUDIOPLAY = 261
|
221
|
+
SDL_SCANCODE_AUDIOMUTE = 262
|
222
|
+
SDL_SCANCODE_MEDIASELECT = 263
|
223
|
+
SDL_SCANCODE_WWW = 264
|
224
|
+
SDL_SCANCODE_MAIL = 265
|
225
|
+
SDL_SCANCODE_CALCULATOR = 266
|
226
|
+
SDL_SCANCODE_COMPUTER = 267
|
227
|
+
SDL_SCANCODE_AC_SEARCH = 268
|
228
|
+
SDL_SCANCODE_AC_HOME = 269
|
229
|
+
SDL_SCANCODE_AC_BACK = 270
|
230
|
+
SDL_SCANCODE_AC_FORWARD = 271
|
231
|
+
SDL_SCANCODE_AC_STOP = 272
|
232
|
+
SDL_SCANCODE_AC_REFRESH = 273
|
233
|
+
SDL_SCANCODE_AC_BOOKMARKS = 274
|
234
|
+
SDL_SCANCODE_BRIGHTNESSDOWN = 275
|
235
|
+
SDL_SCANCODE_BRIGHTNESSUP = 276
|
236
|
+
SDL_SCANCODE_DISPLAYSWITCH = 277
|
237
|
+
SDL_SCANCODE_KBDILLUMTOGGLE = 278
|
238
|
+
SDL_SCANCODE_KBDILLUMDOWN = 279
|
239
|
+
SDL_SCANCODE_KBDILLUMUP = 280
|
240
|
+
SDL_SCANCODE_EJECT = 281
|
241
|
+
SDL_SCANCODE_SLEEP = 282
|
242
|
+
SDL_SCANCODE_APP1 = 283
|
243
|
+
SDL_SCANCODE_APP2 = 284
|
244
|
+
SDL_SCANCODE_AUDIOREWIND = 285
|
245
|
+
SDL_SCANCODE_AUDIOFASTFORWARD = 286
|
246
|
+
SDL_SCANCODE_SOFTLEFT = 287
|
247
|
+
SDL_SCANCODE_SOFTRIGHT = 288
|
248
|
+
SDL_SCANCODE_CALL = 289
|
249
|
+
SDL_SCANCODE_ENDCALL = 290
|
250
|
+
SDL_NUM_SCANCODES = 512
|
4
251
|
typealias "SDL_Scancode", "int"
|
5
252
|
end
|
@@ -1,13 +1,40 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
|
-
require_relative
|
3
|
-
require_relative
|
4
|
-
require_relative
|
5
|
-
require_relative
|
6
|
-
require_relative
|
2
|
+
require_relative "SDL_stdinc.h"
|
3
|
+
require_relative "SDL_pixels.h"
|
4
|
+
require_relative "SDL_rect.h"
|
5
|
+
require_relative "SDL_surface.h"
|
6
|
+
require_relative "SDL_video.h"
|
7
|
+
|
8
|
+
SDL_NONSHAPEABLE_WINDOW = -1
|
9
|
+
SDL_INVALID_SHAPE_ARGUMENT = -2
|
10
|
+
SDL_WINDOW_LACKS_SHAPE = -3
|
7
11
|
|
8
|
-
typealias "WindowShapeMode", "int"
|
9
12
|
extern "SDL_Window * SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags)"
|
10
13
|
extern "SDL_bool SDL_IsShapedWindow(const SDL_Window *window)"
|
14
|
+
|
15
|
+
ShapeModeDefault = 0
|
16
|
+
ShapeModeBinarizeAlpha = 1
|
17
|
+
ShapeModeReverseBinarizeAlpha = 2
|
18
|
+
ShapeModeColorKey = 3
|
19
|
+
typealias "WindowShapeMode", "int"
|
20
|
+
|
21
|
+
def self.SDL_SHAPEMODEALPHA(mode)
|
22
|
+
(mode == ShapeModeDefault || mode == ShapeModeBinarizeAlpha || mode == ShapeModeReverseBinarizeAlpha)
|
23
|
+
end
|
24
|
+
|
25
|
+
SDL_WindowShapeParams = union(
|
26
|
+
[
|
27
|
+
"Uint8 binarizationCutoff",
|
28
|
+
{ colorKey: SDL_Color }
|
29
|
+
]
|
30
|
+
)
|
31
|
+
SDL_WindowShapeMode = struct(
|
32
|
+
[
|
33
|
+
"WindowShapeMode mode",
|
34
|
+
{ parameters: SDL_WindowShapeParams }
|
35
|
+
]
|
36
|
+
)
|
37
|
+
|
11
38
|
extern "int SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode)"
|
12
39
|
extern "int SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode)"
|
13
40
|
end
|