sdl2-bindings 0.1.3 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +145 -134
  3. data/LICENSE.txt +0 -0
  4. data/README.md +108 -86
  5. data/lib/sdl2.rb +131 -131
  6. data/lib/sdl2_audio.rb +265 -261
  7. data/lib/sdl2_blendmode.rb +72 -72
  8. data/lib/sdl2_clipboard.rb +56 -56
  9. data/lib/sdl2_cpuinfo.rb +137 -129
  10. data/lib/sdl2_error.rb +71 -71
  11. data/lib/sdl2_events.rb +575 -564
  12. data/lib/sdl2_filesystem.rb +52 -52
  13. data/lib/sdl2_framerate.rb +74 -74
  14. data/lib/sdl2_gamecontroller.rb +345 -329
  15. data/lib/sdl2_gesture.rb +61 -61
  16. data/lib/sdl2_gfxPrimitives.rb +283 -283
  17. data/lib/sdl2_guid.rb +58 -0
  18. data/lib/sdl2_haptic.rb +301 -301
  19. data/lib/sdl2_hidapi.rb +139 -139
  20. data/lib/sdl2_hints.rb +240 -221
  21. data/lib/sdl2_image.rb +296 -296
  22. data/lib/sdl2_imageFilter.rb +164 -164
  23. data/lib/sdl2_joystick.rb +332 -294
  24. data/lib/sdl2_keyboard.rb +129 -125
  25. data/lib/sdl2_keycode.rb +311 -307
  26. data/lib/sdl2_log.rb +131 -131
  27. data/lib/sdl2_main.rb +74 -74
  28. data/lib/sdl2_messagebox.rb +102 -102
  29. data/lib/sdl2_misc.rb +48 -48
  30. data/lib/sdl2_mixer.rb +464 -464
  31. data/lib/sdl2_mouse.rb +136 -136
  32. data/lib/sdl2_pixels.rb +240 -240
  33. data/lib/sdl2_platform.rb +48 -48
  34. data/lib/sdl2_power.rb +54 -54
  35. data/lib/sdl2_rect.rb +145 -145
  36. data/lib/sdl2_render.rb +408 -408
  37. data/lib/sdl2_rotozoom.rb +76 -76
  38. data/lib/sdl2_rwops.rb +242 -242
  39. data/lib/sdl2_scancode.rb +293 -289
  40. data/lib/sdl2_sensor.rb +115 -115
  41. data/lib/sdl2_shape.rb +83 -83
  42. data/lib/sdl2_sound.rb +154 -154
  43. data/lib/sdl2_stdinc.rb +572 -548
  44. data/lib/sdl2_surface.rb +229 -229
  45. data/lib/sdl2_syswm.rb +160 -160
  46. data/lib/sdl2_timer.rb +74 -74
  47. data/lib/sdl2_touch.rb +86 -86
  48. data/lib/sdl2_ttf.rb +414 -414
  49. data/lib/sdl2_version.rb +67 -67
  50. data/lib/sdl2_video.rb +549 -540
  51. data/lib/sdl2_vulkan.rb +72 -72
  52. metadata +4 -3
data/lib/sdl2_gesture.rb CHANGED
@@ -1,61 +1,61 @@
1
- # Ruby-SDL2 : Yet another SDL2 wrapper for Ruby
2
- #
3
- # * https://github.com/vaiorabbit/sdl2-bindings
4
- #
5
- # [NOTICE] This is an automatically generated file.
6
-
7
- require 'ffi'
8
-
9
- module SDL
10
- extend FFI::Library
11
- # Define/Macro
12
-
13
-
14
- # Enum
15
-
16
-
17
- # Typedef
18
-
19
- typedef :long_long, :SDL_GestureID
20
-
21
- # Struct
22
-
23
-
24
- # Function
25
-
26
- def self.setup_gesture_symbols(output_error = false)
27
- symbols = [
28
- :SDL_RecordGesture,
29
- :SDL_SaveAllDollarTemplates,
30
- :SDL_SaveDollarTemplate,
31
- :SDL_LoadDollarTemplates,
32
- ]
33
- apis = {
34
- :SDL_RecordGesture => :RecordGesture,
35
- :SDL_SaveAllDollarTemplates => :SaveAllDollarTemplates,
36
- :SDL_SaveDollarTemplate => :SaveDollarTemplate,
37
- :SDL_LoadDollarTemplates => :LoadDollarTemplates,
38
- }
39
- args = {
40
- :SDL_RecordGesture => [:long_long],
41
- :SDL_SaveAllDollarTemplates => [:pointer],
42
- :SDL_SaveDollarTemplate => [:long_long, :pointer],
43
- :SDL_LoadDollarTemplates => [:long_long, :pointer],
44
- }
45
- retvals = {
46
- :SDL_RecordGesture => :int,
47
- :SDL_SaveAllDollarTemplates => :int,
48
- :SDL_SaveDollarTemplate => :int,
49
- :SDL_LoadDollarTemplates => :int,
50
- }
51
- symbols.each do |sym|
52
- begin
53
- attach_function apis[sym], sym, args[sym], retvals[sym]
54
- rescue FFI::NotFoundError => error
55
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
56
- end
57
- end
58
- end
59
-
60
- end
61
-
1
+ # Ruby-SDL2 : Yet another SDL2 wrapper for Ruby
2
+ #
3
+ # * https://github.com/vaiorabbit/sdl2-bindings
4
+ #
5
+ # [NOTICE] This is an automatically generated file.
6
+
7
+ require 'ffi'
8
+
9
+ module SDL
10
+ extend FFI::Library
11
+ # Define/Macro
12
+
13
+
14
+ # Enum
15
+
16
+
17
+ # Typedef
18
+
19
+ typedef :long_long, :SDL_GestureID
20
+
21
+ # Struct
22
+
23
+
24
+ # Function
25
+
26
+ def self.setup_gesture_symbols(output_error = false)
27
+ symbols = [
28
+ :SDL_RecordGesture,
29
+ :SDL_SaveAllDollarTemplates,
30
+ :SDL_SaveDollarTemplate,
31
+ :SDL_LoadDollarTemplates,
32
+ ]
33
+ apis = {
34
+ :SDL_RecordGesture => :RecordGesture,
35
+ :SDL_SaveAllDollarTemplates => :SaveAllDollarTemplates,
36
+ :SDL_SaveDollarTemplate => :SaveDollarTemplate,
37
+ :SDL_LoadDollarTemplates => :LoadDollarTemplates,
38
+ }
39
+ args = {
40
+ :SDL_RecordGesture => [:long_long],
41
+ :SDL_SaveAllDollarTemplates => [:pointer],
42
+ :SDL_SaveDollarTemplate => [:long_long, :pointer],
43
+ :SDL_LoadDollarTemplates => [:long_long, :pointer],
44
+ }
45
+ retvals = {
46
+ :SDL_RecordGesture => :int,
47
+ :SDL_SaveAllDollarTemplates => :int,
48
+ :SDL_SaveDollarTemplate => :int,
49
+ :SDL_LoadDollarTemplates => :int,
50
+ }
51
+ symbols.each do |sym|
52
+ begin
53
+ attach_function apis[sym], sym, args[sym], retvals[sym]
54
+ rescue FFI::NotFoundError => error
55
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
56
+ end
57
+ end
58
+ end
59
+
60
+ end
61
+