SDLRuby 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +5 -0
  3. data/LICENSE.txt +21 -0
  4. data/README.md +31 -0
  5. data/Rakefile +12 -0
  6. data/lib/SDLRuby/audio.rb +65 -0
  7. data/lib/SDLRuby/cursor.rb +46 -0
  8. data/lib/SDLRuby/display.rb +79 -0
  9. data/lib/SDLRuby/event/accessor.rb +127 -0
  10. data/lib/SDLRuby/event/type.rb +75 -0
  11. data/lib/SDLRuby/event.rb +80 -0
  12. data/lib/SDLRuby/font.rb +227 -0
  13. data/lib/SDLRuby/hint.rb +36 -0
  14. data/lib/SDLRuby/image/image.rb +23 -0
  15. data/lib/SDLRuby/image/include/SDL_image.h.rb +61 -0
  16. data/lib/SDLRuby/image.rb +69 -0
  17. data/lib/SDLRuby/keyboard.rb +58 -0
  18. data/lib/SDLRuby/mixer/channel.rb +43 -0
  19. data/lib/SDLRuby/mixer/chunk.rb +49 -0
  20. data/lib/SDLRuby/mixer/controller.rb +44 -0
  21. data/lib/SDLRuby/mixer/include/SDL_mixer.h.rb +95 -0
  22. data/lib/SDLRuby/mixer/sdl_mixer.rb +60 -0
  23. data/lib/SDLRuby/mixer.rb +87 -0
  24. data/lib/SDLRuby/mouse.rb +52 -0
  25. data/lib/SDLRuby/music.rb +158 -0
  26. data/lib/SDLRuby/palette.rb +49 -0
  27. data/lib/SDLRuby/pixel_formatter.rb +67 -0
  28. data/lib/SDLRuby/rect.rb +11 -0
  29. data/lib/SDLRuby/renderer/accessor.rb +70 -0
  30. data/lib/SDLRuby/renderer/drawer.rb +107 -0
  31. data/lib/SDLRuby/renderer/renderer_info.rb +27 -0
  32. data/lib/SDLRuby/renderer.rb +101 -0
  33. data/lib/SDLRuby/rw_ops/rw_object.rb +128 -0
  34. data/lib/SDLRuby/rw_ops.rb +216 -0
  35. data/lib/SDLRuby/sdl/include/SDL.h.rb +33 -0
  36. data/lib/SDLRuby/sdl/include/SDL_audio.h.rb +49 -0
  37. data/lib/SDLRuby/sdl/include/SDL_blendmode.h.rb +6 -0
  38. data/lib/SDLRuby/sdl/include/SDL_clipboard.h.rb +10 -0
  39. data/lib/SDLRuby/sdl/include/SDL_config.h.rb +13 -0
  40. data/lib/SDLRuby/sdl/include/SDL_cpuinfo.h.rb +27 -0
  41. data/lib/SDLRuby/sdl/include/SDL_endian.h.rb +3 -0
  42. data/lib/SDLRuby/sdl/include/SDL_error.h.rb +9 -0
  43. data/lib/SDLRuby/sdl/include/SDL_events.h.rb +32 -0
  44. data/lib/SDLRuby/sdl/include/SDL_filesystem.h.rb +6 -0
  45. data/lib/SDLRuby/sdl/include/SDL_gamecontroller.h.rb +66 -0
  46. data/lib/SDLRuby/sdl/include/SDL_gesture.h.rb +12 -0
  47. data/lib/SDLRuby/sdl/include/SDL_guid.h.rb +7 -0
  48. data/lib/SDLRuby/sdl/include/SDL_hints.h.rb +14 -0
  49. data/lib/SDLRuby/sdl/include/SDL_joystick.h.rb +69 -0
  50. data/lib/SDLRuby/sdl/include/SDL_keyboard.h.rb +26 -0
  51. data/lib/SDLRuby/sdl/include/SDL_keycode.h.rb +7 -0
  52. data/lib/SDLRuby/sdl/include/SDL_locale.h.rb +6 -0
  53. data/lib/SDLRuby/sdl/include/SDL_main.h.rb +3 -0
  54. data/lib/SDLRuby/sdl/include/SDL_messagebox.h.rb +10 -0
  55. data/lib/SDLRuby/sdl/include/SDL_misc.h.rb +5 -0
  56. data/lib/SDLRuby/sdl/include/SDL_mouse.h.rb +26 -0
  57. data/lib/SDLRuby/sdl/include/SDL_pixels.h.rb +25 -0
  58. data/lib/SDLRuby/sdl/include/SDL_platform.h.rb +3 -0
  59. data/lib/SDLRuby/sdl/include/SDL_power.h.rb +6 -0
  60. data/lib/SDLRuby/sdl/include/SDL_rect.h.rb +17 -0
  61. data/lib/SDLRuby/sdl/include/SDL_render.h.rb +94 -0
  62. data/lib/SDLRuby/sdl/include/SDL_revision.h.rb +2 -0
  63. data/lib/SDLRuby/sdl/include/SDL_rwops.h.rb +34 -0
  64. data/lib/SDLRuby/sdl/include/SDL_scancode.h.rb +5 -0
  65. data/lib/SDLRuby/sdl/include/SDL_sensor.h.rb +25 -0
  66. data/lib/SDLRuby/sdl/include/SDL_shape.h.rb +13 -0
  67. data/lib/SDLRuby/sdl/include/SDL_stdinc.h.rb +24 -0
  68. data/lib/SDLRuby/sdl/include/SDL_surface.h.rb +37 -0
  69. data/lib/SDLRuby/sdl/include/SDL_system.h.rb +6 -0
  70. data/lib/SDLRuby/sdl/include/SDL_syswm.h.rb +16 -0
  71. data/lib/SDLRuby/sdl/include/SDL_timer.h.rb +13 -0
  72. data/lib/SDLRuby/sdl/include/SDL_touch.h.rb +15 -0
  73. data/lib/SDLRuby/sdl/include/SDL_types.h.rb +3 -0
  74. data/lib/SDLRuby/sdl/include/SDL_version.h.rb +6 -0
  75. data/lib/SDLRuby/sdl/include/SDL_video.h.rb +117 -0
  76. data/lib/SDLRuby/sdl/sdl.rb +55 -0
  77. data/lib/SDLRuby/sdl/sdl_audio.rb +75 -0
  78. data/lib/SDLRuby/sdl/sdl_blendmode.rb +10 -0
  79. data/lib/SDLRuby/sdl/sdl_error.rb +5 -0
  80. data/lib/SDLRuby/sdl/sdl_events.rb +470 -0
  81. data/lib/SDLRuby/sdl/sdl_hints.rb +9 -0
  82. data/lib/SDLRuby/sdl/sdl_keyboard.rb +12 -0
  83. data/lib/SDLRuby/sdl/sdl_locale.rb +8 -0
  84. data/lib/SDLRuby/sdl/sdl_message_box.rb +7 -0
  85. data/lib/SDLRuby/sdl/sdl_mouse.rb +32 -0
  86. data/lib/SDLRuby/sdl/sdl_palette.rb +12 -0
  87. data/lib/SDLRuby/sdl/sdl_pixels.rb +138 -0
  88. data/lib/SDLRuby/sdl/sdl_rect.rb +11 -0
  89. data/lib/SDLRuby/sdl/sdl_render.rb +35 -0
  90. data/lib/SDLRuby/sdl/sdl_rw_ops.rb +29 -0
  91. data/lib/SDLRuby/sdl/sdl_scancode.rb +255 -0
  92. data/lib/SDLRuby/sdl/sdl_surface.rb +27 -0
  93. data/lib/SDLRuby/sdl/sdl_version.rb +5 -0
  94. data/lib/SDLRuby/sdl/sdl_video.rb +104 -0
  95. data/lib/SDLRuby/sdl.rb +192 -0
  96. data/lib/SDLRuby/sdl_error.rb +8 -0
  97. data/lib/SDLRuby/surface/pixel_format.rb +51 -0
  98. data/lib/SDLRuby/surface/surface_renderer.rb +26 -0
  99. data/lib/SDLRuby/surface.rb +179 -0
  100. data/lib/SDLRuby/text_input.rb +38 -0
  101. data/lib/SDLRuby/texture.rb +93 -0
  102. data/lib/SDLRuby/ttf/include/SDL_ttf.h.rb +54 -0
  103. data/lib/SDLRuby/ttf/ttf.rb +41 -0
  104. data/lib/SDLRuby/ttf.rb +54 -0
  105. data/lib/SDLRuby/version.rb +5 -0
  106. data/lib/SDLRuby/window/accessor.rb +125 -0
  107. data/lib/SDLRuby/window/controller.rb +53 -0
  108. data/lib/SDLRuby/window/display_info.rb +48 -0
  109. data/lib/SDLRuby/window/flag.rb +42 -0
  110. data/lib/SDLRuby/window/hit_tester.rb +61 -0
  111. data/lib/SDLRuby/window/input.rb +68 -0
  112. data/lib/SDLRuby/window/shaper.rb +68 -0
  113. data/lib/SDLRuby/window/surfacer.rb +37 -0
  114. data/lib/SDLRuby/window/window_renderer.rb +31 -0
  115. data/lib/SDLRuby/window.rb +90 -0
  116. data/lib/SDLRuby.rb +16 -0
  117. data/sig/SDLRuby/event.rbs +104 -0
  118. data/sig/SDLRuby/pixel_formmater.rbs +24 -0
  119. data/sig/SDLRuby/rect.rbs +5 -0
  120. data/sig/SDLRuby/sdl.rbs +606 -0
  121. data/sig/SDLRuby.rbs +4 -0
  122. metadata +168 -0
@@ -0,0 +1,27 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+
4
+ extern "int SDL_GetCPUCount(void)"
5
+ extern "int SDL_GetCPUCacheLineSize(void)"
6
+ extern "SDL_bool SDL_HasRDTSC(void)"
7
+ extern "SDL_bool SDL_HasAltiVec(void)"
8
+ extern "SDL_bool SDL_HasMMX(void)"
9
+ extern "SDL_bool SDL_Has3DNow(void)"
10
+ extern "SDL_bool SDL_HasSSE(void)"
11
+ extern "SDL_bool SDL_HasSSE2(void)"
12
+ extern "SDL_bool SDL_HasSSE3(void)"
13
+ extern "SDL_bool SDL_HasSSE41(void)"
14
+ extern "SDL_bool SDL_HasSSE42(void)"
15
+ extern "SDL_bool SDL_HasAVX(void)"
16
+ extern "SDL_bool SDL_HasAVX2(void)"
17
+ extern "SDL_bool SDL_HasAVX512F(void)"
18
+ extern "SDL_bool SDL_HasARMSIMD(void)"
19
+ extern "SDL_bool SDL_HasNEON(void)"
20
+ extern "SDL_bool SDL_HasLSX(void)"
21
+ extern "SDL_bool SDL_HasLASX(void)"
22
+ extern "int SDL_GetSystemRAM(void)"
23
+ extern "size_t SDL_SIMDGetAlignment(void)"
24
+ extern "void * SDL_SIMDAlloc(const size_t len)"
25
+ extern "void * SDL_SIMDRealloc(void *mem, const size_t len)"
26
+ extern "void SDL_SIMDFree(void *ptr)"
27
+ end
@@ -0,0 +1,3 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ end
@@ -0,0 +1,9 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+
4
+ typealias "SDL_errorcode", "int"
5
+ extern "const char * SDL_GetError(void)"
6
+ extern "char * SDL_GetErrorMsg(char *errstr, int maxlen)"
7
+ extern "void SDL_ClearError(void)"
8
+ extern "int SDL_Error(SDL_errorcode code)"
9
+ end
@@ -0,0 +1,32 @@
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_keyboard.h.rb'
6
+ require_relative 'SDL_mouse.h.rb'
7
+ require_relative 'SDL_joystick.h.rb'
8
+ require_relative 'SDL_gamecontroller.h.rb'
9
+ require_relative 'SDL_gesture.h.rb'
10
+ require_relative 'SDL_touch.h.rb'
11
+
12
+ typealias "SDL_SysWMmsg", "struct SDL_SysWMmsg"
13
+ typealias "SDL_EventType", "int"
14
+ typealias "SDL_eventaction", "int"
15
+ extern "void SDL_PumpEvents(void)"
16
+ extern "int SDL_PeepEvents(SDL_Event *events, int numevents, SDL_eventaction action, Uint32 minType, Uint32 maxType)"
17
+ extern "SDL_bool SDL_HasEvent(Uint32 type)"
18
+ extern "SDL_bool SDL_HasEvents(Uint32 minType, Uint32 maxType)"
19
+ extern "void SDL_FlushEvent(Uint32 type)"
20
+ extern "void SDL_FlushEvents(Uint32 minType, Uint32 maxType)"
21
+ extern "int SDL_PollEvent(SDL_Event *event)"
22
+ extern "int SDL_WaitEvent(SDL_Event *event)"
23
+ extern "int SDL_WaitEventTimeout(SDL_Event *event, int timeout)"
24
+ extern "int SDL_PushEvent(SDL_Event *event)"
25
+ extern "void SDL_SetEventFilter(SDL_EventFilter filter, void *userdata)"
26
+ extern "SDL_bool SDL_GetEventFilter(SDL_EventFilter *filter, void **userdata)"
27
+ extern "void SDL_AddEventWatch(SDL_EventFilter filter, void *userdata)"
28
+ extern "void SDL_DelEventWatch(SDL_EventFilter filter, void *userdata)"
29
+ extern "void SDL_FilterEvents(SDL_EventFilter filter, void *userdata)"
30
+ extern "Uint8 SDL_EventState(Uint32 type, int state)"
31
+ extern "Uint32 SDL_RegisterEvents(int numevents)"
32
+ end
@@ -0,0 +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
@@ -0,0 +1,66 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+ require_relative 'SDL_rwops.h.rb'
5
+ require_relative 'SDL_sensor.h.rb'
6
+ require_relative 'SDL_joystick.h.rb'
7
+
8
+ typealias "SDL_GameController", "struct _SDL_GameController"
9
+ typealias "SDL_GameControllerType", "int"
10
+ typealias "SDL_GameControllerBindType", "int"
11
+ typealias "SDL_GameControllerAxis", "int"
12
+ typealias "SDL_GameControllerButton", "int"
13
+ extern "int SDL_GameControllerAddMappingsFromRW(SDL_RWops *rw, int freerw)"
14
+ extern "int SDL_GameControllerAddMapping(const char*mappingString)"
15
+ extern "int SDL_GameControllerNumMappings(void)"
16
+ extern "char * SDL_GameControllerMappingForIndex(int mapping_index)"
17
+ extern "char * SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid)"
18
+ extern "char * SDL_GameControllerMapping(SDL_GameController *gamecontroller)"
19
+ extern "SDL_bool SDL_IsGameController(int joystick_index)"
20
+ extern "const char * SDL_GameControllerNameForIndex(int joystick_index)"
21
+ extern "const char * SDL_GameControllerPathForIndex(int joystick_index)"
22
+ extern "SDL_GameControllerType SDL_GameControllerTypeForIndex(int joystick_index)"
23
+ extern "char * SDL_GameControllerMappingForDeviceIndex(int joystick_index)"
24
+ extern "SDL_GameController * SDL_GameControllerOpen(int joystick_index)"
25
+ extern "SDL_GameController * SDL_GameControllerFromInstanceID(SDL_JoystickID joyid)"
26
+ extern "SDL_GameController * SDL_GameControllerFromPlayerIndex(int player_index)"
27
+ extern "const char * SDL_GameControllerName(SDL_GameController *gamecontroller)"
28
+ extern "const char * SDL_GameControllerPath(SDL_GameController *gamecontroller)"
29
+ extern "SDL_GameControllerType SDL_GameControllerGetType(SDL_GameController *gamecontroller)"
30
+ extern "int SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller)"
31
+ extern "void SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index)"
32
+ extern "Uint16 SDL_GameControllerGetVendor(SDL_GameController *gamecontroller)"
33
+ extern "Uint16 SDL_GameControllerGetProduct(SDL_GameController *gamecontroller)"
34
+ extern "Uint16 SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller)"
35
+ extern "Uint16 SDL_GameControllerGetFirmwareVersion(SDL_GameController *gamecontroller)"
36
+ extern "const char * SDL_GameControllerGetSerial(SDL_GameController *gamecontroller)"
37
+ extern "SDL_bool SDL_GameControllerGetAttached(SDL_GameController *gamecontroller)"
38
+ extern "SDL_Joystick * SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller)"
39
+ extern "int SDL_GameControllerEventState(int state)"
40
+ extern "void SDL_GameControllerUpdate(void)"
41
+ extern "SDL_GameControllerAxis SDL_GameControllerGetAxisFromString(const char *str)"
42
+ extern "const char* SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis)"
43
+ extern "SDL_GameControllerButton SDL_GameControllerGetButtonFromString(const char *str)"
44
+ extern "const char* SDL_GameControllerGetStringForButton(SDL_GameControllerButton button)"
45
+ extern "SDL_bool SDL_GameControllerHasButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
46
+ extern "Uint8 SDL_GameControllerGetButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
47
+ extern "int SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller)"
48
+ extern "int SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad)"
49
+ extern "int SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure)"
50
+ extern "SDL_bool SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type)"
51
+ extern "int SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled)"
52
+ extern "SDL_bool SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type)"
53
+ extern "float SDL_GameControllerGetSensorDataRate(SDL_GameController *gamecontroller, SDL_SensorType type)"
54
+ extern "int SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values)"
55
+ extern "int SDL_GameControllerGetSensorDataWithTimestamp(SDL_GameController *gamecontroller, SDL_SensorType type, Uint64 *timestamp, float *data, int num_values)"
56
+ extern "int SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)"
57
+ extern "int SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)"
58
+ extern "SDL_bool SDL_GameControllerHasLED(SDL_GameController *gamecontroller)"
59
+ extern "SDL_bool SDL_GameControllerHasRumble(SDL_GameController *gamecontroller)"
60
+ extern "SDL_bool SDL_GameControllerHasRumbleTriggers(SDL_GameController *gamecontroller)"
61
+ extern "int SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue)"
62
+ extern "int SDL_GameControllerSendEffect(SDL_GameController *gamecontroller, const void *data, int size)"
63
+ extern "void SDL_GameControllerClose(SDL_GameController *gamecontroller)"
64
+ extern "const char* SDL_GameControllerGetAppleSFSymbolsNameForButton(SDL_GameController *gamecontroller, SDL_GameControllerButton button)"
65
+ extern "const char* SDL_GameControllerGetAppleSFSymbolsNameForAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis)"
66
+ end
@@ -0,0 +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
@@ -0,0 +1,7 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+
5
+ extern "void SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID)"
6
+ extern "SDL_GUID SDL_GUIDFromString(const char *pchGUID)"
7
+ end
@@ -0,0 +1,14 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+
4
+ typealias "SDL_HintPriority", "int"
5
+ extern "SDL_bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)"
6
+ extern "SDL_bool SDL_SetHint(const char *name, const char *value)"
7
+ extern "SDL_bool SDL_ResetHint(const char *name)"
8
+ extern "void SDL_ResetHints(void)"
9
+ extern "const char * SDL_GetHint(const char *name)"
10
+ extern "SDL_bool SDL_GetHintBoolean(const char *name, SDL_bool default_value)"
11
+ extern "void SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)"
12
+ extern "void SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata)"
13
+ extern "void SDL_ClearHints(void)"
14
+ end
@@ -0,0 +1,69 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+ require_relative 'SDL_guid.h.rb'
5
+
6
+ typealias "SDL_Joystick", "struct _SDL_Joystick"
7
+ typealias "SDL_JoystickGUID", "SDL_GUID"
8
+ typealias "SDL_JoystickID", "Sint32"
9
+ typealias "SDL_JoystickType", "int"
10
+ typealias "SDL_JoystickPowerLevel", "int"
11
+ extern "void SDL_LockJoysticks(void)"
12
+ extern "void SDL_UnlockJoysticks(void)"
13
+ extern "int SDL_NumJoysticks(void)"
14
+ extern "const char * SDL_JoystickNameForIndex(int device_index)"
15
+ extern "const char * SDL_JoystickPathForIndex(int device_index)"
16
+ extern "int SDL_JoystickGetDevicePlayerIndex(int device_index)"
17
+ extern "SDL_JoystickGUID SDL_JoystickGetDeviceGUID(int device_index)"
18
+ extern "Uint16 SDL_JoystickGetDeviceVendor(int device_index)"
19
+ extern "Uint16 SDL_JoystickGetDeviceProduct(int device_index)"
20
+ extern "Uint16 SDL_JoystickGetDeviceProductVersion(int device_index)"
21
+ extern "SDL_JoystickType SDL_JoystickGetDeviceType(int device_index)"
22
+ extern "SDL_JoystickID SDL_JoystickGetDeviceInstanceID(int device_index)"
23
+ extern "SDL_Joystick * SDL_JoystickOpen(int device_index)"
24
+ extern "SDL_Joystick * SDL_JoystickFromInstanceID(SDL_JoystickID instance_id)"
25
+ extern "SDL_Joystick * SDL_JoystickFromPlayerIndex(int player_index)"
26
+ extern "int SDL_JoystickAttachVirtual(SDL_JoystickType type, int naxes, int nbuttons, int nhats)"
27
+ extern "int SDL_JoystickAttachVirtualEx(const SDL_VirtualJoystickDesc *desc)"
28
+ extern "int SDL_JoystickDetachVirtual(int device_index)"
29
+ extern "SDL_bool SDL_JoystickIsVirtual(int device_index)"
30
+ extern "int SDL_JoystickSetVirtualAxis(SDL_Joystick *joystick, int axis, Sint16 value)"
31
+ extern "int SDL_JoystickSetVirtualButton(SDL_Joystick *joystick, int button, Uint8 value)"
32
+ extern "int SDL_JoystickSetVirtualHat(SDL_Joystick *joystick, int hat, Uint8 value)"
33
+ extern "const char * SDL_JoystickName(SDL_Joystick *joystick)"
34
+ extern "const char * SDL_JoystickPath(SDL_Joystick *joystick)"
35
+ extern "int SDL_JoystickGetPlayerIndex(SDL_Joystick *joystick)"
36
+ extern "void SDL_JoystickSetPlayerIndex(SDL_Joystick *joystick, int player_index)"
37
+ extern "SDL_JoystickGUID SDL_JoystickGetGUID(SDL_Joystick *joystick)"
38
+ extern "Uint16 SDL_JoystickGetVendor(SDL_Joystick *joystick)"
39
+ extern "Uint16 SDL_JoystickGetProduct(SDL_Joystick *joystick)"
40
+ extern "Uint16 SDL_JoystickGetProductVersion(SDL_Joystick *joystick)"
41
+ extern "Uint16 SDL_JoystickGetFirmwareVersion(SDL_Joystick *joystick)"
42
+ extern "const char * SDL_JoystickGetSerial(SDL_Joystick *joystick)"
43
+ extern "SDL_JoystickType SDL_JoystickGetType(SDL_Joystick *joystick)"
44
+ extern "void SDL_JoystickGetGUIDString(SDL_JoystickGUID guid, char *pszGUID, int cbGUID)"
45
+ extern "SDL_JoystickGUID SDL_JoystickGetGUIDFromString(const char *pchGUID)"
46
+ extern "void SDL_GetJoystickGUIDInfo(SDL_JoystickGUID guid, Uint16 *vendor, Uint16 *product, Uint16 *version, Uint16 *crc16)"
47
+ extern "SDL_bool SDL_JoystickGetAttached(SDL_Joystick *joystick)"
48
+ extern "SDL_JoystickID SDL_JoystickInstanceID(SDL_Joystick *joystick)"
49
+ extern "int SDL_JoystickNumAxes(SDL_Joystick *joystick)"
50
+ extern "int SDL_JoystickNumBalls(SDL_Joystick *joystick)"
51
+ extern "int SDL_JoystickNumHats(SDL_Joystick *joystick)"
52
+ extern "int SDL_JoystickNumButtons(SDL_Joystick *joystick)"
53
+ extern "void SDL_JoystickUpdate(void)"
54
+ extern "int SDL_JoystickEventState(int state)"
55
+ extern "Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis)"
56
+ extern "SDL_bool SDL_JoystickGetAxisInitialState(SDL_Joystick *joystick, int axis, Sint16 *state)"
57
+ extern "Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat)"
58
+ extern "int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy)"
59
+ extern "Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button)"
60
+ extern "int SDL_JoystickRumble(SDL_Joystick *joystick, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms)"
61
+ extern "int SDL_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms)"
62
+ extern "SDL_bool SDL_JoystickHasLED(SDL_Joystick *joystick)"
63
+ extern "SDL_bool SDL_JoystickHasRumble(SDL_Joystick *joystick)"
64
+ extern "SDL_bool SDL_JoystickHasRumbleTriggers(SDL_Joystick *joystick)"
65
+ extern "int SDL_JoystickSetLED(SDL_Joystick *joystick, Uint8 red, Uint8 green, Uint8 blue)"
66
+ extern "int SDL_JoystickSendEffect(SDL_Joystick *joystick, const void *data, int size)"
67
+ extern "void SDL_JoystickClose(SDL_Joystick *joystick)"
68
+ extern "SDL_JoystickPowerLevel SDL_JoystickCurrentPowerLevel(SDL_Joystick *joystick)"
69
+ end
@@ -0,0 +1,26 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+ require_relative 'SDL_keycode.h.rb'
5
+ require_relative 'SDL_video.h.rb'
6
+
7
+ extern "SDL_Window * SDL_GetKeyboardFocus(void)"
8
+ extern "const Uint8 * SDL_GetKeyboardState(int *numkeys)"
9
+ extern "void SDL_ResetKeyboard(void)"
10
+ extern "SDL_Keymod SDL_GetModState(void)"
11
+ extern "void SDL_SetModState(SDL_Keymod modstate)"
12
+ extern "SDL_Keycode SDL_GetKeyFromScancode(SDL_Scancode scancode)"
13
+ extern "SDL_Scancode SDL_GetScancodeFromKey(SDL_Keycode key)"
14
+ extern "const char * SDL_GetScancodeName(SDL_Scancode scancode)"
15
+ extern "SDL_Scancode SDL_GetScancodeFromName(const char *name)"
16
+ extern "const char * SDL_GetKeyName(SDL_Keycode key)"
17
+ extern "SDL_Keycode SDL_GetKeyFromName(const char *name)"
18
+ extern "void SDL_StartTextInput(void)"
19
+ extern "SDL_bool SDL_IsTextInputActive(void)"
20
+ extern "void SDL_StopTextInput(void)"
21
+ extern "void SDL_ClearComposition(void)"
22
+ extern "SDL_bool SDL_IsTextInputShown(void)"
23
+ extern "void SDL_SetTextInputRect(const SDL_Rect *rect)"
24
+ extern "SDL_bool SDL_HasScreenKeyboardSupport(void)"
25
+ extern "SDL_bool SDL_IsScreenKeyboardShown(SDL_Window *window)"
26
+ end
@@ -0,0 +1,7 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_scancode.h.rb'
4
+ typealias "SDL_Keycode", "Sint32"
5
+ typealias "SDL_KeyCode", "int"
6
+ typealias "SDL_Keymod", "int"
7
+ end
@@ -0,0 +1,6 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+
5
+ extern "SDL_Locale * SDL_GetPreferredLocales(void)"
6
+ end
@@ -0,0 +1,3 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ end
@@ -0,0 +1,10 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_video.h.rb'
4
+
5
+ typealias "SDL_MessageBoxFlags", "int"
6
+ typealias "SDL_MessageBoxButtonFlags", "int"
7
+ typealias "SDL_MessageBoxColorType", "int"
8
+ extern "int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)"
9
+ extern "int SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window)"
10
+ end
@@ -0,0 +1,5 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+
4
+ extern "int SDL_OpenURL(const char *url)"
5
+ end
@@ -0,0 +1,26 @@
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
+
6
+ typealias "SDL_Cursor", "struct SDL_Cursor"
7
+ typealias "SDL_SystemCursor", "int"
8
+ typealias "SDL_MouseWheelDirection", "int"
9
+ extern "SDL_Window * SDL_GetMouseFocus(void)"
10
+ extern "Uint32 SDL_GetMouseState(int *x, int *y)"
11
+ extern "Uint32 SDL_GetGlobalMouseState(int *x, int *y)"
12
+ extern "Uint32 SDL_GetRelativeMouseState(int *x, int *y)"
13
+ extern "void SDL_WarpMouseInWindow(SDL_Window *window, int x, int y)"
14
+ extern "int SDL_WarpMouseGlobal(int x, int y)"
15
+ extern "int SDL_SetRelativeMouseMode(SDL_bool enabled)"
16
+ extern "int SDL_CaptureMouse(SDL_bool enabled)"
17
+ extern "SDL_bool SDL_GetRelativeMouseMode(void)"
18
+ extern "SDL_Cursor * SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h, int hot_x, int hot_y)"
19
+ extern "SDL_Cursor * SDL_CreateColorCursor(SDL_Surface *surface, int hot_x, int hot_y)"
20
+ extern "SDL_Cursor * SDL_CreateSystemCursor(SDL_SystemCursor id)"
21
+ extern "void SDL_SetCursor(SDL_Cursor *cursor)"
22
+ extern "SDL_Cursor * SDL_GetCursor(void)"
23
+ extern "SDL_Cursor * SDL_GetDefaultCursor(void)"
24
+ extern "void SDL_FreeCursor(SDL_Cursor *cursor)"
25
+ extern "int SDL_ShowCursor(int toggle)"
26
+ end
@@ -0,0 +1,25 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_endian.h.rb'
4
+
5
+ typealias "SDL_PixelType", "int"
6
+ typealias "SDL_BitmapOrder", "int"
7
+ typealias "SDL_PackedOrder", "int"
8
+ typealias "SDL_ArrayOrder", "int"
9
+ typealias "SDL_PackedLayout", "int"
10
+ typealias "SDL_PixelFormatEnum", "int"
11
+ extern "const char* SDL_GetPixelFormatName(Uint32 format)"
12
+ extern "SDL_bool SDL_PixelFormatEnumToMasks(Uint32 format, int *bpp, Uint32 *Rmask, Uint32 *Gmask, Uint32 *Bmask, Uint32 *Amask)"
13
+ extern "Uint32 SDL_MasksToPixelFormatEnum(int bpp, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)"
14
+ extern "SDL_PixelFormat * SDL_AllocFormat(Uint32 pixel_format)"
15
+ extern "void SDL_FreeFormat(SDL_PixelFormat *format)"
16
+ extern "SDL_Palette * SDL_AllocPalette(int ncolors)"
17
+ extern "int SDL_SetPixelFormatPalette(SDL_PixelFormat *format, SDL_Palette *palette)"
18
+ extern "int SDL_SetPaletteColors(SDL_Palette *palette, const SDL_Color *colors, int firstcolor, int ncolors)"
19
+ extern "void SDL_FreePalette(SDL_Palette *palette)"
20
+ extern "Uint32 SDL_MapRGB(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b)"
21
+ extern "Uint32 SDL_MapRGBA(const SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b, Uint8 a)"
22
+ extern "void SDL_GetRGB(Uint32 pixel, const SDL_PixelFormat *format, Uint8 *r, Uint8 *g, Uint8 *b)"
23
+ extern "void SDL_GetRGBA(Uint32 pixel, const SDL_PixelFormat *format, Uint8 *r, Uint8 *g, Uint8 *b, Uint8 *a)"
24
+ extern "void SDL_CalculateGammaRamp(float gamma, Uint16 *ramp)"
25
+ end
@@ -0,0 +1,3 @@
1
+ module SDLRuby::SDL
2
+ extern "const char* SDL_GetPlatform(void)"
3
+ end
@@ -0,0 +1,6 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+
4
+ typealias "SDL_PowerState", "int"
5
+ extern "SDL_PowerState SDL_GetPowerInfo(int *seconds, int *percent)"
6
+ end
@@ -0,0 +1,17 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+ require_relative 'SDL_pixels.h.rb'
5
+ require_relative 'SDL_rwops.h.rb'
6
+
7
+ extern "SDL_bool SDL_HasIntersection(const SDL_Rect *A, const SDL_Rect *B)"
8
+ extern "SDL_bool SDL_IntersectRect(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)"
9
+ extern "void SDL_UnionRect(const SDL_Rect *A, const SDL_Rect *B, SDL_Rect *result)"
10
+ extern "SDL_bool SDL_EnclosePoints(const SDL_Point *points, int count, const SDL_Rect *clip, SDL_Rect *result)"
11
+ extern "SDL_bool SDL_IntersectRectAndLine(const SDL_Rect *rect, int *X1, int *Y1, int *X2, int *Y2)"
12
+ extern "SDL_bool SDL_HasIntersectionF(const SDL_FRect *A, const SDL_FRect *B)"
13
+ extern "SDL_bool SDL_IntersectFRect(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result)"
14
+ extern "void SDL_UnionFRect(const SDL_FRect *A, const SDL_FRect *B, SDL_FRect *result)"
15
+ extern "SDL_bool SDL_EncloseFPoints(const SDL_FPoint *points, int count, const SDL_FRect *clip, SDL_FRect *result)"
16
+ extern "SDL_bool SDL_IntersectFRectAndLine(const SDL_FRect *rect, float *X1, float *Y1, float *X2, float *Y2)"
17
+ end
@@ -0,0 +1,94 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_rect.h.rb'
4
+ require_relative 'SDL_video.h.rb'
5
+
6
+ typealias "SDL_Renderer", "struct SDL_Renderer"
7
+ typealias "SDL_Texture", "struct SDL_Texture"
8
+ typealias "SDL_RendererFlags", "int"
9
+ typealias "SDL_ScaleMode", "int"
10
+ typealias "SDL_TextureAccess", "int"
11
+ typealias "SDL_TextureModulate", "int"
12
+ typealias "SDL_RendererFlip", "int"
13
+ extern "int SDL_GetNumRenderDrivers(void)"
14
+ extern "int SDL_GetRenderDriverInfo(int index, SDL_RendererInfo *info)"
15
+ 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)"
19
+ 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)"
39
+ extern "int SDL_LockTextureToSurface(SDL_Texture *texture, const SDL_Rect *rect, SDL_Surface **surface)"
40
+ extern "void SDL_UnlockTexture(SDL_Texture *texture)"
41
+ extern "SDL_bool SDL_RenderTargetSupported(SDL_Renderer *renderer)"
42
+ extern "int SDL_SetRenderTarget(SDL_Renderer *renderer, SDL_Texture *texture)"
43
+ 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)"
82
+ extern "int SDL_RenderGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const SDL_Vertex *vertices, int num_vertices, const int *indices, int num_indices)"
83
+ 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)"
89
+ extern "int SDL_GL_BindTexture(SDL_Texture *texture, float *texw, float *texh)"
90
+ 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)"
94
+ end
@@ -0,0 +1,2 @@
1
+ module SDLRuby::SDL
2
+ end
@@ -0,0 +1,34 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+
5
+ extern "SDL_RWops * SDL_RWFromFile(const char *file, const char *mode)"
6
+ extern "SDL_RWops * SDL_RWFromFP(FILE *fp, SDL_bool autoclose)"
7
+ extern "SDL_RWops * SDL_RWFromFP(void *fp, SDL_bool autoclose)"
8
+ extern "SDL_RWops * SDL_RWFromMem(void *mem, int size)"
9
+ extern "SDL_RWops * SDL_RWFromConstMem(const void *mem, int size)"
10
+ extern "SDL_RWops * SDL_AllocRW(void)"
11
+ extern "void SDL_FreeRW(SDL_RWops *area)"
12
+ extern "Sint64 SDL_RWsize(SDL_RWops *context)"
13
+ extern "Sint64 SDL_RWseek(SDL_RWops *context, Sint64 offset, int whence)"
14
+ extern "Sint64 SDL_RWtell(SDL_RWops *context)"
15
+ extern "size_t SDL_RWread(SDL_RWops *context, void *ptr, size_t size, size_t maxnum)"
16
+ extern "size_t SDL_RWwrite(SDL_RWops *context, const void *ptr, size_t size, size_t num)"
17
+ extern "int SDL_RWclose(SDL_RWops *context)"
18
+ extern "void * SDL_LoadFile_RW(SDL_RWops *src, size_t *datasize, int freesrc)"
19
+ 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)"
34
+ end
@@ -0,0 +1,5 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+
4
+ typealias "SDL_Scancode", "int"
5
+ end
@@ -0,0 +1,25 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_error.h.rb'
4
+
5
+ typealias "SDL_Sensor", "struct _SDL_Sensor"
6
+ typealias "SDL_SensorID", "Sint32"
7
+ typealias "SDL_SensorType", "int"
8
+ extern "void SDL_LockSensors(void)"
9
+ extern "void SDL_UnlockSensors(void)"
10
+ extern "int SDL_NumSensors(void)"
11
+ extern "const char * SDL_SensorGetDeviceName(int device_index)"
12
+ extern "SDL_SensorType SDL_SensorGetDeviceType(int device_index)"
13
+ extern "int SDL_SensorGetDeviceNonPortableType(int device_index)"
14
+ extern "SDL_SensorID SDL_SensorGetDeviceInstanceID(int device_index)"
15
+ extern "SDL_Sensor * SDL_SensorOpen(int device_index)"
16
+ extern "SDL_Sensor * SDL_SensorFromInstanceID(SDL_SensorID instance_id)"
17
+ extern "const char * SDL_SensorGetName(SDL_Sensor *sensor)"
18
+ extern "SDL_SensorType SDL_SensorGetType(SDL_Sensor *sensor)"
19
+ extern "int SDL_SensorGetNonPortableType(SDL_Sensor *sensor)"
20
+ extern "SDL_SensorID SDL_SensorGetInstanceID(SDL_Sensor *sensor)"
21
+ extern "int SDL_SensorGetData(SDL_Sensor *sensor, float *data, int num_values)"
22
+ extern "int SDL_SensorGetDataWithTimestamp(SDL_Sensor *sensor, Uint64 *timestamp, float *data, int num_values)"
23
+ extern "void SDL_SensorClose(SDL_Sensor *sensor)"
24
+ extern "void SDL_SensorUpdate(void)"
25
+ end
@@ -0,0 +1,13 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_stdinc.h.rb'
3
+ require_relative 'SDL_pixels.h.rb'
4
+ require_relative 'SDL_rect.h.rb'
5
+ require_relative 'SDL_surface.h.rb'
6
+ require_relative 'SDL_video.h.rb'
7
+
8
+ typealias "WindowShapeMode", "int"
9
+ extern "SDL_Window * SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags)"
10
+ extern "SDL_bool SDL_IsShapedWindow(const SDL_Window *window)"
11
+ extern "int SDL_SetWindowShape(SDL_Window *window,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode)"
12
+ extern "int SDL_GetShapedWindowMode(SDL_Window *window,SDL_WindowShapeMode *shape_mode)"
13
+ end
@@ -0,0 +1,24 @@
1
+ module SDLRuby::SDL
2
+ require_relative 'SDL_config.h.rb'
3
+
4
+ typealias "SDL_bool", "int"
5
+ typealias "Sint8", "int8_t"
6
+ typealias "Uint8", "uint8_t"
7
+ typealias "Sint16", "int16_t"
8
+ typealias "Uint16", "uint16_t"
9
+ typealias "Sint32", "int32_t"
10
+ typealias "Uint32", "uint32_t"
11
+ typealias "Sint64", "int64_t"
12
+ typealias "Uint64", "uint64_t"
13
+ typealias "SDL_iconv_t", "struct _SDL_iconv_t*"
14
+ typealias "SDL_bool", "int"
15
+ typealias "SDL_DUMMY_ENUM", "int"
16
+ extern "void * SDL_malloc(size_t size)"
17
+ extern "void * SDL_calloc(size_t nmemb, size_t size)"
18
+ extern "void * SDL_realloc(void *mem, size_t size)"
19
+ extern "void SDL_free(void *mem)"
20
+ 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
+ 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
+ extern "int SDL_SetMemoryFunctions(SDL_malloc_func malloc_func, SDL_calloc_func calloc_func, SDL_realloc_func realloc_func, SDL_free_func free_func)"
23
+ extern "int SDL_GetNumAllocations(void)"
24
+ end