sdl2-bindings 0.0.8 → 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 -92
  3. data/LICENSE.txt +1 -1
  4. data/README.md +77 -53
  5. data/lib/sdl2.rb +131 -172
  6. data/lib/sdl2_audio.rb +261 -222
  7. data/lib/sdl2_blendmode.rb +72 -69
  8. data/lib/sdl2_clipboard.rb +56 -51
  9. data/lib/sdl2_cpuinfo.rb +129 -106
  10. data/lib/sdl2_error.rb +71 -64
  11. data/lib/sdl2_events.rb +564 -533
  12. data/lib/sdl2_filesystem.rb +52 -48
  13. data/lib/sdl2_framerate.rb +74 -67
  14. data/lib/sdl2_gamecontroller.rb +329 -274
  15. data/lib/sdl2_gesture.rb +61 -55
  16. data/lib/sdl2_gfxPrimitives.rb +283 -222
  17. data/lib/sdl2_haptic.rb +301 -269
  18. data/lib/sdl2_hidapi.rb +139 -118
  19. data/lib/sdl2_hints.rb +221 -197
  20. data/lib/sdl2_image.rb +232 -185
  21. data/lib/sdl2_imageFilter.rb +164 -132
  22. data/lib/sdl2_joystick.rb +294 -239
  23. data/lib/sdl2_keyboard.rb +125 -99
  24. data/lib/sdl2_keycode.rb +307 -305
  25. data/lib/sdl2_log.rb +131 -115
  26. data/lib/sdl2_main.rb +74 -67
  27. data/lib/sdl2_messagebox.rb +102 -98
  28. data/lib/sdl2_misc.rb +48 -45
  29. data/lib/sdl2_mixer.rb +392 -317
  30. data/lib/sdl2_mouse.rb +136 -117
  31. data/lib/sdl2_pixels.rb +240 -224
  32. data/lib/sdl2_platform.rb +48 -45
  33. data/lib/sdl2_power.rb +54 -51
  34. data/lib/sdl2_rect.rb +145 -102
  35. data/lib/sdl2_render.rb +408 -322
  36. data/lib/sdl2_rotozoom.rb +76 -66
  37. data/lib/sdl2_rwops.rb +238 -208
  38. data/lib/sdl2_scancode.rb +289 -287
  39. data/lib/sdl2_sensor.rb +115 -97
  40. data/lib/sdl2_shape.rb +83 -77
  41. data/lib/sdl2_sound.rb +154 -0
  42. data/lib/sdl2_stdinc.rb +556 -439
  43. data/lib/sdl2_surface.rb +229 -188
  44. data/lib/sdl2_syswm.rb +160 -156
  45. data/lib/sdl2_timer.rb +74 -65
  46. data/lib/sdl2_touch.rb +86 -75
  47. data/lib/sdl2_ttf.rb +358 -202
  48. data/lib/sdl2_version.rb +67 -62
  49. data/lib/sdl2_video.rb +540 -446
  50. data/lib/sdl2_vulkan.rb +72 -64
  51. metadata +19 -4
data/lib/sdl2_vulkan.rb CHANGED
@@ -1,64 +1,72 @@
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 SDL2
10
- extend FFI::Library
11
- # Define/Macro
12
-
13
-
14
- # Enum
15
-
16
-
17
- # Typedef
18
-
19
- typedef :pointer, :VkInstance
20
- typedef :pointer, :VkSurfaceKHR
21
- typedef :pointer, :SDL_vulkanInstance
22
- typedef :pointer, :SDL_vulkanSurface
23
-
24
- # Struct
25
-
26
-
27
- # Function
28
-
29
- def self.setup_vulkan_symbols()
30
- symbols = [
31
- :SDL_Vulkan_LoadLibrary,
32
- :SDL_Vulkan_GetVkGetInstanceProcAddr,
33
- :SDL_Vulkan_UnloadLibrary,
34
- :SDL_Vulkan_GetInstanceExtensions,
35
- :SDL_Vulkan_CreateSurface,
36
- :SDL_Vulkan_GetDrawableSize,
37
- ]
38
- args = {
39
- :SDL_Vulkan_LoadLibrary => [:pointer],
40
- :SDL_Vulkan_GetVkGetInstanceProcAddr => [],
41
- :SDL_Vulkan_UnloadLibrary => [],
42
- :SDL_Vulkan_GetInstanceExtensions => [:pointer, :pointer, :pointer],
43
- :SDL_Vulkan_CreateSurface => [:pointer, :pointer, :pointer],
44
- :SDL_Vulkan_GetDrawableSize => [:pointer, :pointer, :pointer],
45
- }
46
- retvals = {
47
- :SDL_Vulkan_LoadLibrary => :int,
48
- :SDL_Vulkan_GetVkGetInstanceProcAddr => :pointer,
49
- :SDL_Vulkan_UnloadLibrary => :void,
50
- :SDL_Vulkan_GetInstanceExtensions => :int,
51
- :SDL_Vulkan_CreateSurface => :int,
52
- :SDL_Vulkan_GetDrawableSize => :void,
53
- }
54
- symbols.each do |sym|
55
- begin
56
- attach_function sym, args[sym], retvals[sym]
57
- rescue FFI::NotFoundError => error
58
- $stderr.puts("[Warning] Failed to import #{sym} (#{error}).")
59
- end
60
- end
61
- end
62
-
63
- end
64
-
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 :pointer, :VkInstance
20
+ typedef :pointer, :VkSurfaceKHR
21
+ typedef :pointer, :SDL_vulkanInstance
22
+ typedef :pointer, :SDL_vulkanSurface
23
+
24
+ # Struct
25
+
26
+
27
+ # Function
28
+
29
+ def self.setup_vulkan_symbols(output_error = false)
30
+ symbols = [
31
+ :SDL_Vulkan_LoadLibrary,
32
+ :SDL_Vulkan_GetVkGetInstanceProcAddr,
33
+ :SDL_Vulkan_UnloadLibrary,
34
+ :SDL_Vulkan_GetInstanceExtensions,
35
+ :SDL_Vulkan_CreateSurface,
36
+ :SDL_Vulkan_GetDrawableSize,
37
+ ]
38
+ apis = {
39
+ :SDL_Vulkan_LoadLibrary => :Vulkan_LoadLibrary,
40
+ :SDL_Vulkan_GetVkGetInstanceProcAddr => :Vulkan_GetVkGetInstanceProcAddr,
41
+ :SDL_Vulkan_UnloadLibrary => :Vulkan_UnloadLibrary,
42
+ :SDL_Vulkan_GetInstanceExtensions => :Vulkan_GetInstanceExtensions,
43
+ :SDL_Vulkan_CreateSurface => :Vulkan_CreateSurface,
44
+ :SDL_Vulkan_GetDrawableSize => :Vulkan_GetDrawableSize,
45
+ }
46
+ args = {
47
+ :SDL_Vulkan_LoadLibrary => [:pointer],
48
+ :SDL_Vulkan_GetVkGetInstanceProcAddr => [],
49
+ :SDL_Vulkan_UnloadLibrary => [],
50
+ :SDL_Vulkan_GetInstanceExtensions => [:pointer, :pointer, :pointer],
51
+ :SDL_Vulkan_CreateSurface => [:pointer, :pointer, :pointer],
52
+ :SDL_Vulkan_GetDrawableSize => [:pointer, :pointer, :pointer],
53
+ }
54
+ retvals = {
55
+ :SDL_Vulkan_LoadLibrary => :int,
56
+ :SDL_Vulkan_GetVkGetInstanceProcAddr => :pointer,
57
+ :SDL_Vulkan_UnloadLibrary => :void,
58
+ :SDL_Vulkan_GetInstanceExtensions => :int,
59
+ :SDL_Vulkan_CreateSurface => :int,
60
+ :SDL_Vulkan_GetDrawableSize => :void,
61
+ }
62
+ symbols.each do |sym|
63
+ begin
64
+ attach_function apis[sym], sym, args[sym], retvals[sym]
65
+ rescue FFI::NotFoundError => error
66
+ $stderr.puts("[Warning] Failed to import #{sym} (#{error}).") if output_error
67
+ end
68
+ end
69
+ end
70
+
71
+ end
72
+
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdl2-bindings
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaiorabbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-12-01 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ffi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.15'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.15'
13
27
  description: 'Ruby bindings for SDL2.
14
28
 
15
29
  '
@@ -58,6 +72,7 @@ files:
58
72
  - lib/sdl2_scancode.rb
59
73
  - lib/sdl2_sensor.rb
60
74
  - lib/sdl2_shape.rb
75
+ - lib/sdl2_sound.rb
61
76
  - lib/sdl2_stdinc.rb
62
77
  - lib/sdl2_surface.rb
63
78
  - lib/sdl2_syswm.rb
@@ -86,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
101
  - !ruby/object:Gem::Version
87
102
  version: '0'
88
103
  requirements: []
89
- rubygems_version: 3.2.22
104
+ rubygems_version: 3.3.4
90
105
  signing_key:
91
106
  specification_version: 4
92
107
  summary: Bindings for SDL2