sdl2-bindings 0.1.0 → 0.1.3

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