sdl2-bindings 0.0.9 → 0.1.2

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