SDLRuby 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/SDLRuby/event/accessor.rb +62 -63
- data/lib/SDLRuby/event/type.rb +1 -1
- data/lib/SDLRuby/event.rb +98 -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,22 +1,60 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
|
-
require_relative
|
2
|
+
require_relative "SDL_config.h"
|
3
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
|
4
16
|
typealias "SDL_bool", "int"
|
17
|
+
|
18
|
+
SDL_MAX_SINT8 = (0x7F)
|
19
|
+
SDL_MIN_SINT8 = ((~0x7F))
|
5
20
|
typealias "Sint8", "int8_t"
|
21
|
+
|
22
|
+
SDL_MAX_UINT8 = (0xFF)
|
23
|
+
SDL_MIN_UINT8 = (0x00)
|
6
24
|
typealias "Uint8", "uint8_t"
|
25
|
+
|
26
|
+
SDL_MAX_SINT16 = (0x7FFF)
|
27
|
+
SDL_MIN_SINT16 = ((~0x7FFF))
|
7
28
|
typealias "Sint16", "int16_t"
|
29
|
+
|
30
|
+
SDL_MAX_UINT16 = (0xFFFF)
|
31
|
+
SDL_MIN_UINT16 = (0x0000)
|
8
32
|
typealias "Uint16", "uint16_t"
|
33
|
+
|
34
|
+
SDL_MAX_SINT32 = (0x7FFFFFFF)
|
35
|
+
SDL_MIN_SINT32 = ((~0x7FFFFFFF))
|
9
36
|
typealias "Sint32", "int32_t"
|
37
|
+
|
38
|
+
SDL_MAX_UINT32 = (0xFFFFFFFF)
|
39
|
+
SDL_MIN_UINT32 = (0x00000000)
|
10
40
|
typealias "Uint32", "uint32_t"
|
41
|
+
|
42
|
+
SDL_MAX_SINT64 = (0x7FFFFFFFFFFFFFFF)
|
43
|
+
SDL_MIN_SINT64 = ((~0x7FFFFFFFFFFFFFFF))
|
11
44
|
typealias "Sint64", "int64_t"
|
45
|
+
|
46
|
+
SDL_MAX_UINT64 = (0xFFFFFFFFFFFFFFFF)
|
47
|
+
SDL_MIN_UINT64 = ((0x0000000000000000))
|
12
48
|
typealias "Uint64", "uint64_t"
|
13
|
-
|
14
|
-
typealias "SDL_bool", "int"
|
15
|
-
typealias "SDL_DUMMY_ENUM", "int"
|
49
|
+
|
16
50
|
extern "void * SDL_malloc(size_t size)"
|
17
51
|
extern "void * SDL_calloc(size_t nmemb, size_t size)"
|
18
52
|
extern "void * SDL_realloc(void *mem, size_t size)"
|
19
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"
|
20
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)"
|
21
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)"
|
22
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)"
|
@@ -1,36 +1,99 @@
|
|
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_blendmode.h"
|
6
|
+
require_relative "SDL_rwops.h"
|
7
7
|
|
8
|
-
|
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
|
9
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)"
|
10
45
|
extern "SDL_Surface * SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)"
|
11
|
-
extern "
|
12
|
-
extern "
|
13
|
-
extern "int
|
14
|
-
extern "
|
15
|
-
extern "
|
16
|
-
extern "
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
extern "int
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
extern "
|
29
|
-
extern "
|
30
|
-
extern "int
|
31
|
-
extern "
|
32
|
-
extern "int
|
33
|
-
extern "int
|
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)"
|
34
97
|
extern "void SDL_SetYUVConversionMode(SDL_YUV_CONVERSION_MODE mode)"
|
35
98
|
extern "SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionMode(void)"
|
36
99
|
extern "SDL_YUV_CONVERSION_MODE SDL_GetYUVConversionModeForResolution(int width, int height)"
|
@@ -4,13 +4,7 @@ module SDLRuby::SDL
|
|
4
4
|
require_relative 'SDL_video.h.rb'
|
5
5
|
require_relative 'SDL_version.h.rb'
|
6
6
|
|
7
|
-
typealias "NSWindow", "struct _NSWindow"
|
8
|
-
typealias "UIWindow", "struct _UIWindow"
|
9
|
-
typealias "UIViewController", "struct _UIViewController"
|
10
|
-
typealias "GLuint", "Uint32"
|
11
|
-
typealias "ANativeWindow", "struct ANativeWindow"
|
12
|
-
typealias "EGLSurface", "void*"
|
13
7
|
typealias "SDL_SysWMinfo", "struct SDL_SysWMinfo"
|
14
|
-
|
8
|
+
|
15
9
|
extern "SDL_bool SDL_GetWindowWMInfo(SDL_Window *window, SDL_SysWMinfo *info)"
|
16
10
|
end
|
@@ -1,13 +1,21 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
|
-
require_relative
|
3
|
-
require_relative
|
2
|
+
require_relative "SDL_stdinc.h"
|
3
|
+
require_relative "SDL_error.h"
|
4
4
|
|
5
|
-
typealias "SDL_TimerID", "int"
|
6
5
|
extern "Uint32 SDL_GetTicks(void)"
|
7
6
|
extern "Uint64 SDL_GetTicks64(void)"
|
7
|
+
|
8
|
+
def self.SDL_TICKS_PASSED(a, b)
|
9
|
+
(((b) - (a)) <= 0)
|
10
|
+
end
|
11
|
+
|
8
12
|
extern "Uint64 SDL_GetPerformanceCounter(void)"
|
9
13
|
extern "Uint64 SDL_GetPerformanceFrequency(void)"
|
10
14
|
extern "void SDL_Delay(Uint32 ms)"
|
15
|
+
|
16
|
+
typealias "SDL_TimerCallback", "void*"
|
17
|
+
typealias "SDL_TimerID", "int"
|
18
|
+
|
11
19
|
extern "SDL_TimerID SDL_AddTimer(Uint32 interval, SDL_TimerCallback callback, void *param)"
|
12
20
|
extern "SDL_bool SDL_RemoveTimer(SDL_TimerID id)"
|
13
21
|
end
|
@@ -1,6 +1,14 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
|
-
require_relative
|
2
|
+
require_relative "SDL_stdinc.h"
|
3
3
|
|
4
|
-
|
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)"
|
5
13
|
extern "const char * SDL_GetRevision(void)"
|
6
14
|
end
|
@@ -1,22 +1,154 @@
|
|
1
1
|
module SDLRuby::SDL
|
2
|
-
require_relative
|
3
|
-
require_relative
|
4
|
-
require_relative
|
5
|
-
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
6
|
|
7
|
-
|
8
|
-
|
7
|
+
SDL_DisplayMode = struct(
|
8
|
+
[
|
9
|
+
"Uint32 format",
|
10
|
+
"int w",
|
11
|
+
"int h",
|
12
|
+
"int refresh_rate",
|
13
|
+
"void *driverdata",
|
14
|
+
]
|
15
|
+
)
|
16
|
+
|
17
|
+
SDL_WINDOW_FULLSCREEN = 0x00000001
|
18
|
+
SDL_WINDOW_OPENGL = 0x00000002
|
19
|
+
SDL_WINDOW_SHOWN = 0x00000004
|
20
|
+
SDL_WINDOW_HIDDEN = 0x00000008
|
21
|
+
SDL_WINDOW_BORDERLESS = 0x00000010
|
22
|
+
SDL_WINDOW_RESIZABLE = 0x00000020
|
23
|
+
SDL_WINDOW_MINIMIZED = 0x00000040
|
24
|
+
SDL_WINDOW_MAXIMIZED = 0x00000080
|
25
|
+
SDL_WINDOW_MOUSE_GRABBED = 0x00000100
|
26
|
+
SDL_WINDOW_INPUT_FOCUS = 0x00000200
|
27
|
+
SDL_WINDOW_MOUSE_FOCUS = 0x00000400
|
28
|
+
SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 )
|
29
|
+
SDL_WINDOW_FOREIGN = 0x00000800
|
30
|
+
SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000
|
31
|
+
SDL_WINDOW_MOUSE_CAPTURE = 0x00004000
|
32
|
+
SDL_WINDOW_ALWAYS_ON_TOP = 0x00008000
|
33
|
+
SDL_WINDOW_SKIP_TASKBAR = 0x00010000
|
34
|
+
SDL_WINDOW_UTILITY = 0x00020000
|
35
|
+
SDL_WINDOW_TOOLTIP = 0x00040000
|
36
|
+
SDL_WINDOW_POPUP_MENU = 0x00080000
|
37
|
+
SDL_WINDOW_KEYBOARD_GRABBED = 0x00100000
|
38
|
+
SDL_WINDOW_VULKAN = 0x10000000
|
39
|
+
SDL_WINDOW_METAL = 0x20000000
|
40
|
+
SDL_WINDOW_INPUT_GRABBED = SDL_WINDOW_MOUSE_GRABBED
|
9
41
|
typealias "SDL_WindowFlags", "int"
|
42
|
+
|
43
|
+
SDL_WINDOWPOS_UNDEFINED_MASK = 0x1FFF0000
|
44
|
+
def self.SDL_WINDOWPOS_UNDEFINED_DISPLAY(x)
|
45
|
+
(SDL_WINDOWPOS_UNDEFINED_MASK|(x))
|
46
|
+
end
|
47
|
+
SDL_WINDOWPOS_UNDEFINED = SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
|
48
|
+
def self.SDL_WINDOWPOS_ISUNDEFINED(x)
|
49
|
+
(((x)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
|
50
|
+
end
|
51
|
+
|
52
|
+
SDL_WINDOWPOS_CENTERED_MASK = 0x2FFF0000
|
53
|
+
def self.SDL_WINDOWPOS_CENTERED_DISPLAY(x)
|
54
|
+
(SDL_WINDOWPOS_CENTERED_MASK|(x))
|
55
|
+
end
|
56
|
+
SDL_WINDOWPOS_CENTERED = self.SDL_WINDOWPOS_CENTERED_DISPLAY(0)
|
57
|
+
def self.SDL_WINDOWPOS_ISCENTERED(x)
|
58
|
+
(((x)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
|
59
|
+
end
|
60
|
+
|
61
|
+
SDL_WINDOWEVENT_NONE = 0
|
62
|
+
SDL_WINDOWEVENT_SHOWN = 1
|
63
|
+
SDL_WINDOWEVENT_HIDDEN = 2
|
64
|
+
SDL_WINDOWEVENT_EXPOSED = 3
|
65
|
+
SDL_WINDOWEVENT_MOVED = 4
|
66
|
+
SDL_WINDOWEVENT_RESIZED = 5
|
67
|
+
SDL_WINDOWEVENT_SIZE_CHANGED = 6
|
68
|
+
SDL_WINDOWEVENT_MINIMIZED = 7
|
69
|
+
SDL_WINDOWEVENT_MAXIMIZED = 8
|
70
|
+
SDL_WINDOWEVENT_RESTORED = 9
|
71
|
+
SDL_WINDOWEVENT_ENTER = 10
|
72
|
+
SDL_WINDOWEVENT_LEAVE = 11
|
73
|
+
SDL_WINDOWEVENT_FOCUS_GAINED = 12
|
74
|
+
SDL_WINDOWEVENT_FOCUS_LOST = 13
|
75
|
+
SDL_WINDOWEVENT_CLOSE = 14
|
76
|
+
SDL_WINDOWEVENT_TAKE_FOCUS = 15
|
77
|
+
SDL_WINDOWEVENT_HIT_TEST = 16
|
78
|
+
SDL_WINDOWEVENT_ICCPROF_CHANGED = 17
|
79
|
+
SDL_WINDOWEVENT_DISPLAY_CHANGED = 18
|
10
80
|
typealias "SDL_WindowEventID", "int"
|
81
|
+
|
82
|
+
SDL_DISPLAYEVENT_NONE = 0
|
83
|
+
SDL_DISPLAYEVENT_ORIENTATION = 1
|
84
|
+
SDL_DISPLAYEVENT_CONNECTED = 2
|
85
|
+
SDL_DISPLAYEVENT_DISCONNECTED = 3
|
86
|
+
SDL_DISPLAYEVENT_MOVED = 4
|
11
87
|
typealias "SDL_DisplayEventID", "int"
|
88
|
+
|
89
|
+
SDL_ORIENTATION_UNKNOWN = 0
|
90
|
+
SDL_ORIENTATION_LANDSCAPE = 1
|
91
|
+
SDL_ORIENTATION_LANDSCAPE_FLIPPED = 2
|
92
|
+
SDL_ORIENTATION_PORTRAIT = 3
|
93
|
+
SDL_ORIENTATION_PORTRAIT_FLIPPED = 4
|
12
94
|
typealias "SDL_DisplayOrientation", "int"
|
95
|
+
|
96
|
+
SDL_FLASH_CANCEL = 0
|
97
|
+
SDL_FLASH_BRIEFLY = 1
|
98
|
+
SDL_FLASH_UNTIL_FOCUSED = 2
|
13
99
|
typealias "SDL_FlashOperation", "int"
|
100
|
+
|
101
|
+
typealias "SDL_GLContext", "void*"
|
102
|
+
|
103
|
+
SDL_GL_RED_SIZE = 0
|
104
|
+
SDL_GL_GREEN_SIZE = 1
|
105
|
+
SDL_GL_BLUE_SIZE = 2
|
106
|
+
SDL_GL_ALPHA_SIZE = 3
|
107
|
+
SDL_GL_BUFFER_SIZE = 4
|
108
|
+
SDL_GL_DOUBLEBUFFER = 5
|
109
|
+
SDL_GL_DEPTH_SIZE = 6
|
110
|
+
SDL_GL_STENCIL_SIZE = 7
|
111
|
+
SDL_GL_ACCUM_RED_SIZE = 8
|
112
|
+
SDL_GL_ACCUM_GREEN_SIZE = 9
|
113
|
+
SDL_GL_ACCUM_BLUE_SIZE = 10
|
114
|
+
SDL_GL_ACCUM_ALPHA_SIZE = 11
|
115
|
+
SDL_GL_STEREO = 12
|
116
|
+
SDL_GL_MULTISAMPLEBUFFERS = 13
|
117
|
+
SDL_GL_MULTISAMPLESAMPLES = 14
|
118
|
+
SDL_GL_ACCELERATED_VISUAL = 15
|
119
|
+
SDL_GL_RETAINED_BACKING = 16
|
120
|
+
SDL_GL_CONTEXT_MAJOR_VERSION = 17
|
121
|
+
SDL_GL_CONTEXT_MINOR_VERSION = 18
|
122
|
+
SDL_GL_CONTEXT_EGL = 19
|
123
|
+
SDL_GL_CONTEXT_FLAGS = 20
|
124
|
+
SDL_GL_CONTEXT_PROFILE_MASK = 21
|
125
|
+
SDL_GL_SHARE_WITH_CURRENT_CONTEXT = 22
|
126
|
+
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE = 23
|
127
|
+
SDL_GL_CONTEXT_RELEASE_BEHAVIOR = 24
|
128
|
+
SDL_GL_CONTEXT_RESET_NOTIFICATION = 25
|
129
|
+
SDL_GL_CONTEXT_NO_ERROR = 26
|
130
|
+
SDL_GL_FLOATBUFFERS = 27
|
14
131
|
typealias "SDL_GLattr", "int"
|
132
|
+
|
133
|
+
SDL_GL_CONTEXT_PROFILE_CORE = 0x0001
|
134
|
+
SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002
|
135
|
+
SDL_GL_CONTEXT_PROFILE_ES = 0x0004
|
15
136
|
typealias "SDL_GLprofile", "int"
|
137
|
+
|
138
|
+
SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001
|
139
|
+
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002
|
140
|
+
SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004
|
141
|
+
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
|
16
142
|
typealias "SDL_GLcontextFlag", "int"
|
143
|
+
|
144
|
+
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000
|
145
|
+
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001
|
17
146
|
typealias "SDL_GLcontextReleaseFlag", "int"
|
147
|
+
|
148
|
+
SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000
|
149
|
+
SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001
|
18
150
|
typealias "SDL_GLContextResetNotification", "int"
|
19
|
-
|
151
|
+
|
20
152
|
extern "int SDL_GetNumVideoDrivers(void)"
|
21
153
|
extern "const char * SDL_GetVideoDriver(int index)"
|
22
154
|
extern "int SDL_VideoInit(const char *driver_name)"
|
@@ -24,77 +156,92 @@ module SDLRuby::SDL
|
|
24
156
|
extern "const char * SDL_GetCurrentVideoDriver(void)"
|
25
157
|
extern "int SDL_GetNumVideoDisplays(void)"
|
26
158
|
extern "const char * SDL_GetDisplayName(int displayIndex)"
|
27
|
-
extern "int SDL_GetDisplayBounds(int displayIndex, SDL_Rect *rect)"
|
28
|
-
extern "int SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect *rect)"
|
29
|
-
extern "int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)"
|
159
|
+
extern "int SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect)"
|
160
|
+
extern "int SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect)"
|
161
|
+
extern "int SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi)"
|
30
162
|
extern "SDL_DisplayOrientation SDL_GetDisplayOrientation(int displayIndex)"
|
31
163
|
extern "int SDL_GetNumDisplayModes(int displayIndex)"
|
32
|
-
extern "int SDL_GetDisplayMode(int displayIndex, int modeIndex, SDL_DisplayMode *mode)"
|
33
|
-
extern "int SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode *mode)"
|
34
|
-
extern "int SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode *mode)"
|
35
|
-
extern "SDL_DisplayMode * SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode *mode, SDL_DisplayMode *closest)"
|
36
|
-
extern "int SDL_GetPointDisplayIndex(const SDL_Point *point)"
|
37
|
-
extern "int SDL_GetRectDisplayIndex(const SDL_Rect *rect)"
|
38
|
-
extern "int SDL_GetWindowDisplayIndex(SDL_Window *window)"
|
39
|
-
extern "int SDL_SetWindowDisplayMode(SDL_Window *window, const SDL_DisplayMode *mode)"
|
40
|
-
extern "int SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)"
|
41
|
-
extern "void* SDL_GetWindowICCProfile(SDL_Window *window, size_t*size)"
|
42
|
-
extern "Uint32 SDL_GetWindowPixelFormat(SDL_Window *window)"
|
164
|
+
extern "int SDL_GetDisplayMode(int displayIndex, int modeIndex, SDL_DisplayMode * mode)"
|
165
|
+
extern "int SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode)"
|
166
|
+
extern "int SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode)"
|
167
|
+
extern "SDL_DisplayMode * SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest)"
|
168
|
+
extern "int SDL_GetPointDisplayIndex(const SDL_Point * point)"
|
169
|
+
extern "int SDL_GetRectDisplayIndex(const SDL_Rect * rect)"
|
170
|
+
extern "int SDL_GetWindowDisplayIndex(SDL_Window * window)"
|
171
|
+
extern "int SDL_SetWindowDisplayMode(SDL_Window * window, const SDL_DisplayMode * mode)"
|
172
|
+
extern "int SDL_GetWindowDisplayMode(SDL_Window * window, SDL_DisplayMode * mode)"
|
173
|
+
extern "void* SDL_GetWindowICCProfile(SDL_Window * window, size_t* size)"
|
174
|
+
extern "Uint32 SDL_GetWindowPixelFormat(SDL_Window * window)"
|
43
175
|
extern "SDL_Window * SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)"
|
44
176
|
extern "SDL_Window * SDL_CreateWindowFrom(const void *data)"
|
45
|
-
extern "Uint32 SDL_GetWindowID(SDL_Window *window)"
|
177
|
+
extern "Uint32 SDL_GetWindowID(SDL_Window * window)"
|
46
178
|
extern "SDL_Window * SDL_GetWindowFromID(Uint32 id)"
|
47
|
-
extern "Uint32 SDL_GetWindowFlags(SDL_Window *window)"
|
48
|
-
extern "void SDL_SetWindowTitle(SDL_Window *window, const char *title)"
|
49
|
-
extern "const char * SDL_GetWindowTitle(SDL_Window *window)"
|
50
|
-
extern "void SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon)"
|
51
|
-
extern "void* SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata)"
|
52
|
-
extern "void * SDL_GetWindowData(SDL_Window *window, const char *name)"
|
53
|
-
extern "void SDL_SetWindowPosition(SDL_Window *window, int x, int y)"
|
54
|
-
extern "void SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)"
|
55
|
-
extern "void SDL_SetWindowSize(SDL_Window *window, int w, int h)"
|
56
|
-
extern "void SDL_GetWindowSize(SDL_Window *window, int *w, int *h)"
|
57
|
-
extern "int SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right)"
|
58
|
-
extern "void SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h)"
|
59
|
-
extern "void SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h)"
|
60
|
-
extern "void SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h)"
|
61
|
-
extern "void SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)"
|
62
|
-
extern "void SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h)"
|
63
|
-
extern "void SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered)"
|
64
|
-
extern "void SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable)"
|
65
|
-
extern "void SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top)"
|
66
|
-
extern "void SDL_ShowWindow(SDL_Window *window)"
|
67
|
-
extern "void SDL_HideWindow(SDL_Window *window)"
|
68
|
-
extern "void SDL_RaiseWindow(SDL_Window *window)"
|
69
|
-
extern "void SDL_MaximizeWindow(SDL_Window *window)"
|
70
|
-
extern "void SDL_MinimizeWindow(SDL_Window *window)"
|
71
|
-
extern "void SDL_RestoreWindow(SDL_Window *window)"
|
72
|
-
extern "int SDL_SetWindowFullscreen(SDL_Window *window, Uint32 flags)"
|
179
|
+
extern "Uint32 SDL_GetWindowFlags(SDL_Window * window)"
|
180
|
+
extern "void SDL_SetWindowTitle(SDL_Window * window, const char *title)"
|
181
|
+
extern "const char * SDL_GetWindowTitle(SDL_Window * window)"
|
182
|
+
extern "void SDL_SetWindowIcon(SDL_Window * window, SDL_Surface * icon)"
|
183
|
+
extern "void* SDL_SetWindowData(SDL_Window * window, const char *name, void *userdata)"
|
184
|
+
extern "void * SDL_GetWindowData(SDL_Window * window, const char *name)"
|
185
|
+
extern "void SDL_SetWindowPosition(SDL_Window * window, int x, int y)"
|
186
|
+
extern "void SDL_GetWindowPosition(SDL_Window * window, int *x, int *y)"
|
187
|
+
extern "void SDL_SetWindowSize(SDL_Window * window, int w, int h)"
|
188
|
+
extern "void SDL_GetWindowSize(SDL_Window * window, int *w, int *h)"
|
189
|
+
extern "int SDL_GetWindowBordersSize(SDL_Window * window, int *top, int *left, int *bottom, int *right)"
|
190
|
+
extern "void SDL_GetWindowSizeInPixels(SDL_Window * window, int *w, int *h)"
|
191
|
+
extern "void SDL_SetWindowMinimumSize(SDL_Window * window, int min_w, int min_h)"
|
192
|
+
extern "void SDL_GetWindowMinimumSize(SDL_Window * window, int *w, int *h)"
|
193
|
+
extern "void SDL_SetWindowMaximumSize(SDL_Window * window, int max_w, int max_h)"
|
194
|
+
extern "void SDL_GetWindowMaximumSize(SDL_Window * window, int *w, int *h)"
|
195
|
+
extern "void SDL_SetWindowBordered(SDL_Window * window, SDL_bool bordered)"
|
196
|
+
extern "void SDL_SetWindowResizable(SDL_Window * window, SDL_bool resizable)"
|
197
|
+
extern "void SDL_SetWindowAlwaysOnTop(SDL_Window * window, SDL_bool on_top)"
|
198
|
+
extern "void SDL_ShowWindow(SDL_Window * window)"
|
199
|
+
extern "void SDL_HideWindow(SDL_Window * window)"
|
200
|
+
extern "void SDL_RaiseWindow(SDL_Window * window)"
|
201
|
+
extern "void SDL_MaximizeWindow(SDL_Window * window)"
|
202
|
+
extern "void SDL_MinimizeWindow(SDL_Window * window)"
|
203
|
+
extern "void SDL_RestoreWindow(SDL_Window * window)"
|
204
|
+
extern "int SDL_SetWindowFullscreen(SDL_Window * window, Uint32 flags)"
|
73
205
|
extern "SDL_bool SDL_HasWindowSurface(SDL_Window *window)"
|
74
|
-
extern "SDL_Surface * SDL_GetWindowSurface(SDL_Window *window)"
|
75
|
-
extern "int SDL_UpdateWindowSurface(SDL_Window *window)"
|
76
|
-
extern "int SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects)"
|
206
|
+
extern "SDL_Surface * SDL_GetWindowSurface(SDL_Window * window)"
|
207
|
+
extern "int SDL_UpdateWindowSurface(SDL_Window * window)"
|
208
|
+
extern "int SDL_UpdateWindowSurfaceRects(SDL_Window * window, const SDL_Rect * rects, int numrects)"
|
77
209
|
extern "int SDL_DestroyWindowSurface(SDL_Window *window)"
|
78
|
-
extern "void SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed)"
|
79
|
-
extern "void SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed)"
|
80
|
-
extern "void SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed)"
|
81
|
-
extern "SDL_bool SDL_GetWindowGrab(SDL_Window *window)"
|
82
|
-
extern "SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window *window)"
|
83
|
-
extern "SDL_bool SDL_GetWindowMouseGrab(SDL_Window *window)"
|
210
|
+
extern "void SDL_SetWindowGrab(SDL_Window * window, SDL_bool grabbed)"
|
211
|
+
extern "void SDL_SetWindowKeyboardGrab(SDL_Window * window, SDL_bool grabbed)"
|
212
|
+
extern "void SDL_SetWindowMouseGrab(SDL_Window * window, SDL_bool grabbed)"
|
213
|
+
extern "SDL_bool SDL_GetWindowGrab(SDL_Window * window)"
|
214
|
+
extern "SDL_bool SDL_GetWindowKeyboardGrab(SDL_Window * window)"
|
215
|
+
extern "SDL_bool SDL_GetWindowMouseGrab(SDL_Window * window)"
|
84
216
|
extern "SDL_Window * SDL_GetGrabbedWindow(void)"
|
85
|
-
extern "int SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect)"
|
86
|
-
extern "const SDL_Rect * SDL_GetWindowMouseRect(SDL_Window *window)"
|
87
|
-
extern "int SDL_SetWindowBrightness(SDL_Window *window, float brightness)"
|
88
|
-
extern "float SDL_GetWindowBrightness(SDL_Window *window)"
|
89
|
-
extern "int SDL_SetWindowOpacity(SDL_Window *window, float opacity)"
|
90
|
-
extern "int SDL_GetWindowOpacity(SDL_Window *window, float *out_opacity)"
|
91
|
-
extern "int SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window)"
|
92
|
-
extern "int SDL_SetWindowInputFocus(SDL_Window *window)"
|
93
|
-
extern "int SDL_SetWindowGammaRamp(SDL_Window *window, const Uint16 *red, const Uint16 *green, const Uint16 *blue)"
|
94
|
-
extern "int SDL_GetWindowGammaRamp(SDL_Window *window, Uint16 *red, Uint16 *green, Uint16 *blue)"
|
95
|
-
|
96
|
-
|
97
|
-
|
217
|
+
extern "int SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect)"
|
218
|
+
extern "const SDL_Rect * SDL_GetWindowMouseRect(SDL_Window * window)"
|
219
|
+
extern "int SDL_SetWindowBrightness(SDL_Window * window, float brightness)"
|
220
|
+
extern "float SDL_GetWindowBrightness(SDL_Window * window)"
|
221
|
+
extern "int SDL_SetWindowOpacity(SDL_Window * window, float opacity)"
|
222
|
+
extern "int SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity)"
|
223
|
+
extern "int SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window)"
|
224
|
+
extern "int SDL_SetWindowInputFocus(SDL_Window * window)"
|
225
|
+
extern "int SDL_SetWindowGammaRamp(SDL_Window * window, const Uint16 * red, const Uint16 * green, const Uint16 * blue)"
|
226
|
+
extern "int SDL_GetWindowGammaRamp(SDL_Window * window, Uint16 * red, Uint16 * green, Uint16 * blue)"
|
227
|
+
|
228
|
+
SDL_HITTEST_NORMAL = 0
|
229
|
+
SDL_HITTEST_DRAGGABLE = 1
|
230
|
+
SDL_HITTEST_RESIZE_TOPLEFT = 2
|
231
|
+
SDL_HITTEST_RESIZE_TOP = 3
|
232
|
+
SDL_HITTEST_RESIZE_TOPRIGHT = 4
|
233
|
+
SDL_HITTEST_RESIZE_RIGHT = 5
|
234
|
+
SDL_HITTEST_RESIZE_BOTTOMRIGHT = 6
|
235
|
+
SDL_HITTEST_RESIZE_BOTTOM = 7
|
236
|
+
SDL_HITTEST_RESIZE_BOTTOMLEFT = 8
|
237
|
+
SDL_HITTEST_RESIZE_LEFT = 9
|
238
|
+
typealias "SDL_HitTestResult", "int"
|
239
|
+
|
240
|
+
typealias "SDL_HitTest", "void*"
|
241
|
+
|
242
|
+
extern "int SDL_SetWindowHitTest(SDL_Window * window, SDL_HitTest callback, void *callback_data)"
|
243
|
+
extern "int SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation)"
|
244
|
+
extern "void SDL_DestroyWindow(SDL_Window * window)"
|
98
245
|
extern "SDL_bool SDL_IsScreenSaverEnabled(void)"
|
99
246
|
extern "void SDL_EnableScreenSaver(void)"
|
100
247
|
extern "void SDL_DisableScreenSaver(void)"
|
@@ -105,13 +252,13 @@ module SDLRuby::SDL
|
|
105
252
|
extern "void SDL_GL_ResetAttributes(void)"
|
106
253
|
extern "int SDL_GL_SetAttribute(SDL_GLattr attr, int value)"
|
107
254
|
extern "int SDL_GL_GetAttribute(SDL_GLattr attr, int *value)"
|
108
|
-
extern "SDL_GLContext SDL_GL_CreateContext(SDL_Window *window)"
|
109
|
-
extern "int SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context)"
|
255
|
+
extern "SDL_GLContext SDL_GL_CreateContext(SDL_Window * window)"
|
256
|
+
extern "int SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext context)"
|
110
257
|
extern "SDL_Window* SDL_GL_GetCurrentWindow(void)"
|
111
258
|
extern "SDL_GLContext SDL_GL_GetCurrentContext(void)"
|
112
|
-
extern "void SDL_GL_GetDrawableSize(SDL_Window *window, int *w, int *h)"
|
259
|
+
extern "void SDL_GL_GetDrawableSize(SDL_Window * window, int *w, int *h)"
|
113
260
|
extern "int SDL_GL_SetSwapInterval(int interval)"
|
114
261
|
extern "int SDL_GL_GetSwapInterval(void)"
|
115
|
-
extern "void SDL_GL_SwapWindow(SDL_Window *window)"
|
262
|
+
extern "void SDL_GL_SwapWindow(SDL_Window * window)"
|
116
263
|
extern "void SDL_GL_DeleteContext(SDL_GLContext context)"
|
117
264
|
end
|
data/lib/SDLRuby/sdl/sdl.rb
CHANGED
@@ -1,55 +1,5 @@
|
|
1
1
|
module SDLRuby
|
2
2
|
module SDL
|
3
|
-
# struct
|
4
|
-
#
|
5
|
-
typealias "SDL_GUID", "void*"
|
6
|
-
typealias "SDL_GameControllerButtonBind", "void*"
|
7
|
-
|
8
|
-
# function ptr
|
9
|
-
#
|
10
|
-
typealias "SDL_EventFilter", "void*"
|
11
|
-
typealias "SDL_HintCallback", "void*"
|
12
|
-
typealias "SDL_HitTest", "void*"
|
13
|
-
typealias "SDL_TimerCallback", "void*"
|
14
|
-
typealias "SDL_WindowsMessageHook", "void*"
|
15
|
-
typealias "SDL_calloc_func", "void*"
|
16
|
-
typealias "SDL_free_func", "void*"
|
17
|
-
typealias "SDL_joystick_lock", "void*"
|
18
|
-
typealias "SDL_main_func", "void*"
|
19
|
-
typealias "SDL_malloc_func", "void*"
|
20
|
-
typealias "SDL_realloc_func", "void*"
|
21
|
-
|
22
3
|
require_relative 'include/SDL.h.rb'
|
23
|
-
|
24
|
-
require_relative 'sdl_audio'
|
25
|
-
require_relative 'sdl_blendmode'
|
26
|
-
require_relative 'sdl_error'
|
27
|
-
require_relative 'sdl_events'
|
28
|
-
require_relative 'sdl_hints'
|
29
|
-
require_relative 'sdl_keyboard'
|
30
|
-
require_relative 'sdl_locale'
|
31
|
-
require_relative 'sdl_message_box'
|
32
|
-
require_relative 'sdl_mouse'
|
33
|
-
require_relative 'sdl_palette'
|
34
|
-
require_relative 'sdl_pixels'
|
35
|
-
require_relative 'sdl_rect'
|
36
|
-
require_relative 'sdl_render'
|
37
|
-
require_relative 'sdl_rw_ops'
|
38
|
-
require_relative 'sdl_scancode'
|
39
|
-
require_relative 'sdl_surface'
|
40
|
-
require_relative 'sdl_version'
|
41
|
-
require_relative 'sdl_video'
|
42
|
-
|
43
|
-
SDL_INIT_TIMER = 0x00000001
|
44
|
-
SDL_INIT_AUDIO = 0x00000010
|
45
|
-
SDL_INIT_VIDEO = 0x00000020
|
46
|
-
SDL_INIT_JOYSTICK = 0x00000200
|
47
|
-
SDL_INIT_HAPTIC = 0x00001000
|
48
|
-
SDL_INIT_GAMEPAD = 0x00002000
|
49
|
-
SDL_INIT_EVENTS = 0x00004000
|
50
|
-
SDL_INIT_SENSOR = 0x00008000
|
51
|
-
SDL_INIT_EVERYTHING =
|
52
|
-
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS |
|
53
|
-
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMEPAD | SDL_INIT_SENSOR
|
54
4
|
end
|
55
5
|
end
|