solargraph-dragonruby 0.2.0
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 +7 -0
- data/CHANGELOG.md +56 -0
- data/CODE_OF_CONDUCT.md +10 -0
- data/LICENSE.txt +21 -0
- data/NOTICE +8 -0
- data/README.md +185 -0
- data/Rakefile +13 -0
- data/lib/solargraph/dragonruby/convention.rb +43 -0
- data/lib/solargraph/dragonruby/macro_node.rb +44 -0
- data/lib/solargraph/dragonruby/version.rb +7 -0
- data/lib/solargraph/dragonruby.rb +15 -0
- data/lib/solargraph-dragonruby.rb +5 -0
- data/sig/solargraph/dragonruby.rbs +19 -0
- data/stubs/extensions/README.md +20 -0
- data/stubs/extensions/args.rb +91 -0
- data/stubs/extensions/array.rb +25 -0
- data/stubs/extensions/attr.rb +249 -0
- data/stubs/extensions/easing.rb +90 -0
- data/stubs/extensions/entity.rb +63 -0
- data/stubs/extensions/geometry.rb +528 -0
- data/stubs/extensions/grid.rb +247 -0
- data/stubs/extensions/inputs.rb +678 -0
- data/stubs/extensions/layout.rb +175 -0
- data/stubs/extensions/log.rb +158 -0
- data/stubs/extensions/main.rb +63 -0
- data/stubs/extensions/numeric.rb +395 -0
- data/stubs/extensions/outputs.rb +132 -0
- data/stubs/extensions/runtime.rb +436 -0
- data/stubs/extensions/string.rb +85 -0
- data/stubs/extensions/typing.rb +193 -0
- data/stubs/extensions/zlib.rb +24 -0
- data/stubs/upstream/LICENSE.txt +21 -0
- data/stubs/upstream/UPSTREAM +2 -0
- data/stubs/upstream/args.rb +61 -0
- data/stubs/upstream/constants.rb +8 -0
- data/stubs/upstream/controller.rb +90 -0
- data/stubs/upstream/easing.rb +119 -0
- data/stubs/upstream/geometry.rb +430 -0
- data/stubs/upstream/globals.rb +17 -0
- data/stubs/upstream/gtk.rb +476 -0
- data/stubs/upstream/inputs.rb +286 -0
- data/stubs/upstream/kernel.rb +7 -0
- data/stubs/upstream/keyboard.rb +38 -0
- data/stubs/upstream/layout.rb +32 -0
- data/stubs/upstream/numeric.rb +82 -0
- data/stubs/upstream/outputs.rb +55 -0
- data/stubs/upstream/outputs_array.rb +4 -0
- data/stubs/upstream/phantom_types.rb +25 -0
- data/stubs/upstream/toplevel.rb +13 -0
- metadata +107 -0
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
module GTK
|
|
2
|
+
# Information about the screen and game canvas. Use the global `Grid`
|
|
3
|
+
# (or `$grid`/`args.grid`). Unless noted, values are in logical
|
|
4
|
+
# (720p-scale) units and take `origin_name` and `orientation` into account.
|
|
5
|
+
class Grid
|
|
6
|
+
# @return [Symbol] `:landscape` (default) or `:portrait`, from `game_metadata.txt`
|
|
7
|
+
def orientation; end
|
|
8
|
+
|
|
9
|
+
# @return [Boolean] true on the frame the orientation changed (window resize or device rotation)
|
|
10
|
+
def orientation_changed?; end
|
|
11
|
+
|
|
12
|
+
# @return [Symbol] `:bottom_left` (default) or `:center`
|
|
13
|
+
def origin_name; end
|
|
14
|
+
|
|
15
|
+
# Sets the coordinate system so `0, 0` is the bottom-left corner.
|
|
16
|
+
# @return [void]
|
|
17
|
+
def origin_bottom_left!; end
|
|
18
|
+
|
|
19
|
+
# Sets the coordinate system so `0, 0` is the center of the screen.
|
|
20
|
+
# @return [void]
|
|
21
|
+
def origin_center!; end
|
|
22
|
+
|
|
23
|
+
# @return [Boolean] true if `orientation` is `:portrait`
|
|
24
|
+
def portrait?; end
|
|
25
|
+
|
|
26
|
+
# @return [Boolean] true if `orientation` is `:landscape`
|
|
27
|
+
def landscape?; end
|
|
28
|
+
|
|
29
|
+
# @return [Numeric] bottom of the grid (`0`, or `-360`/`-640` with a centered origin)
|
|
30
|
+
def bottom; end
|
|
31
|
+
|
|
32
|
+
# @return [Numeric] top of the grid
|
|
33
|
+
def top; end
|
|
34
|
+
|
|
35
|
+
# @return [Numeric] left of the grid
|
|
36
|
+
def left; end
|
|
37
|
+
|
|
38
|
+
# @return [Numeric] right of the grid
|
|
39
|
+
def right; end
|
|
40
|
+
|
|
41
|
+
# @return [Typing::RectHash] a rect primitive (`x`, `y`, `w`, `h`) representing the grid
|
|
42
|
+
def rect; end
|
|
43
|
+
|
|
44
|
+
# @return [Numeric] the grid's width
|
|
45
|
+
def w; end
|
|
46
|
+
|
|
47
|
+
# @return [Numeric] the grid's height
|
|
48
|
+
def h; end
|
|
49
|
+
|
|
50
|
+
# @return [Integer] width component of the aspect ratio (`16` in landscape for the default 16:9)
|
|
51
|
+
def aspect_ratio_w; end
|
|
52
|
+
|
|
53
|
+
# @return [Integer] height component of the aspect ratio (`9` in landscape for the default 16:9)
|
|
54
|
+
def aspect_ratio_h; end
|
|
55
|
+
|
|
56
|
+
# @return [Integer] the `aspect_size` from `game_metadata.txt` (default `720`)
|
|
57
|
+
def aspect_size; end
|
|
58
|
+
|
|
59
|
+
# @!group All Screen (area outside the 16:9 safe area, when the window overflows it)
|
|
60
|
+
#
|
|
61
|
+
# Pro license: only meaningful with `hd_letterbox=false` in
|
|
62
|
+
# `game_metadata.txt` (edge-to-edge rendering). Otherwise they match the
|
|
63
|
+
# logical values.
|
|
64
|
+
|
|
65
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
66
|
+
# @return [Numeric]
|
|
67
|
+
def allscreen_left; end
|
|
68
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
69
|
+
# @return [Numeric]
|
|
70
|
+
def allscreen_x; end
|
|
71
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
72
|
+
# @return [Numeric]
|
|
73
|
+
def allscreen_right; end
|
|
74
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
75
|
+
# @return [Numeric]
|
|
76
|
+
def allscreen_y; end
|
|
77
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
78
|
+
# @return [Numeric]
|
|
79
|
+
def allscreen_top; end
|
|
80
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
81
|
+
# @return [Numeric]
|
|
82
|
+
def allscreen_bottom; end
|
|
83
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
84
|
+
# @return [Numeric]
|
|
85
|
+
def allscreen_w; end
|
|
86
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
87
|
+
# @return [Numeric]
|
|
88
|
+
def allscreen_h; end
|
|
89
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
90
|
+
# @return [Typing::RectHash] rect covering the whole window
|
|
91
|
+
def allscreen_rect; end
|
|
92
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
93
|
+
# @return [Numeric]
|
|
94
|
+
def allscreen_offset_x; end
|
|
95
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
96
|
+
# @return [Numeric]
|
|
97
|
+
def allscreen_offset_y; end
|
|
98
|
+
# Pro license: only differs from the logical value with `hd_letterbox=false`.
|
|
99
|
+
# @return [Typing::PointHash] `x`, `y` offsets of the safe area within the window
|
|
100
|
+
def allscreen_offset; end
|
|
101
|
+
|
|
102
|
+
# @!endgroup
|
|
103
|
+
|
|
104
|
+
# @!group Pixel category
|
|
105
|
+
#
|
|
106
|
+
# Pro license: real pixel values require `hd=true` in `game_metadata.txt`.
|
|
107
|
+
# Without it (and on Standard), they return the logical values.
|
|
108
|
+
|
|
109
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
110
|
+
# @return [Numeric]
|
|
111
|
+
def w_px; end
|
|
112
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
113
|
+
# @return [Numeric]
|
|
114
|
+
def h_px; end
|
|
115
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
116
|
+
# @return [Numeric]
|
|
117
|
+
def left_px; end
|
|
118
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
119
|
+
# @return [Numeric]
|
|
120
|
+
def right_px; end
|
|
121
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
122
|
+
# @return [Numeric]
|
|
123
|
+
def top_px; end
|
|
124
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
125
|
+
# @return [Numeric]
|
|
126
|
+
def bottom_px; end
|
|
127
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
128
|
+
# @return [Numeric]
|
|
129
|
+
def allscreen_left_px; end
|
|
130
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
131
|
+
# @return [Numeric]
|
|
132
|
+
def allscreen_right_px; end
|
|
133
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
134
|
+
# @return [Numeric]
|
|
135
|
+
def allscreen_top_px; end
|
|
136
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
137
|
+
# @return [Numeric]
|
|
138
|
+
def allscreen_bottom_px; end
|
|
139
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
140
|
+
# @return [Numeric]
|
|
141
|
+
def allscreen_offset_x_px; end
|
|
142
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
143
|
+
# @return [Numeric]
|
|
144
|
+
def allscreen_offset_y_px; end
|
|
145
|
+
|
|
146
|
+
# @!endgroup
|
|
147
|
+
|
|
148
|
+
# Pro license (HD mode, `hd=true`).
|
|
149
|
+
#
|
|
150
|
+
# @return [Float] native scale of the window compared to 720p
|
|
151
|
+
def native_scale; end
|
|
152
|
+
|
|
153
|
+
# Pro license (HD mode, `hd=true`).
|
|
154
|
+
#
|
|
155
|
+
# @return [Float] best-fit pixel-perfect render scale compared to 720p (see `hd_max_scale`)
|
|
156
|
+
def render_scale; end
|
|
157
|
+
|
|
158
|
+
# Pro license (HD mode, `hd=true`).
|
|
159
|
+
#
|
|
160
|
+
# @return [Float] rendering scale for textures (720p: `1.0`, 1080p: `1.5`, 4k: `3.0`, ...)
|
|
161
|
+
def texture_scale; end
|
|
162
|
+
|
|
163
|
+
# Pro license (HD mode, `hd=true`).
|
|
164
|
+
#
|
|
165
|
+
# @return [Integer] best-fit texture atlas scale (720p: `100`, 1080p: `150`, ...)
|
|
166
|
+
def texture_scale_enum; end
|
|
167
|
+
|
|
168
|
+
# @return [Integer] refresh rate of the current display
|
|
169
|
+
def refresh_rate; end
|
|
170
|
+
|
|
171
|
+
# @return [Numeric] same as #left
|
|
172
|
+
def x; end
|
|
173
|
+
|
|
174
|
+
# @return [Numeric] same as #bottom
|
|
175
|
+
def y; end
|
|
176
|
+
|
|
177
|
+
# @return [Numeric] x of the center of the screen
|
|
178
|
+
def center_x; end
|
|
179
|
+
|
|
180
|
+
# @return [Numeric] y of the center of the screen
|
|
181
|
+
def center_y; end
|
|
182
|
+
|
|
183
|
+
# @return [Typing::RectHash] center of the screen as `{ x:, y:, w: 0, h: 0 }`
|
|
184
|
+
def center; end
|
|
185
|
+
|
|
186
|
+
# @return [Numeric] half of #w
|
|
187
|
+
def w_half; end
|
|
188
|
+
|
|
189
|
+
# @return [Numeric] half of #h
|
|
190
|
+
def h_half; end
|
|
191
|
+
|
|
192
|
+
# @return [Boolean] true if the origin is the center of the screen (see #origin_center!)
|
|
193
|
+
def origin_center?; end
|
|
194
|
+
|
|
195
|
+
# @return [Boolean] true if the origin is the bottom left of the screen (the default)
|
|
196
|
+
def origin_bottom_left?; end
|
|
197
|
+
|
|
198
|
+
# @return [Boolean] true if the game is letterboxed
|
|
199
|
+
def letterbox?; end
|
|
200
|
+
|
|
201
|
+
# @return [Boolean] true if `hd=true` is set in `game_metadata.txt` (Pro license)
|
|
202
|
+
def hd?; end
|
|
203
|
+
|
|
204
|
+
# @return [Boolean] true if `highdpi=true` is set in `game_metadata.txt`
|
|
205
|
+
def highdpi?; end
|
|
206
|
+
|
|
207
|
+
# @return [Float] high DPI scale of the display the window is on
|
|
208
|
+
def high_dpi_scale; end
|
|
209
|
+
|
|
210
|
+
# @return [Array<Symbol>] orientations from `game_metadata.txt` (`:landscape`, `:portrait`)
|
|
211
|
+
def supported_orientations; end
|
|
212
|
+
|
|
213
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
214
|
+
# @return [Numeric]
|
|
215
|
+
def x_px; end
|
|
216
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
217
|
+
# @return [Numeric]
|
|
218
|
+
def y_px; end
|
|
219
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
220
|
+
# @return [Typing::RectHash] `{ x:, y:, w:, h: }`
|
|
221
|
+
def rect_px; end
|
|
222
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
223
|
+
# @return [Numeric]
|
|
224
|
+
def allscreen_x_px; end
|
|
225
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
226
|
+
# @return [Numeric]
|
|
227
|
+
def allscreen_y_px; end
|
|
228
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
229
|
+
# @return [Numeric]
|
|
230
|
+
def allscreen_w_px; end
|
|
231
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
232
|
+
# @return [Numeric]
|
|
233
|
+
def allscreen_h_px; end
|
|
234
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
235
|
+
# @return [Typing::RectHash] `{ x:, y:, w:, h: }`
|
|
236
|
+
def allscreen_rect_px; end
|
|
237
|
+
# Pro license: real pixel values need `hd=true` (otherwise same as the logical value).
|
|
238
|
+
# @return [Typing::PointHash] `{ x:, y: }`
|
|
239
|
+
def allscreen_offset_px; end
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# @return [GTK::Grid]
|
|
244
|
+
Grid = GTK::Grid.new
|
|
245
|
+
|
|
246
|
+
# @type [GTK::Grid]
|
|
247
|
+
$grid = GTK::Grid.new
|