sfml3-rb 0.3.0-arm-linux-gnu → 0.3.1-arm-linux-gnu
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.md +25 -0
- data/README.md +36 -13
- data/TODO.md +18 -11
- data/lib/sfml/3.1/sfml_ext.so +0 -0
- data/lib/sfml/3.2/sfml_ext.so +0 -0
- data/lib/sfml/3.3/sfml_ext.so +0 -0
- data/lib/sfml/3.4/sfml_ext.so +0 -0
- data/lib/sfml/4.0/sfml_ext.so +0 -0
- data/lib/sfml/version.rb +1 -1
- data/sig/audio/sound.rbs +1 -1
- data/sig/audio/sound_buffer_recorder.rbs +1 -1
- data/sig/audio/sound_recorder.rbs +1 -1
- data/sig/audio/sound_source_cone.rbs +1 -1
- data/sig/audio/sound_stream.rbs +1 -1
- data/sig/graphics/blend_mode.rbs +1 -1
- data/sig/graphics/circle.rbs +1 -1
- data/sig/graphics/color.rbs +5 -5
- data/sig/graphics/image.rbs +1 -1
- data/sig/graphics/polygon.rbs +1 -1
- data/sig/graphics/rect.rbs +5 -5
- data/sig/graphics/rectangle.rbs +1 -1
- data/sig/graphics/render_state.rbs +2 -2
- data/sig/graphics/render_target.rbs +18 -0
- data/sig/graphics/render_texture.rbs +4 -2
- data/sig/graphics/render_window.rbs +7 -0
- data/sig/graphics/shape.rbs +1 -1
- data/sig/graphics/sprite.rbs +2 -2
- data/sig/graphics/stencil_mode.rbs +2 -2
- data/sig/graphics/target.rbs +1 -3
- data/sig/graphics/text.rbs +4 -4
- data/sig/graphics/texture.rbs +1 -1
- data/sig/graphics/transformable.rbs +1 -1
- data/sig/graphics/vertex.rbs +4 -4
- data/sig/graphics/vertex_array.rbs +1 -1
- data/sig/graphics/vertex_buffer.rbs +4 -4
- data/sig/graphics/view.rbs +0 -1
- data/sig/network/ftp.rbs +1 -1
- data/sig/network/http.rbs +2 -2
- data/sig/network/ip_address.rbs +1 -1
- data/sig/network/packet.rbs +1 -1
- data/sig/network/socket_selector.rbs +1 -1
- data/sig/network/tcp_listener.rbs +1 -1
- data/sig/network/tcp_socket.rbs +1 -1
- data/sig/network/udp_socket.rbs +1 -1
- data/sig/sfml/version.rbs +3 -0
- data/sig/system/buffer.rbs +1 -1
- data/sig/system/clock.rbs +1 -1
- data/sig/system/input_stream.rbs +1 -1
- data/sig/system/time.rbs +4 -4
- data/sig/system/vec2.rbs +4 -4
- data/sig/system/vec3.rbs +4 -4
- data/sig/window/context.rbs +1 -1
- data/sig/window/context_settings.rbs +1 -1
- data/sig/window/event.rbs +1 -1
- data/sig/window/mouse.rbs +2 -2
- data/sig/window/touch.rbs +1 -1
- data/sig/window/video_mode.rbs +1 -1
- data/sig/window/window.rbs +2 -25
- data/sig/window/window_base.rbs +33 -0
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5e54b8ec2efab7f07ba01fd9ced74b0f3f92bb590031e63fcb87604bbeae3411
|
|
4
|
+
data.tar.gz: 45e65ba4315c5ca02544475a39c51905a16286686cf55f7f7f7bc594c9cfce9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e65581342a3cfb58b43d1c9b444634e743b8ca9fac85aca2eb9aed3b873fa46fe1208e6cd1b30d5b027a00f3d21efb12689deefe9fb8e21d02d530ab78a37935
|
|
7
|
+
data.tar.gz: ab294f7a81082fdc52839de21a16b6708d6d5d71c73ac9a5f417169b6c5a3b35709dec124a662f6cff410750043225f36b9f240875eb97dbb7efd6069d2f35dd
|
data/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,31 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.3.1] - 2026-09-19
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
* **`SFML::WindowBase`, `SFML::RenderWindow` and the `SFML::RenderTarget` module**, mirroring
|
|
13
|
+
SFML 3's own hierarchy. `WindowBase` wraps `sfWindowBase` -- an OS window and event queue with
|
|
14
|
+
no OpenGL context -- and is constructible, with `Window` and `RenderWindow` derived from it.
|
|
15
|
+
`Window` keeps its existing `sfRenderWindow` behaviour; `RenderWindow` is the same renderable
|
|
16
|
+
window under the name that also includes `RenderTarget`. `RenderTexture` includes
|
|
17
|
+
`RenderTarget` too, so a drawable's `#draw` now accepts a `RenderWindow` or a `RenderTexture`
|
|
18
|
+
directly (the legacy `Target` still works). The shared window surface is generated once, in
|
|
19
|
+
`ext/window/window_base.inc`.
|
|
20
|
+
* **RBS signatures are now checked against the code.** `sig/**/*.rbs` declares `SFML::VERSION`, and
|
|
21
|
+
a `Steepfile` plus the `steep` development gem add `rake steep` to type-check `lib/` against the
|
|
22
|
+
signatures. `check.yaml` runs both `rake rbs` and `rake steep`, on `main` and on `release/**`
|
|
23
|
+
PRs, which previously ran no workflow at all.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
* `Mouse.position`, `Mouse.set_position` and `Touch.position` dispatch to the
|
|
27
|
+
`*RenderWindow` or `*WindowBase` CSFML entry point depending on whether the argument is a
|
|
28
|
+
Window/RenderWindow or a WindowBase, instead of passing an `sfRenderWindow*` where an
|
|
29
|
+
`sfWindowBase*` is expected.
|
|
30
|
+
* **RBS constructors use `def initialize`.** Every `def self.new` became
|
|
31
|
+
`def initialize: (…) -> void`, the form RubyMine links to `Foo.new` and Steep checks, and which
|
|
32
|
+
matches the C extension, where every constructor is an `initialize`.
|
|
33
|
+
|
|
9
34
|
## [0.3.0] - 2026-09-19
|
|
10
35
|
|
|
11
36
|
### Added
|
data/README.md
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
Ruby bindings for [SFML 3](https://www.sfml-dev.org/), via its C API, [CSFML](https://github.com/SFML/CSFML).
|
|
4
4
|
|
|
5
5
|
[](https://www.ruby-lang.org/)
|
|
6
|
-
[](https://img.shields.io/github/actions/workflow/status/algaves/sfml3.rb/test.yaml?style=flat-square)
|
|
7
|
+
[](https://img.shields.io/github/actions/workflow/status/algaves/sfml3.rb/check.yaml?style=flat-square)
|
|
8
|
+
[](https://algaves.github.io/sfml3.rb/)
|
|
8
9
|
[](https://rubygems.org/gems/sfml3-rb)
|
|
9
10
|
[](https://rubygems.org/gems/sfml3-rb)
|
|
10
11
|
[](LICENSE.md)
|
|
11
12
|
|
|
12
|
-
Latest release: **0.3.
|
|
13
|
+
Latest release: **0.3.1**, bound against **CSFML 3**.
|
|
13
14
|
|
|
14
15
|
## Features
|
|
15
16
|
|
|
@@ -20,10 +21,11 @@ Latest release: **0.3.0**, bound against **CSFML 3**.
|
|
|
20
21
|
* **A source fallback everywhere else**, which downloads and builds the pinned, checksum-verified
|
|
21
22
|
dependencies at install time, so the gem works on macOS, ARM and the BSDs out of the box.
|
|
22
23
|
* **Complete API documentation and types**: every class, module, method and constant is documented
|
|
23
|
-
on [
|
|
24
|
+
on the [docs site](https://algaves.github.io/sfml3.rb/) and covered by RBS signatures shipped in
|
|
24
25
|
the gem.
|
|
25
|
-
* **A close fit to SFML's own model**: classes mirror the C++ types (
|
|
26
|
-
Sound, ...) minus the parts that only exist in C++, like
|
|
26
|
+
* **A close fit to SFML's own model**: classes mirror the C++ types (WindowBase, Window,
|
|
27
|
+
RenderWindow, Texture, Sprite, Sound, ...) minus the parts that only exist in C++, like
|
|
28
|
+
`std::string` and exceptions.
|
|
27
29
|
|
|
28
30
|
## Table of Contents
|
|
29
31
|
|
|
@@ -124,13 +126,30 @@ part of the test suite.
|
|
|
124
126
|
|
|
125
127
|
## Documentation
|
|
126
128
|
|
|
127
|
-
* [API reference](https://
|
|
128
|
-
built from the YARD comments in `ext/**/*.c
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
* [API reference](https://algaves.github.io/sfml3.rb/) — every class, module, method and constant,
|
|
130
|
+
built from the YARD comments in `ext/**/*.c` and deployed to GitHub Pages by CI. The same docs
|
|
131
|
+
are also generated on [RubyDoc.info](https://rubydoc.info/gems/sfml3-rb).
|
|
132
|
+
* RBS type signatures (`sig/**/*.rbs`) describe the whole API, including the native classes, for
|
|
133
|
+
RBS-aware editors. `rake rbs` validates the signatures and `rake steep` type-checks `lib/`
|
|
134
|
+
against them.
|
|
131
135
|
* [CHANGELOG.md](CHANGELOG.md) — what changed in each release.
|
|
132
136
|
* [TODO.md](TODO.md) — module-by-module porting coverage and what is deliberately unbound.
|
|
133
137
|
|
|
138
|
+
### IDE setup (RubyMine)
|
|
139
|
+
|
|
140
|
+
`sig/**/*.rbs` is the only machine-readable description of the API: the native extension cannot be
|
|
141
|
+
introspected, so an editor either reads the signatures or sees nothing. RBS support lives in
|
|
142
|
+
**RubyMine** (and IntelliJ IDEA Ultimate with the Ruby plugin); CLion and other C/C++ IDEs show
|
|
143
|
+
`.rbs` files as plain text.
|
|
144
|
+
|
|
145
|
+
1. Open the project in RubyMine and point **Settings → Languages & Frameworks → Ruby SDK** at the
|
|
146
|
+
interpreter you build against (Ruby 3.1+). Keep the C sources in CLion/clangd.
|
|
147
|
+
2. Run `bundle install` so the `rbs` gem (3.2+) is available to that interpreter.
|
|
148
|
+
3. RubyMine indexes `sig/` automatically; completion, type info (`Ctrl+Shift+P`), parameter info
|
|
149
|
+
and *Navigate → Type Signature* then work for `Window.new` and the rest of the API.
|
|
150
|
+
4. For a full type check, run `steep check` from *Run anything* (`Ctrl` twice); `Steepfile` points
|
|
151
|
+
it at `lib/` and `sig/`.
|
|
152
|
+
|
|
134
153
|
## Development
|
|
135
154
|
|
|
136
155
|
```sh
|
|
@@ -140,6 +159,7 @@ rake test # compile, then run the test suite
|
|
|
140
159
|
rake gem # build the source gem into pkg/
|
|
141
160
|
rake yard # build API docs into doc/
|
|
142
161
|
rake rbs # validate sig/**/*.rbs
|
|
162
|
+
rake steep # type-check lib/ against sig/**/*.rbs
|
|
143
163
|
```
|
|
144
164
|
|
|
145
165
|
`rake githooks:install` points your checkout at the committed `.githooks/` pre-commit hook, which
|
|
@@ -155,9 +175,12 @@ side by side: `core/` (CSFML umbrella header, macros, exceptions, UTF-32 convers
|
|
|
155
175
|
devices), `graphics/` (shapes, Color, Transform, View, Texture, Text, Shader, the render targets),
|
|
156
176
|
`audio/` and `network/`. Includes are subsystem-relative, e.g. `#include "graphics/circle.h"`.
|
|
157
177
|
|
|
158
|
-
|
|
159
|
-
a different macro prefix: `audio/sound_source.inc` (Sound, Music, SoundStream)
|
|
160
|
-
`graphics/render_target.inc` (Window,
|
|
178
|
+
Three `.inc` files hold method bodies shared by several classes and are included once per class
|
|
179
|
+
with a different macro prefix: `audio/sound_source.inc` (Sound, Music, SoundStream),
|
|
180
|
+
`window/window_base.inc` (WindowBase, Window) and `graphics/render_target.inc` (Window,
|
|
181
|
+
RenderTexture). `SFML::RenderWindow < SFML::Window < SFML::WindowBase` and includes the
|
|
182
|
+
`SFML::RenderTarget` module, so a drawable's `#draw` accepts a `RenderWindow` or a
|
|
183
|
+
`RenderTexture` directly; `SFML::Target` remains as the legacy generic wrapper.
|
|
161
184
|
|
|
162
185
|
Note that mkmf flattens object files to their basenames, so every `.c` filename has to stay
|
|
163
186
|
unique across the whole tree — and that `$srcs` is baked into the generated Makefile, so after
|
data/TODO.md
CHANGED
|
@@ -51,9 +51,14 @@ Base module: time, vectors, clocks, streams.
|
|
|
51
51
|
|
|
52
52
|
OpenGL-based windows, events, input handling.
|
|
53
53
|
|
|
54
|
-
- [x] **
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
- [x] **WindowBase** — `SFML::WindowBase` (`ext/window/window_base.c`); wraps `sfWindowBase`, an OS
|
|
55
|
+
window and event queue with no OpenGL context. The methods shared with `Window` are generated
|
|
56
|
+
from `ext/window/window_base.inc`.
|
|
57
|
+
- [x] **Window** — `SFML::Window` (`ext/window/window.c`); wraps `sfRenderWindow` and derives from
|
|
58
|
+
`WindowBase`, overriding every base method with the matching `sfRenderWindow_*` entry point.
|
|
59
|
+
Accepts style, state and `ContextSettings`; exposes min/max size, icon, cursor, native handle,
|
|
60
|
+
settings, display, and the render-target surface. Deliberately still renderable, so existing
|
|
61
|
+
`Window.new(...).clear` code keeps working.
|
|
57
62
|
- [x] **VideoMode** — `SFML::VideoMode` (`ext/window/video_mode.c`); includes `desktop_mode` and
|
|
58
63
|
`fullscreen_modes`
|
|
59
64
|
- [x] **Event** — `SFML::Event` (`ext/window/event.c`, `ext/window/event_name.c`); every payload is
|
|
@@ -87,13 +92,16 @@ OpenGL-based windows, events, input handling.
|
|
|
87
92
|
- [x] **Drawable** — `SFML::Drawable` mixin (`ext/graphics/drawable.c`)
|
|
88
93
|
- [x] **RenderStates** — `SFML::RenderState` (`ext/graphics/render_state.c`); blend mode, stencil
|
|
89
94
|
mode, coordinate type, texture, shader and transform are all settable
|
|
90
|
-
- [x] **RenderTarget** — `SFML::
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
- [x] **RenderTarget** — `SFML::RenderTarget` module (`ext/graphics/target.c`), included by
|
|
96
|
+
`RenderWindow` and `RenderTexture`, so a drawable's `#draw` accepts either directly. The
|
|
97
|
+
methods — `map_pixel_to_coords`, `map_coords_to_pixel`, `push_gl_states`, `pop_gl_states`,
|
|
93
98
|
`reset_gl_states`, `draw_primitives`, `draw_vertex_buffer_range`, `clear_stencil`,
|
|
94
99
|
`clear_color_and_stencil`, `viewport`, `scissor`, `srgb?` — are generated once for both
|
|
95
|
-
`Window` and `RenderTexture` from `ext/graphics/render_target.inc`
|
|
96
|
-
|
|
100
|
+
`Window` and `RenderTexture` from `ext/graphics/render_target.inc`. `SFML::Target` remains
|
|
101
|
+
as the legacy runtime-dispatch wrapper for `Drawable#draw`.
|
|
102
|
+
- [x] **RenderWindow** — `SFML::RenderWindow` (`ext/graphics/render_window.c`); derives from
|
|
103
|
+
`Window` and includes `RenderTarget`. Creation, events and the window surface come from
|
|
104
|
+
`Window` / `WindowBase`.
|
|
97
105
|
- [x] **RenderTexture** — `SFML::RenderTexture` (`ext/graphics/render_texture.c`)
|
|
98
106
|
- [x] **View** — `SFML::View` (`ext/graphics/view.c`); including `View.from_rect` and
|
|
99
107
|
`scissor`/`scissor=`
|
|
@@ -179,9 +187,8 @@ without re-deriving the reasoning each time.
|
|
|
179
187
|
|
|
180
188
|
| Symbols | Why |
|
|
181
189
|
| --- | --- |
|
|
182
|
-
| `sfWindow_
|
|
183
|
-
| `
|
|
184
|
-
| `sfRenderWindow_create`, `sfText_getString`/`setString`, `sfRenderWindow_setTitle`, `sfFtpDirectoryResponse_getDirectory` | Superseded by their `*Unicode` counterparts; the narrow forms decode through the C locale and mangle non-ASCII. |
|
|
190
|
+
| `sfWindow_*` (~26 functions) | A plain `sfWindow` (an OpenGL context with no render-target surface); `SFML::Window` wraps `sfRenderWindow` and `SFML::WindowBase` wraps `sfWindowBase`. |
|
|
191
|
+
| `sfRenderWindow_create`, `sfWindowBase_create`, `sfText_getString`/`setString`, `sfRenderWindow_setTitle`, `sfWindowBase_setTitle`, `sfFtpDirectoryResponse_getDirectory` | Superseded by their `*Unicode` counterparts; the narrow forms decode through the C locale and mangle non-ASCII. |
|
|
185
192
|
| `sfColor_add`/`subtract`/`modulate`/`fromRGB`/`fromRGBA`/`fromInteger`/`toInteger`, `sfIntRect_contains`/`intersects` | Reimplemented directly in C in `color.c` / `rect.c`; the Ruby methods exist. |
|
|
186
193
|
| `sfSprite_getTexture`, `sfText_getFont`, `sf*Shape_getTexture` | The Ruby getters return the cached wrapper object. CSFML returns a non-owning pointer, so re-wrapping it would hand Ruby an object it must not free. |
|
|
187
194
|
| `sfShape_getPoint`, `sfShape_getPointCount` | `SFML::Shape` reads these from the Ruby subclass, which is where they are defined. |
|
data/lib/sfml/3.1/sfml_ext.so
CHANGED
|
Binary file
|
data/lib/sfml/3.2/sfml_ext.so
CHANGED
|
Binary file
|
data/lib/sfml/3.3/sfml_ext.so
CHANGED
|
Binary file
|
data/lib/sfml/3.4/sfml_ext.so
CHANGED
|
Binary file
|
data/lib/sfml/4.0/sfml_ext.so
CHANGED
|
Binary file
|
data/lib/sfml/version.rb
CHANGED
data/sig/audio/sound.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class SoundSourceCone
|
|
3
|
-
def
|
|
3
|
+
def initialize: (Float inner_angle, Float outer_angle, Float outer_gain) -> void
|
|
4
4
|
|
|
5
5
|
def inner_angle: () -> Float
|
|
6
6
|
def inner_angle=: (Float value) -> Float
|
data/sig/audio/sound_stream.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class SoundStream
|
|
3
|
-
def
|
|
3
|
+
def initialize: (Integer channel_count, Integer sample_rate, ?Array[Symbol] channel_map) -> void
|
|
4
4
|
|
|
5
5
|
def channel_count: () -> Integer
|
|
6
6
|
def sample_rate: () -> Integer
|
data/sig/graphics/blend_mode.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class BlendMode
|
|
3
|
-
def
|
|
3
|
+
def initialize: () -> void
|
|
4
4
|
| (Symbol | Integer color_src_factor, Symbol | Integer color_dst_factor,
|
|
5
5
|
Symbol | Integer color_equation, Symbol | Integer alpha_src_factor,
|
|
6
6
|
Symbol | Integer alpha_dst_factor, Symbol | Integer alpha_equation) -> BlendMode
|
data/sig/graphics/circle.rbs
CHANGED
data/sig/graphics/color.rbs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class Color
|
|
3
|
-
def
|
|
4
|
-
| (Integer r, Integer g, Integer b, ?Integer a) ->
|
|
5
|
-
| (Array[Integer] rgb_or_rgba) ->
|
|
6
|
-
| (Integer packed) ->
|
|
7
|
-
| (Color other) ->
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Integer r, Integer g, Integer b, ?Integer a) -> void
|
|
5
|
+
| (Array[Integer] rgb_or_rgba) -> void
|
|
6
|
+
| (Integer packed) -> void
|
|
7
|
+
| (Color other) -> void
|
|
8
8
|
def self.from_rgb: (Integer rgb) -> Color
|
|
9
9
|
def self.from_rgba: (Integer rgba) -> Color
|
|
10
10
|
def self.from_integer: (Integer rgba) -> Color
|
data/sig/graphics/image.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class Image
|
|
3
|
-
def
|
|
3
|
+
def initialize: (Vector2 | Array[Integer] size) -> void
|
|
4
4
|
def self.from_color: (Vector2 | Array[Integer] size, Color color) -> Image
|
|
5
5
|
def self.from_pixels: (Vector2 | Array[Integer] size, String pixels) -> Image
|
|
6
6
|
def self.from_file: (String path) -> Image
|
data/sig/graphics/polygon.rbs
CHANGED
data/sig/graphics/rect.rbs
CHANGED
|
@@ -2,11 +2,11 @@ module SFML
|
|
|
2
2
|
class Rect
|
|
3
3
|
include Enumerable[Float]
|
|
4
4
|
|
|
5
|
-
def
|
|
6
|
-
| (Float left, Float top) ->
|
|
7
|
-
| (Float left, Float top, Float width, Float height) ->
|
|
8
|
-
| (Array[Float] left_top_width_height) ->
|
|
9
|
-
| (Rect other) ->
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
| (Float left, Float top) -> void
|
|
7
|
+
| (Float left, Float top, Float width, Float height) -> void
|
|
8
|
+
| (Array[Float] left_top_width_height) -> void
|
|
9
|
+
| (Rect other) -> void
|
|
10
10
|
|
|
11
11
|
def left: () -> Float
|
|
12
12
|
def left=: (Float value) -> Float
|
data/sig/graphics/rectangle.rbs
CHANGED
|
@@ -2,7 +2,7 @@ module SFML
|
|
|
2
2
|
class RectangleShape
|
|
3
3
|
include Drawable
|
|
4
4
|
|
|
5
|
-
def
|
|
5
|
+
def initialize: (?(Vector2 | Array[Float]) size) -> void
|
|
6
6
|
|
|
7
7
|
def copy: () -> RectangleShape
|
|
8
8
|
def move: (Vector2 | Array[Float] offset) -> self
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class RenderState
|
|
3
|
-
def
|
|
4
|
-
| (Array[Array[Float]] | Array[Float] matrix) ->
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Array[Array[Float]] | Array[Float] matrix) -> void
|
|
5
5
|
|
|
6
6
|
def transform: () -> Array[untyped]
|
|
7
7
|
def transform=: (Array[Array[Float]] | Array[Float] matrix) -> self
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
# Included by RenderWindow and RenderTexture. The method bodies are generated
|
|
3
|
+
# per class from ext/graphics/render_target.inc.
|
|
4
|
+
module RenderTarget
|
|
5
|
+
def srgb?: () -> bool
|
|
6
|
+
def clear_stencil: (Integer value) -> self
|
|
7
|
+
def clear_color_and_stencil: (untyped color, Integer stencil) -> self
|
|
8
|
+
def viewport: (?untyped view) -> untyped
|
|
9
|
+
def scissor: (?untyped view) -> untyped
|
|
10
|
+
def map_pixel_to_coords: (untyped point, ?untyped view) -> untyped
|
|
11
|
+
def map_coords_to_pixel: (untyped point, ?untyped view) -> untyped
|
|
12
|
+
def push_gl_states: () -> self
|
|
13
|
+
def pop_gl_states: () -> self
|
|
14
|
+
def reset_gl_states: () -> self
|
|
15
|
+
def draw_primitives: (untyped vertices, untyped primitive, ?untyped state) -> self
|
|
16
|
+
def draw_vertex_buffer_range: (untyped buffer, Integer first, Integer count, ?untyped state) -> self
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class RenderTexture
|
|
3
|
-
|
|
3
|
+
include RenderTarget
|
|
4
|
+
|
|
5
|
+
def initialize: (Vector2 size, ?untyped settings) -> void
|
|
4
6
|
def self.maximum_antialiasing_level: () -> Integer
|
|
5
7
|
|
|
6
8
|
def size: () -> Vector2
|
|
@@ -20,7 +22,7 @@ module SFML
|
|
|
20
22
|
|
|
21
23
|
def draw: (untyped drawable, ?untyped state) -> self
|
|
22
24
|
|
|
23
|
-
# Shared with
|
|
25
|
+
# Shared with RenderWindow via render_target.inc -- see ext/graphics/render_target.inc
|
|
24
26
|
def srgb?: () -> bool
|
|
25
27
|
def clear_stencil: (Integer value) -> self
|
|
26
28
|
def clear_color_and_stencil: (untyped color, Integer stencil) -> self
|
data/sig/graphics/shape.rbs
CHANGED
data/sig/graphics/sprite.rbs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class StencilMode
|
|
3
|
-
def
|
|
4
|
-
| (Symbol | Integer comparison, Symbol | Integer update_operation, Integer reference, Integer mask, bool stencil_only) ->
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Symbol | Integer comparison, Symbol | Integer update_operation, Integer reference, Integer mask, bool stencil_only) -> void
|
|
5
5
|
|
|
6
6
|
def comparison: () -> Symbol
|
|
7
7
|
def comparison=: (Symbol | Integer value) -> (Symbol | Integer)
|
data/sig/graphics/target.rbs
CHANGED
data/sig/graphics/text.rbs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class Text
|
|
3
|
-
def
|
|
4
|
-
| (untyped font) ->
|
|
5
|
-
| (untyped font, String string) ->
|
|
6
|
-
| (untyped font, String string, Integer character_size) ->
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (untyped font) -> void
|
|
5
|
+
| (untyped font, String string) -> void
|
|
6
|
+
| (untyped font, String string, Integer character_size) -> void
|
|
7
7
|
|
|
8
8
|
def copy: () -> Text
|
|
9
9
|
def font: () -> untyped
|
data/sig/graphics/texture.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class Texture
|
|
3
|
-
def
|
|
3
|
+
def initialize: (Vector2 size) -> void
|
|
4
4
|
def self.srgb: (Vector2 size) -> Texture
|
|
5
5
|
def self.from_file: (String path, ?untyped area) -> Texture
|
|
6
6
|
def self.srgb_from_file: (String path, ?untyped area) -> Texture
|
data/sig/graphics/vertex.rbs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class Vertex
|
|
3
|
-
def
|
|
4
|
-
| (Vector2 position) ->
|
|
5
|
-
| (Vector2 position, untyped color) ->
|
|
6
|
-
| (Vector2 position, untyped color, Vector2 tex_coords) ->
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Vector2 position) -> void
|
|
5
|
+
| (Vector2 position, untyped color) -> void
|
|
6
|
+
| (Vector2 position, untyped color, Vector2 tex_coords) -> void
|
|
7
7
|
|
|
8
8
|
def position: () -> Vector2
|
|
9
9
|
def position=: (Vector2 value) -> Vector2
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class VertexBuffer
|
|
3
|
-
def
|
|
4
|
-
| (Integer count) ->
|
|
5
|
-
| (Integer count, Symbol primitive) ->
|
|
6
|
-
| (Integer count, Symbol primitive, Symbol usage) ->
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Integer count) -> void
|
|
5
|
+
| (Integer count, Symbol primitive) -> void
|
|
6
|
+
| (Integer count, Symbol primitive, Symbol usage) -> void
|
|
7
7
|
def self.available?: () -> bool
|
|
8
8
|
|
|
9
9
|
def copy: () -> VertexBuffer
|
data/sig/graphics/view.rbs
CHANGED
data/sig/network/ftp.rbs
CHANGED
data/sig/network/http.rbs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class Http
|
|
3
|
-
def
|
|
3
|
+
def initialize: () -> void
|
|
4
4
|
|
|
5
5
|
def set_host: (String host, ?Integer port) -> self
|
|
6
6
|
def send_request: (HttpRequest request, ?Time timeout) -> HttpResponse
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
class HttpRequest
|
|
10
|
-
def
|
|
10
|
+
def initialize: () -> void
|
|
11
11
|
|
|
12
12
|
def set_field: (String field, String value) -> String
|
|
13
13
|
def method=: (Symbol | Integer value) -> (Symbol | Integer)
|
data/sig/network/ip_address.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class IpAddress
|
|
3
|
-
def
|
|
3
|
+
def initialize: (Integer | String | IpAddress address) -> void
|
|
4
4
|
def self.from_string: (String address) -> IpAddress
|
|
5
5
|
def self.from_bytes: (Integer byte0, Integer byte1, Integer byte2, Integer byte3) -> IpAddress
|
|
6
6
|
def self.from_integer: (Integer value) -> IpAddress
|
data/sig/network/packet.rbs
CHANGED
data/sig/network/tcp_socket.rbs
CHANGED
data/sig/network/udp_socket.rbs
CHANGED
data/sig/system/buffer.rbs
CHANGED
data/sig/system/clock.rbs
CHANGED
data/sig/system/input_stream.rbs
CHANGED
data/sig/system/time.rbs
CHANGED
|
@@ -2,10 +2,10 @@ module SFML
|
|
|
2
2
|
class Time
|
|
3
3
|
include Comparable
|
|
4
4
|
|
|
5
|
-
def
|
|
6
|
-
| (Float seconds) ->
|
|
7
|
-
| (Integer microseconds) ->
|
|
8
|
-
| (Time other) ->
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
| (Float seconds) -> void
|
|
7
|
+
| (Integer microseconds) -> void
|
|
8
|
+
| (Time other) -> void
|
|
9
9
|
def self.seconds: (Float value) -> Time
|
|
10
10
|
def self.milliseconds: (Integer value) -> Time
|
|
11
11
|
def self.microseconds: (Integer value) -> Time
|
data/sig/system/vec2.rbs
CHANGED
|
@@ -2,10 +2,10 @@ module SFML
|
|
|
2
2
|
class Vector2
|
|
3
3
|
include Enumerable[Float]
|
|
4
4
|
|
|
5
|
-
def
|
|
6
|
-
| (Float x, Float y) ->
|
|
7
|
-
| (Array[Float] xy) ->
|
|
8
|
-
| (Vector2 other) ->
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
| (Float x, Float y) -> void
|
|
7
|
+
| (Array[Float] xy) -> void
|
|
8
|
+
| (Vector2 other) -> void
|
|
9
9
|
|
|
10
10
|
def x: () -> Float
|
|
11
11
|
def x=: (Float value) -> Float
|
data/sig/system/vec3.rbs
CHANGED
|
@@ -2,10 +2,10 @@ module SFML
|
|
|
2
2
|
class Vector3
|
|
3
3
|
include Enumerable[Float]
|
|
4
4
|
|
|
5
|
-
def
|
|
6
|
-
| (Float x, Float y, Float z) ->
|
|
7
|
-
| (Array[Float] xyz) ->
|
|
8
|
-
| (Vector3 other) ->
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
| (Float x, Float y, Float z) -> void
|
|
7
|
+
| (Array[Float] xyz) -> void
|
|
8
|
+
| (Vector3 other) -> void
|
|
9
9
|
|
|
10
10
|
def x: () -> Float
|
|
11
11
|
def x=: (Float value) -> Float
|
data/sig/window/context.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class ContextSettings
|
|
3
|
-
def
|
|
3
|
+
def initialize: (?Integer depth_bits, ?Integer stencil_bits, ?Integer antialiasing_level, ?Integer major_version, ?Integer minor_version, ?(Symbol | Array[Symbol] | Integer) flags, ?bool srgb_capable) -> void
|
|
4
4
|
|
|
5
5
|
def depth_bits: () -> Integer
|
|
6
6
|
def depth_bits=: (Integer value) -> Integer
|
data/sig/window/event.rbs
CHANGED
data/sig/window/mouse.rbs
CHANGED
|
@@ -2,8 +2,8 @@ module SFML
|
|
|
2
2
|
module Mouse
|
|
3
3
|
def self.button_pressed?: (Symbol | Integer button) -> bool
|
|
4
4
|
def self.pressed?: (Symbol | Integer button) -> bool
|
|
5
|
-
def self.position: (?
|
|
6
|
-
def self.set_position: (Vector2 | Array[Float] position, ?
|
|
5
|
+
def self.position: (?WindowBase? window) -> Vector2
|
|
6
|
+
def self.set_position: (Vector2 | Array[Float] position, ?WindowBase? window) -> Vector2
|
|
7
7
|
def self.position=: (Vector2 | Array[Float] value) -> Vector2
|
|
8
8
|
end
|
|
9
9
|
end
|
data/sig/window/touch.rbs
CHANGED
data/sig/window/video_mode.rbs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
module SFML
|
|
2
2
|
class VideoMode
|
|
3
|
-
def
|
|
3
|
+
def initialize: (Integer width, Integer height, Integer bits_per_pixel) -> void
|
|
4
4
|
def self.desktop_mode: () -> VideoMode
|
|
5
5
|
def self.fullscreen_modes: () -> Array[VideoMode]
|
|
6
6
|
|
data/sig/window/window.rbs
CHANGED
|
@@ -1,44 +1,21 @@
|
|
|
1
1
|
module SFML
|
|
2
|
-
class Window
|
|
3
|
-
def
|
|
2
|
+
class Window < WindowBase
|
|
3
|
+
def initialize: (VideoMode video_mode, String title, ?Symbol | Array[Symbol] | Integer style, ?Symbol state, ?ContextSettings? settings) -> void
|
|
4
4
|
def self.from_handle: (Integer handle, ?ContextSettings? settings) -> Window
|
|
5
5
|
|
|
6
|
-
def is_open?: () -> bool
|
|
7
|
-
def close!: () -> self
|
|
8
6
|
def clear: (?untyped color) -> self
|
|
9
7
|
def display: () -> self
|
|
10
|
-
def poll_event!: (Event event) -> bool
|
|
11
|
-
def wait_event!: (Event event) -> bool
|
|
12
8
|
|
|
13
9
|
def frame_rate=: (Integer value) -> self
|
|
14
10
|
def framerate_limit=: (Integer value) -> self
|
|
15
|
-
def size=: (Vector2 | Array[Float] value) -> self
|
|
16
|
-
def minimum_size=: (Vector2 | Array[Float] value) -> (Vector2 | Array[Float])
|
|
17
|
-
def maximum_size=: (Vector2 | Array[Float] value) -> (Vector2 | Array[Float])
|
|
18
|
-
def title=: (String value) -> self
|
|
19
|
-
def set_icon: (Vector2 | Array[Float] size, String pixels) -> String
|
|
20
|
-
def visible=: (bool value) -> self
|
|
21
11
|
def active=: (bool value) -> bool
|
|
22
12
|
def vertical_sync_enabled=: (bool value) -> self
|
|
23
|
-
def cursor_visible=: (bool value) -> self
|
|
24
|
-
def cursor_grabbed=: (bool value) -> self
|
|
25
|
-
def mouse_cursor=: (Cursor? value) -> Cursor?
|
|
26
|
-
def cursor=: (Cursor? value) -> Cursor?
|
|
27
|
-
def key_repeat_enabled=: (bool value) -> self
|
|
28
|
-
def joystick_threshold=: (Float value) -> Float
|
|
29
|
-
def position=: (Vector2 | Array[Float] value) -> (Vector2 | Array[Float])
|
|
30
13
|
def view=: (untyped value) -> self
|
|
31
14
|
|
|
32
|
-
def request_focus: () -> self
|
|
33
|
-
def focus?: () -> bool
|
|
34
15
|
def draw: (untyped drawable, ?untyped state) -> self
|
|
35
|
-
def position: () -> Vector2
|
|
36
|
-
def size: () -> Vector2
|
|
37
16
|
def view: () -> untyped
|
|
38
17
|
def default_view: () -> untyped
|
|
39
18
|
def settings: () -> ContextSettings
|
|
40
|
-
def native_handle: () -> Integer
|
|
41
|
-
def create_vulkan_surface: (Integer instance, ?Integer? allocator) -> Integer?
|
|
42
19
|
|
|
43
20
|
# Shared with RenderTexture, via ext/graphics/render_target.inc.
|
|
44
21
|
def srgb?: () -> bool
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class WindowBase
|
|
3
|
+
def initialize: (VideoMode video_mode, String title, ?Symbol | Array[Symbol] | Integer style, ?Symbol state) -> void
|
|
4
|
+
def self.from_handle: (Integer handle) -> WindowBase
|
|
5
|
+
|
|
6
|
+
def is_open?: () -> bool
|
|
7
|
+
def close!: () -> self
|
|
8
|
+
def poll_event!: (Event event) -> bool
|
|
9
|
+
def wait_event!: (Event event) -> bool
|
|
10
|
+
|
|
11
|
+
def position: () -> Vector2
|
|
12
|
+
def size: () -> Vector2
|
|
13
|
+
def focus?: () -> bool
|
|
14
|
+
def native_handle: () -> Integer
|
|
15
|
+
|
|
16
|
+
def position=: (Vector2 | Array[Float] value) -> (Vector2 | Array[Float])
|
|
17
|
+
def size=: (Vector2 | Array[Float] value) -> self
|
|
18
|
+
def minimum_size=: (Vector2 | Array[Float] value) -> (Vector2 | Array[Float])
|
|
19
|
+
def maximum_size=: (Vector2 | Array[Float] value) -> (Vector2 | Array[Float])
|
|
20
|
+
def title=: (String value) -> self
|
|
21
|
+
def set_icon: (Vector2 | Array[Float] size, String pixels) -> String
|
|
22
|
+
def visible=: (bool value) -> self
|
|
23
|
+
def cursor_visible=: (bool value) -> self
|
|
24
|
+
def cursor_grabbed=: (bool value) -> self
|
|
25
|
+
def mouse_cursor=: (Cursor? value) -> Cursor?
|
|
26
|
+
def cursor=: (Cursor? value) -> Cursor?
|
|
27
|
+
def key_repeat_enabled=: (bool value) -> self
|
|
28
|
+
def joystick_threshold=: (Float value) -> Float
|
|
29
|
+
|
|
30
|
+
def request_focus: () -> self
|
|
31
|
+
def create_vulkan_surface: (Integer instance, ?Integer? allocator) -> Integer?
|
|
32
|
+
end
|
|
33
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sfml3-rb
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: arm-linux-gnu
|
|
6
6
|
authors:
|
|
7
7
|
- Algaves
|
|
@@ -54,7 +54,9 @@ files:
|
|
|
54
54
|
- sig/graphics/rect.rbs
|
|
55
55
|
- sig/graphics/rectangle.rbs
|
|
56
56
|
- sig/graphics/render_state.rbs
|
|
57
|
+
- sig/graphics/render_target.rbs
|
|
57
58
|
- sig/graphics/render_texture.rbs
|
|
59
|
+
- sig/graphics/render_window.rbs
|
|
58
60
|
- sig/graphics/shader.rbs
|
|
59
61
|
- sig/graphics/shape.rbs
|
|
60
62
|
- sig/graphics/sprite.rbs
|
|
@@ -77,6 +79,7 @@ files:
|
|
|
77
79
|
- sig/network/tcp_listener.rbs
|
|
78
80
|
- sig/network/tcp_socket.rbs
|
|
79
81
|
- sig/network/udp_socket.rbs
|
|
82
|
+
- sig/sfml/version.rbs
|
|
80
83
|
- sig/system/buffer.rbs
|
|
81
84
|
- sig/system/clock.rbs
|
|
82
85
|
- sig/system/input_stream.rbs
|
|
@@ -97,6 +100,7 @@ files:
|
|
|
97
100
|
- sig/window/video_mode.rbs
|
|
98
101
|
- sig/window/vulkan.rbs
|
|
99
102
|
- sig/window/window.rbs
|
|
103
|
+
- sig/window/window_base.rbs
|
|
100
104
|
homepage: https://github.com/algaves/sfml3.rb
|
|
101
105
|
licenses:
|
|
102
106
|
- 0BSD
|
|
@@ -104,7 +108,7 @@ metadata:
|
|
|
104
108
|
source_code_uri: https://github.com/algaves/sfml3.rb
|
|
105
109
|
bug_tracker_uri: https://github.com/algaves/sfml3.rb/issues
|
|
106
110
|
changelog_uri: https://github.com/algaves/sfml3.rb/blob/main/CHANGELOG.md
|
|
107
|
-
documentation_uri: https://
|
|
111
|
+
documentation_uri: https://algaves.github.io/sfml3.rb/
|
|
108
112
|
rubygems_mfa_required: 'true'
|
|
109
113
|
rdoc_options:
|
|
110
114
|
- "--main"
|