hokusai-zero 0.2.6.pre.pinephone2 → 0.2.6.pre.pinephone4
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/ast/src/core/input.c +0 -135
- data/ast/src/core/input.h +0 -33
- data/ast/test/hokusai.c +0 -2
- data/hokusai.gemspec +1 -1
- data/ui/examples/forum/file.rb +1 -1
- data/ui/examples/forum/post.rb +0 -1
- data/ui/examples/forum.rb +7 -7
- data/ui/examples/keyboard.rb +47 -0
- data/ui/examples/shader/test.rb +28 -18
- data/ui/examples/spreadsheet.rb +12 -11
- data/ui/lib/lib_hokusai.rb +19 -37
- data/ui/spec/hokusai/e2e/keyboard_spec.rb +52 -0
- data/ui/src/hokusai/assets/icons/outline/arrow-big-up.svg +19 -0
- data/ui/src/hokusai/assets/icons/outline/backspace.svg +20 -0
- data/ui/src/hokusai/backends/raylib/config.rb +2 -1
- data/ui/src/hokusai/backends/raylib.rb +54 -20
- data/ui/src/hokusai/backends/sdl2/config.rb +9 -6
- data/ui/src/hokusai/backends/sdl2/font.rb +3 -1
- data/ui/src/hokusai/backends/sdl2.rb +164 -65
- data/ui/src/hokusai/blocks/input.rb +1 -1
- data/ui/src/hokusai/blocks/keyboard.rb +249 -0
- data/ui/src/hokusai/blocks/slider.rb +139 -0
- data/ui/src/hokusai/commands/rect.rb +2 -2
- data/ui/src/hokusai/events/touch.rb +5 -11
- data/ui/src/hokusai/mounting/loop_entry.rb +1 -1
- data/ui/src/hokusai/painter.rb +6 -2
- data/ui/src/hokusai/types.rb +160 -50
- data/ui/src/hokusai/util/wrap_stream.rb +197 -0
- data/ui/src/hokusai.rb +61 -30
- metadata +8 -6
- data/ast/test/input.c +0 -44
- data/ui/src/hokusai/backends/embedded/config.rb +0 -48
- data/ui/src/hokusai/backends/embedded/font.rb +0 -112
- data/ui/src/hokusai/backends/embedded/keys.rb +0 -124
- data/ui/src/hokusai/backends/embedded.rb +0 -540
data/ui/src/hokusai/types.rb
CHANGED
@@ -96,6 +96,14 @@ module Hokusai
|
|
96
96
|
alias_method :r, :right
|
97
97
|
alias_method :b, :bottom
|
98
98
|
|
99
|
+
def width
|
100
|
+
right + left
|
101
|
+
end
|
102
|
+
|
103
|
+
def height
|
104
|
+
top + bottom
|
105
|
+
end
|
106
|
+
|
99
107
|
def self.convert(value)
|
100
108
|
case value
|
101
109
|
when String
|
@@ -129,6 +137,7 @@ module Hokusai
|
|
129
137
|
@y = y
|
130
138
|
@vertical = vertical
|
131
139
|
@reverse = reverse
|
140
|
+
@hoku_rect = LibHokusai::HmlRect.create(x, y, width, height)
|
132
141
|
end
|
133
142
|
|
134
143
|
def reset(x, y, width, height, vertical: true, reverse: false)
|
@@ -138,6 +147,10 @@ module Hokusai
|
|
138
147
|
self.height = height
|
139
148
|
self.vertical = vertical
|
140
149
|
self.reverse = reverse
|
150
|
+
@hoku_rect[:x] = x
|
151
|
+
@hoku_rect[:y] = y
|
152
|
+
@hoku_rect[:w] = width
|
153
|
+
@hoku_rect[:h] = height
|
141
154
|
end
|
142
155
|
|
143
156
|
def to_bounds
|
@@ -149,7 +162,7 @@ module Hokusai
|
|
149
162
|
end
|
150
163
|
|
151
164
|
def to_hoku_rect
|
152
|
-
|
165
|
+
@hoku_rect
|
153
166
|
end
|
154
167
|
end
|
155
168
|
|
@@ -241,90 +254,185 @@ module Hokusai
|
|
241
254
|
end
|
242
255
|
|
243
256
|
class Touch
|
244
|
-
|
257
|
+
attr_accessor :stack, :archive
|
258
|
+
def initialize
|
259
|
+
@stack = []
|
260
|
+
@archive = []
|
261
|
+
@tapped = false
|
262
|
+
@swiped = false
|
263
|
+
@pinched = false
|
264
|
+
# @file = File.open("touch.log", "w")
|
265
|
+
end
|
245
266
|
|
246
|
-
|
247
|
-
|
248
|
-
].each do |key|
|
249
|
-
define_method(key) do
|
250
|
-
raw[:touch][key]
|
251
|
-
end
|
267
|
+
def tapped?
|
268
|
+
@tapped
|
252
269
|
end
|
253
270
|
|
254
271
|
def swiped?
|
255
|
-
|
272
|
+
@swiped
|
256
273
|
end
|
257
274
|
|
275
|
+
def pinched?
|
276
|
+
@pinched
|
277
|
+
end
|
278
|
+
|
279
|
+
def longtapping?(stuff = "ok")
|
280
|
+
log("#{touching?} - #{elapsed(token)} - #{stuff}") if touching?
|
281
|
+
touching? && elapsed(token) > 5
|
282
|
+
end
|
283
|
+
|
258
284
|
def longtapped?
|
259
|
-
|
285
|
+
@longtapped
|
286
|
+
end
|
287
|
+
|
288
|
+
def touching?
|
289
|
+
type == :down || type == :move
|
260
290
|
end
|
261
291
|
|
262
|
-
# return [Intger] duration in milliseconds
|
263
292
|
def duration
|
264
|
-
|
293
|
+
if longtapping?
|
294
|
+
return elapsed(token)
|
295
|
+
end
|
296
|
+
|
297
|
+
first, last = archive[-2..-1]
|
298
|
+
|
299
|
+
last[:start] - first[:start]
|
265
300
|
end
|
266
301
|
|
267
|
-
def
|
268
|
-
|
302
|
+
def distance
|
303
|
+
raise Hokusai::Error.new("Archive is empty") if archive.empty?
|
304
|
+
first, last = archive[-2..-1]
|
305
|
+
|
306
|
+
x = last[:x] - first[:x]
|
307
|
+
y = last[:y] - first[:y]
|
308
|
+
|
309
|
+
[x, y]
|
269
310
|
end
|
270
311
|
|
271
|
-
def
|
272
|
-
|
312
|
+
def direction
|
313
|
+
raise Hokusai::Error.new("Archive is empty") if archive.empty?
|
314
|
+
|
315
|
+
first, last = archive[-2..-1]
|
316
|
+
|
317
|
+
x = last[:x] - first[:x]
|
318
|
+
y = last[:y] - first[:y]
|
319
|
+
|
320
|
+
if x.abs > y.abs
|
321
|
+
# swiping left/right
|
322
|
+
last[:x] > first[:x] ? :right : :left
|
323
|
+
else
|
324
|
+
# swiping up/down
|
325
|
+
last[:y] > first[:y] ? :down : :up
|
326
|
+
end
|
273
327
|
end
|
274
328
|
|
275
|
-
def
|
276
|
-
|
329
|
+
def angle
|
330
|
+
raise Hokusai::Error.new("Archive is empty") if archive.empty?
|
331
|
+
|
332
|
+
last, first = archive[-2..-1]
|
333
|
+
|
334
|
+
x = last[:x] - first[:x]
|
335
|
+
y = last[:y] - first[:y]
|
336
|
+
|
337
|
+
(Math.atan2(x, y) * (-180 / Math::PI)).round(0).to_i
|
277
338
|
end
|
278
339
|
|
279
|
-
def
|
280
|
-
|
340
|
+
def log(str)
|
341
|
+
# Thread.new do
|
342
|
+
# @file.write_nonblock("#{str}\n")
|
343
|
+
# end
|
281
344
|
end
|
282
345
|
|
283
|
-
def
|
284
|
-
|
346
|
+
def record(finger, x, y)
|
347
|
+
log("recording #{token}")
|
348
|
+
if type == :down
|
349
|
+
push(:move, finger, x, y)
|
350
|
+
log("state is move")
|
351
|
+
elsif type == :move
|
352
|
+
stack.last[:x] = x
|
353
|
+
stack.last[:y] = y
|
354
|
+
|
355
|
+
log("updated state move")
|
356
|
+
else
|
357
|
+
@longtapped = false
|
358
|
+
@swiped = false
|
359
|
+
@tapped = false
|
360
|
+
push(:down, finger, x, y)
|
361
|
+
log("state is down")
|
362
|
+
end
|
363
|
+
end
|
285
364
|
|
286
|
-
|
287
|
-
|
365
|
+
def clear
|
366
|
+
# log("clearing")
|
367
|
+
if type == :move
|
368
|
+
log("elapsed: #{elapsed(token)}")
|
369
|
+
if elapsed(token) > 300 && within(10.0)
|
370
|
+
@longtapped = true
|
371
|
+
log('longtap')
|
372
|
+
elsif within(10.0)
|
373
|
+
@tapped = true
|
374
|
+
else
|
375
|
+
@swiped = true
|
376
|
+
log('swipe')
|
377
|
+
end
|
378
|
+
elsif type == :down
|
379
|
+
@tapped = true
|
380
|
+
log('tap')
|
381
|
+
else
|
382
|
+
@longtapped = false
|
383
|
+
@swiped = false
|
384
|
+
@tapped = false
|
385
|
+
end
|
288
386
|
|
289
|
-
|
290
|
-
|
387
|
+
self.archive = stack.dup
|
388
|
+
stack.clear
|
389
|
+
end
|
291
390
|
|
292
|
-
|
391
|
+
def elapsed(token)
|
392
|
+
Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) - token[:start]
|
293
393
|
end
|
294
394
|
|
295
|
-
def
|
296
|
-
|
395
|
+
def within(threshold)
|
396
|
+
move = stack.last
|
397
|
+
down = stack[-2]
|
297
398
|
|
298
|
-
|
299
|
-
|
399
|
+
t1 = (move[:x] - down[:x]).abs
|
400
|
+
t2 = (move[:y] - down[:y]).abs
|
300
401
|
|
301
|
-
|
302
|
-
|
402
|
+
t1 < threshold && t2 < threshold
|
403
|
+
end
|
303
404
|
|
304
|
-
|
305
|
-
|
306
|
-
position.x > last_position.x ? :right : :left
|
307
|
-
else
|
308
|
-
# swiping up/down
|
309
|
-
position.y > last_position.y ? :up : :down
|
310
|
-
end
|
405
|
+
def pop
|
406
|
+
stack.pop
|
311
407
|
end
|
312
408
|
|
313
|
-
def
|
314
|
-
|
409
|
+
def push(type, finger, x, y)
|
410
|
+
log("push: #{type}")
|
411
|
+
stack << {
|
412
|
+
type: type,
|
413
|
+
i: finger,
|
414
|
+
x: x,
|
415
|
+
y: y,
|
416
|
+
start: Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond)
|
417
|
+
}
|
315
418
|
end
|
316
419
|
|
317
|
-
def
|
318
|
-
|
420
|
+
def index
|
421
|
+
token&.[](:finger)
|
319
422
|
end
|
320
423
|
|
321
|
-
def
|
322
|
-
|
424
|
+
def type
|
425
|
+
token&.[](:type)
|
426
|
+
end
|
427
|
+
|
428
|
+
def token
|
429
|
+
@stack.last
|
323
430
|
end
|
324
431
|
end
|
325
432
|
|
326
433
|
class Input
|
327
|
-
|
434
|
+
attr_accessor :keyboard_override
|
435
|
+
attr_reader :raw, :touch
|
328
436
|
|
329
437
|
def hash
|
330
438
|
[self.class, mouse.pos.x, mouse.pos.y, mouse.scroll, mouse.left.clicked, mouse.left.down, mouse.left.up].hash
|
@@ -332,12 +440,14 @@ module Hokusai
|
|
332
440
|
|
333
441
|
def initialize(raw)
|
334
442
|
@raw = raw
|
443
|
+
@touch = nil
|
444
|
+
@keyboard_override = false
|
335
445
|
end
|
336
446
|
|
337
|
-
def
|
338
|
-
|
447
|
+
def support_touch!
|
448
|
+
@touch ||= Touch.new
|
339
449
|
|
340
|
-
|
450
|
+
self
|
341
451
|
end
|
342
452
|
|
343
453
|
def keyboard
|
@@ -0,0 +1,197 @@
|
|
1
|
+
require "rouge"
|
2
|
+
require "hokusai"
|
3
|
+
require_relative "./lib/hokusai_code/formatter"
|
4
|
+
|
5
|
+
module Hokusai::Util
|
6
|
+
class Wrapped
|
7
|
+
attr_accessor :text, :x, :y, :extra
|
8
|
+
|
9
|
+
def initialize(text, x, y, extra)
|
10
|
+
@text = text
|
11
|
+
@x = x
|
12
|
+
@y = y
|
13
|
+
@extra = extra
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
class SelectionWrapper
|
18
|
+
attr_accessor :x, :y, :width, :height
|
19
|
+
|
20
|
+
def initialize(x, y, w, h)
|
21
|
+
@x = x
|
22
|
+
@y = y
|
23
|
+
@width = w
|
24
|
+
@height = h
|
25
|
+
end
|
26
|
+
|
27
|
+
def <<(w)
|
28
|
+
@width += w
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
class WrapStream
|
33
|
+
attr_accessor :width, :current_width, :x, :y,
|
34
|
+
:origin_x, :origin_y, :buffer, :stack
|
35
|
+
attr_reader :on_text_cb, :on_text_selection_cb, :on_advancex_cb, :selector, :padding
|
36
|
+
|
37
|
+
def initialize(width, &measure)
|
38
|
+
@width = width
|
39
|
+
@current_width = 0.0
|
40
|
+
|
41
|
+
@origin_x = 0.0
|
42
|
+
@origin_y = 0.0
|
43
|
+
@x = @origin_x
|
44
|
+
@y = @origin_y
|
45
|
+
|
46
|
+
@stack = []
|
47
|
+
@buffer = ""
|
48
|
+
|
49
|
+
@measure_cb = measure
|
50
|
+
end
|
51
|
+
|
52
|
+
def on_advancex(&block)
|
53
|
+
@on_advancex_cb = block
|
54
|
+
end
|
55
|
+
|
56
|
+
def on_text_selection(selector, padding, &block)
|
57
|
+
@selector = selector
|
58
|
+
@padding = padding || Hokusai::Padding.new(0.0, 0.0, 0.0, 0.0)
|
59
|
+
@on_text_selection_cb = block
|
60
|
+
end
|
61
|
+
|
62
|
+
def on_text(&block)
|
63
|
+
@on_text_cb = block
|
64
|
+
end
|
65
|
+
|
66
|
+
def measure(string, extra)
|
67
|
+
@measure_cb.call(string, extra)
|
68
|
+
end
|
69
|
+
|
70
|
+
def flush
|
71
|
+
sx = x + padding.left
|
72
|
+
wrapper = nil
|
73
|
+
stack.each do |(range, extra)|
|
74
|
+
str = buffer[range]
|
75
|
+
if selector
|
76
|
+
str.split("").each do |char|
|
77
|
+
nw, nh = measure(char, extra)
|
78
|
+
ox = on_advancex_cb.call(char.codepoints.first)
|
79
|
+
|
80
|
+
if selector.selected(sx, y + padding.top - selector.offset_y, nw, nh)
|
81
|
+
wrapper ||= SelectionWrapper.new(sx, y + padding.top, 0.0, nh)
|
82
|
+
wrapper << ox
|
83
|
+
end
|
84
|
+
|
85
|
+
sx += ox
|
86
|
+
end
|
87
|
+
|
88
|
+
on_text_selection_cb.call(wrapper) if wrapper
|
89
|
+
wrapper = nil
|
90
|
+
end
|
91
|
+
|
92
|
+
nw, _ = measure(str, extra)
|
93
|
+
|
94
|
+
# hard break on the buffer, split on character
|
95
|
+
wrap_and_call(str, extra)
|
96
|
+
|
97
|
+
self.x += nw
|
98
|
+
end
|
99
|
+
|
100
|
+
self.current_width = 0.0
|
101
|
+
self.buffer = ""
|
102
|
+
stack.clear
|
103
|
+
self.x = origin_x
|
104
|
+
end
|
105
|
+
|
106
|
+
def wrap(text, extra)
|
107
|
+
offset = 0
|
108
|
+
size = text.size
|
109
|
+
|
110
|
+
stack << [((buffer.size)..(text.size + buffer.size - 1)), extra]
|
111
|
+
|
112
|
+
while offset < size
|
113
|
+
char = text[offset]
|
114
|
+
w, h = measure(char, extra)
|
115
|
+
|
116
|
+
# if it's a newline we want to break
|
117
|
+
if char =~ /\n|\r\n/
|
118
|
+
flush
|
119
|
+
|
120
|
+
stack << [(0...(text.size - offset - 1)), extra]
|
121
|
+
self.y += h
|
122
|
+
self.x = origin_x
|
123
|
+
offset += 1
|
124
|
+
|
125
|
+
next
|
126
|
+
end
|
127
|
+
|
128
|
+
# if adding this char extends beyond the boundary
|
129
|
+
if current_width + w > width
|
130
|
+
# find the last space
|
131
|
+
idx = buffer.rindex(" ")
|
132
|
+
|
133
|
+
# if there is a break in this line split the buffer
|
134
|
+
# and render the current line
|
135
|
+
unless idx.nil? || idx < (buffer.size / 2)
|
136
|
+
cur = []
|
137
|
+
nex = []
|
138
|
+
found = false
|
139
|
+
|
140
|
+
# We need to split up both the buffer, and the ranges
|
141
|
+
while payload = stack.shift
|
142
|
+
range, xtra = payload
|
143
|
+
if range.include?(idx)
|
144
|
+
# putting the space on this line
|
145
|
+
cur << [(range.begin..idx), xtra]
|
146
|
+
# pp [range, idx]
|
147
|
+
nex << [(0..(range.end - idx - 1)), xtra] unless idx == range.end
|
148
|
+
|
149
|
+
found = true
|
150
|
+
elsif !found
|
151
|
+
cur << payload
|
152
|
+
else
|
153
|
+
nex << [((range.begin - idx - 1)..(range.end - idx - 1)), xtra]
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
scur = buffer[0..idx]
|
158
|
+
snex = buffer[(idx + 1)..-1]
|
159
|
+
|
160
|
+
cur.each do |(range, xtra)|
|
161
|
+
str = scur[range]
|
162
|
+
|
163
|
+
nw, _ = measure(str, xtra)
|
164
|
+
wrap_and_call(str, xtra)
|
165
|
+
|
166
|
+
self.x += nw
|
167
|
+
end
|
168
|
+
|
169
|
+
self.buffer = snex + char
|
170
|
+
self.stack = nex
|
171
|
+
self.y += h
|
172
|
+
self.current_width = measure(buffer, extra).first
|
173
|
+
self.x = origin_x
|
174
|
+
else
|
175
|
+
# break on this word
|
176
|
+
flush
|
177
|
+
|
178
|
+
self.y += h
|
179
|
+
self.current_width = measure(char, extra).first
|
180
|
+
self.buffer = char
|
181
|
+
stack << [(0...(text.size - offset)), extra]
|
182
|
+
end
|
183
|
+
else
|
184
|
+
self.current_width += w
|
185
|
+
buffer << char
|
186
|
+
end
|
187
|
+
|
188
|
+
offset += 1
|
189
|
+
end
|
190
|
+
|
191
|
+
end
|
192
|
+
|
193
|
+
private def wrap_and_call(text, extra)
|
194
|
+
on_text_cb.call Wrapped.new(text, x, y, extra)
|
195
|
+
end
|
196
|
+
end
|
197
|
+
end
|
data/ui/src/hokusai.rb
CHANGED
@@ -13,35 +13,6 @@ require_relative './hokusai/event'
|
|
13
13
|
require_relative './hokusai/painter'
|
14
14
|
require_relative './hokusai/util/selection'
|
15
15
|
require_relative './hokusai/util/piece_table'
|
16
|
-
require_relative './hokusai/blocks/empty'
|
17
|
-
require_relative './hokusai/blocks/vblock'
|
18
|
-
require_relative './hokusai/blocks/hblock'
|
19
|
-
require_relative './hokusai/blocks/label'
|
20
|
-
require_relative './hokusai/blocks/rect'
|
21
|
-
require_relative './hokusai/blocks/button'
|
22
|
-
require_relative './hokusai/blocks/circle'
|
23
|
-
require_relative './hokusai/blocks/checkbox'
|
24
|
-
require_relative './hokusai/blocks/scissor_begin'
|
25
|
-
require_relative './hokusai/blocks/scissor_end'
|
26
|
-
require_relative './hokusai/blocks/clipped'
|
27
|
-
require_relative './hokusai/blocks/cursor'
|
28
|
-
require_relative './hokusai/blocks/image'
|
29
|
-
require_relative './hokusai/blocks/svg'
|
30
|
-
require_relative './hokusai/blocks/toggle'
|
31
|
-
require_relative './hokusai/blocks/scrollbar'
|
32
|
-
require_relative './hokusai/blocks/dynamic'
|
33
|
-
require_relative './hokusai/blocks/panel'
|
34
|
-
require_relative './hokusai/blocks/text'
|
35
|
-
require_relative './hokusai/blocks/selectable'
|
36
|
-
require_relative './hokusai/blocks/input'
|
37
|
-
require_relative './hokusai/blocks/variable'
|
38
|
-
require_relative './hokusai/blocks/titlebar/osx'
|
39
|
-
require_relative './hokusai/blocks/modal'
|
40
|
-
require_relative './hokusai/blocks/dropdown'
|
41
|
-
require_relative './hokusai/blocks/shader_begin'
|
42
|
-
require_relative './hokusai/blocks/shader_end'
|
43
|
-
require_relative './hokusai/blocks/texture'
|
44
|
-
require_relative './hokusai/blocks/color_picker'
|
45
16
|
|
46
17
|
# A backend agnostic library for authoring
|
47
18
|
# desktop applications
|
@@ -60,6 +31,10 @@ module Hokusai
|
|
60
31
|
SHADER_UNIFORM_UIVEC3 = 10 # Shader uniform type: uivec3 (3 unsigned int)
|
61
32
|
SHADER_UNIFORM_UIVEC4 = 11 # Shader uniform type: uivec4 (4 unsigned int)
|
62
33
|
|
34
|
+
def self.asset(path)
|
35
|
+
"#{ASSETS_FOLDER}/#{path}"
|
36
|
+
end
|
37
|
+
|
63
38
|
# Access the font registry
|
64
39
|
#
|
65
40
|
# @return [Hokusai::FontRegistry]
|
@@ -161,4 +136,60 @@ module Hokusai
|
|
161
136
|
def self.set_mouse_cursor(type)
|
162
137
|
@on_set_mouse_cursor&.call(type)
|
163
138
|
end
|
164
|
-
|
139
|
+
|
140
|
+
# Mobile support
|
141
|
+
def self.on_show_keyboard(&block)
|
142
|
+
@on_show_keyboard = block
|
143
|
+
end
|
144
|
+
|
145
|
+
def self.show_keyboard
|
146
|
+
@on_show_keyboard&.call
|
147
|
+
end
|
148
|
+
|
149
|
+
def self.on_hide_keyboard(&block)
|
150
|
+
@on_hide_keyboard = block
|
151
|
+
end
|
152
|
+
|
153
|
+
def self.hide_keyboard
|
154
|
+
@on_hide_keyboard&.call
|
155
|
+
end
|
156
|
+
|
157
|
+
def self.on_keyboard_visible(&block)
|
158
|
+
@on_keyboard_visible = block
|
159
|
+
end
|
160
|
+
|
161
|
+
def self.keyboard_visible?
|
162
|
+
@on_keyboard_visible&.call
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
require_relative './hokusai/blocks/empty'
|
167
|
+
require_relative './hokusai/blocks/vblock'
|
168
|
+
require_relative './hokusai/blocks/hblock'
|
169
|
+
require_relative './hokusai/blocks/label'
|
170
|
+
require_relative './hokusai/blocks/rect'
|
171
|
+
require_relative './hokusai/blocks/button'
|
172
|
+
require_relative './hokusai/blocks/circle'
|
173
|
+
require_relative './hokusai/blocks/checkbox'
|
174
|
+
require_relative './hokusai/blocks/scissor_begin'
|
175
|
+
require_relative './hokusai/blocks/scissor_end'
|
176
|
+
require_relative './hokusai/blocks/clipped'
|
177
|
+
require_relative './hokusai/blocks/cursor'
|
178
|
+
require_relative './hokusai/blocks/image'
|
179
|
+
require_relative './hokusai/blocks/svg'
|
180
|
+
require_relative './hokusai/blocks/toggle'
|
181
|
+
require_relative './hokusai/blocks/scrollbar'
|
182
|
+
require_relative './hokusai/blocks/dynamic'
|
183
|
+
require_relative './hokusai/blocks/panel'
|
184
|
+
require_relative './hokusai/blocks/text'
|
185
|
+
require_relative './hokusai/blocks/selectable'
|
186
|
+
require_relative './hokusai/blocks/input'
|
187
|
+
require_relative './hokusai/blocks/variable'
|
188
|
+
require_relative './hokusai/blocks/titlebar/osx'
|
189
|
+
require_relative './hokusai/blocks/modal'
|
190
|
+
require_relative './hokusai/blocks/dropdown'
|
191
|
+
require_relative './hokusai/blocks/shader_begin'
|
192
|
+
require_relative './hokusai/blocks/shader_end'
|
193
|
+
require_relative './hokusai/blocks/texture'
|
194
|
+
require_relative './hokusai/blocks/color_picker'
|
195
|
+
require_relative './hokusai/blocks/keyboard'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hokusai-zero
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.6.pre.
|
4
|
+
version: 0.2.6.pre.pinephone4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- skinnyjames
|
@@ -114,7 +114,6 @@ files:
|
|
114
114
|
- ast/test/fixtures/test.ui
|
115
115
|
- ast/test/greatest.h
|
116
116
|
- ast/test/hokusai.c
|
117
|
-
- ast/test/input.c
|
118
117
|
- ast/test/parser.c
|
119
118
|
- ast/test/text.c
|
120
119
|
- docs.sh
|
@@ -175,6 +174,7 @@ files:
|
|
175
174
|
- ui/examples/forum/music.rb
|
176
175
|
- ui/examples/forum/post.rb
|
177
176
|
- ui/examples/game.rb
|
177
|
+
- ui/examples/keyboard.rb
|
178
178
|
- ui/examples/overlay.rb
|
179
179
|
- ui/examples/provider.rb
|
180
180
|
- ui/examples/shader.rb
|
@@ -193,6 +193,7 @@ files:
|
|
193
193
|
- ui/spec/hokusai/diff_spec.rb
|
194
194
|
- ui/spec/hokusai/directives_spec.rb
|
195
195
|
- ui/spec/hokusai/e2e/client_spec.rb
|
196
|
+
- ui/spec/hokusai/e2e/keyboard_spec.rb
|
196
197
|
- ui/spec/hokusai/e2e/meta_spec.rb
|
197
198
|
- ui/spec/hokusai/providers_spec.rb
|
198
199
|
- ui/spec/hokusai/publisher_spec.rb
|
@@ -205,6 +206,8 @@ files:
|
|
205
206
|
- ui/src/hokusai/assets/arrow-down-wide-line.png
|
206
207
|
- ui/src/hokusai/assets/arrow-drop-down-line.png
|
207
208
|
- ui/src/hokusai/assets/close-large-line.png
|
209
|
+
- ui/src/hokusai/assets/icons/outline/arrow-big-up.svg
|
210
|
+
- ui/src/hokusai/assets/icons/outline/backspace.svg
|
208
211
|
- ui/src/hokusai/ast.rb
|
209
212
|
- ui/src/hokusai/automation.rb
|
210
213
|
- ui/src/hokusai/automation/client.rb
|
@@ -221,10 +224,6 @@ files:
|
|
221
224
|
- ui/src/hokusai/automation/keys_transcoder.rb
|
222
225
|
- ui/src/hokusai/automation/selector.rb
|
223
226
|
- ui/src/hokusai/automation/server.rb
|
224
|
-
- ui/src/hokusai/backends/embedded.rb
|
225
|
-
- ui/src/hokusai/backends/embedded/config.rb
|
226
|
-
- ui/src/hokusai/backends/embedded/font.rb
|
227
|
-
- ui/src/hokusai/backends/embedded/keys.rb
|
228
227
|
- ui/src/hokusai/backends/raylib.rb
|
229
228
|
- ui/src/hokusai/backends/raylib/config.rb
|
230
229
|
- ui/src/hokusai/backends/raylib/font.rb
|
@@ -248,6 +247,7 @@ files:
|
|
248
247
|
- ui/src/hokusai/blocks/hblock.rb
|
249
248
|
- ui/src/hokusai/blocks/image.rb
|
250
249
|
- ui/src/hokusai/blocks/input.rb
|
250
|
+
- ui/src/hokusai/blocks/keyboard.rb
|
251
251
|
- ui/src/hokusai/blocks/label.rb
|
252
252
|
- ui/src/hokusai/blocks/modal.rb
|
253
253
|
- ui/src/hokusai/blocks/panel.rb
|
@@ -258,6 +258,7 @@ files:
|
|
258
258
|
- ui/src/hokusai/blocks/selectable.rb
|
259
259
|
- ui/src/hokusai/blocks/shader_begin.rb
|
260
260
|
- ui/src/hokusai/blocks/shader_end.rb
|
261
|
+
- ui/src/hokusai/blocks/slider.rb
|
261
262
|
- ui/src/hokusai/blocks/svg.rb
|
262
263
|
- ui/src/hokusai/blocks/text.rb
|
263
264
|
- ui/src/hokusai/blocks/texture.rb
|
@@ -294,6 +295,7 @@ files:
|
|
294
295
|
- ui/src/hokusai/util/clamping_iterator.rb
|
295
296
|
- ui/src/hokusai/util/piece_table.rb
|
296
297
|
- ui/src/hokusai/util/selection.rb
|
298
|
+
- ui/src/hokusai/util/wrap_stream.rb
|
297
299
|
- ui/vendor/.gitkeep
|
298
300
|
- vendor/.gitkeep
|
299
301
|
- xmake.lua
|