sdl2-bindings 0.1.1 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +140 -124
- data/LICENSE.txt +0 -0
- data/README.md +93 -77
- data/lib/sdl2.rb +131 -131
- data/lib/sdl2_audio.rb +265 -261
- data/lib/sdl2_blendmode.rb +72 -72
- data/lib/sdl2_clipboard.rb +56 -56
- data/lib/sdl2_cpuinfo.rb +137 -129
- data/lib/sdl2_error.rb +71 -71
- data/lib/sdl2_events.rb +575 -564
- data/lib/sdl2_filesystem.rb +52 -52
- data/lib/sdl2_framerate.rb +74 -74
- data/lib/sdl2_gamecontroller.rb +345 -329
- data/lib/sdl2_gesture.rb +61 -61
- data/lib/sdl2_gfxPrimitives.rb +283 -283
- data/lib/sdl2_guid.rb +58 -0
- data/lib/sdl2_haptic.rb +301 -301
- data/lib/sdl2_hidapi.rb +139 -139
- data/lib/sdl2_hints.rb +240 -221
- data/lib/sdl2_image.rb +296 -232
- data/lib/sdl2_imageFilter.rb +164 -164
- data/lib/sdl2_joystick.rb +332 -294
- data/lib/sdl2_keyboard.rb +129 -125
- data/lib/sdl2_keycode.rb +311 -307
- data/lib/sdl2_log.rb +131 -131
- data/lib/sdl2_main.rb +74 -74
- data/lib/sdl2_messagebox.rb +102 -102
- data/lib/sdl2_misc.rb +48 -48
- data/lib/sdl2_mixer.rb +464 -392
- data/lib/sdl2_mouse.rb +136 -136
- data/lib/sdl2_pixels.rb +240 -240
- data/lib/sdl2_platform.rb +48 -48
- data/lib/sdl2_power.rb +54 -54
- data/lib/sdl2_rect.rb +145 -145
- data/lib/sdl2_render.rb +408 -408
- data/lib/sdl2_rotozoom.rb +76 -76
- data/lib/sdl2_rwops.rb +242 -238
- data/lib/sdl2_scancode.rb +293 -289
- data/lib/sdl2_sensor.rb +115 -115
- data/lib/sdl2_shape.rb +83 -83
- data/lib/sdl2_sound.rb +154 -154
- data/lib/sdl2_stdinc.rb +564 -556
- data/lib/sdl2_surface.rb +229 -229
- data/lib/sdl2_syswm.rb +160 -160
- data/lib/sdl2_timer.rb +74 -74
- data/lib/sdl2_touch.rb +86 -86
- data/lib/sdl2_ttf.rb +414 -358
- data/lib/sdl2_version.rb +67 -67
- data/lib/sdl2_video.rb +549 -540
- data/lib/sdl2_vulkan.rb +72 -72
- metadata +4 -3
data/lib/sdl2_vulkan.rb
CHANGED
@@ -1,72 +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 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
|
-
|
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,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sdl2-bindings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaiorabbit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -48,6 +48,7 @@ files:
|
|
48
48
|
- lib/sdl2_gamecontroller.rb
|
49
49
|
- lib/sdl2_gesture.rb
|
50
50
|
- lib/sdl2_gfxPrimitives.rb
|
51
|
+
- lib/sdl2_guid.rb
|
51
52
|
- lib/sdl2_haptic.rb
|
52
53
|
- lib/sdl2_hidapi.rb
|
53
54
|
- lib/sdl2_hints.rb
|
@@ -101,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
102
|
- !ruby/object:Gem::Version
|
102
103
|
version: '0'
|
103
104
|
requirements: []
|
104
|
-
rubygems_version: 3.3.
|
105
|
+
rubygems_version: 3.3.7
|
105
106
|
signing_key:
|
106
107
|
specification_version: 4
|
107
108
|
summary: Bindings for SDL2
|