SDLRuby 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +29 -22
- data/LICENSE.txt +21 -21
- data/README.md +31 -31
- data/Rakefile +12 -12
- data/SDLRuby.gemspec +38 -0
- data/examples/alert.rb +8 -0
- data/examples/window.rb +7 -0
- data/lib/SDLRuby/event/accessor.rb +2 -2
- data/lib/SDLRuby/event.rb +101 -101
- data/lib/SDLRuby/image/include/SDL_image.h.rb +61 -61
- data/lib/SDLRuby/mixer/include/SDL_mixer.h.rb +95 -95
- data/lib/SDLRuby/rw_ops/rw_object.rb +34 -34
- data/lib/SDLRuby/rw_ops.rb +91 -91
- data/lib/SDLRuby/sdl/include/SDL.h.rb +44 -44
- data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +160 -160
- data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +30 -30
- data/lib/SDLRuby/sdl/include/SDL_clipboard.h.rb +10 -10
- data/lib/SDLRuby/sdl/include/SDL_config.h.rb +13 -13
- data/lib/SDLRuby/sdl/include/SDL_cpuinfo.h.rb +27 -27
- data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +12 -12
- data/lib/SDLRuby/sdl/include/SDL_error.h.rb +28 -28
- data/lib/SDLRuby/sdl/include/SDL_events.h.rb +472 -472
- data/lib/SDLRuby/sdl/include/SDL_filesystem.h.rb +6 -6
- data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +147 -147
- data/lib/SDLRuby/sdl/include/SDL_gesture.h.rb +12 -12
- data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +13 -13
- data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +199 -199
- data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +131 -131
- data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +35 -35
- data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +292 -292
- data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +13 -13
- data/lib/SDLRuby/sdl/include/SDL_main.h.rb +3 -3
- data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +58 -58
- data/lib/SDLRuby/sdl/include/SDL_misc.h.rb +5 -5
- data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +57 -57
- data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +285 -285
- data/lib/SDLRuby/sdl/include/SDL_platform.h.rb +3 -3
- data/lib/SDLRuby/sdl/include/SDL_power.h.rb +6 -6
- data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +46 -46
- data/lib/SDLRuby/sdl/include/SDL_render.h.rb +131 -131
- data/lib/SDLRuby/sdl/include/SDL_revision.h.rb +2 -2
- data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +78 -78
- data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +252 -252
- data/lib/SDLRuby/sdl/include/SDL_sensor.h.rb +25 -25
- data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +40 -40
- data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +62 -62
- data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +100 -100
- data/lib/SDLRuby/sdl/include/SDL_system.h.rb +6 -6
- data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +10 -10
- data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +21 -21
- data/lib/SDLRuby/sdl/include/SDL_touch.h.rb +15 -15
- data/lib/SDLRuby/sdl/include/SDL_types.h.rb +3 -3
- data/lib/SDLRuby/sdl/include/SDL_version.h.rb +14 -14
- data/lib/SDLRuby/sdl/include/SDL_video.h.rb +264 -264
- data/lib/SDLRuby/sdl.rb +218 -218
- data/lib/SDLRuby/ttf/include/SDL_ttf.h.rb +54 -54
- data/lib/SDLRuby/version.rb +5 -5
- data/lib/SDLRuby/window/surfacer.rb +37 -37
- data/lib/SDLRuby.rb +32 -16
- data/sig/SDLRuby.rbs +4 -4
- data/sig/lib/SDLRuby/event/accessor.rbs +157 -157
- data/sig/lib/SDLRuby/event/type.rbs +67 -67
- data/sig/lib/SDLRuby/event.rbs +47 -47
- data/sig/lib/SDLRuby/keyboard.rbs +25 -25
- data/sig/lib/SDLRuby/mouse.rbs +35 -35
- data/sig/lib/SDLRuby/sdl.rbs +655 -655
- data/sig/lib/SDLRuby/timer.rbs +7 -7
- metadata +6 -3
@@ -1,131 +1,131 @@
|
|
1
|
-
module SDLRuby::SDL
|
2
|
-
require_relative "SDL_stdinc.h"
|
3
|
-
require_relative "SDL_error.h"
|
4
|
-
require_relative "SDL_guid.h"
|
5
|
-
|
6
|
-
# typealias "SDL_JoystickGUID", "SDL_GUID"
|
7
|
-
typealias "SDL_JoystickID", "Sint32"
|
8
|
-
|
9
|
-
SDL_JOYSTICK_TYPE_UNKNOWN = 0
|
10
|
-
SDL_JOYSTICK_TYPE_GAMECONTROLLER = 1
|
11
|
-
SDL_JOYSTICK_TYPE_WHEEL = 2
|
12
|
-
SDL_JOYSTICK_TYPE_ARCADE_STICK = 3
|
13
|
-
SDL_JOYSTICK_TYPE_FLIGHT_STICK = 4
|
14
|
-
SDL_JOYSTICK_TYPE_DANCE_PAD = 5
|
15
|
-
SDL_JOYSTICK_TYPE_GUITAR = 6
|
16
|
-
SDL_JOYSTICK_TYPE_DRUM_KIT = 7
|
17
|
-
SDL_JOYSTICK_TYPE_ARCADE_PAD = 8
|
18
|
-
SDL_JOYSTICK_TYPE_THROTTLE = 9
|
19
|
-
typealias "SDL_JoystickType", "int"
|
20
|
-
|
21
|
-
SDL_JOYSTICK_POWER_UNKNOWN = -1
|
22
|
-
SDL_JOYSTICK_POWER_EMPTY = 0
|
23
|
-
SDL_JOYSTICK_POWER_LOW = 1
|
24
|
-
SDL_JOYSTICK_POWER_MEDIUM = 2
|
25
|
-
SDL_JOYSTICK_POWER_FULL = 3
|
26
|
-
SDL_JOYSTICK_POWER_WIRED = 4
|
27
|
-
SDL_JOYSTICK_POWER_MAX = 5
|
28
|
-
typealias "SDL_JoystickPowerLevel", "int"
|
29
|
-
|
30
|
-
SDL_IPHONE_MAX_GFORCE = 5.0
|
31
|
-
|
32
|
-
extern "void SDL_LockJoysticks(void)"
|
33
|
-
extern "void SDL_UnlockJoysticks(void)"
|
34
|
-
extern "int SDL_NumJoysticks(void)"
|
35
|
-
extern "const char * SDL_JoystickNameForIndex(int device_index)"
|
36
|
-
extern "const char * SDL_JoystickPathForIndex(int device_index)"
|
37
|
-
extern "int SDL_JoystickGetDevicePlayerIndex(int device_index)"
|
38
|
-
# extern "SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index)"
|
39
|
-
extern "Uint16 SDL_JoystickGetDeviceVendor(int device_index)"
|
40
|
-
extern "Uint16 SDL_JoystickGetDeviceProduct(int device_index)"
|
41
|
-
extern "Uint16 SDL_JoystickGetDeviceProductVersion(int device_index)"
|
42
|
-
extern "SDL_JoystickType SDL_JoystickGetDeviceType(int device_index)"
|
43
|
-
extern "SDL_JoystickID SDL_JoystickGetDeviceInstanceID(int device_index)"
|
44
|
-
extern "SDL_Joystick * SDL_JoystickOpen(int device_index)"
|
45
|
-
extern "SDL_Joystick * SDL_JoystickFromInstanceID(SDL_JoystickID instance_id)"
|
46
|
-
extern "SDL_Joystick * SDL_JoystickFromPlayerIndex(int player_index)"
|
47
|
-
extern "int SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nbuttons, int nhats)"
|
48
|
-
|
49
|
-
SDL_VirtualJoystickDesc = struct(
|
50
|
-
[
|
51
|
-
"Uint16 version",
|
52
|
-
"Uint16 type",
|
53
|
-
"Uint16 naxes",
|
54
|
-
"Uint16 nbuttons",
|
55
|
-
"Uint16 nhats",
|
56
|
-
"Uint16 vendor_id",
|
57
|
-
"Uint16 product_id",
|
58
|
-
"Uint16 padding",
|
59
|
-
"Uint32 button_mask",
|
60
|
-
"Uint32 axis_mask",
|
61
|
-
"const char *name",
|
62
|
-
"void *userdata",
|
63
|
-
"void *Update",
|
64
|
-
"void *SetPlayerIndex",
|
65
|
-
"void *Rumble",
|
66
|
-
"void *RumbleTriggers",
|
67
|
-
"void *SetLED",
|
68
|
-
"void *SendEffect",
|
69
|
-
]
|
70
|
-
)
|
71
|
-
|
72
|
-
SDL_VIRTUAL_JOYSTICK_DESC_VERSION = 1
|
73
|
-
|
74
|
-
extern "int SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc)"
|
75
|
-
extern "int SDL_JoystickDetachVirtual(int device_index)"
|
76
|
-
extern "SDL_bool SDL_JoystickIsVirtual(int device_index)"
|
77
|
-
extern "int SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value)"
|
78
|
-
extern "int SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value)"
|
79
|
-
extern "int SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value)"
|
80
|
-
extern "const char * SDL_JoystickName(SDL_Joystick *joystick)"
|
81
|
-
extern "const char * SDL_JoystickPath(SDL_Joystick *joystick)"
|
82
|
-
extern "int SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick)"
|
83
|
-
extern "void SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)"
|
84
|
-
# extern "SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick *joystick)"
|
85
|
-
extern "Uint16 SDL_JoystickGetVendor(SDL_Joystick *joystick)"
|
86
|
-
extern "Uint16 SDL_JoystickGetProduct(SDL_Joystick *joystick)"
|
87
|
-
extern "Uint16 SDL_JoystickGetProductVersion(SDL_Joystick *joystick)"
|
88
|
-
extern "Uint16 SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick)"
|
89
|
-
extern "const char * SDL_JoystickGetSerial(SDL_Joystick *joystick)"
|
90
|
-
extern "SDL_JoystickType SDL_JoystickGetType(SDL_Joystick *joystick)"
|
91
|
-
# extern "void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID)"
|
92
|
-
# extern "SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID)"
|
93
|
-
# extern "void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)"
|
94
|
-
extern "SDL_bool SDL_JoystickGetAttached(SDL_Joystick *joystick)"
|
95
|
-
extern "SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick *joystick)"
|
96
|
-
extern "int SDL_JoystickNumAxes(SDL_Joystick *joystick)"
|
97
|
-
extern "int SDL_JoystickNumBalls(SDL_Joystick *joystick)"
|
98
|
-
extern "int SDL_JoystickNumHats(SDL_Joystick *joystick)"
|
99
|
-
extern "int SDL_JoystickNumButtons(SDL_Joystick *joystick)"
|
100
|
-
extern "void SDL_JoystickUpdate(void)"
|
101
|
-
extern "int SDL_JoystickEventState(int state)"
|
102
|
-
|
103
|
-
SDL_JOYSTICK_AXIS_MAX = 32767
|
104
|
-
SDL_JOYSTICK_AXIS_MIN = -32768
|
105
|
-
|
106
|
-
extern "Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis)"
|
107
|
-
extern "SDL_bool SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)"
|
108
|
-
|
109
|
-
SDL_HAT_CENTERED = 0x00
|
110
|
-
SDL_HAT_UP = 0x01
|
111
|
-
SDL_HAT_RIGHT = 0x02
|
112
|
-
SDL_HAT_DOWN = 0x04
|
113
|
-
SDL_HAT_LEFT = 0x08
|
114
|
-
SDL_HAT_RIGHTUP = (SDL_HAT_RIGHT|SDL_HAT_UP)
|
115
|
-
SDL_HAT_RIGHTDOWN = (SDL_HAT_RIGHT|SDL_HAT_DOWN)
|
116
|
-
SDL_HAT_LEFTUP = (SDL_HAT_LEFT|SDL_HAT_UP)
|
117
|
-
SDL_HAT_LEFTDOWN = (SDL_HAT_LEFT|SDL_HAT_DOWN)
|
118
|
-
|
119
|
-
extern "Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat)"
|
120
|
-
extern "int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy)"
|
121
|
-
extern "Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button)"
|
122
|
-
extern "int SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)"
|
123
|
-
extern "int SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)"
|
124
|
-
extern "SDL_bool SDL_JoystickHasLED(SDL_Joystick *joystick)"
|
125
|
-
extern "SDL_bool SDL_JoystickHasRumble(SDL_Joystick *joystick)"
|
126
|
-
extern "SDL_bool SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick)"
|
127
|
-
extern "int SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)"
|
128
|
-
extern "int SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size)"
|
129
|
-
extern "void SDL_JoystickClose(SDL_Joystick *joystick)"
|
130
|
-
extern "SDL_JoystickPowerLevel SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick)"
|
131
|
-
end
|
1
|
+
module SDLRuby::SDL
|
2
|
+
require_relative "SDL_stdinc.h"
|
3
|
+
require_relative "SDL_error.h"
|
4
|
+
require_relative "SDL_guid.h"
|
5
|
+
|
6
|
+
# typealias "SDL_JoystickGUID", "SDL_GUID"
|
7
|
+
typealias "SDL_JoystickID", "Sint32"
|
8
|
+
|
9
|
+
SDL_JOYSTICK_TYPE_UNKNOWN = 0
|
10
|
+
SDL_JOYSTICK_TYPE_GAMECONTROLLER = 1
|
11
|
+
SDL_JOYSTICK_TYPE_WHEEL = 2
|
12
|
+
SDL_JOYSTICK_TYPE_ARCADE_STICK = 3
|
13
|
+
SDL_JOYSTICK_TYPE_FLIGHT_STICK = 4
|
14
|
+
SDL_JOYSTICK_TYPE_DANCE_PAD = 5
|
15
|
+
SDL_JOYSTICK_TYPE_GUITAR = 6
|
16
|
+
SDL_JOYSTICK_TYPE_DRUM_KIT = 7
|
17
|
+
SDL_JOYSTICK_TYPE_ARCADE_PAD = 8
|
18
|
+
SDL_JOYSTICK_TYPE_THROTTLE = 9
|
19
|
+
typealias "SDL_JoystickType", "int"
|
20
|
+
|
21
|
+
SDL_JOYSTICK_POWER_UNKNOWN = -1
|
22
|
+
SDL_JOYSTICK_POWER_EMPTY = 0
|
23
|
+
SDL_JOYSTICK_POWER_LOW = 1
|
24
|
+
SDL_JOYSTICK_POWER_MEDIUM = 2
|
25
|
+
SDL_JOYSTICK_POWER_FULL = 3
|
26
|
+
SDL_JOYSTICK_POWER_WIRED = 4
|
27
|
+
SDL_JOYSTICK_POWER_MAX = 5
|
28
|
+
typealias "SDL_JoystickPowerLevel", "int"
|
29
|
+
|
30
|
+
SDL_IPHONE_MAX_GFORCE = 5.0
|
31
|
+
|
32
|
+
extern "void SDL_LockJoysticks(void)"
|
33
|
+
extern "void SDL_UnlockJoysticks(void)"
|
34
|
+
extern "int SDL_NumJoysticks(void)"
|
35
|
+
extern "const char * SDL_JoystickNameForIndex(int device_index)"
|
36
|
+
extern "const char * SDL_JoystickPathForIndex(int device_index)"
|
37
|
+
extern "int SDL_JoystickGetDevicePlayerIndex(int device_index)"
|
38
|
+
# extern "SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index)"
|
39
|
+
extern "Uint16 SDL_JoystickGetDeviceVendor(int device_index)"
|
40
|
+
extern "Uint16 SDL_JoystickGetDeviceProduct(int device_index)"
|
41
|
+
extern "Uint16 SDL_JoystickGetDeviceProductVersion(int device_index)"
|
42
|
+
extern "SDL_JoystickType SDL_JoystickGetDeviceType(int device_index)"
|
43
|
+
extern "SDL_JoystickID SDL_JoystickGetDeviceInstanceID(int device_index)"
|
44
|
+
extern "SDL_Joystick * SDL_JoystickOpen(int device_index)"
|
45
|
+
extern "SDL_Joystick * SDL_JoystickFromInstanceID(SDL_JoystickID instance_id)"
|
46
|
+
extern "SDL_Joystick * SDL_JoystickFromPlayerIndex(int player_index)"
|
47
|
+
extern "int SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nbuttons, int nhats)"
|
48
|
+
|
49
|
+
SDL_VirtualJoystickDesc = struct(
|
50
|
+
[
|
51
|
+
"Uint16 version",
|
52
|
+
"Uint16 type",
|
53
|
+
"Uint16 naxes",
|
54
|
+
"Uint16 nbuttons",
|
55
|
+
"Uint16 nhats",
|
56
|
+
"Uint16 vendor_id",
|
57
|
+
"Uint16 product_id",
|
58
|
+
"Uint16 padding",
|
59
|
+
"Uint32 button_mask",
|
60
|
+
"Uint32 axis_mask",
|
61
|
+
"const char *name",
|
62
|
+
"void *userdata",
|
63
|
+
"void *Update",
|
64
|
+
"void *SetPlayerIndex",
|
65
|
+
"void *Rumble",
|
66
|
+
"void *RumbleTriggers",
|
67
|
+
"void *SetLED",
|
68
|
+
"void *SendEffect",
|
69
|
+
]
|
70
|
+
)
|
71
|
+
|
72
|
+
SDL_VIRTUAL_JOYSTICK_DESC_VERSION = 1
|
73
|
+
|
74
|
+
extern "int SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc)"
|
75
|
+
extern "int SDL_JoystickDetachVirtual(int device_index)"
|
76
|
+
extern "SDL_bool SDL_JoystickIsVirtual(int device_index)"
|
77
|
+
extern "int SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value)"
|
78
|
+
extern "int SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value)"
|
79
|
+
extern "int SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value)"
|
80
|
+
extern "const char * SDL_JoystickName(SDL_Joystick *joystick)"
|
81
|
+
extern "const char * SDL_JoystickPath(SDL_Joystick *joystick)"
|
82
|
+
extern "int SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick)"
|
83
|
+
extern "void SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)"
|
84
|
+
# extern "SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick *joystick)"
|
85
|
+
extern "Uint16 SDL_JoystickGetVendor(SDL_Joystick *joystick)"
|
86
|
+
extern "Uint16 SDL_JoystickGetProduct(SDL_Joystick *joystick)"
|
87
|
+
extern "Uint16 SDL_JoystickGetProductVersion(SDL_Joystick *joystick)"
|
88
|
+
extern "Uint16 SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick)"
|
89
|
+
extern "const char * SDL_JoystickGetSerial(SDL_Joystick *joystick)"
|
90
|
+
extern "SDL_JoystickType SDL_JoystickGetType(SDL_Joystick *joystick)"
|
91
|
+
# extern "void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID)"
|
92
|
+
# extern "SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID)"
|
93
|
+
# extern "void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)"
|
94
|
+
extern "SDL_bool SDL_JoystickGetAttached(SDL_Joystick *joystick)"
|
95
|
+
extern "SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick *joystick)"
|
96
|
+
extern "int SDL_JoystickNumAxes(SDL_Joystick *joystick)"
|
97
|
+
extern "int SDL_JoystickNumBalls(SDL_Joystick *joystick)"
|
98
|
+
extern "int SDL_JoystickNumHats(SDL_Joystick *joystick)"
|
99
|
+
extern "int SDL_JoystickNumButtons(SDL_Joystick *joystick)"
|
100
|
+
extern "void SDL_JoystickUpdate(void)"
|
101
|
+
extern "int SDL_JoystickEventState(int state)"
|
102
|
+
|
103
|
+
SDL_JOYSTICK_AXIS_MAX = 32767
|
104
|
+
SDL_JOYSTICK_AXIS_MIN = -32768
|
105
|
+
|
106
|
+
extern "Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis)"
|
107
|
+
extern "SDL_bool SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)"
|
108
|
+
|
109
|
+
SDL_HAT_CENTERED = 0x00
|
110
|
+
SDL_HAT_UP = 0x01
|
111
|
+
SDL_HAT_RIGHT = 0x02
|
112
|
+
SDL_HAT_DOWN = 0x04
|
113
|
+
SDL_HAT_LEFT = 0x08
|
114
|
+
SDL_HAT_RIGHTUP = (SDL_HAT_RIGHT|SDL_HAT_UP)
|
115
|
+
SDL_HAT_RIGHTDOWN = (SDL_HAT_RIGHT|SDL_HAT_DOWN)
|
116
|
+
SDL_HAT_LEFTUP = (SDL_HAT_LEFT|SDL_HAT_UP)
|
117
|
+
SDL_HAT_LEFTDOWN = (SDL_HAT_LEFT|SDL_HAT_DOWN)
|
118
|
+
|
119
|
+
extern "Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat)"
|
120
|
+
extern "int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy)"
|
121
|
+
extern "Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button)"
|
122
|
+
extern "int SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)"
|
123
|
+
extern "int SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)"
|
124
|
+
extern "SDL_bool SDL_JoystickHasLED(SDL_Joystick *joystick)"
|
125
|
+
extern "SDL_bool SDL_JoystickHasRumble(SDL_Joystick *joystick)"
|
126
|
+
extern "SDL_bool SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick)"
|
127
|
+
extern "int SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)"
|
128
|
+
extern "int SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size)"
|
129
|
+
extern "void SDL_JoystickClose(SDL_Joystick *joystick)"
|
130
|
+
extern "SDL_JoystickPowerLevel SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick)"
|
131
|
+
end
|
@@ -1,35 +1,35 @@
|
|
1
|
-
module SDLRuby::SDL
|
2
|
-
require_relative "SDL_stdinc.h"
|
3
|
-
require_relative "SDL_error.h"
|
4
|
-
require_relative "SDL_keycode.h"
|
5
|
-
require_relative "SDL_video.h"
|
6
|
-
|
7
|
-
SDL_Keysym = struct(
|
8
|
-
[
|
9
|
-
"SDL_Scancode scancode",
|
10
|
-
"SDL_Keycode sym",
|
11
|
-
"Uint16 mod",
|
12
|
-
"Uint32 unused",
|
13
|
-
]
|
14
|
-
)
|
15
|
-
|
16
|
-
extern "SDL_Window * SDL_GetKeyboardFocus(void)"
|
17
|
-
extern "const Uint8 * SDL_GetKeyboardState(int *numkeys)"
|
18
|
-
extern "void SDL_ResetKeyboard(void)"
|
19
|
-
extern "SDL_Keymod SDL_GetModState(void)"
|
20
|
-
extern "void SDL_SetModState(SDL_Keymod modstate)"
|
21
|
-
extern "SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode)"
|
22
|
-
extern "SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key)"
|
23
|
-
extern "const char * SDL_GetScancodeName(SDL_Scancode scancode)"
|
24
|
-
extern "SDL_Scancode SDL_GetScancodeFromName(const char *name)"
|
25
|
-
extern "const char * SDL_GetKeyName(SDL_Keycode key)"
|
26
|
-
extern "SDL_Keycode SDL_GetKeyFromName(const char *name)"
|
27
|
-
extern "void SDL_StartTextInput(void)"
|
28
|
-
extern "SDL_bool SDL_IsTextInputActive(void)"
|
29
|
-
extern "void SDL_StopTextInput(void)"
|
30
|
-
extern "void SDL_ClearComposition(void)"
|
31
|
-
extern "SDL_bool SDL_IsTextInputShown(void)"
|
32
|
-
extern "void SDL_SetTextInputRect(const SDL_Rect *rect)"
|
33
|
-
extern "SDL_bool SDL_HasScreenKeyboardSupport(void)"
|
34
|
-
extern "SDL_bool SDL_IsScreenKeyboardShown(SDL_Window *window)"
|
35
|
-
end
|
1
|
+
module SDLRuby::SDL
|
2
|
+
require_relative "SDL_stdinc.h"
|
3
|
+
require_relative "SDL_error.h"
|
4
|
+
require_relative "SDL_keycode.h"
|
5
|
+
require_relative "SDL_video.h"
|
6
|
+
|
7
|
+
SDL_Keysym = struct(
|
8
|
+
[
|
9
|
+
"SDL_Scancode scancode",
|
10
|
+
"SDL_Keycode sym",
|
11
|
+
"Uint16 mod",
|
12
|
+
"Uint32 unused",
|
13
|
+
]
|
14
|
+
)
|
15
|
+
|
16
|
+
extern "SDL_Window * SDL_GetKeyboardFocus(void)"
|
17
|
+
extern "const Uint8 * SDL_GetKeyboardState(int *numkeys)"
|
18
|
+
extern "void SDL_ResetKeyboard(void)"
|
19
|
+
extern "SDL_Keymod SDL_GetModState(void)"
|
20
|
+
extern "void SDL_SetModState(SDL_Keymod modstate)"
|
21
|
+
extern "SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode)"
|
22
|
+
extern "SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key)"
|
23
|
+
extern "const char * SDL_GetScancodeName(SDL_Scancode scancode)"
|
24
|
+
extern "SDL_Scancode SDL_GetScancodeFromName(const char *name)"
|
25
|
+
extern "const char * SDL_GetKeyName(SDL_Keycode key)"
|
26
|
+
extern "SDL_Keycode SDL_GetKeyFromName(const char *name)"
|
27
|
+
extern "void SDL_StartTextInput(void)"
|
28
|
+
extern "SDL_bool SDL_IsTextInputActive(void)"
|
29
|
+
extern "void SDL_StopTextInput(void)"
|
30
|
+
extern "void SDL_ClearComposition(void)"
|
31
|
+
extern "SDL_bool SDL_IsTextInputShown(void)"
|
32
|
+
extern "void SDL_SetTextInputRect(const SDL_Rect *rect)"
|
33
|
+
extern "SDL_bool SDL_HasScreenKeyboardSupport(void)"
|
34
|
+
extern "SDL_bool SDL_IsScreenKeyboardShown(SDL_Window *window)"
|
35
|
+
end
|