sdl2-bindings 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/ChangeLog +124 -108
  3. data/LICENSE.txt +0 -0
  4. data/README.md +77 -68
  5. data/lib/sdl2.rb +131 -127
  6. data/lib/sdl2_audio.rb +261 -261
  7. data/lib/sdl2_blendmode.rb +72 -72
  8. data/lib/sdl2_clipboard.rb +56 -56
  9. data/lib/sdl2_cpuinfo.rb +129 -129
  10. data/lib/sdl2_error.rb +71 -71
  11. data/lib/sdl2_events.rb +564 -552
  12. data/lib/sdl2_filesystem.rb +52 -52
  13. data/lib/sdl2_framerate.rb +74 -74
  14. data/lib/sdl2_gamecontroller.rb +329 -329
  15. data/lib/sdl2_gesture.rb +61 -61
  16. data/lib/sdl2_gfxPrimitives.rb +283 -283
  17. data/lib/sdl2_haptic.rb +301 -301
  18. data/lib/sdl2_hidapi.rb +139 -139
  19. data/lib/sdl2_hints.rb +221 -207
  20. data/lib/sdl2_image.rb +232 -232
  21. data/lib/sdl2_imageFilter.rb +164 -164
  22. data/lib/sdl2_joystick.rb +294 -294
  23. data/lib/sdl2_keyboard.rb +125 -117
  24. data/lib/sdl2_keycode.rb +307 -307
  25. data/lib/sdl2_log.rb +131 -131
  26. data/lib/sdl2_main.rb +74 -74
  27. data/lib/sdl2_messagebox.rb +102 -102
  28. data/lib/sdl2_misc.rb +48 -48
  29. data/lib/sdl2_mixer.rb +392 -392
  30. data/lib/sdl2_mouse.rb +136 -136
  31. data/lib/sdl2_pixels.rb +240 -240
  32. data/lib/sdl2_platform.rb +48 -48
  33. data/lib/sdl2_power.rb +54 -54
  34. data/lib/sdl2_rect.rb +145 -109
  35. data/lib/sdl2_render.rb +408 -404
  36. data/lib/sdl2_rotozoom.rb +76 -76
  37. data/lib/sdl2_rwops.rb +238 -238
  38. data/lib/sdl2_scancode.rb +289 -289
  39. data/lib/sdl2_sensor.rb +115 -115
  40. data/lib/sdl2_shape.rb +83 -83
  41. data/lib/sdl2_sound.rb +154 -0
  42. data/lib/sdl2_stdinc.rb +556 -564
  43. data/lib/sdl2_surface.rb +229 -229
  44. data/lib/sdl2_syswm.rb +160 -160
  45. data/lib/sdl2_timer.rb +74 -74
  46. data/lib/sdl2_touch.rb +86 -82
  47. data/lib/sdl2_ttf.rb +358 -357
  48. data/lib/sdl2_version.rb +67 -67
  49. data/lib/sdl2_video.rb +540 -540
  50. data/lib/sdl2_vulkan.rb +72 -72
  51. metadata +3 -2
@@ -1,52 +1,52 @@
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
-
20
- # Struct
21
-
22
-
23
- # Function
24
-
25
- def self.setup_filesystem_symbols(output_error = false)
26
- symbols = [
27
- :SDL_GetBasePath,
28
- :SDL_GetPrefPath,
29
- ]
30
- apis = {
31
- :SDL_GetBasePath => :GetBasePath,
32
- :SDL_GetPrefPath => :GetPrefPath,
33
- }
34
- args = {
35
- :SDL_GetBasePath => [],
36
- :SDL_GetPrefPath => [:pointer, :pointer],
37
- }
38
- retvals = {
39
- :SDL_GetBasePath => :pointer,
40
- :SDL_GetPrefPath => :pointer,
41
- }
42
- symbols.each do |sym|
43
- begin
44
- attach_function apis[sym], sym, args[sym], retvals[sym]
45
- rescue FFI::NotFoundError => error
46
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
47
- end
48
- end
49
- end
50
-
51
- end
52
-
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
+
20
+ # Struct
21
+
22
+
23
+ # Function
24
+
25
+ def self.setup_filesystem_symbols(output_error = false)
26
+ symbols = [
27
+ :SDL_GetBasePath,
28
+ :SDL_GetPrefPath,
29
+ ]
30
+ apis = {
31
+ :SDL_GetBasePath => :GetBasePath,
32
+ :SDL_GetPrefPath => :GetPrefPath,
33
+ }
34
+ args = {
35
+ :SDL_GetBasePath => [],
36
+ :SDL_GetPrefPath => [:pointer, :pointer],
37
+ }
38
+ retvals = {
39
+ :SDL_GetBasePath => :pointer,
40
+ :SDL_GetPrefPath => :pointer,
41
+ }
42
+ symbols.each do |sym|
43
+ begin
44
+ attach_function apis[sym], sym, args[sym], retvals[sym]
45
+ rescue FFI::NotFoundError => error
46
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
47
+ end
48
+ end
49
+ end
50
+
51
+ end
52
+
@@ -1,74 +1,74 @@
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
-
20
- # Struct
21
-
22
- class FPSmanager < FFI::Struct
23
- layout(
24
- :framecount, :uint,
25
- :rateticks, :float,
26
- :baseticks, :uint,
27
- :lastticks, :uint,
28
- :rate, :uint,
29
- )
30
- end
31
-
32
-
33
- # Function
34
-
35
- def self.setup_gfx_framerate_symbols(output_error = false)
36
- symbols = [
37
- :SDL_initFramerate,
38
- :SDL_setFramerate,
39
- :SDL_getFramerate,
40
- :SDL_getFramecount,
41
- :SDL_framerateDelay,
42
- ]
43
- apis = {
44
- :SDL_initFramerate => :initFramerate,
45
- :SDL_setFramerate => :setFramerate,
46
- :SDL_getFramerate => :getFramerate,
47
- :SDL_getFramecount => :getFramecount,
48
- :SDL_framerateDelay => :framerateDelay,
49
- }
50
- args = {
51
- :SDL_initFramerate => [:pointer],
52
- :SDL_setFramerate => [:pointer, :uint],
53
- :SDL_getFramerate => [:pointer],
54
- :SDL_getFramecount => [:pointer],
55
- :SDL_framerateDelay => [:pointer],
56
- }
57
- retvals = {
58
- :SDL_initFramerate => :void,
59
- :SDL_setFramerate => :int,
60
- :SDL_getFramerate => :int,
61
- :SDL_getFramecount => :int,
62
- :SDL_framerateDelay => :uint,
63
- }
64
- symbols.each do |sym|
65
- begin
66
- attach_function apis[sym], sym, args[sym], retvals[sym]
67
- rescue FFI::NotFoundError => error
68
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
69
- end
70
- end
71
- end
72
-
73
- end
74
-
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
+
20
+ # Struct
21
+
22
+ class FPSmanager < FFI::Struct
23
+ layout(
24
+ :framecount, :uint,
25
+ :rateticks, :float,
26
+ :baseticks, :uint,
27
+ :lastticks, :uint,
28
+ :rate, :uint,
29
+ )
30
+ end
31
+
32
+
33
+ # Function
34
+
35
+ def self.setup_gfx_framerate_symbols(output_error = false)
36
+ symbols = [
37
+ :SDL_initFramerate,
38
+ :SDL_setFramerate,
39
+ :SDL_getFramerate,
40
+ :SDL_getFramecount,
41
+ :SDL_framerateDelay,
42
+ ]
43
+ apis = {
44
+ :SDL_initFramerate => :initFramerate,
45
+ :SDL_setFramerate => :setFramerate,
46
+ :SDL_getFramerate => :getFramerate,
47
+ :SDL_getFramecount => :getFramecount,
48
+ :SDL_framerateDelay => :framerateDelay,
49
+ }
50
+ args = {
51
+ :SDL_initFramerate => [:pointer],
52
+ :SDL_setFramerate => [:pointer, :uint],
53
+ :SDL_getFramerate => [:pointer],
54
+ :SDL_getFramecount => [:pointer],
55
+ :SDL_framerateDelay => [:pointer],
56
+ }
57
+ retvals = {
58
+ :SDL_initFramerate => :void,
59
+ :SDL_setFramerate => :int,
60
+ :SDL_getFramerate => :int,
61
+ :SDL_getFramecount => :int,
62
+ :SDL_framerateDelay => :uint,
63
+ }
64
+ symbols.each do |sym|
65
+ begin
66
+ attach_function apis[sym], sym, args[sym], retvals[sym]
67
+ rescue FFI::NotFoundError => error
68
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
69
+ end
70
+ end
71
+ end
72
+
73
+ end
74
+