sdl3-bindings 1.0.0.beta.1 → 1.0.0.beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/ChangeLog +23 -0
- data/README.md +34 -12
- data/lib/sdl3_audio.rb +2 -0
- data/lib/sdl3_events.rb +2 -0
- data/lib/sdl3_gpu.rb +1 -1
- data/lib/sdl3_hints.rb +2 -0
- data/lib/sdl3_image.rb +2 -2
- data/lib/sdl3_keycode.rb +4 -0
- data/lib/sdl3_mixer.rb +5 -6
- data/lib/sdl3_pixels.rb +1 -0
- data/lib/sdl3_revision.rb +1 -1
- data/lib/sdl3_stdinc.rb +1 -0
- data/lib/sdl3_surface.rb +4 -0
- data/lib/sdl3_touch.rb +2 -0
- data/lib/sdl3_ttf.rb +56 -17
- data/lib/sdl3_version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60c457f936c47758f85e526ae583c833e570770db5a3dd6fef89748212404fb1
|
4
|
+
data.tar.gz: 0a5aa53591c1180933fe551702e60383d6ee91bfea30893bfaea22290d0924e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26df9c05f25a1e882613d7df8720eb1cf4ca8eeb2969591a41c50646a551d10d51733b85f3b62d0d8595cede8398a0fbe8258039a433fda5fab550433694dfd1
|
7
|
+
data.tar.gz: a46d01bed7d2919b5a160878442c3642c7007b8a7fd3209e76495b39bf564b7f649da354f43a30f39c6da7ad145646f0c5d2e4ff762c758a95b2a0b61743dc8a
|
data/ChangeLog
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
2025-05-10 vaiorabbit <http://twitter.com/vaiorabbit>
|
2
|
+
|
3
|
+
* SDL 3.2.12 ( https://github.com/libsdl-org/SDL/releases/tag/release-3.2.12 )
|
4
|
+
* SDL_image 3.2.4 ( https://github.com/libsdl-org/SDL_image/releases/tag/release-3.2.4 )
|
5
|
+
* SDL_mixer b3a6fa8b5ad183f0a1bad02527d89a00c3c90106 ( https://github.com/libsdl-org/SDL_mixer/commit/b3a6fa8b5ad183f0a1bad02527d89a00c3c90106 )
|
6
|
+
* SDL_sound 68d18fe0a1105d1043b9f62d5e37fca19c0cd2c1 ( https://github.com/icculus/SDL_sound/commit/68d18fe0a1105d1043b9f62d5e37fca19c0cd2c1 )
|
7
|
+
* SDL_ttf 3.2.2 ( https://github.com/libsdl-org/SDL_ttf/releases/tag/release-3.2.2 )
|
8
|
+
|
9
|
+
2025-03-29 vaiorabbit <http://twitter.com/vaiorabbit>
|
10
|
+
|
11
|
+
* SDL 3.2.8 ( https://github.com/libsdl-org/SDL/releases/tag/release-3.2.8 )
|
12
|
+
* SDL_image 3.2.4 ( https://github.com/libsdl-org/SDL_image/releases/tag/release-3.2.4 )
|
13
|
+
* SDL_mixer 698aaa2e2fd18900f0e28132a8de9b48538d4857 ( https://github.com/libsdl-org/SDL_mixer/commit/698aaa2e2fd18900f0e28132a8de9b48538d4857 )
|
14
|
+
* SDL_sound f2705793331771fc584c34c3b26581462a3e95f4 ( https://github.com/icculus/SDL_sound/commit/f2705793331771fc584c34c3b26581462a3e95f4 )
|
15
|
+
* SDL_ttf 3.2.0 ( https://github.com/libsdl-org/SDL_ttf/releases/tag/prerelease-3.2.0 )
|
16
|
+
|
17
|
+
2025-02-23 vaiorabbit <http://twitter.com/vaiorabbit>
|
18
|
+
|
19
|
+
* SDL 3.2.4 ( https://github.com/libsdl-org/SDL/releases/tag/release-3.2.4 )
|
20
|
+
* SDL_image 3.2.0 ( https://github.com/libsdl-org/SDL_image/releases/tag/release-3.2.0 )
|
21
|
+
* SDL_ttf 3.1.2 ( https://github.com/libsdl-org/SDL_ttf/releases/tag/prerelease-3.1.2 )
|
22
|
+
* SDL_mixer 863f8c0c0a1f3d8efe9b9cdb7f474efdfac54b76 ( https://github.com/libsdl-org/SDL_mixer/commit/863f8c0c0a1f3d8efe9b9cdb7f474efdfac54b76 )
|
23
|
+
|
1
24
|
2025-01-26 vaiorabbit <http://twitter.com/vaiorabbit>
|
2
25
|
|
3
26
|
* SDL 3.2.0 ( https://github.com/libsdl-org/SDL/releases/tag/release-3.2.0 )
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# sdl3-bindings : SDL3 wrapper for Ruby #
|
4
4
|
|
5
5
|
* Created : 2015-09-19
|
6
|
-
* Last modified : 2025-
|
6
|
+
* Last modified : 2025-05-10
|
7
7
|
|
8
8
|
## Features ##
|
9
9
|
|
@@ -14,7 +14,7 @@
|
|
14
14
|
See the project below to learn how to use this library:
|
15
15
|
|
16
16
|
* Whac-a-Mole! : Ruby SDL2 bindings demo
|
17
|
-
* <https://github.com/vaiorabbit/sdl2-bindings-whacamole>
|
17
|
+
* <https://github.com/vaiorabbit/sdl2-bindings-whacamole/tree/feature/sdl3>
|
18
18
|
* [](https://www.youtube.com/watch?v=HroP-_EWcg8)
|
19
19
|
|
20
20
|
## Limitations ##
|
@@ -23,12 +23,13 @@ See the project below to learn how to use this library:
|
|
23
23
|
|
24
24
|
## Target version ##
|
25
25
|
|
26
|
-
* [2025-
|
27
|
-
*
|
28
|
-
*
|
29
|
-
*
|
30
|
-
*
|
31
|
-
*
|
26
|
+
* [2025-05-10]
|
27
|
+
* SDL : 3.2.12
|
28
|
+
* SDL_image : 3.2.4
|
29
|
+
* SDL_mixer : b3a6fa8b5ad183f0a1bad02527d89a00c3c90106
|
30
|
+
* SDL_sound : 68d18fe0a1105d1043b9f62d5e37fca19c0cd2c1
|
31
|
+
* SDL_ttf : 3.2.2
|
32
|
+
|
32
33
|
|
33
34
|
<details>
|
34
35
|
<summary>Older versions</summary>
|
@@ -89,16 +90,29 @@ See the project below to learn how to use this library:
|
|
89
90
|
* SDL_ttf : 2.20.1
|
90
91
|
* SDL2_gfx : 1.0.4
|
91
92
|
* SDL_sound : 2.0.1
|
93
|
+
* [2025-01-26]
|
94
|
+
* SDL : 3.2.4
|
95
|
+
* SDL_image : 3.2.0
|
96
|
+
* SDL_mixer : 3.0.0
|
97
|
+
* SDL_ttf : 3.1.2
|
98
|
+
* SDL_sound : 3.0.0
|
99
|
+
* [2025-03-29]
|
100
|
+
* SDL : 3.2.8
|
101
|
+
* SDL_image : 3.2.4
|
102
|
+
* SDL_mixer : 698aaa2e2fd18900f0e28132a8de9b48538d4857
|
103
|
+
* SDL_ttf : 3.2.0
|
104
|
+
* SDL_sound : f2705793331771fc584c34c3b26581462a3e95f4
|
92
105
|
|
93
106
|
</details>
|
94
107
|
|
95
108
|
## Tested Environments ##
|
96
109
|
|
97
|
-
* [2025-
|
110
|
+
* [2025-03-29] Windows 11 (24H2), ruby 3.4.2 (2025-02-15 revision d2930f8e7a) +PRISM [x64-mingw-ucrt]
|
98
111
|
|
99
112
|
<details>
|
100
113
|
<summary>Older Environments</summary>
|
101
114
|
|
115
|
+
* [2025-01-26] Windows 11 (24H2), ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x64-mingw-ucrt]
|
102
116
|
* [2023-02-05] Ubuntu Linux 22.04 LTS (jammy) on WSL/Windows 11, ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
|
103
117
|
* [2023-01-07] Windows 11 (22H2), ruby 3.2.0 (2022-12-25 revision a528908271) [x64-mingw-ucrt]
|
104
118
|
* [2023-01-07] macOS Ventura (13.1) ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin21]
|
@@ -120,9 +134,6 @@ See the project below to learn how to use this library:
|
|
120
134
|
|
121
135
|
The zlib/libpng License ( http://opensource.org/licenses/Zlib ).
|
122
136
|
|
123
|
-
sdl3-bindings : SDL3 wrapper for Ruby
|
124
|
-
Copyright (c) 2015-2025 vaiorabbit <http://twitter.com/vaiorabbit>
|
125
|
-
|
126
137
|
This software is provided 'as-is', without any express or implied
|
127
138
|
warranty. In no event will the authors be held liable for any damages
|
128
139
|
arising from the use of this software.
|
@@ -130,3 +141,14 @@ The zlib/libpng License ( http://opensource.org/licenses/Zlib ).
|
|
130
141
|
Permission is granted to anyone to use this software for any purpose,
|
131
142
|
including commercial applications, and to alter it and redistribute it
|
132
143
|
freely, subject to the following restrictions:
|
144
|
+
|
145
|
+
1. The origin of this software must not be misrepresented; you must not
|
146
|
+
claim that you wrote the original software. If you use this software
|
147
|
+
in a product, an acknowledgment in the product documentation would be
|
148
|
+
appreciated but is not required.
|
149
|
+
|
150
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
151
|
+
misrepresented as being the original software.
|
152
|
+
|
153
|
+
3. This notice may not be removed or altered from any source
|
154
|
+
distribution.
|
data/lib/sdl3_audio.rb
CHANGED
data/lib/sdl3_events.rb
CHANGED
data/lib/sdl3_gpu.rb
CHANGED
@@ -54,7 +54,7 @@ module SDL
|
|
54
54
|
PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT = "SDL.gpu.texture.create.d3d12.clear.b"
|
55
55
|
PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT = "SDL.gpu.texture.create.d3d12.clear.a"
|
56
56
|
PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT = "SDL.gpu.texture.create.d3d12.clear.depth"
|
57
|
-
|
57
|
+
PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_NUMBER = "SDL.gpu.texture.create.d3d12.clear.stencil"
|
58
58
|
PROP_GPU_TEXTURE_CREATE_NAME_STRING = "SDL.gpu.texture.create.name"
|
59
59
|
PROP_GPU_BUFFER_CREATE_NAME_STRING = "SDL.gpu.buffer.create.name"
|
60
60
|
PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING = "SDL.gpu.transferbuffer.create.name"
|
data/lib/sdl3_hints.rb
CHANGED
@@ -131,6 +131,7 @@ module SDL
|
|
131
131
|
HINT_JOYSTICK_WHEEL_DEVICES = "SDL_JOYSTICK_WHEEL_DEVICES"
|
132
132
|
HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED = "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"
|
133
133
|
HINT_JOYSTICK_ZERO_CENTERED_DEVICES = "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"
|
134
|
+
HINT_JOYSTICK_HAPTIC_AXES = "SDL_JOYSTICK_HAPTIC_AXES"
|
134
135
|
HINT_KEYCODE_OPTIONS = "SDL_KEYCODE_OPTIONS"
|
135
136
|
HINT_KMSDRM_DEVICE_INDEX = "SDL_KMSDRM_DEVICE_INDEX"
|
136
137
|
HINT_KMSDRM_REQUIRE_DRM_MASTER = "SDL_KMSDRM_REQUIRE_DRM_MASTER"
|
@@ -205,6 +206,7 @@ module SDL
|
|
205
206
|
HINT_VIDEO_WAYLAND_PREFER_LIBDECOR = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
|
206
207
|
HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY = "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"
|
207
208
|
HINT_VIDEO_WIN_D3DCOMPILER = "SDL_VIDEO_WIN_D3DCOMPILER"
|
209
|
+
HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT = "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT"
|
208
210
|
HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
|
209
211
|
HINT_VIDEO_X11_NET_WM_PING = "SDL_VIDEO_X11_NET_WM_PING"
|
210
212
|
HINT_VIDEO_X11_NODIRECTCOLOR = "SDL_VIDEO_X11_NODIRECTCOLOR"
|
data/lib/sdl3_image.rb
CHANGED
data/lib/sdl3_keycode.rb
CHANGED
@@ -282,6 +282,10 @@ module SDL
|
|
282
282
|
KMOD_CAPS = 0x2000
|
283
283
|
KMOD_MODE = 0x4000
|
284
284
|
KMOD_SCROLL = 0x8000
|
285
|
+
KMOD_CTRL = (KMOD_LCTRL | KMOD_RCTRL)
|
286
|
+
KMOD_SHIFT = (KMOD_LSHIFT | KMOD_RSHIFT)
|
287
|
+
KMOD_ALT = (KMOD_LALT | KMOD_RALT)
|
288
|
+
KMOD_GUI = (KMOD_LGUI | KMOD_RGUI)
|
285
289
|
|
286
290
|
# Enum
|
287
291
|
|
data/lib/sdl3_mixer.rb
CHANGED
@@ -17,6 +17,7 @@ module SDL
|
|
17
17
|
MIX_INIT_MOD = 0x00000002
|
18
18
|
MIX_INIT_MP3 = 0x00000008
|
19
19
|
MIX_INIT_OGG = 0x00000010
|
20
|
+
MIX_INIT_MID = 0x00000020
|
20
21
|
MIX_INIT_OPUS = 0x00000040
|
21
22
|
MIX_INIT_WAVPACK = 0x00000080
|
22
23
|
MIX_CHANNELS = 8
|
@@ -37,12 +38,10 @@ module SDL
|
|
37
38
|
MUS_MID = 3
|
38
39
|
MUS_OGG = 4
|
39
40
|
MUS_MP3 = 5
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
MUS_WAVPACK = 10
|
45
|
-
MUS_GME = 11
|
41
|
+
MUS_FLAC = 6
|
42
|
+
MUS_OPUS = 7
|
43
|
+
MUS_WAVPACK = 8
|
44
|
+
MUS_GME = 9
|
46
45
|
|
47
46
|
# Typedef
|
48
47
|
|
data/lib/sdl3_pixels.rb
CHANGED
@@ -122,6 +122,7 @@ module SDL
|
|
122
122
|
PIXELFORMAT_NV21 = 825382478
|
123
123
|
PIXELFORMAT_P010 = 808530000
|
124
124
|
PIXELFORMAT_EXTERNAL_OES = 542328143
|
125
|
+
PIXELFORMAT_MJPG = 1196444237
|
125
126
|
PIXELFORMAT_RGBA32 = 376840196
|
126
127
|
PIXELFORMAT_ARGB32 = 377888772
|
127
128
|
PIXELFORMAT_BGRA32 = 372645892
|
data/lib/sdl3_revision.rb
CHANGED
data/lib/sdl3_stdinc.rb
CHANGED
data/lib/sdl3_surface.rb
CHANGED
@@ -18,9 +18,12 @@ module SDL
|
|
18
18
|
PROP_SURFACE_SDR_WHITE_POINT_FLOAT = "SDL.surface.SDR_white_point"
|
19
19
|
PROP_SURFACE_HDR_HEADROOM_FLOAT = "SDL.surface.HDR_headroom"
|
20
20
|
PROP_SURFACE_TONEMAP_OPERATOR_STRING = "SDL.surface.tonemap"
|
21
|
+
PROP_SURFACE_HOTSPOT_X_NUMBER = "SDL.surface.hotspot.x"
|
22
|
+
PROP_SURFACE_HOTSPOT_Y_NUMBER = "SDL.surface.hotspot.y"
|
21
23
|
|
22
24
|
# Enum
|
23
25
|
|
26
|
+
SCALEMODE_INVALID = -1
|
24
27
|
SCALEMODE_NEAREST = 0
|
25
28
|
SCALEMODE_LINEAR = 1
|
26
29
|
FLIP_NONE = 0
|
@@ -101,6 +104,7 @@ module SDL
|
|
101
104
|
[:BlitSurfaceUnchecked, :SDL_BlitSurfaceUnchecked, [:pointer, :pointer, :pointer, :pointer], :bool],
|
102
105
|
[:BlitSurfaceScaled, :SDL_BlitSurfaceScaled, [:pointer, :pointer, :pointer, :pointer, :int], :bool],
|
103
106
|
[:BlitSurfaceUncheckedScaled, :SDL_BlitSurfaceUncheckedScaled, [:pointer, :pointer, :pointer, :pointer, :int], :bool],
|
107
|
+
[:StretchSurface, :SDL_StretchSurface, [:pointer, :pointer, :pointer, :pointer, :int], :bool],
|
104
108
|
[:BlitSurfaceTiled, :SDL_BlitSurfaceTiled, [:pointer, :pointer, :pointer, :pointer], :bool],
|
105
109
|
[:BlitSurfaceTiledWithScale, :SDL_BlitSurfaceTiledWithScale, [:pointer, :pointer, :float, :int, :pointer, :pointer], :bool],
|
106
110
|
[:BlitSurface9Grid, :SDL_BlitSurface9Grid, [:pointer, :pointer, :int, :int, :int, :int, :float, :int, :pointer, :pointer], :bool],
|
data/lib/sdl3_touch.rb
CHANGED
data/lib/sdl3_ttf.rb
CHANGED
@@ -12,8 +12,8 @@ module SDL
|
|
12
12
|
# Define/Macro
|
13
13
|
|
14
14
|
TTF_MAJOR_VERSION = 3
|
15
|
-
TTF_MINOR_VERSION =
|
16
|
-
TTF_MICRO_VERSION =
|
15
|
+
TTF_MINOR_VERSION = 2
|
16
|
+
TTF_MICRO_VERSION = 2
|
17
17
|
TTF_PROP_FONT_CREATE_FILENAME_STRING = "SDL_ttf.font.create.filename"
|
18
18
|
TTF_PROP_FONT_CREATE_IOSTREAM_POINTER = "SDL_ttf.font.create.iostream"
|
19
19
|
TTF_PROP_FONT_CREATE_IOSTREAM_OFFSET_NUMBER = "SDL_ttf.font.create.iostream.offset"
|
@@ -22,6 +22,7 @@ module SDL
|
|
22
22
|
TTF_PROP_FONT_CREATE_FACE_NUMBER = "SDL_ttf.font.create.face"
|
23
23
|
TTF_PROP_FONT_CREATE_HORIZONTAL_DPI_NUMBER = "SDL_ttf.font.create.hdpi"
|
24
24
|
TTF_PROP_FONT_CREATE_VERTICAL_DPI_NUMBER = "SDL_ttf.font.create.vdpi"
|
25
|
+
TTF_PROP_FONT_CREATE_EXISTING_FONT = "SDL_ttf.font.create.existing_font"
|
25
26
|
TTF_PROP_FONT_OUTLINE_LINE_CAP_NUMBER = "SDL_ttf.font.outline.line_cap"
|
26
27
|
TTF_PROP_FONT_OUTLINE_LINE_JOIN_NUMBER = "SDL_ttf.font.outline.line_join"
|
27
28
|
TTF_PROP_FONT_OUTLINE_MITER_LIMIT_NUMBER = "SDL_ttf.font.outline.miter_limit"
|
@@ -30,13 +31,29 @@ module SDL
|
|
30
31
|
TTF_STYLE_ITALIC = 0x02
|
31
32
|
TTF_STYLE_UNDERLINE = 0x04
|
32
33
|
TTF_STYLE_STRIKETHROUGH = 0x08
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
TTF_FONT_WEIGHT_THIN = 100
|
35
|
+
TTF_FONT_WEIGHT_EXTRA_LIGHT = 200
|
36
|
+
TTF_FONT_WEIGHT_LIGHT = 300
|
37
|
+
TTF_FONT_WEIGHT_NORMAL = 400
|
38
|
+
TTF_FONT_WEIGHT_MEDIUM = 500
|
39
|
+
TTF_FONT_WEIGHT_SEMI_BOLD = 600
|
40
|
+
TTF_FONT_WEIGHT_BOLD = 700
|
41
|
+
TTF_FONT_WEIGHT_EXTRA_BOLD = 800
|
42
|
+
TTF_FONT_WEIGHT_BLACK = 900
|
43
|
+
TTF_FONT_WEIGHT_EXTRA_BLACK = 950
|
44
|
+
TTF_PROP_RENDERER_TEXT_ENGINE_RENDERER = "SDL_ttf.renderer_text_engine.create.renderer"
|
45
|
+
TTF_PROP_RENDERER_TEXT_ENGINE_ATLAS_TEXTURE_SIZE = "SDL_ttf.renderer_text_engine.create.atlas_texture_size"
|
46
|
+
TTF_PROP_GPU_TEXT_ENGINE_DEVICE = "SDL_ttf.gpu_text_engine.create.device"
|
47
|
+
TTF_PROP_GPU_TEXT_ENGINE_ATLAS_TEXTURE_SIZE = "SDL_ttf.gpu_text_engine.create.atlas_texture_size"
|
48
|
+
TTF_SUBSTRING_DIRECTION_MASK = 0x000000FF
|
49
|
+
TTF_SUBSTRING_TEXT_START = 0x00000100
|
50
|
+
TTF_SUBSTRING_LINE_START = 0x00000200
|
51
|
+
TTF_SUBSTRING_LINE_END = 0x00000400
|
52
|
+
TTF_SUBSTRING_TEXT_END = 0x00000800
|
37
53
|
|
38
54
|
# Enum
|
39
55
|
|
56
|
+
TTF_HINTING_INVALID = -1
|
40
57
|
TTF_HINTING_NORMAL = 0
|
41
58
|
TTF_HINTING_LIGHT = 1
|
42
59
|
TTF_HINTING_MONO = 2
|
@@ -46,10 +63,15 @@ module SDL
|
|
46
63
|
TTF_HORIZONTAL_ALIGN_LEFT = 0
|
47
64
|
TTF_HORIZONTAL_ALIGN_CENTER = 1
|
48
65
|
TTF_HORIZONTAL_ALIGN_RIGHT = 2
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
66
|
+
TTF_DIRECTION_INVALID = 0
|
67
|
+
TTF_DIRECTION_LTR = 4
|
68
|
+
TTF_DIRECTION_RTL = 5
|
69
|
+
TTF_DIRECTION_TTB = 6
|
70
|
+
TTF_DIRECTION_BTT = 7
|
71
|
+
TTF_IMAGE_INVALID = 0
|
72
|
+
TTF_IMAGE_ALPHA = 1
|
73
|
+
TTF_IMAGE_COLOR = 2
|
74
|
+
TTF_IMAGE_SDF = 3
|
53
75
|
TTF_GPU_TEXTENGINE_WINDING_INVALID = -1
|
54
76
|
TTF_GPU_TEXTENGINE_WINDING_CLOCKWISE = 0
|
55
77
|
TTF_GPU_TEXTENGINE_WINDING_COUNTER_CLOCKWISE = 1
|
@@ -60,6 +82,7 @@ module SDL
|
|
60
82
|
typedef :int, :TTF_HintingFlags
|
61
83
|
typedef :int, :TTF_HorizontalAlignment
|
62
84
|
typedef :int, :TTF_Direction
|
85
|
+
typedef :int, :TTF_ImageType
|
63
86
|
typedef :int, :TTF_GPUTextEngineWinding
|
64
87
|
typedef :uint, :TTF_SubStringFlags
|
65
88
|
|
@@ -82,6 +105,7 @@ module SDL
|
|
82
105
|
:num_vertices, :int,
|
83
106
|
:indices, :pointer,
|
84
107
|
:num_indices, :int,
|
108
|
+
:image_type, :int,
|
85
109
|
:next, :pointer,
|
86
110
|
)
|
87
111
|
end
|
@@ -109,8 +133,12 @@ module SDL
|
|
109
133
|
[:TTF_OpenFont, :TTF_OpenFont, [:pointer, :float], :pointer],
|
110
134
|
[:TTF_OpenFontIO, :TTF_OpenFontIO, [:pointer, :bool, :float], :pointer],
|
111
135
|
[:TTF_OpenFontWithProperties, :TTF_OpenFontWithProperties, [:uint], :pointer],
|
136
|
+
[:TTF_CopyFont, :TTF_CopyFont, [:pointer], :pointer],
|
112
137
|
[:TTF_GetFontProperties, :TTF_GetFontProperties, [:pointer], :uint],
|
113
138
|
[:TTF_GetFontGeneration, :TTF_GetFontGeneration, [:pointer], :uint],
|
139
|
+
[:TTF_AddFallbackFont, :TTF_AddFallbackFont, [:pointer, :pointer], :bool],
|
140
|
+
[:TTF_RemoveFallbackFont, :TTF_RemoveFallbackFont, [:pointer, :pointer], :void],
|
141
|
+
[:TTF_ClearFallbackFonts, :TTF_ClearFallbackFonts, [:pointer], :void],
|
114
142
|
[:TTF_SetFontSize, :TTF_SetFontSize, [:pointer, :float], :bool],
|
115
143
|
[:TTF_SetFontSizeDPI, :TTF_SetFontSizeDPI, [:pointer, :float, :int, :int], :bool],
|
116
144
|
[:TTF_GetFontSize, :TTF_GetFontSize, [:pointer], :float],
|
@@ -120,9 +148,11 @@ module SDL
|
|
120
148
|
[:TTF_SetFontOutline, :TTF_SetFontOutline, [:pointer, :int], :bool],
|
121
149
|
[:TTF_GetFontOutline, :TTF_GetFontOutline, [:pointer], :int],
|
122
150
|
[:TTF_SetFontHinting, :TTF_SetFontHinting, [:pointer, :int], :void],
|
151
|
+
[:TTF_GetNumFontFaces, :TTF_GetNumFontFaces, [:pointer], :int],
|
123
152
|
[:TTF_GetFontHinting, :TTF_GetFontHinting, [:pointer], :int],
|
124
153
|
[:TTF_SetFontSDF, :TTF_SetFontSDF, [:pointer, :bool], :bool],
|
125
154
|
[:TTF_GetFontSDF, :TTF_GetFontSDF, [:pointer], :bool],
|
155
|
+
[:TTF_GetFontWeight, :TTF_GetFontWeight, [:pointer], :int],
|
126
156
|
[:TTF_SetFontWrapAlignment, :TTF_SetFontWrapAlignment, [:pointer, :int], :void],
|
127
157
|
[:TTF_GetFontWrapAlignment, :TTF_GetFontWrapAlignment, [:pointer], :int],
|
128
158
|
[:TTF_GetFontHeight, :TTF_GetFontHeight, [:pointer], :int],
|
@@ -136,22 +166,25 @@ module SDL
|
|
136
166
|
[:TTF_FontIsScalable, :TTF_FontIsScalable, [:pointer], :bool],
|
137
167
|
[:TTF_GetFontFamilyName, :TTF_GetFontFamilyName, [:pointer], :pointer],
|
138
168
|
[:TTF_GetFontStyleName, :TTF_GetFontStyleName, [:pointer], :pointer],
|
139
|
-
[:TTF_RenderText_Solid, :TTF_RenderText_Solid, [:pointer, :pointer, :ulong_long, Color.by_value], :pointer],
|
140
|
-
[:TTF_RenderText_Solid_Wrapped, :TTF_RenderText_Solid_Wrapped, [:pointer, :pointer, :ulong_long, Color.by_value, :int], :pointer],
|
141
|
-
[:TTF_RenderGlyph_Solid, :TTF_RenderGlyph_Solid, [:pointer, :uint, Color.by_value], :pointer],
|
142
169
|
[:TTF_SetFontDirection, :TTF_SetFontDirection, [:pointer, :int], :bool],
|
143
170
|
[:TTF_GetFontDirection, :TTF_GetFontDirection, [:pointer], :int],
|
144
|
-
[:
|
145
|
-
[:
|
171
|
+
[:TTF_StringToTag, :TTF_StringToTag, [:pointer], :uint],
|
172
|
+
[:TTF_TagToString, :TTF_TagToString, [:uint, :pointer, :ulong_long], :void],
|
173
|
+
[:TTF_SetFontScript, :TTF_SetFontScript, [:pointer, :uint], :bool],
|
174
|
+
[:TTF_GetFontScript, :TTF_GetFontScript, [:pointer], :uint],
|
175
|
+
[:TTF_GetGlyphScript, :TTF_GetGlyphScript, [:uint], :uint],
|
146
176
|
[:TTF_SetFontLanguage, :TTF_SetFontLanguage, [:pointer, :pointer], :bool],
|
147
177
|
[:TTF_FontHasGlyph, :TTF_FontHasGlyph, [:pointer, :uint], :bool],
|
148
|
-
[:TTF_GetGlyphImage, :TTF_GetGlyphImage, [:pointer, :uint], :pointer],
|
149
|
-
[:TTF_GetGlyphImageForIndex, :TTF_GetGlyphImageForIndex, [:pointer, :uint], :pointer],
|
178
|
+
[:TTF_GetGlyphImage, :TTF_GetGlyphImage, [:pointer, :uint, :pointer], :pointer],
|
179
|
+
[:TTF_GetGlyphImageForIndex, :TTF_GetGlyphImageForIndex, [:pointer, :uint, :pointer], :pointer],
|
150
180
|
[:TTF_GetGlyphMetrics, :TTF_GetGlyphMetrics, [:pointer, :uint, :pointer, :pointer, :pointer, :pointer, :pointer], :bool],
|
151
181
|
[:TTF_GetGlyphKerning, :TTF_GetGlyphKerning, [:pointer, :uint, :uint, :pointer], :bool],
|
152
182
|
[:TTF_GetStringSize, :TTF_GetStringSize, [:pointer, :pointer, :ulong_long, :pointer, :pointer], :bool],
|
153
183
|
[:TTF_GetStringSizeWrapped, :TTF_GetStringSizeWrapped, [:pointer, :pointer, :ulong_long, :int, :pointer, :pointer], :bool],
|
154
184
|
[:TTF_MeasureString, :TTF_MeasureString, [:pointer, :pointer, :ulong_long, :int, :pointer, :pointer], :bool],
|
185
|
+
[:TTF_RenderText_Solid, :TTF_RenderText_Solid, [:pointer, :pointer, :ulong_long, Color.by_value], :pointer],
|
186
|
+
[:TTF_RenderText_Solid_Wrapped, :TTF_RenderText_Solid_Wrapped, [:pointer, :pointer, :ulong_long, Color.by_value, :int], :pointer],
|
187
|
+
[:TTF_RenderGlyph_Solid, :TTF_RenderGlyph_Solid, [:pointer, :uint, Color.by_value], :pointer],
|
155
188
|
[:TTF_RenderText_Shaded, :TTF_RenderText_Shaded, [:pointer, :pointer, :ulong_long, Color.by_value, Color.by_value], :pointer],
|
156
189
|
[:TTF_RenderText_Shaded_Wrapped, :TTF_RenderText_Shaded_Wrapped, [:pointer, :pointer, :ulong_long, Color.by_value, Color.by_value, :int], :pointer],
|
157
190
|
[:TTF_RenderGlyph_Shaded, :TTF_RenderGlyph_Shaded, [:pointer, :uint, Color.by_value, Color.by_value], :pointer],
|
@@ -165,9 +198,11 @@ module SDL
|
|
165
198
|
[:TTF_DrawSurfaceText, :TTF_DrawSurfaceText, [:pointer, :int, :int, :pointer], :bool],
|
166
199
|
[:TTF_DestroySurfaceTextEngine, :TTF_DestroySurfaceTextEngine, [:pointer], :void],
|
167
200
|
[:TTF_CreateRendererTextEngine, :TTF_CreateRendererTextEngine, [:pointer], :pointer],
|
201
|
+
[:TTF_CreateRendererTextEngineWithProperties, :TTF_CreateRendererTextEngineWithProperties, [:uint], :pointer],
|
168
202
|
[:TTF_DrawRendererText, :TTF_DrawRendererText, [:pointer, :float, :float], :bool],
|
169
203
|
[:TTF_DestroyRendererTextEngine, :TTF_DestroyRendererTextEngine, [:pointer], :void],
|
170
204
|
[:TTF_CreateGPUTextEngine, :TTF_CreateGPUTextEngine, [:pointer], :pointer],
|
205
|
+
[:TTF_CreateGPUTextEngineWithProperties, :TTF_CreateGPUTextEngineWithProperties, [:uint], :pointer],
|
171
206
|
[:TTF_GetGPUTextDrawData, :TTF_GetGPUTextDrawData, [:pointer], :pointer],
|
172
207
|
[:TTF_DestroyGPUTextEngine, :TTF_DestroyGPUTextEngine, [:pointer], :void],
|
173
208
|
[:TTF_SetGPUTextEngineWinding, :TTF_SetGPUTextEngineWinding, [:pointer, :int], :void],
|
@@ -178,6 +213,10 @@ module SDL
|
|
178
213
|
[:TTF_GetTextEngine, :TTF_GetTextEngine, [:pointer], :pointer],
|
179
214
|
[:TTF_SetTextFont, :TTF_SetTextFont, [:pointer, :pointer], :bool],
|
180
215
|
[:TTF_GetTextFont, :TTF_GetTextFont, [:pointer], :pointer],
|
216
|
+
[:TTF_SetTextDirection, :TTF_SetTextDirection, [:pointer, :int], :bool],
|
217
|
+
[:TTF_GetTextDirection, :TTF_GetTextDirection, [:pointer], :int],
|
218
|
+
[:TTF_SetTextScript, :TTF_SetTextScript, [:pointer, :uint], :bool],
|
219
|
+
[:TTF_GetTextScript, :TTF_GetTextScript, [:pointer], :uint],
|
181
220
|
[:TTF_SetTextColor, :TTF_SetTextColor, [:pointer, :uchar, :uchar, :uchar, :uchar], :bool],
|
182
221
|
[:TTF_SetTextColorFloat, :TTF_SetTextColorFloat, [:pointer, :float, :float, :float, :float], :bool],
|
183
222
|
[:TTF_GetTextColor, :TTF_GetTextColor, [:pointer, :pointer, :pointer, :pointer, :pointer], :bool],
|
data/lib/sdl3_version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sdl3-bindings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.beta.
|
4
|
+
version: 1.0.0.beta.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- vaiorabbit
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-05-10 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ffi
|
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
114
|
requirements: []
|
115
|
-
rubygems_version: 3.6.
|
115
|
+
rubygems_version: 3.6.5
|
116
116
|
specification_version: 4
|
117
117
|
summary: Bindings for SDL3
|
118
118
|
test_files: []
|