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,6 +1,6 @@
1
- module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
-
4
- extern "char * SDL_GetBasePath(void)"
5
- extern "char * SDL_GetPrefPath(const char *org, const char *app)"
6
- end
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+
4
+ extern "char * SDL_GetBasePath(void)"
5
+ extern "char * SDL_GetPrefPath(const char *org, const char *app)"
6
+ end
@@ -1,147 +1,147 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
- require_relative "SDL_error.h"
4
- require_relative "SDL_rwops.h"
5
- require_relative "SDL_sensor.h"
6
- require_relative "SDL_joystick.h"
7
-
8
- SDL_CONTROLLER_TYPE_UNKNOWN = 0
9
- SDL_CONTROLLER_TYPE_XBOX360 = 1
10
- SDL_CONTROLLER_TYPE_XBOXONE = 2
11
- SDL_CONTROLLER_TYPE_PS3 = 3
12
- SDL_CONTROLLER_TYPE_PS4 = 4
13
- SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO = 5
14
- SDL_CONTROLLER_TYPE_VIRTUAL = 6
15
- SDL_CONTROLLER_TYPE_PS5 = 7
16
- SDL_CONTROLLER_TYPE_AMAZON_LUNA = 8
17
- SDL_CONTROLLER_TYPE_GOOGLE_STADIA = 9
18
- SDL_CONTROLLER_TYPE_NVIDIA_SHIELD = 10
19
- SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT = 11
20
- SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT = 12
21
- SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR = 13
22
- typealias "SDL_GameControllerType", "int"
23
-
24
- SDL_CONTROLLER_BINDTYPE_NONE = 0
25
- SDL_CONTROLLER_BINDTYPE_BUTTON = 1
26
- SDL_CONTROLLER_BINDTYPE_AXIS = 2
27
- SDL_CONTROLLER_BINDTYPE_HAT = 3
28
- typealias "SDL_GameControllerBindType", "int"
29
-
30
- SDL_GameControllerButtonBind = struct(
31
- [
32
- "SDL_GameControllerBindType bindType",
33
- { value: union(
34
- [
35
- "int button",
36
- "int axis",
37
- { hat: struct(
38
- [
39
- "int hat",
40
- "int hat_mask",
41
- ]
42
- ) }
43
- ]
44
- ) }
45
- ]
46
- )
47
-
48
- extern "int SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw)"
49
-
50
- def self.SDL_GameControllerAddMappingsFromFile(file)
51
- SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
52
- end
53
-
54
- extern "int SDL_GameControllerAddMapping(const char* mappingString)"
55
- extern "int SDL_GameControllerNumMappings(void)"
56
- extern "char * SDL_GameControllerMappingForIndex(int mapping_index)"
57
- # extern "char * SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)"
58
- extern "char * SDL_GameControllerMapping(SDL_GameController *gamecontroller)"
59
- extern "SDL_bool SDL_IsGameController(int joystick_index)"
60
- extern "const char * SDL_GameControllerNameForIndex(int joystick_index)"
61
- extern "const char * SDL_GameControllerPathForIndex(int joystick_index)"
62
- extern "SDL_GameControllerType SDL_GameControllerTypeForIndex(int joystick_index)"
63
- extern "char * SDL_GameControllerMappingForDeviceIndex(int joystick_index)"
64
- extern "SDL_GameController * SDL_GameControllerOpen(int joystick_index)"
65
- extern "SDL_GameController * SDL_GameControllerFromInstanceID(SDL_JoystickID joyid)"
66
- extern "SDL_GameController * SDL_GameControllerFromPlayerIndex(int player_index)"
67
- extern "const char * SDL_GameControllerName(SDL_GameController *gamecontroller)"
68
- extern "const char * SDL_GameControllerPath(SDL_GameController *gamecontroller)"
69
- extern "SDL_GameControllerType SDL_GameControllerGetType(SDL_GameController *gamecontroller)"
70
- extern "int SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller)"
71
- extern "void SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index)"
72
- extern "Uint16 SDL_GameControllerGetVendor(SDL_GameController *gamecontroller)"
73
- extern "Uint16 SDL_GameControllerGetProduct(SDL_GameController *gamecontroller)"
74
- extern "Uint16 SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller)"
75
- extern "Uint16 SDL_GameControllerGetFirmwareVersion(SDL_GameController *gamecontroller)"
76
- extern "const char * SDL_GameControllerGetSerial(SDL_GameController *gamecontroller)"
77
- extern "SDL_bool SDL_GameControllerGetAttached(SDL_GameController *gamecontroller)"
78
- extern "SDL_Joystick * SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller)"
79
- extern "int SDL_GameControllerEventState(int state)"
80
- extern "void SDL_GameControllerUpdate(void)"
81
-
82
- SDL_CONTROLLER_AXIS_INVALID = -1
83
- SDL_CONTROLLER_AXIS_LEFTX = 0
84
- SDL_CONTROLLER_AXIS_LEFTY = 1
85
- SDL_CONTROLLER_AXIS_RIGHTX = 2
86
- SDL_CONTROLLER_AXIS_RIGHTY = 3
87
- SDL_CONTROLLER_AXIS_TRIGGERLEFT = 4
88
- SDL_CONTROLLER_AXIS_TRIGGERRIGHT = 5
89
- SDL_CONTROLLER_AXIS_MAX = 6
90
- typealias "SDL_GameControllerAxis", "int"
91
-
92
- extern "SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(const char *str)"
93
- extern "const char* SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis)"
94
- # extern "SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
95
- extern "SDL_bool SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
96
- extern "Sint16 SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
97
-
98
- SDL_CONTROLLER_BUTTON_INVALID = -1
99
- SDL_CONTROLLER_BUTTON_A = 0
100
- SDL_CONTROLLER_BUTTON_B = 1
101
- SDL_CONTROLLER_BUTTON_X = 2
102
- SDL_CONTROLLER_BUTTON_Y = 3
103
- SDL_CONTROLLER_BUTTON_BACK = 4
104
- SDL_CONTROLLER_BUTTON_GUIDE = 5
105
- SDL_CONTROLLER_BUTTON_START = 6
106
- SDL_CONTROLLER_BUTTON_LEFTSTICK = 7
107
- SDL_CONTROLLER_BUTTON_RIGHTSTICK = 8
108
- SDL_CONTROLLER_BUTTON_LEFTSHOULDER = 9
109
- SDL_CONTROLLER_BUTTON_RIGHTSHOULDER = 10
110
- SDL_CONTROLLER_BUTTON_DPAD_UP = 11
111
- SDL_CONTROLLER_BUTTON_DPAD_DOWN = 12
112
- SDL_CONTROLLER_BUTTON_DPAD_LEFT = 13
113
- SDL_CONTROLLER_BUTTON_DPAD_RIGHT = 14
114
- SDL_CONTROLLER_BUTTON_MISC1 = 15
115
- SDL_CONTROLLER_BUTTON_PADDLE1 = 16
116
- SDL_CONTROLLER_BUTTON_PADDLE2 = 17
117
- SDL_CONTROLLER_BUTTON_PADDLE3 = 18
118
- SDL_CONTROLLER_BUTTON_PADDLE4 = 19
119
- SDL_CONTROLLER_BUTTON_TOUCHPAD = 20
120
- SDL_CONTROLLER_BUTTON_MAX = 21
121
- typealias "SDL_GameControllerButton", "int"
122
-
123
- extern "SDL_GameControllerButton SDL_GameControllerGetButtonFromString(const char *str)"
124
- extern "const char* SDL_GameControllerGetStringForButton(SDL_GameControllerButton button)"
125
- # extern "SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
126
- extern "SDL_bool SDL_GameControllerHasButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
127
- extern "Uint8 SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
128
- extern "int SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller)"
129
- extern "int SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad)"
130
- extern "int SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure)"
131
- extern "SDL_bool SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type)"
132
- extern "int SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled)"
133
- extern "SDL_bool SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type)"
134
- extern "float SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type)"
135
- extern "int SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values)"
136
- extern "int SDL_GameControllerGetSensorDataWithTimestamp(SDL_GameController *gamecontroller, SDL_SensorType type, Uint64 *timestamp, float *data, int num_values)"
137
- extern "int SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)"
138
- extern "int SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)"
139
- extern "SDL_bool SDL_GameControllerHasLED(SDL_GameController *gamecontroller)"
140
- extern "SDL_bool SDL_GameControllerHasRumble(SDL_GameController *gamecontroller)"
141
- extern "SDL_bool SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller)"
142
- extern "int SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue)"
143
- extern "int SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size)"
144
- extern "void SDL_GameControllerClose(SDL_GameController *gamecontroller)"
145
- extern "const char* SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
146
- extern "const char* SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
147
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+ require_relative "SDL_rwops.h"
5
+ require_relative "SDL_sensor.h"
6
+ require_relative "SDL_joystick.h"
7
+
8
+ SDL_CONTROLLER_TYPE_UNKNOWN = 0
9
+ SDL_CONTROLLER_TYPE_XBOX360 = 1
10
+ SDL_CONTROLLER_TYPE_XBOXONE = 2
11
+ SDL_CONTROLLER_TYPE_PS3 = 3
12
+ SDL_CONTROLLER_TYPE_PS4 = 4
13
+ SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO = 5
14
+ SDL_CONTROLLER_TYPE_VIRTUAL = 6
15
+ SDL_CONTROLLER_TYPE_PS5 = 7
16
+ SDL_CONTROLLER_TYPE_AMAZON_LUNA = 8
17
+ SDL_CONTROLLER_TYPE_GOOGLE_STADIA = 9
18
+ SDL_CONTROLLER_TYPE_NVIDIA_SHIELD = 10
19
+ SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_LEFT = 11
20
+ SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_RIGHT = 12
21
+ SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_JOYCON_PAIR = 13
22
+ typealias "SDL_GameControllerType", "int"
23
+
24
+ SDL_CONTROLLER_BINDTYPE_NONE = 0
25
+ SDL_CONTROLLER_BINDTYPE_BUTTON = 1
26
+ SDL_CONTROLLER_BINDTYPE_AXIS = 2
27
+ SDL_CONTROLLER_BINDTYPE_HAT = 3
28
+ typealias "SDL_GameControllerBindType", "int"
29
+
30
+ SDL_GameControllerButtonBind = struct(
31
+ [
32
+ "SDL_GameControllerBindType bindType",
33
+ { value: union(
34
+ [
35
+ "int button",
36
+ "int axis",
37
+ { hat: struct(
38
+ [
39
+ "int hat",
40
+ "int hat_mask",
41
+ ]
42
+ ) }
43
+ ]
44
+ ) }
45
+ ]
46
+ )
47
+
48
+ extern "int SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw)"
49
+
50
+ def self.SDL_GameControllerAddMappingsFromFile(file)
51
+ SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
52
+ end
53
+
54
+ extern "int SDL_GameControllerAddMapping(const char* mappingString)"
55
+ extern "int SDL_GameControllerNumMappings(void)"
56
+ extern "char * SDL_GameControllerMappingForIndex(int mapping_index)"
57
+ # extern "char * SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)"
58
+ extern "char * SDL_GameControllerMapping(SDL_GameController *gamecontroller)"
59
+ extern "SDL_bool SDL_IsGameController(int joystick_index)"
60
+ extern "const char * SDL_GameControllerNameForIndex(int joystick_index)"
61
+ extern "const char * SDL_GameControllerPathForIndex(int joystick_index)"
62
+ extern "SDL_GameControllerType SDL_GameControllerTypeForIndex(int joystick_index)"
63
+ extern "char * SDL_GameControllerMappingForDeviceIndex(int joystick_index)"
64
+ extern "SDL_GameController * SDL_GameControllerOpen(int joystick_index)"
65
+ extern "SDL_GameController * SDL_GameControllerFromInstanceID(SDL_JoystickID joyid)"
66
+ extern "SDL_GameController * SDL_GameControllerFromPlayerIndex(int player_index)"
67
+ extern "const char * SDL_GameControllerName(SDL_GameController *gamecontroller)"
68
+ extern "const char * SDL_GameControllerPath(SDL_GameController *gamecontroller)"
69
+ extern "SDL_GameControllerType SDL_GameControllerGetType(SDL_GameController *gamecontroller)"
70
+ extern "int SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller)"
71
+ extern "void SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index)"
72
+ extern "Uint16 SDL_GameControllerGetVendor(SDL_GameController *gamecontroller)"
73
+ extern "Uint16 SDL_GameControllerGetProduct(SDL_GameController *gamecontroller)"
74
+ extern "Uint16 SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller)"
75
+ extern "Uint16 SDL_GameControllerGetFirmwareVersion(SDL_GameController *gamecontroller)"
76
+ extern "const char * SDL_GameControllerGetSerial(SDL_GameController *gamecontroller)"
77
+ extern "SDL_bool SDL_GameControllerGetAttached(SDL_GameController *gamecontroller)"
78
+ extern "SDL_Joystick * SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller)"
79
+ extern "int SDL_GameControllerEventState(int state)"
80
+ extern "void SDL_GameControllerUpdate(void)"
81
+
82
+ SDL_CONTROLLER_AXIS_INVALID = -1
83
+ SDL_CONTROLLER_AXIS_LEFTX = 0
84
+ SDL_CONTROLLER_AXIS_LEFTY = 1
85
+ SDL_CONTROLLER_AXIS_RIGHTX = 2
86
+ SDL_CONTROLLER_AXIS_RIGHTY = 3
87
+ SDL_CONTROLLER_AXIS_TRIGGERLEFT = 4
88
+ SDL_CONTROLLER_AXIS_TRIGGERRIGHT = 5
89
+ SDL_CONTROLLER_AXIS_MAX = 6
90
+ typealias "SDL_GameControllerAxis", "int"
91
+
92
+ extern "SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(const char *str)"
93
+ extern "const char* SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis)"
94
+ # extern "SDL_GameControllerButtonBind SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
95
+ extern "SDL_bool SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
96
+ extern "Sint16 SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
97
+
98
+ SDL_CONTROLLER_BUTTON_INVALID = -1
99
+ SDL_CONTROLLER_BUTTON_A = 0
100
+ SDL_CONTROLLER_BUTTON_B = 1
101
+ SDL_CONTROLLER_BUTTON_X = 2
102
+ SDL_CONTROLLER_BUTTON_Y = 3
103
+ SDL_CONTROLLER_BUTTON_BACK = 4
104
+ SDL_CONTROLLER_BUTTON_GUIDE = 5
105
+ SDL_CONTROLLER_BUTTON_START = 6
106
+ SDL_CONTROLLER_BUTTON_LEFTSTICK = 7
107
+ SDL_CONTROLLER_BUTTON_RIGHTSTICK = 8
108
+ SDL_CONTROLLER_BUTTON_LEFTSHOULDER = 9
109
+ SDL_CONTROLLER_BUTTON_RIGHTSHOULDER = 10
110
+ SDL_CONTROLLER_BUTTON_DPAD_UP = 11
111
+ SDL_CONTROLLER_BUTTON_DPAD_DOWN = 12
112
+ SDL_CONTROLLER_BUTTON_DPAD_LEFT = 13
113
+ SDL_CONTROLLER_BUTTON_DPAD_RIGHT = 14
114
+ SDL_CONTROLLER_BUTTON_MISC1 = 15
115
+ SDL_CONTROLLER_BUTTON_PADDLE1 = 16
116
+ SDL_CONTROLLER_BUTTON_PADDLE2 = 17
117
+ SDL_CONTROLLER_BUTTON_PADDLE3 = 18
118
+ SDL_CONTROLLER_BUTTON_PADDLE4 = 19
119
+ SDL_CONTROLLER_BUTTON_TOUCHPAD = 20
120
+ SDL_CONTROLLER_BUTTON_MAX = 21
121
+ typealias "SDL_GameControllerButton", "int"
122
+
123
+ extern "SDL_GameControllerButton SDL_GameControllerGetButtonFromString(const char *str)"
124
+ extern "const char* SDL_GameControllerGetStringForButton(SDL_GameControllerButton button)"
125
+ # extern "SDL_GameControllerButtonBind SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
126
+ extern "SDL_bool SDL_GameControllerHasButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
127
+ extern "Uint8 SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
128
+ extern "int SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller)"
129
+ extern "int SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad)"
130
+ extern "int SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure)"
131
+ extern "SDL_bool SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type)"
132
+ extern "int SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled)"
133
+ extern "SDL_bool SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type)"
134
+ extern "float SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type)"
135
+ extern "int SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values)"
136
+ extern "int SDL_GameControllerGetSensorDataWithTimestamp(SDL_GameController *gamecontroller, SDL_SensorType type, Uint64 *timestamp, float *data, int num_values)"
137
+ extern "int SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)"
138
+ extern "int SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)"
139
+ extern "SDL_bool SDL_GameControllerHasLED(SDL_GameController *gamecontroller)"
140
+ extern "SDL_bool SDL_GameControllerHasRumble(SDL_GameController *gamecontroller)"
141
+ extern "SDL_bool SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller)"
142
+ extern "int SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue)"
143
+ extern "int SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size)"
144
+ extern "void SDL_GameControllerClose(SDL_GameController *gamecontroller)"
145
+ extern "const char* SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
146
+ extern "const char* SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
147
+ end
@@ -1,12 +1,12 @@
1
- module SDLRuby::SDL
2
- require_relative 'SDL_stdinc.h.rb'
3
- require_relative 'SDL_error.h.rb'
4
- require_relative 'SDL_video.h.rb'
5
- require_relative 'SDL_touch.h.rb'
6
-
7
- typealias "SDL_GestureID", "Sint64"
8
- extern "int SDL_RecordGesture(SDL_TouchID touchId)"
9
- extern "int SDL_SaveAllDollarTemplates(SDL_RWops *dst)"
10
- extern "int SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst)"
11
- extern "int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src)"
12
- end
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+ require_relative 'SDL_video.h.rb'
5
+ require_relative 'SDL_touch.h.rb'
6
+
7
+ typealias "SDL_GestureID", "Sint64"
8
+ extern "int SDL_RecordGesture(SDL_TouchID touchId)"
9
+ extern "int SDL_SaveAllDollarTemplates(SDL_RWops *dst)"
10
+ extern "int SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst)"
11
+ extern "int SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src)"
12
+ end
@@ -1,13 +1,13 @@
1
- module SDLRuby::SDL
2
- require_relative "SDL_stdinc.h"
3
- require_relative "SDL_error.h"
4
-
5
- SDL_GUID = struct(
6
- [
7
- "Uint8 data[16]"
8
- ]
9
- )
10
-
11
- # extern "void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID)"
12
- # extern "SDL_GUID SDL_GUIDFromString(const char *pchGUID)"
13
- end
1
+ module SDLRuby::SDL
2
+ require_relative "SDL_stdinc.h"
3
+ require_relative "SDL_error.h"
4
+
5
+ SDL_GUID = struct(
6
+ [
7
+ "Uint8 data[16]"
8
+ ]
9
+ )
10
+
11
+ # extern "void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID)"
12
+ # extern "SDL_GUID SDL_GUIDFromString(const char *pchGUID)"
13
+ end