glimmer-dsl-libui 0.3.1 → 0.3.2

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: 74fca1540788e27b3b5086a888b83f0fe13e296c54eb6faf4ed244ee8e659484
4
- data.tar.gz: 0ce0c22598269dea07489049462f3b94a16e75fc68dcb1fc61f69f1ad66686a0
3
+ metadata.gz: 2ed68bb2e66a4360184bea96a6fcfdfc4a13bdab5bb18861c536250b2e877a84
4
+ data.tar.gz: 5d17577d31c8d1ad76f7e1c05acfbfb92c02ba70371a25907ebce882a177a2d0
5
5
  SHA512:
6
- metadata.gz: e449f830e5cdf53aae5bcd490644b5f6611f080353f455a833b17c75dc2f2dd3feacac53fc584aff06d38f7b6f9665b423818d81f6e42523b0549ac029269170
7
- data.tar.gz: 78eb5db52c86d37166f32a91fee303d6cbd3ba91e9add0cd97c6ff6db14d85348a947fdf53bfd9e254a66bff819308844eb9669ebd7affe3c9d7c46cc08729f4
6
+ metadata.gz: 119b53a76cfe2c401087e8199b2625e527241911d04b6952ff161eae743e18dce8a7e4ea05ade7cb5ecb4753db8b48d7df7e5a52c09eb21e5eee186d1bccd833
7
+ data.tar.gz: 5236ce0bd94c52a1d25ea60587221e6ec8fe352f8a3e7e6abe48980b430fd1002256dd1b85ece3c6c6300a77955156e82445be58767197747fa1b82073b080e4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.3.2
4
+
5
+ - Fix issue with attempting to free `image` as an object from memory by mistake when used as a control (not an object for `table`)
6
+
3
7
  ## 0.3.1
4
8
 
5
9
  - Support building `image_column` `image` objects in a `table` via `file` property (simplify through automation of use of `image_part` for `.png` image files given that `chunky_png` is now included in the gem)
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for LibUI 0.3.1
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for LibUI 0.3.2
2
2
  ## Prerequisite-Free Ruby Desktop Development GUI Library
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-libui.svg)](http://badge.fury.io/rb/glimmer-dsl-libui)
4
4
  [![Join the chat at https://gitter.im/AndyObtiva/glimmer](https://badges.gitter.im/AndyObtiva/glimmer.svg)](https://gitter.im/AndyObtiva/glimmer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -382,7 +382,7 @@ gem install glimmer-dsl-libui
382
382
  Or install via Bundler `Gemfile`:
383
383
 
384
384
  ```ruby
385
- gem 'glimmer-dsl-libui', '~> 0.3.1'
385
+ gem 'glimmer-dsl-libui', '~> 0.3.2'
386
386
  ```
387
387
 
388
388
  Add `require 'glimmer-dsl-libui'` at the top, and then `include Glimmer` into the top-level main object for testing or into an actual class for serious usage.
@@ -453,6 +453,8 @@ w.libui # => #<Fiddle::Pointer:0x00007fde53997980 ptr=0x00007fde51352a60 size=0
453
453
 
454
454
  ### Supported Keywords
455
455
 
456
+ These are all the supported keywords. Note that some keywords do not represent controls, but produce objects that are used as the property values of controls (e.g. `image` can be used as a control under `area` or alternatively build objects to use in `cell_rows` for a `table` with an `image_column`)
457
+
456
458
  Keyword(Args) | Properties | Listeners
457
459
  ------------- | ---------- | ---------
458
460
  `about_menu_item` | None | `on_clicked`
@@ -480,7 +482,7 @@ Keyword(Args) | Properties | Listeners
480
482
  `group(text as String)` | `margined` (Boolean), `title` (`String`) | None
481
483
  `horizontal_box` | `padded` (Boolean) | None
482
484
  `horizontal_separator` | None | None
483
- `image(file as String = nil, width as Numeric = nil, height as Numeric = nil)` | None | None
485
+ `image(file as String = nil, width as Numeric = nil, height as Numeric = nil)` | `file` (`String` path or URL), `width`, `height` | None
484
486
  `image_part(pixels as String [encoded image rgba byte array], width as Numeric, height as Numeric, byte_stride as Numeric [usually width*4])` | None | None
485
487
  `image_column(name as String)` | None | None
486
488
  `image_text_column(name as String)` | None | None
@@ -885,9 +887,9 @@ Linux
885
887
  **(ALPHA FEATURE)**
886
888
 
887
889
  [libui](https://github.com/andlabs/libui) does not support `image` rendering outside of `table` yet.
888
- However, [Glimmer DSL for LibUI](https://rubygems.org/gems/glimmer-dsl-libui) adds a special `image` custom control that renders an image unto an `area` pixel by pixel (and when possible to optimize, line by line).
890
+ However, [Glimmer DSL for LibUI](https://rubygems.org/gems/glimmer-dsl-libui) adds a special `image(file as String path or web URL, width as Numeric, height as Numeric)` custom control that renders an image unto an `area` pixel by pixel (and when possible to optimize, line by line).
889
891
 
890
- Given that it is very new and not a [libui](https://github.com/andlabs/libui)-native control, please keep these notes in mind:
892
+ Given that it is very new and is not a [libui](https://github.com/andlabs/libui)-native control, please keep these notes in mind:
891
893
  - It only supports the `.png` file format.
892
894
  - [libui](https://github.com/andlabs/libui) pixel-by-pixel rendering performance is slow.
893
895
  - Including an `image` inside an `area` `on_draw` listener improves performance due to not retaining pixel/line data in memory.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.1
1
+ 0.3.2
Binary file
@@ -123,8 +123,7 @@ module Glimmer
123
123
  end
124
124
 
125
125
  def area_image?
126
- @parent_proxy&.is_a?(AreaProxy) or
127
- AreaProxy.current_area_draw_params
126
+ @area_image ||= !!(@parent_proxy&.is_a?(AreaProxy) || AreaProxy.current_area_draw_params)
128
127
  end
129
128
 
130
129
  def destroy
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-libui
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh