libui 0.2.4-aarch64-linux → 0.2.5-aarch64-linux

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7496c52de8d0d6f7148d92a68d701f09d8a161614500bdc3e4c1cdbcd65151ce
4
- data.tar.gz: 82c21e5b08800c217612ffc7cb4b9e5b19393a2a4083882d15faf4aaa57979cf
3
+ metadata.gz: 77994b2bace98793bf5f43754222d006a11cf5fed59b621c3ffea4fada0487cc
4
+ data.tar.gz: 9a8134abb376c4a2051b1e669eaebf7ee4d22a27823f5793b14841962f579395
5
5
  SHA512:
6
- metadata.gz: 3686768210fdb79b5d9574885882646b81d83a2d3d315d372f4dfcbb5d8b665bf76851698c0813f35dbfa9d4f24c1e303d4a0fb3d31390843d8314dd248a0d60
7
- data.tar.gz: 4867f5321a9df684ad387db6d921ffb515adf7a19ea33b0d43da640b8f1ebbda52adfd3418f6a0bdc3d110c81a7bc763585edc826adeab39e7810d0ae09747dd
6
+ metadata.gz: 70c69023026412376ae02ce9edce3f6c4bb20ad0735b51604a9a6ce7127eb0b5bf033e7f62b038f72bb595f5d2c62d0e0d3af8139b3c9671b9cea4b825ad678f
7
+ data.tar.gz: 30204c488bf75d4d2ee01a94b9144037ee8314b3c94197fd88ea16cbbca977991220b31cb51e5a865fe134c64fb3844116c9b5c013384f236d91cf4d2c0c26e3
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
- Push a version tag to automatically publish platform-specific gems:
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.0
226
- git push origin v0.2.0
229
+ git tag v0.2.5
230
+ git push origin v0.2.5
227
231
  ```
228
232
 
229
- Requires `RUBYGEMS_API_KEY` repository secret with scoped API key.
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
- ls vendor # check the vendor directory
235
- rm -rf pkg # remove previously built gems
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-mingw32 or x64-mingw-ucrt)
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.0-x64-mingw32.gem
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)'
@@ -574,6 +577,7 @@ module LibUI
574
577
 
575
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)'
576
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)'
577
581
  try_extern 'int uiGridPadded(uiGrid *g)'
578
582
  try_extern 'void uiGridSetPadded(uiGrid *g, int padded)'
579
583
  try_extern 'uiGrid *uiNewGrid(void)'
@@ -582,7 +586,7 @@ module LibUI
582
586
 
583
587
  try_extern 'uiImage *uiNewImage(double width, double height)'
584
588
  try_extern 'void uiFreeImage(uiImage *i)'
585
- 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)'
586
590
 
587
591
  # uiTable
588
592
  try_extern 'void uiFreeTableValue(uiTableValue *v)'
@@ -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: 'macOS-arm64-shared-release.zip',
10
- release_src: 'builddir/meson-out/libui.dylib'
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: 'macOS-x64-shared-release.zip',
16
- release_src: 'builddir/meson-out/libui.dylib'
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: 'Ubuntu-x64-shared-release.zip',
22
- release_src: 'builddir/meson-out/libui.so'
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: 'Ubuntu-arm64-shared-release.zip',
28
- release_src: 'builddir/meson-out/libui.so'
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: 'Windows-x64-msvc-shared-release.zip',
34
- release_src: 'builddir/meson-out/libui.dll'
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: 'Windows-x86-msvc-shared-release.zip',
40
- release_src: 'builddir/meson-out/libui.dll'
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
@@ -1,3 +1,3 @@
1
1
  module LibUI
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
data/lib/libui.rb CHANGED
@@ -25,6 +25,10 @@ module LibUI
25
25
  extend LibUIBase
26
26
 
27
27
  class << self
28
+ def version
29
+ super.to_s
30
+ end
31
+
28
32
  def init(opt = nil)
29
33
  # Allocate uiInitOptions if not provided
30
34
  unless opt
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
4
+ version: 0.2.5
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - kojix2
@@ -53,14 +53,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - ">="
55
55
  - !ruby/object:Gem::Version
56
- version: '2.6'
56
+ version: '2.7'
57
57
  required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  requirements: []
63
- rubygems_version: 3.6.9
63
+ rubygems_version: 4.0.20
64
64
  specification_version: 4
65
65
  summary: Ruby bindings to libui
66
66
  test_files: []