sfml3-rb 0.2.2-x86-linux-gnu → 0.3.1-x86-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/.yardopts +9 -0
- data/CHANGELOG.md +67 -16
- data/README.md +123 -32
- 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/audio_enums.rbs +30 -0
- data/sig/audio/listener.rbs +16 -0
- data/sig/audio/music.rbs +56 -0
- data/sig/audio/sound.rbs +51 -0
- data/sig/audio/sound_buffer.rbs +17 -0
- data/sig/audio/sound_buffer_recorder.rbs +14 -0
- data/sig/audio/sound_recorder.rbs +17 -0
- data/sig/audio/sound_source_cone.rbs +14 -0
- data/sig/audio/sound_stream.rbs +51 -0
- data/sig/graphics/blend_mode.rbs +29 -0
- data/sig/graphics/circle.rbs +44 -0
- data/sig/graphics/color.rbs +39 -0
- data/sig/graphics/drawable.rbs +5 -0
- data/sig/graphics/font.rbs +20 -0
- data/sig/graphics/glyph.rbs +7 -0
- data/sig/graphics/image.rbs +22 -0
- data/sig/graphics/polygon.rbs +42 -0
- data/sig/graphics/rect.rbs +33 -0
- data/sig/graphics/rectangle.rbs +42 -0
- data/sig/graphics/render_state.rbs +21 -0
- data/sig/graphics/render_target.rbs +18 -0
- data/sig/graphics/render_texture.rbs +39 -0
- data/sig/graphics/render_window.rbs +7 -0
- data/sig/graphics/shader.rbs +39 -0
- data/sig/graphics/shape.rbs +38 -0
- data/sig/graphics/sprite.rbs +34 -0
- data/sig/graphics/stencil_mode.rbs +18 -0
- data/sig/graphics/target.rbs +8 -0
- data/sig/graphics/text.rbs +48 -0
- data/sig/graphics/texture.rbs +34 -0
- data/sig/graphics/transform.rbs +37 -0
- data/sig/graphics/transformable.rbs +25 -0
- data/sig/graphics/vertex.rbs +17 -0
- data/sig/graphics/vertex_array.rbs +17 -0
- data/sig/graphics/vertex_buffer.rbs +22 -0
- data/sig/graphics/view.rbs +23 -0
- data/sig/network/ftp.rbs +46 -0
- data/sig/network/http.rbs +27 -0
- data/sig/network/ip_address.rbs +22 -0
- data/sig/network/network_enums.rbs +95 -0
- data/sig/network/packet.rbs +40 -0
- data/sig/network/socket_selector.rbs +14 -0
- data/sig/network/tcp_listener.rbs +13 -0
- data/sig/network/tcp_socket.rbs +18 -0
- data/sig/network/udp_socket.rbs +17 -0
- data/sig/sfml/version.rbs +3 -0
- data/sig/system/buffer.rbs +11 -0
- data/sig/system/clock.rbs +13 -0
- data/sig/system/input_stream.rbs +7 -0
- data/sig/system/sleep.rbs +3 -0
- data/sig/system/time.rbs +28 -0
- data/sig/system/vec2.rbs +26 -0
- data/sig/system/vec3.rbs +27 -0
- data/sig/window/clipboard.rbs +8 -0
- data/sig/window/context.rbs +11 -0
- data/sig/window/context_settings.rbs +20 -0
- data/sig/window/cursor.rbs +6 -0
- data/sig/window/event.rbs +20 -0
- data/sig/window/joystick.rbs +15 -0
- data/sig/window/keyboard.rbs +10 -0
- data/sig/window/mouse.rbs +9 -0
- data/sig/window/sensor.rbs +8 -0
- data/sig/window/touch.rbs +6 -0
- data/sig/window/video_mode.rbs +16 -0
- data/sig/window/vulkan.rbs +7 -0
- data/sig/window/window.rbs +34 -0
- data/sig/window/window_base.rbs +33 -0
- metadata +70 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Transform
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Array[Float] array_of_9) -> void
|
|
5
|
+
| (Float, Float, Float, Float, Float, Float, Float, Float, Float) -> void
|
|
6
|
+
|
|
7
|
+
def self.identity: () -> Transform
|
|
8
|
+
def self.from_a: (Array[Float] array_of_9) -> Transform
|
|
9
|
+
def self.combine: (Array[Float] array_a, Array[Float] array_b) -> Array[Float]
|
|
10
|
+
def self.inverse: (Array[Float] array) -> Array[Float]
|
|
11
|
+
|
|
12
|
+
def to_a: () -> Array[Float]
|
|
13
|
+
def to_ary: () -> Array[Float]
|
|
14
|
+
def matrix: () -> Array[Float]
|
|
15
|
+
def gl_matrix: () -> Array[Float]
|
|
16
|
+
def ==: (untyped other) -> bool
|
|
17
|
+
def to_s: () -> String
|
|
18
|
+
def inspect: () -> String
|
|
19
|
+
|
|
20
|
+
def copy: () -> Transform
|
|
21
|
+
def inverse: () -> Transform
|
|
22
|
+
def transform_point: (untyped point) -> untyped
|
|
23
|
+
def transform_rect: (untyped rect) -> untyped
|
|
24
|
+
|
|
25
|
+
def *: (Transform | Array[Float] other) -> Transform
|
|
26
|
+
def combine: (Transform | Array[Float] other) -> Transform
|
|
27
|
+
def combine!: (Transform | Array[Float] other) -> self
|
|
28
|
+
def translate: (untyped offset) -> Transform
|
|
29
|
+
def translate!: (untyped offset) -> self
|
|
30
|
+
def rotate: (Float angle, ?untyped center) -> Transform
|
|
31
|
+
def rotate!: (Float angle, ?untyped center) -> self
|
|
32
|
+
def scale: (untyped factors, ?untyped center) -> Transform
|
|
33
|
+
def scale!: (untyped factors, ?untyped center) -> self
|
|
34
|
+
|
|
35
|
+
IDENTITY: Transform
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Transformable
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def position=: (Vector2 value) -> self
|
|
6
|
+
def rotation=: (Float value) -> self
|
|
7
|
+
def scale=: (Vector2 value) -> self
|
|
8
|
+
def origin=: (Vector2 value) -> self
|
|
9
|
+
|
|
10
|
+
def position: () -> Vector2
|
|
11
|
+
def rotation: () -> Float
|
|
12
|
+
def scale: () -> Vector2
|
|
13
|
+
def origin: () -> Vector2
|
|
14
|
+
|
|
15
|
+
def move: (Vector2 offset) -> self
|
|
16
|
+
def rotate: (Float angle) -> self
|
|
17
|
+
def scale!: (Vector2 factors) -> self
|
|
18
|
+
|
|
19
|
+
def transform: () -> Array[Float]
|
|
20
|
+
def matrix: () -> Array[Float]
|
|
21
|
+
def inverse_transform: () -> Array[Float]
|
|
22
|
+
|
|
23
|
+
def copy: () -> Transformable
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Vertex
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Vector2 position) -> void
|
|
5
|
+
| (Vector2 position, untyped color) -> void
|
|
6
|
+
| (Vector2 position, untyped color, Vector2 tex_coords) -> void
|
|
7
|
+
|
|
8
|
+
def position: () -> Vector2
|
|
9
|
+
def position=: (Vector2 value) -> Vector2
|
|
10
|
+
def color: () -> untyped
|
|
11
|
+
def color=: (untyped value) -> untyped
|
|
12
|
+
def tex_coords: () -> Vector2
|
|
13
|
+
def tex_coords=: (Vector2 value) -> Vector2
|
|
14
|
+
def to_a: () -> [Vector2, untyped]
|
|
15
|
+
def ==: (untyped other) -> bool
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class VertexArray
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def copy: () -> VertexArray
|
|
6
|
+
def vertex_count: () -> Integer
|
|
7
|
+
def vertex: (Integer index) -> Vertex
|
|
8
|
+
def set_vertex: (Integer index, Vertex vertex) -> Vertex
|
|
9
|
+
def append: (Vertex vertex) -> self
|
|
10
|
+
def clear!: () -> self
|
|
11
|
+
def resize: (Integer count) -> self
|
|
12
|
+
def primitive: () -> Symbol
|
|
13
|
+
def primitive=: (Symbol value) -> Symbol
|
|
14
|
+
def bounds: () -> untyped
|
|
15
|
+
def draw: (untyped target, untyped state) -> nil
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class VertexBuffer
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
| (Integer count) -> void
|
|
5
|
+
| (Integer count, Symbol primitive) -> void
|
|
6
|
+
| (Integer count, Symbol primitive, Symbol usage) -> void
|
|
7
|
+
def self.available?: () -> bool
|
|
8
|
+
|
|
9
|
+
def copy: () -> VertexBuffer
|
|
10
|
+
def vertex_count: () -> Integer
|
|
11
|
+
def update: (Array[untyped] vertices, ?Integer offset) -> bool
|
|
12
|
+
def update_from: (VertexBuffer other) -> bool
|
|
13
|
+
def swap: (VertexBuffer other) -> self
|
|
14
|
+
def primitive: () -> Symbol
|
|
15
|
+
def primitive=: (Symbol value) -> Symbol
|
|
16
|
+
def usage: () -> Symbol
|
|
17
|
+
def usage=: (Symbol value) -> Symbol
|
|
18
|
+
def native_handle: () -> Integer
|
|
19
|
+
def bind: () -> self
|
|
20
|
+
def draw: (untyped target, untyped state) -> nil
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class View
|
|
3
|
+
def self.from_rect: (untyped rect) -> View
|
|
4
|
+
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
def move: (Vector2 offset) -> self
|
|
7
|
+
def rotate: (Float angle) -> self
|
|
8
|
+
def zoom: (Float factor) -> self
|
|
9
|
+
def copy: () -> View
|
|
10
|
+
|
|
11
|
+
def rotation=: (Float value) -> self
|
|
12
|
+
def size=: (Vector2 value) -> self
|
|
13
|
+
def center=: (Vector2 value) -> self
|
|
14
|
+
def viewport=: (untyped value) -> self
|
|
15
|
+
def scissor=: (untyped value) -> self
|
|
16
|
+
|
|
17
|
+
def rotation: () -> Float
|
|
18
|
+
def size: () -> Vector2
|
|
19
|
+
def center: () -> Vector2
|
|
20
|
+
def viewport: () -> untyped
|
|
21
|
+
def scissor: () -> untyped
|
|
22
|
+
end
|
|
23
|
+
end
|
data/sig/network/ftp.rbs
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Ftp
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def connect: (IpAddress | String | Integer address, ?Integer port, ?Time timeout) -> FtpResponse
|
|
6
|
+
def login_anonymous: () -> FtpResponse
|
|
7
|
+
def login: (String name, String password) -> FtpResponse
|
|
8
|
+
def disconnect: () -> FtpResponse
|
|
9
|
+
def keep_alive: () -> FtpResponse
|
|
10
|
+
def working_directory: () -> FtpDirectoryResponse
|
|
11
|
+
def directory_listing: (?String? directory) -> FtpListingResponse
|
|
12
|
+
def change_directory: (String directory) -> FtpResponse
|
|
13
|
+
def parent_directory: () -> FtpResponse
|
|
14
|
+
def create_directory: (String name) -> FtpResponse
|
|
15
|
+
def delete_directory: (String name) -> FtpResponse
|
|
16
|
+
def rename_file: (String file, String new_name) -> FtpResponse
|
|
17
|
+
def delete_file: (String name) -> FtpResponse
|
|
18
|
+
def download: (String remote_file, String local_path, ?Symbol | Integer mode) -> FtpResponse
|
|
19
|
+
def upload: (String local_file, String remote_path, ?Symbol | Integer mode, ?bool append) -> FtpResponse
|
|
20
|
+
def send_command: (String command, ?String? parameter) -> FtpResponse
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
class FtpResponse
|
|
24
|
+
def ok?: () -> bool
|
|
25
|
+
def status: () -> Integer
|
|
26
|
+
def status_name: () -> Symbol
|
|
27
|
+
def message: () -> String
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
class FtpDirectoryResponse
|
|
31
|
+
def ok?: () -> bool
|
|
32
|
+
def status: () -> Integer
|
|
33
|
+
def status_name: () -> Symbol
|
|
34
|
+
def message: () -> String
|
|
35
|
+
def directory: () -> String
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
class FtpListingResponse
|
|
39
|
+
def ok?: () -> bool
|
|
40
|
+
def status: () -> Integer
|
|
41
|
+
def status_name: () -> Symbol
|
|
42
|
+
def message: () -> String
|
|
43
|
+
def count: () -> Integer
|
|
44
|
+
def name: (Integer index) -> String
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Http
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def set_host: (String host, ?Integer port) -> self
|
|
6
|
+
def send_request: (HttpRequest request, ?Time timeout) -> HttpResponse
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
class HttpRequest
|
|
10
|
+
def initialize: () -> void
|
|
11
|
+
|
|
12
|
+
def set_field: (String field, String value) -> String
|
|
13
|
+
def method=: (Symbol | Integer value) -> (Symbol | Integer)
|
|
14
|
+
def uri=: (String value) -> String
|
|
15
|
+
def set_http_version: (Integer major, Integer minor) -> [Integer, Integer]
|
|
16
|
+
def body=: (String value) -> String
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
class HttpResponse
|
|
20
|
+
def field: (String name) -> String?
|
|
21
|
+
def status: () -> Integer
|
|
22
|
+
def status_name: () -> Symbol
|
|
23
|
+
def major_version: () -> Integer
|
|
24
|
+
def minor_version: () -> Integer
|
|
25
|
+
def body: () -> String
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class IpAddress
|
|
3
|
+
def initialize: (Integer | String | IpAddress address) -> void
|
|
4
|
+
def self.from_string: (String address) -> IpAddress
|
|
5
|
+
def self.from_bytes: (Integer byte0, Integer byte1, Integer byte2, Integer byte3) -> IpAddress
|
|
6
|
+
def self.from_integer: (Integer value) -> IpAddress
|
|
7
|
+
def self.local_address: () -> IpAddress
|
|
8
|
+
def self.public_address: (?Time timeout) -> IpAddress
|
|
9
|
+
|
|
10
|
+
def to_s: () -> String
|
|
11
|
+
def to_str: () -> String
|
|
12
|
+
def to_integer: () -> Integer
|
|
13
|
+
def hash: () -> Integer
|
|
14
|
+
def ==: (untyped other) -> bool
|
|
15
|
+
def eql?: (untyped other) -> bool
|
|
16
|
+
|
|
17
|
+
NONE: IpAddress
|
|
18
|
+
ANY: IpAddress
|
|
19
|
+
LOCAL_HOST: IpAddress
|
|
20
|
+
BROADCAST: IpAddress
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
module SocketStatus
|
|
3
|
+
DONE: Integer
|
|
4
|
+
NOT_READY: Integer
|
|
5
|
+
PARTIAL: Integer
|
|
6
|
+
DISCONNECTED: Integer
|
|
7
|
+
ERROR: Integer
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
module HttpMethod
|
|
11
|
+
GET: Integer
|
|
12
|
+
POST: Integer
|
|
13
|
+
HEAD: Integer
|
|
14
|
+
PUT: Integer
|
|
15
|
+
DELETE: Integer
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
module HttpStatus
|
|
19
|
+
OK: Integer
|
|
20
|
+
CREATED: Integer
|
|
21
|
+
ACCEPTED: Integer
|
|
22
|
+
NO_CONTENT: Integer
|
|
23
|
+
RESET_CONTENT: Integer
|
|
24
|
+
PARTIAL_CONTENT: Integer
|
|
25
|
+
MULTIPLE_CHOICES: Integer
|
|
26
|
+
MOVED_PERMANENTLY: Integer
|
|
27
|
+
MOVED_TEMPORARILY: Integer
|
|
28
|
+
NOT_MODIFIED: Integer
|
|
29
|
+
BAD_REQUEST: Integer
|
|
30
|
+
UNAUTHORIZED: Integer
|
|
31
|
+
FORBIDDEN: Integer
|
|
32
|
+
NOT_FOUND: Integer
|
|
33
|
+
RANGE_NOT_SATISFIABLE: Integer
|
|
34
|
+
INTERNAL_SERVER_ERROR: Integer
|
|
35
|
+
NOT_IMPLEMENTED: Integer
|
|
36
|
+
BAD_GATEWAY: Integer
|
|
37
|
+
SERVICE_NOT_AVAILABLE: Integer
|
|
38
|
+
GATEWAY_TIMEOUT: Integer
|
|
39
|
+
VERSION_NOT_SUPPORTED: Integer
|
|
40
|
+
INVALID_RESPONSE: Integer
|
|
41
|
+
CONNECTION_FAILED: Integer
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
module FtpTransferMode
|
|
45
|
+
BINARY: Integer
|
|
46
|
+
ASCII: Integer
|
|
47
|
+
EBCDIC: Integer
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
module FtpStatus
|
|
51
|
+
RESTART_MARKER_REPLY: Integer
|
|
52
|
+
SERVICE_READY_SOON: Integer
|
|
53
|
+
DATA_CONNECTION_ALREADY_OPENED: Integer
|
|
54
|
+
OPENING_DATA_CONNECTION: Integer
|
|
55
|
+
OK: Integer
|
|
56
|
+
POINTLESS_COMMAND: Integer
|
|
57
|
+
SYSTEM_STATUS: Integer
|
|
58
|
+
DIRECTORY_STATUS: Integer
|
|
59
|
+
FILE_STATUS: Integer
|
|
60
|
+
HELP_MESSAGE: Integer
|
|
61
|
+
SYSTEM_TYPE: Integer
|
|
62
|
+
SERVICE_READY: Integer
|
|
63
|
+
CLOSING_CONNECTION: Integer
|
|
64
|
+
DATA_CONNECTION_OPENED: Integer
|
|
65
|
+
CLOSING_DATA_CONNECTION: Integer
|
|
66
|
+
ENTERING_PASSIVE_MODE: Integer
|
|
67
|
+
LOGGED_IN: Integer
|
|
68
|
+
FILE_ACTION_OK: Integer
|
|
69
|
+
DIRECTORY_OK: Integer
|
|
70
|
+
NEED_PASSWORD: Integer
|
|
71
|
+
NEED_ACCOUNT_TO_LOG_IN: Integer
|
|
72
|
+
NEED_INFORMATION: Integer
|
|
73
|
+
SERVICE_UNAVAILABLE: Integer
|
|
74
|
+
DATA_CONNECTION_UNAVAILABLE: Integer
|
|
75
|
+
TRANSFER_ABORTED: Integer
|
|
76
|
+
FILE_ACTION_ABORTED: Integer
|
|
77
|
+
LOCAL_ERROR: Integer
|
|
78
|
+
INSUFFICIENT_STORAGE_SPACE: Integer
|
|
79
|
+
COMMAND_UNKNOWN: Integer
|
|
80
|
+
PARAMETERS_UNKNOWN: Integer
|
|
81
|
+
COMMAND_NOT_IMPLEMENTED: Integer
|
|
82
|
+
BAD_COMMAND_SEQUENCE: Integer
|
|
83
|
+
PARAMETER_NOT_IMPLEMENTED: Integer
|
|
84
|
+
NOT_LOGGED_IN: Integer
|
|
85
|
+
NEED_ACCOUNT_TO_STORE: Integer
|
|
86
|
+
FILE_UNAVAILABLE: Integer
|
|
87
|
+
PAGE_TYPE_UNKNOWN: Integer
|
|
88
|
+
NOT_ENOUGH_MEMORY: Integer
|
|
89
|
+
FILENAME_NOT_ALLOWED: Integer
|
|
90
|
+
INVALID_RESPONSE: Integer
|
|
91
|
+
CONNECTION_FAILED: Integer
|
|
92
|
+
CONNECTION_CLOSED: Integer
|
|
93
|
+
INVALID_FILE: Integer
|
|
94
|
+
end
|
|
95
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Packet
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def copy: () -> Packet
|
|
6
|
+
def append: (String data) -> self
|
|
7
|
+
def clear: () -> self
|
|
8
|
+
def data: () -> String
|
|
9
|
+
def data_size: () -> Integer
|
|
10
|
+
def read_position: () -> Integer
|
|
11
|
+
def end_of_packet?: () -> bool
|
|
12
|
+
def can_read?: () -> bool
|
|
13
|
+
|
|
14
|
+
def read_bool: () -> bool
|
|
15
|
+
def read_int8: () -> Integer
|
|
16
|
+
def read_uint8: () -> Integer
|
|
17
|
+
def read_int16: () -> Integer
|
|
18
|
+
def read_uint16: () -> Integer
|
|
19
|
+
def read_int32: () -> Integer
|
|
20
|
+
def read_uint32: () -> Integer
|
|
21
|
+
def read_int64: () -> Integer
|
|
22
|
+
def read_uint64: () -> Integer
|
|
23
|
+
def read_float: () -> Float
|
|
24
|
+
def read_double: () -> Float
|
|
25
|
+
def read_string: () -> String
|
|
26
|
+
|
|
27
|
+
def write_bool: (bool value) -> bool
|
|
28
|
+
def write_int8: (Integer value) -> Integer
|
|
29
|
+
def write_uint8: (Integer value) -> Integer
|
|
30
|
+
def write_int16: (Integer value) -> Integer
|
|
31
|
+
def write_uint16: (Integer value) -> Integer
|
|
32
|
+
def write_int32: (Integer value) -> Integer
|
|
33
|
+
def write_uint32: (Integer value) -> Integer
|
|
34
|
+
def write_int64: (Integer value) -> Integer
|
|
35
|
+
def write_uint64: (Integer value) -> Integer
|
|
36
|
+
def write_float: (Float value) -> Float
|
|
37
|
+
def write_double: (Float value) -> Float
|
|
38
|
+
def write_string: (String value) -> String
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class SocketSelector
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def copy: () -> SocketSelector
|
|
6
|
+
def add: (TcpListener | TcpSocket | UdpSocket socket) -> self
|
|
7
|
+
def remove: (TcpListener | TcpSocket | UdpSocket socket) -> self
|
|
8
|
+
def clear: () -> self
|
|
9
|
+
def wait: (?Time timeout) -> bool
|
|
10
|
+
def tcp_listener_ready?: (TcpListener listener) -> bool
|
|
11
|
+
def tcp_socket_ready?: (TcpSocket socket) -> bool
|
|
12
|
+
def udp_socket_ready?: (UdpSocket socket) -> bool
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class TcpListener
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
def self.any_port: () -> Integer
|
|
5
|
+
|
|
6
|
+
def blocking?: () -> bool
|
|
7
|
+
def blocking=: (bool value) -> bool
|
|
8
|
+
def local_port: () -> Integer
|
|
9
|
+
def listen: (Integer port, ?IpAddress address) -> Symbol
|
|
10
|
+
def close: () -> self
|
|
11
|
+
def accept: () -> [TcpSocket?, Symbol]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class TcpSocket
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def blocking?: () -> bool
|
|
6
|
+
def blocking=: (bool value) -> bool
|
|
7
|
+
def local_port: () -> Integer
|
|
8
|
+
def remote_address: () -> IpAddress
|
|
9
|
+
def remote_port: () -> Integer
|
|
10
|
+
def connect: (IpAddress | String | Integer address, Integer port, ?Time timeout) -> Symbol
|
|
11
|
+
def disconnect: () -> self
|
|
12
|
+
def send: (String data) -> Symbol
|
|
13
|
+
def send_partial: (String data) -> [Integer, Symbol]
|
|
14
|
+
def receive: (?Integer max_length) -> [String, Symbol]
|
|
15
|
+
def send_packet: (Packet packet) -> Symbol
|
|
16
|
+
def receive_packet: (Packet packet) -> Symbol
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class UdpSocket
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
def self.any_port: () -> Integer
|
|
5
|
+
def self.max_datagram_size: () -> Integer
|
|
6
|
+
|
|
7
|
+
def blocking?: () -> bool
|
|
8
|
+
def blocking=: (bool value) -> bool
|
|
9
|
+
def local_port: () -> Integer
|
|
10
|
+
def bind: (Integer port, ?IpAddress address) -> Symbol
|
|
11
|
+
def unbind: () -> self
|
|
12
|
+
def send: (String data, IpAddress | String | Integer address, Integer port) -> Symbol
|
|
13
|
+
def receive: (?Integer max_length) -> [String, IpAddress, Integer, Symbol]
|
|
14
|
+
def send_packet: (Packet packet, IpAddress | String | Integer address, Integer port) -> Symbol
|
|
15
|
+
def receive_packet: (Packet packet) -> [IpAddress, Integer, Symbol]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Clock
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def elapsed_time: () -> Time
|
|
6
|
+
def restart!: () -> Time
|
|
7
|
+
def reset!: () -> Time
|
|
8
|
+
def running?: () -> bool
|
|
9
|
+
def start!: () -> self
|
|
10
|
+
def stop!: () -> self
|
|
11
|
+
def copy: () -> Clock
|
|
12
|
+
end
|
|
13
|
+
end
|
data/sig/system/time.rbs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Time
|
|
3
|
+
include Comparable
|
|
4
|
+
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
| (Float seconds) -> void
|
|
7
|
+
| (Integer microseconds) -> void
|
|
8
|
+
| (Time other) -> void
|
|
9
|
+
def self.seconds: (Float value) -> Time
|
|
10
|
+
def self.milliseconds: (Integer value) -> Time
|
|
11
|
+
def self.microseconds: (Integer value) -> Time
|
|
12
|
+
def self.zero: () -> Time
|
|
13
|
+
|
|
14
|
+
def as_seconds: () -> Float
|
|
15
|
+
def as_milliseconds: () -> Integer
|
|
16
|
+
def as_microseconds: () -> Integer
|
|
17
|
+
def to_f: () -> Float
|
|
18
|
+
def to_i: () -> Integer
|
|
19
|
+
def +: (Time other) -> Time
|
|
20
|
+
def -: (Time other) -> Time
|
|
21
|
+
def *: (Float scalar) -> Time
|
|
22
|
+
def /: (Time other) -> Float
|
|
23
|
+
| (Float other) -> Time
|
|
24
|
+
def <=>: (Time other) -> Integer
|
|
25
|
+
def ==: (untyped other) -> bool
|
|
26
|
+
def to_s: () -> String
|
|
27
|
+
end
|
|
28
|
+
end
|
data/sig/system/vec2.rbs
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Vector2
|
|
3
|
+
include Enumerable[Float]
|
|
4
|
+
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
| (Float x, Float y) -> void
|
|
7
|
+
| (Array[Float] xy) -> void
|
|
8
|
+
| (Vector2 other) -> void
|
|
9
|
+
|
|
10
|
+
def x: () -> Float
|
|
11
|
+
def x=: (Float value) -> Float
|
|
12
|
+
def y: () -> Float
|
|
13
|
+
def y=: (Float value) -> Float
|
|
14
|
+
def to_a: () -> [Float, Float]
|
|
15
|
+
def to_ary: () -> [Float, Float]
|
|
16
|
+
def each: () { (Float) -> void } -> self
|
|
17
|
+
def []: (Integer index) -> Float
|
|
18
|
+
def size: () -> Integer
|
|
19
|
+
def length: () -> Integer
|
|
20
|
+
def ==: (untyped other) -> bool
|
|
21
|
+
def +: (Vector2 | Array[Float] other) -> Vector2
|
|
22
|
+
def -: (Vector2 | Array[Float] other) -> Vector2
|
|
23
|
+
def *: (Float scalar) -> Vector2
|
|
24
|
+
def to_s: () -> String
|
|
25
|
+
end
|
|
26
|
+
end
|
data/sig/system/vec3.rbs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Vector3
|
|
3
|
+
include Enumerable[Float]
|
|
4
|
+
|
|
5
|
+
def initialize: () -> void
|
|
6
|
+
| (Float x, Float y, Float z) -> void
|
|
7
|
+
| (Array[Float] xyz) -> void
|
|
8
|
+
| (Vector3 other) -> void
|
|
9
|
+
|
|
10
|
+
def x: () -> Float
|
|
11
|
+
def x=: (Float value) -> Float
|
|
12
|
+
def y: () -> Float
|
|
13
|
+
def y=: (Float value) -> Float
|
|
14
|
+
def z: () -> Float
|
|
15
|
+
def z=: (Float value) -> Float
|
|
16
|
+
def to_a: () -> [Float, Float, Float]
|
|
17
|
+
def to_ary: () -> [Float, Float, Float]
|
|
18
|
+
def each: () { (Float) -> void } -> self
|
|
19
|
+
def size: () -> Integer
|
|
20
|
+
def length: () -> Integer
|
|
21
|
+
def ==: (untyped other) -> bool
|
|
22
|
+
def +: (Vector3 | Array[Float] other) -> Vector3
|
|
23
|
+
def -: (Vector3 | Array[Float] other) -> Vector3
|
|
24
|
+
def *: (Float scalar) -> Vector3
|
|
25
|
+
def to_s: () -> String
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Context
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
def self.extension_available?: (String name) -> bool
|
|
5
|
+
def self.function: (String name) -> Integer
|
|
6
|
+
def self.active_context_id: () -> Integer
|
|
7
|
+
|
|
8
|
+
def active=: (bool value) -> bool
|
|
9
|
+
def settings: () -> ContextSettings
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class ContextSettings
|
|
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
|
+
|
|
5
|
+
def depth_bits: () -> Integer
|
|
6
|
+
def depth_bits=: (Integer value) -> Integer
|
|
7
|
+
def stencil_bits: () -> Integer
|
|
8
|
+
def stencil_bits=: (Integer value) -> Integer
|
|
9
|
+
def antialiasing_level: () -> Integer
|
|
10
|
+
def antialiasing_level=: (Integer value) -> Integer
|
|
11
|
+
def major_version: () -> Integer
|
|
12
|
+
def major_version=: (Integer value) -> Integer
|
|
13
|
+
def minor_version: () -> Integer
|
|
14
|
+
def minor_version=: (Integer value) -> Integer
|
|
15
|
+
def attribute_flags: () -> Array[Symbol]
|
|
16
|
+
def attribute_flags=: (Symbol | Array[Symbol] | Integer value) -> (Symbol | Array[Symbol] | Integer)
|
|
17
|
+
def srgb_capable?: () -> bool
|
|
18
|
+
def srgb_capable=: (bool value) -> bool
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
class Event
|
|
3
|
+
def initialize: () -> void
|
|
4
|
+
|
|
5
|
+
def type: () -> String
|
|
6
|
+
def size: () -> Vector2
|
|
7
|
+
def key: () -> Hash[Symbol, untyped]
|
|
8
|
+
def text: () -> String
|
|
9
|
+
def mouse_move: () -> Vector2
|
|
10
|
+
def mouse_move_raw: () -> Vector2
|
|
11
|
+
def mouse_button: () -> Hash[Symbol, untyped]
|
|
12
|
+
def mouse_wheel_scroll: () -> Hash[Symbol, untyped]
|
|
13
|
+
def mouse_wheel: () -> Hash[Symbol, untyped]
|
|
14
|
+
def joystick_move: () -> Hash[Symbol, untyped]
|
|
15
|
+
def joystick_button: () -> Hash[Symbol, untyped]
|
|
16
|
+
def joystick_connect: () -> Hash[Symbol, untyped]
|
|
17
|
+
def touch: () -> Hash[Symbol, untyped]
|
|
18
|
+
def sensor: () -> Hash[Symbol, untyped]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module SFML
|
|
2
|
+
module Joystick
|
|
3
|
+
COUNT: Integer
|
|
4
|
+
BUTTON_COUNT: Integer
|
|
5
|
+
AXIS_COUNT: Integer
|
|
6
|
+
|
|
7
|
+
def self.connected?: (Integer joystick) -> bool
|
|
8
|
+
def self.button_count: (Integer joystick) -> Integer
|
|
9
|
+
def self.has_axis?: (Integer joystick, Symbol | Integer axis) -> bool
|
|
10
|
+
def self.button_pressed?: (Integer joystick, Integer button) -> bool
|
|
11
|
+
def self.axis_position: (Integer joystick, Symbol | Integer axis) -> Float
|
|
12
|
+
def self.identification: (Integer joystick) -> Hash[Symbol, untyped]
|
|
13
|
+
def self.update!: () -> nil
|
|
14
|
+
end
|
|
15
|
+
end
|