libui 0.2.3 → 0.2.5
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/README.md +14 -11
- data/lib/libui/ffi.rb +8 -1
- data/lib/libui/platform.rb +12 -12
- data/lib/libui/version.rb +1 -1
- data/lib/libui.rb +4 -0
- data/vendor/libui.aarch64.so +0 -0
- data/vendor/libui.arm64.dylib +0 -0
- data/vendor/libui.x64.dll +0 -0
- data/vendor/libui.x86.dll +0 -0
- data/vendor/libui.x86_64.dylib +0 -0
- data/vendor/libui.x86_64.so +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cd23cf7341231407902fae7b163f36e3593ac4a0c42f1345e85913f186726031
|
|
4
|
+
data.tar.gz: 73888d1f9eb2c94004b9ca6a70ce34a3a6b40c0bdf7b1d29c3e8906cc25f7df7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 402a858b0d3df5bc3d1a572a7ccddddf332a85522400664c63401bd876ed1d0bd8991e1c57dbe72252a4c818fe51f89bbb93ca2d482f86c5ace9d653d67fc110
|
|
7
|
+
data.tar.gz: '029104d61d2fcc51b4b431cce400a9c35c970385a772052b8c0df28ad12f957c5f97881052116f0222d556f55421cbb838949fe95bc6f3af4ebc3357ba3241fb'
|
data/README.md
CHANGED
|
@@ -94,6 +94,9 @@ Text getter methods such as `label_text`, `entry_text`, and `window_title`
|
|
|
94
94
|
return `Fiddle::Pointer` objects for strings allocated by libui. Convert the
|
|
95
95
|
pointer to a Ruby string, then release it with `free_text`.
|
|
96
96
|
|
|
97
|
+
`LibUI.version` returns the loaded libui-ng build identifier as a Ruby string.
|
|
98
|
+
`LibUI::VERSION` is the gem version.
|
|
99
|
+
|
|
97
100
|
```ruby
|
|
98
101
|
label = UI.new_label("Ruby")
|
|
99
102
|
pointer = UI.label_text(label) # #<Fiddle::Pointer>
|
|
@@ -219,36 +222,36 @@ If you build libui-ng yourself, set `LIBUIDIR` to the directory containing the c
|
|
|
219
222
|
|
|
220
223
|
#### Automated Publishing
|
|
221
224
|
|
|
222
|
-
|
|
225
|
+
After updating `lib/libui/version.rb` and pushing `0.2-stable`, wait for CI to
|
|
226
|
+
pass, then push the new version tag to publish platform-specific and generic gems:
|
|
223
227
|
|
|
224
228
|
```sh
|
|
225
|
-
git tag v0.2.
|
|
226
|
-
git push origin v0.2.
|
|
229
|
+
git tag v0.2.5
|
|
230
|
+
git push origin v0.2.5
|
|
227
231
|
```
|
|
228
232
|
|
|
229
|
-
|
|
233
|
+
The release workflow uses RubyGems Trusted Publishing via the
|
|
234
|
+
`release-rubygems` GitHub environment.
|
|
230
235
|
|
|
231
236
|
#### Manual Publishing
|
|
232
237
|
|
|
233
238
|
```sh
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
rake build_platform # build gems
|
|
239
|
+
bundle exec rake vendor:all # download all native libraries
|
|
240
|
+
bundle exec rake build_platform # build platform gems
|
|
237
241
|
|
|
238
242
|
# Check the contents of the gem
|
|
239
243
|
find pkg -name *.gem -exec sh -c "echo; echo \# {}; tar -O -f {} -x data.tar.gz | tar zt" \;
|
|
240
244
|
|
|
241
|
-
rake release_platform # publish gems
|
|
245
|
+
bundle exec rake release_platform # publish platform gems
|
|
242
246
|
```
|
|
243
247
|
|
|
244
|
-
Windows Ruby (x64-
|
|
248
|
+
Windows Ruby (use `x64-mingw-ucrt` in place of `x64-mingw32` for UCRT):
|
|
245
249
|
|
|
246
250
|
```sh
|
|
247
251
|
gem install rake rubyzip
|
|
248
|
-
GEM_PLATFORM=x64-mingw32 rake vendor:clean
|
|
249
252
|
GEM_PLATFORM=x64-mingw32 rake vendor:auto
|
|
250
253
|
GEM_PLATFORM=x64-mingw32 gem build libui.gemspec
|
|
251
|
-
gem push libui-0.2.
|
|
254
|
+
gem push libui-0.2.5-x64-mingw32.gem
|
|
252
255
|
```
|
|
253
256
|
|
|
254
257
|
### libui or libui-ng
|
data/lib/libui/ffi.rb
CHANGED
|
@@ -45,6 +45,7 @@ module LibUI
|
|
|
45
45
|
# https://github.com/andlabs/libui/blob/master/ui.h
|
|
46
46
|
# keep same order
|
|
47
47
|
|
|
48
|
+
try_extern 'const char *uiVersion(void)'
|
|
48
49
|
try_extern 'const char *uiInit(uiInitOptions *options)'
|
|
49
50
|
try_extern 'void uiUninit(void)'
|
|
50
51
|
try_extern 'void uiFreeInitError(const char *err)'
|
|
@@ -76,6 +77,7 @@ module LibUI
|
|
|
76
77
|
]
|
|
77
78
|
|
|
78
79
|
try_extern 'void uiControlDestroy(uiControl *c)'
|
|
80
|
+
try_extern 'void uiControlOnDestroyed(uiControl *c, void (*f)(uiControl *c, void *data), void *data)'
|
|
79
81
|
try_extern 'uintptr_t uiControlHandle(uiControl *c)'
|
|
80
82
|
try_extern 'uiControl *uiControlParent(uiControl *c)'
|
|
81
83
|
try_extern 'void uiControlSetParent(uiControl *c, uiControl *parent)'
|
|
@@ -86,6 +88,7 @@ module LibUI
|
|
|
86
88
|
try_extern 'int uiControlEnabled(uiControl *c)'
|
|
87
89
|
try_extern 'void uiControlEnable(uiControl *c)'
|
|
88
90
|
try_extern 'void uiControlDisable(uiControl *c)'
|
|
91
|
+
try_extern 'void uiControlSetMinimumSize(uiControl *c, int width, int height)'
|
|
89
92
|
|
|
90
93
|
try_extern 'uiControl *uiAllocControl(size_t n, uint32_t OSsig, uint32_t typesig, const char *typenamestr)'
|
|
91
94
|
try_extern 'void uiFreeControl(uiControl *c)'
|
|
@@ -170,6 +173,9 @@ module LibUI
|
|
|
170
173
|
try_extern 'int uiTabNumPages(uiTab *t)'
|
|
171
174
|
try_extern 'int uiTabMargined(uiTab *t, int index)'
|
|
172
175
|
try_extern 'void uiTabSetMargined(uiTab *t, int index, int margined)'
|
|
176
|
+
try_extern 'int uiTabSelected(uiTab *t)'
|
|
177
|
+
try_extern 'void uiTabSetSelected(uiTab *t, int index)'
|
|
178
|
+
try_extern 'void uiTabOnSelected(uiTab *t, void (*f)(uiTab *sender, void *senderData), void *data)'
|
|
173
179
|
try_extern 'uiTab *uiNewTab(void)'
|
|
174
180
|
|
|
175
181
|
# uiGroup
|
|
@@ -571,6 +577,7 @@ module LibUI
|
|
|
571
577
|
|
|
572
578
|
try_extern 'void uiGridAppend(uiGrid *g, uiControl *c, int left, int top, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign)'
|
|
573
579
|
try_extern 'void uiGridInsertAt(uiGrid *g, uiControl *c, uiControl *existing, uiAt at, int xspan, int yspan, int hexpand, uiAlign halign, int vexpand, uiAlign valign)'
|
|
580
|
+
try_extern 'void uiGridDelete(uiGrid *g, uiControl *c)'
|
|
574
581
|
try_extern 'int uiGridPadded(uiGrid *g)'
|
|
575
582
|
try_extern 'void uiGridSetPadded(uiGrid *g, int padded)'
|
|
576
583
|
try_extern 'uiGrid *uiNewGrid(void)'
|
|
@@ -579,7 +586,7 @@ module LibUI
|
|
|
579
586
|
|
|
580
587
|
try_extern 'uiImage *uiNewImage(double width, double height)'
|
|
581
588
|
try_extern 'void uiFreeImage(uiImage *i)'
|
|
582
|
-
try_extern 'void uiImageAppend(uiImage *i, void *pixels, int pixelWidth, int pixelHeight, int byteStride)'
|
|
589
|
+
try_extern 'void uiImageAppend(uiImage *i, const void *pixels, int pixelWidth, int pixelHeight, int byteStride)'
|
|
583
590
|
|
|
584
591
|
# uiTable
|
|
585
592
|
try_extern 'void uiFreeTableValue(uiTableValue *v)'
|
data/lib/libui/platform.rb
CHANGED
|
@@ -6,38 +6,38 @@ module LibUI
|
|
|
6
6
|
'arm64-darwin' => {
|
|
7
7
|
vendor: 'vendor/libui.arm64.dylib',
|
|
8
8
|
lib_names: ['libui.arm64.dylib', 'libui.dylib'],
|
|
9
|
-
release_zip: '
|
|
10
|
-
release_src: '
|
|
9
|
+
release_zip: 'libui-ng-macos-arm64-shared-release.zip',
|
|
10
|
+
release_src: 'lib/libui.dylib'
|
|
11
11
|
},
|
|
12
12
|
'x86_64-darwin' => {
|
|
13
13
|
vendor: 'vendor/libui.x86_64.dylib',
|
|
14
14
|
lib_names: ['libui.x86_64.dylib', 'libui.dylib'],
|
|
15
|
-
release_zip: '
|
|
16
|
-
release_src: '
|
|
15
|
+
release_zip: 'libui-ng-macos-x64-shared-release.zip',
|
|
16
|
+
release_src: 'lib/libui.dylib'
|
|
17
17
|
},
|
|
18
18
|
'x86_64-linux' => {
|
|
19
19
|
vendor: 'vendor/libui.x86_64.so',
|
|
20
20
|
lib_names: ['libui.x86_64.so', 'libui.so'],
|
|
21
|
-
release_zip: '
|
|
22
|
-
release_src: '
|
|
21
|
+
release_zip: 'libui-ng-ubuntu-x64-shared-release.zip',
|
|
22
|
+
release_src: 'lib/libui.so'
|
|
23
23
|
},
|
|
24
24
|
'aarch64-linux' => {
|
|
25
25
|
vendor: 'vendor/libui.aarch64.so',
|
|
26
26
|
lib_names: ['libui.aarch64.so', 'libui.so'],
|
|
27
|
-
release_zip: '
|
|
28
|
-
release_src: '
|
|
27
|
+
release_zip: 'libui-ng-ubuntu-arm64-shared-release.zip',
|
|
28
|
+
release_src: 'lib/libui.so'
|
|
29
29
|
},
|
|
30
30
|
'x64-mingw32' => {
|
|
31
31
|
vendor: 'vendor/libui.x64.dll',
|
|
32
32
|
lib_names: ['libui.x64.dll', 'libui.dll'],
|
|
33
|
-
release_zip: '
|
|
34
|
-
release_src: '
|
|
33
|
+
release_zip: 'libui-ng-windows-x64-msvc-shared-md-release.zip',
|
|
34
|
+
release_src: 'bin/libui.dll'
|
|
35
35
|
},
|
|
36
36
|
'x86-mingw32' => {
|
|
37
37
|
vendor: 'vendor/libui.x86.dll',
|
|
38
38
|
lib_names: ['libui.x86.dll', 'libui.dll'],
|
|
39
|
-
release_zip: '
|
|
40
|
-
release_src: '
|
|
39
|
+
release_zip: 'libui-ng-windows-x86-msvc-shared-md-release.zip',
|
|
40
|
+
release_src: 'bin/libui.dll'
|
|
41
41
|
}
|
|
42
42
|
}.freeze
|
|
43
43
|
|
data/lib/libui/version.rb
CHANGED
data/lib/libui.rb
CHANGED
data/vendor/libui.aarch64.so
CHANGED
|
Binary file
|
data/vendor/libui.arm64.dylib
CHANGED
|
Binary file
|
data/vendor/libui.x64.dll
CHANGED
|
Binary file
|
data/vendor/libui.x86.dll
CHANGED
|
Binary file
|
data/vendor/libui.x86_64.dylib
CHANGED
|
Binary file
|
data/vendor/libui.x86_64.so
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: libui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- kojix2
|
|
@@ -58,14 +58,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '2.
|
|
61
|
+
version: '2.7'
|
|
62
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
63
|
requirements:
|
|
64
64
|
- - ">="
|
|
65
65
|
- !ruby/object:Gem::Version
|
|
66
66
|
version: '0'
|
|
67
67
|
requirements: []
|
|
68
|
-
rubygems_version:
|
|
68
|
+
rubygems_version: 4.0.20
|
|
69
69
|
specification_version: 4
|
|
70
70
|
summary: Ruby bindings to libui
|
|
71
71
|
test_files: []
|