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.
- checksums.yaml +4 -4
- data/ChangeLog +145 -134
- data/LICENSE.txt +0 -0
- data/README.md +108 -86
- 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 -296
- 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 -464
- 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 -242
- 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 +572 -548
- 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 -414
- data/lib/sdl2_version.rb +67 -67
- data/lib/sdl2_video.rb +549 -540
- data/lib/sdl2_vulkan.rb +72 -72
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ca4423c0218ca2efe6fd3522958924fb2f80a7f8f4306297eb4be53aaea8fc4b
|
4
|
+
data.tar.gz: a55940e461db8235156d115de6fc775421e69e34506e16310f99fa952b18e559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b65767f1f1f62aafeb0cfb1ad18aacee9064cb8d4b320f722de7ec64be0d97528794bda50e56545a9627ad57ff7a0e14a79ca5fe094d42dc881fde4af9ca0f4c
|
7
|
+
data.tar.gz: 1a4d46c4aa8e7dd30db494f0db17883f6ea01a40ebbd550a0bbf51c683d0680dd9e879845b620d6c7e8d8743fedc2abe1ba80463d9b92ab2d2c26a661de9df77
|
data/ChangeLog
CHANGED
@@ -1,134 +1,145 @@
|
|
1
|
-
2022-
|
2
|
-
|
3
|
-
*
|
4
|
-
*
|
5
|
-
|
6
|
-
2022-
|
7
|
-
|
8
|
-
*
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
*
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
*
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
*
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
*
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
*
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
*
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
* lib/
|
122
|
-
|
123
|
-
2015-09-
|
124
|
-
|
125
|
-
* lib/
|
126
|
-
* lib/
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
* lib/
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
1
|
+
2022-10-09 vaiorabbit <http://twitter.com/vaiorabbit>
|
2
|
+
|
3
|
+
* SDL 2.24.1 ( https://github.com/libsdl-org/SDL/releases/tag/release-2.24.1 )
|
4
|
+
* Fixed wrong value definitions
|
5
|
+
|
6
|
+
2022-08-20 vaiorabbit <http://twitter.com/vaiorabbit>
|
7
|
+
|
8
|
+
* SDL 2.24.0 ( https://github.com/libsdl-org/SDL/releases/tag/release-2.24.0 )
|
9
|
+
* Generated for SDL_image 2.6.2, SDL_mixer 2.6.2 and SDL_ttf 2.20.1
|
10
|
+
* SDL::JoystickGUID is now defined as an alias of SDL::GUID ( https://github.com/libsdl-org/SDL/commit/3a20274ddff20d9c3ea4895353b23ff252954b87 )
|
11
|
+
|
12
|
+
2022-07-31 vaiorabbit <http://twitter.com/vaiorabbit>
|
13
|
+
|
14
|
+
* Regenerated bindings to fix bugs (size_t interpretation)
|
15
|
+
* Regenerated bindings for SDL_image 2.6.0, SDL_mixer 2.6.0 and SDL_ttf 2.20.0
|
16
|
+
|
17
|
+
2022-05-01 vaiorabbit <http://twitter.com/vaiorabbit>
|
18
|
+
|
19
|
+
* lib/sdl2_rwops.rb: Added RW_SEEK_SET, RW_SEEK_CUR and RW_SEEK_END
|
20
|
+
|
21
|
+
2022-04-29 vaiorabbit <http://twitter.com/vaiorabbit>
|
22
|
+
|
23
|
+
* Added SDL 2.0.22 features ( https://github.com/libsdl-org/SDL/releases/tag/release-2.0.22 )
|
24
|
+
* third_party/sdl2_build_dll.cmd: Updated to refer 2.0.22
|
25
|
+
|
26
|
+
2022-03-28 vaiorabbit <http://twitter.com/vaiorabbit>
|
27
|
+
|
28
|
+
* lib/sdl2_sound.rb: Added
|
29
|
+
|
30
|
+
2022-02-13 vaiorabbit <http://twitter.com/vaiorabbit>
|
31
|
+
|
32
|
+
* Removed unavailable inline functions (SDL_memset4, SDL_memcpy4)
|
33
|
+
|
34
|
+
2022-02-12 vaiorabbit <http://twitter.com/vaiorabbit>
|
35
|
+
|
36
|
+
* Some tests are now available on Windows
|
37
|
+
|
38
|
+
2022-01-26 vaiorabbit <http://twitter.com/vaiorabbit>
|
39
|
+
|
40
|
+
* test/test*.rb: Changed namespace
|
41
|
+
* load_lib: Now accepts argument 'output_error'
|
42
|
+
|
43
|
+
2022-01-22 vaiorabbit <http://twitter.com/vaiorabbit>
|
44
|
+
|
45
|
+
* lib/sdl2_ttf.rb: Generated for version 2.0.18
|
46
|
+
* generator: Fixed wrong 'by_value' handling
|
47
|
+
* .gitignore: Added
|
48
|
+
* test/test_opengl.rb: Use opengl-bindings2
|
49
|
+
|
50
|
+
2022-01-11 vaiorabbit <http://twitter.com/vaiorabbit>
|
51
|
+
|
52
|
+
* Added SDL 2.0.20 features ( https://github.com/libsdl-org/SDL/releases/tag/release-2.0.20 )
|
53
|
+
|
54
|
+
2021-12-02 vaiorabbit <http://twitter.com/vaiorabbit>
|
55
|
+
|
56
|
+
* Added SDL 2.0.18 features ( https://github.com/libsdl-org/SDL/releases/tag/release-2.0.18 )
|
57
|
+
|
58
|
+
2021-08-12 vaiorabbit <http://twitter.com/vaiorabbit>
|
59
|
+
|
60
|
+
* Added SDL 2.0.14 features (SDL_misc).
|
61
|
+
* Added SDL 2.0.16 features (SDL_sensor).
|
62
|
+
|
63
|
+
2021-02-21 vaiorabbit <http://twitter.com/vaiorabbit>
|
64
|
+
|
65
|
+
* Added defines from Audio, Mixer and TTF
|
66
|
+
|
67
|
+
2020-12-27 vaiorabbit <http://twitter.com/vaiorabbit>
|
68
|
+
|
69
|
+
* Added SDL 2.0.14 features.
|
70
|
+
* third_party/sdl2_build_dll.sh: Added to build x64 DLL for Windows
|
71
|
+
* test/util.rb: Added
|
72
|
+
|
73
|
+
2020-12-20 vaiorabbit <http://twitter.com/vaiorabbit>
|
74
|
+
|
75
|
+
* third_party/sdl2_build_dylib.sh: Added to build x86_64|arm64 Universal Binary
|
76
|
+
|
77
|
+
2020-06-08 vaiorabbit <http://twitter.com/vaiorabbit>
|
78
|
+
|
79
|
+
* lib/sdl2_syswm.rb: Added
|
80
|
+
* lib/sdl2_hints.rb: Added hint string symboles
|
81
|
+
|
82
|
+
2020-03-22 vaiorabbit <http://twitter.com/vaiorabbit>
|
83
|
+
|
84
|
+
* Added SDL 2.0.12 features.
|
85
|
+
* Generate callback types correctly.
|
86
|
+
|
87
|
+
2019-10-27 vaiorabbit <http://twitter.com/vaiorabbit>
|
88
|
+
|
89
|
+
* lib/sdl2_stdinc.rb: Added.
|
90
|
+
|
91
|
+
2019-08-31 vaiorabbit <http://twitter.com/vaiorabbit>
|
92
|
+
|
93
|
+
* Refactoring + Cleanup
|
94
|
+
* Some tests are usable again
|
95
|
+
|
96
|
+
2019-08-28 vaiorabbit <http://twitter.com/vaiorabbit>
|
97
|
+
|
98
|
+
* Exception-safety
|
99
|
+
|
100
|
+
2019-08-27 vaiorabbit <http://twitter.com/vaiorabbit>
|
101
|
+
|
102
|
+
* lib/sdl2_mixer.rb: Added (experimental)
|
103
|
+
|
104
|
+
2019-08-24 vaiorabbit <http://twitter.com/vaiorabbit>
|
105
|
+
|
106
|
+
* Added SDL 2.0.10 features.
|
107
|
+
* Added generator. Binding codes are generated semi-automatically.
|
108
|
+
* Now depends on Ruby/FFI. Note that some codes in 'test' directory are still not usable.
|
109
|
+
|
110
|
+
2016-04-03 vaiorabbit <http://twitter.com/vaiorabbit>
|
111
|
+
|
112
|
+
* lib/sdl2_gfx.rb, test/test_gfx.rb: Added.
|
113
|
+
|
114
|
+
2016-04-02 vaiorabbit <http://twitter.com/vaiorabbit>
|
115
|
+
|
116
|
+
* Added SDL 2.0.4 features.
|
117
|
+
* lib/version.rb: Added SDL_MAJOR_VERSION, etc.
|
118
|
+
|
119
|
+
2015-09-29 vaiorabbit <http://twitter.com/vaiorabbit>
|
120
|
+
|
121
|
+
* lib/sdl2_ttf.rb: Added.
|
122
|
+
|
123
|
+
2015-09-28 vaiorabbit <http://twitter.com/vaiorabbit>
|
124
|
+
|
125
|
+
* lib/sdl2_image.rb: Added.
|
126
|
+
* lib/sdl2_mixer.rb: Added.
|
127
|
+
|
128
|
+
2015-09-22 vaiorabbit <http://twitter.com/vaiorabbit>
|
129
|
+
|
130
|
+
* lib/pixels.rb, lib/gamecontroller.rb, lib/joystick.rb: Added.
|
131
|
+
* lib/rwops.rb, lib/syswm.rb, lib/surface.rb, lib/render.rb: Added.
|
132
|
+
* lib/cpuinfo.rb, lib/gesture.rb, lib/touch.rb, lib/audio.rb: Added.
|
133
|
+
|
134
|
+
2015-09-21 vaiorabbit <http://twitter.com/vaiorabbit>
|
135
|
+
|
136
|
+
* lib/events.rb, lib/timer.rb, lib/video.rb: Added.
|
137
|
+
* lib/keyboard.rb, lib/keycode.rb, lib/scancode.rb: Added.
|
138
|
+
* lib/error.rb: Added.
|
139
|
+
* lib/blendmode.rb, lib/clipboard.rb, lib/filesystem.rb, lib/version.rb: Added.
|
140
|
+
* lib/platform.rb, lib/rect.rb, lib/mouse.rb: Added.
|
141
|
+
* lib/messagebox.rb, lib/pixels.rb: Added.
|
142
|
+
|
143
|
+
2015-09-19 vaiorabbit <http://twitter.com/vaiorabbit>
|
144
|
+
|
145
|
+
* Project started.
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
@@ -1,86 +1,108 @@
|
|
1
|
-
<!-- -*- mode:markdown; coding:utf-8; -*- -->
|
2
|
-
|
3
|
-
# sdl2-bindings : Yet another SDL2 wrapper for Ruby #
|
4
|
-
|
5
|
-
* Created : 2015-09-19
|
6
|
-
* Last modified : 2022-
|
7
|
-
|
8
|
-
## Features ##
|
9
|
-
|
10
|
-
* Generated semi-automatically
|
11
|
-
* Based on Ruby/FFI
|
12
|
-
* No need to build C extension library
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
*
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
*
|
32
|
-
*
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
* [
|
38
|
-
* [
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
*
|
46
|
-
*
|
47
|
-
*
|
48
|
-
*
|
49
|
-
*
|
50
|
-
*
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
*
|
58
|
-
* [2022-07-31]
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
*
|
64
|
-
*
|
65
|
-
* [
|
66
|
-
*
|
67
|
-
*
|
68
|
-
*
|
69
|
-
*
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
1
|
+
<!-- -*- mode:markdown; coding:utf-8; -*- -->
|
2
|
+
|
3
|
+
# sdl2-bindings : Yet another SDL2 wrapper for Ruby #
|
4
|
+
|
5
|
+
* Created : 2015-09-19
|
6
|
+
* Last modified : 2022-10-09
|
7
|
+
|
8
|
+
## Features ##
|
9
|
+
|
10
|
+
* Generated semi-automatically
|
11
|
+
* Based on Ruby/FFI
|
12
|
+
* No need to build C extension library
|
13
|
+
|
14
|
+
See the project below to learn how to use this library:
|
15
|
+
|
16
|
+
* Whac-a-Mole! : Ruby SDL2 bindings demo
|
17
|
+
* <https://github.com/vaiorabbit/sdl2-bindings-whacamole>
|
18
|
+
* [![](http://img.youtube.com/vi/HroP-_EWcg8/mqdefault.jpg)](https://www.youtube.com/watch?v=HroP-_EWcg8)
|
19
|
+
|
20
|
+
## Limitations ##
|
21
|
+
|
22
|
+
* Several original APIs originally defined with pre-processor macro are unavailable in this library (e.g. `SDL_LoadBMP`)
|
23
|
+
|
24
|
+
## Target version ##
|
25
|
+
|
26
|
+
* [2022-10-09]
|
27
|
+
* SDL : 2.24.1
|
28
|
+
* SDL_image : 2.6.2
|
29
|
+
* SDL_mixer : 2.6.2
|
30
|
+
* SDL_ttf : 2.20.1
|
31
|
+
* SDL2_gfx : 1.0.4
|
32
|
+
* SDL_sound : 2.0.1
|
33
|
+
|
34
|
+
<details>
|
35
|
+
<summary>Older versions</summary>
|
36
|
+
|
37
|
+
* [2015-09-19] SDL 2.0.3
|
38
|
+
* [2016-04-03] SDL 2.0.4
|
39
|
+
* [2019-08-31] SDL 2.0.10
|
40
|
+
* [2020-03-22] SDL 2.0.12
|
41
|
+
* [2020-12-27] SDL 2.0.14
|
42
|
+
* [2021-08-12] SDL 2.0.16
|
43
|
+
* [2021-12-02] SDL 2.0.18
|
44
|
+
* [2022-03-28]
|
45
|
+
* SDL : 2.0.20
|
46
|
+
* SDL_image : 2.0.5
|
47
|
+
* SDL_mixer : 2.0.4
|
48
|
+
* SDL_ttf : 2.0.18
|
49
|
+
* SDL2_gfx : 1.0.4
|
50
|
+
* SDL_sound : 2.0.1
|
51
|
+
* [2022-04-29]
|
52
|
+
* SDL : 2.0.22
|
53
|
+
* SDL_image : 2.0.5
|
54
|
+
* SDL_mixer : 2.0.4
|
55
|
+
* SDL_ttf : 2.0.18
|
56
|
+
* SDL2_gfx : 1.0.4
|
57
|
+
* SDL_sound : 2.0.1
|
58
|
+
* [2022-07-31]
|
59
|
+
* SDL : 2.0.22
|
60
|
+
* SDL_image : 2.6.0
|
61
|
+
* SDL_mixer : 2.6.0
|
62
|
+
* SDL_ttf : 2.20.0
|
63
|
+
* SDL2_gfx : 1.0.4
|
64
|
+
* SDL_sound : 2.0.1
|
65
|
+
* [2022-08-20]
|
66
|
+
* SDL : 2.24.0
|
67
|
+
* SDL_image : 2.6.2
|
68
|
+
* SDL_mixer : 2.6.2
|
69
|
+
* SDL_ttf : 2.20.1
|
70
|
+
* SDL2_gfx : 1.0.4
|
71
|
+
* SDL_sound : 2.0.1
|
72
|
+
|
73
|
+
</details>
|
74
|
+
|
75
|
+
## Supported Environments ##
|
76
|
+
|
77
|
+
* [2022-04-29] Windows 10 (21H1), ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x64-mingw-ucrt]
|
78
|
+
* [2022-10-09] macOS Monterey (12.5.1), ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [arm64-darwin21]
|
79
|
+
* [2022-10-09] Debian 11 (bullseye) on ASUS Chromebook Detachable CZ1, ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [aarch64-linux]
|
80
|
+
|
81
|
+
<details>
|
82
|
+
<summary>Older Environments</summary>
|
83
|
+
|
84
|
+
* [2022-07-31] macOS Monterey (12.4), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin21]
|
85
|
+
* [2022-02-12] Windows 10 (21H1), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [x64-mingw-ucrt]
|
86
|
+
* [2022-01-11] macOS Monterey (12.1), ruby 3.1.0p0 (2021-12-25 revision fb4df44d16) [arm64-darwin20]
|
87
|
+
* [2021-12-02] macOS Big Sur (11.6), ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
|
88
|
+
* [2021-08-12] macOS Big Sur (11.5), ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm64-darwin20]
|
89
|
+
* [2020-12-27] macOS Big Sur (11.0.1), ruby 3.0.0p0 (2020-12-25 revision 95aff21468) [arm64-darwin20]
|
90
|
+
* [2016-04-03] Mac OS X 10.11.4, ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
|
91
|
+
* [2015-09-19] Mac OS X 10.10.5, ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14]
|
92
|
+
|
93
|
+
</details>
|
94
|
+
|
95
|
+
## License ##
|
96
|
+
|
97
|
+
The zlib/libpng License ( http://opensource.org/licenses/Zlib ).
|
98
|
+
|
99
|
+
sdl2-bindings : Yet another SDL2 wrapper for Ruby
|
100
|
+
Copyright (c) 2015-2022 vaiorabbit <http://twitter.com/vaiorabbit>
|
101
|
+
|
102
|
+
This software is provided 'as-is', without any express or implied
|
103
|
+
warranty. In no event will the authors be held liable for any damages
|
104
|
+
arising from the use of this software.
|
105
|
+
|
106
|
+
Permission is granted to anyone to use this software for any purpose,
|
107
|
+
including commercial applications, and to alter it and redistribute it
|
108
|
+
freely, subject to the following restrictions:
|