glimmer 0.4.4 → 0.4.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
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 313a2b82012ccded3ec1eb15a190a75354e6528c4835c2d90d5139c30764558c
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 1439d36f56bf10e99d6d0d6fd0582aefd86a07b82f1b82bd127ab5a0f12b5909
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: b073d545dbdddb31ceb9cb543f76d2b05bc541f133234174dd56e7e492d1a44315df91135a215c91c0935f229fd4126a3e7b0e13c6bf1adcd765ae70e1b8be9c
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: d64203b4bb7c91078c802bf67cf5b52674b61f0ba41f1c1df3de684064e7cde7e9c5cf6bf6df5a1ffe43b2a924b43db86644a55dce08211c38b78700239e8530
         
     | 
    
        data/README.markdown
    CHANGED
    
    | 
         @@ -102,14 +102,14 @@ Please follow these instructions to make the `glimmer` command available on your 
     | 
|
| 
       102 
102 
     | 
    
         | 
| 
       103 
103 
     | 
    
         
             
            Run this command to install directly:
         
     | 
| 
       104 
104 
     | 
    
         
             
            ```
         
     | 
| 
       105 
     | 
    
         
            -
            jgem install glimmer -v 0.4. 
     | 
| 
      
 105 
     | 
    
         
            +
            jgem install glimmer -v 0.4.5
         
     | 
| 
       106 
106 
     | 
    
         
             
            ```
         
     | 
| 
       107 
107 
     | 
    
         | 
| 
       108 
108 
     | 
    
         
             
            ### Option 2: Bundler
         
     | 
| 
       109 
109 
     | 
    
         | 
| 
       110 
110 
     | 
    
         
             
            Add the following to `Gemfile`:
         
     | 
| 
       111 
111 
     | 
    
         
             
            ```
         
     | 
| 
       112 
     | 
    
         
            -
            gem 'glimmer', '~> 0.4. 
     | 
| 
      
 112 
     | 
    
         
            +
            gem 'glimmer', '~> 0.4.5'
         
     | 
| 
       113 
113 
     | 
    
         
             
            ```
         
     | 
| 
       114 
114 
     | 
    
         | 
| 
       115 
115 
     | 
    
         
             
            And, then run:
         
     | 
| 
         @@ -152,6 +152,45 @@ Other widget examples: 
     | 
|
| 
       152 
152 
     | 
    
         
             
            - `table_column`: wrapper for `org.eclipse.swt.widgets.TableColumn`
         
     | 
| 
       153 
153 
     | 
    
         
             
            - `tree`: wrapper for `org.eclipse.swt.widgets.Tree`
         
     | 
| 
       154 
154 
     | 
    
         | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
            **Browser Widget**
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
            Glimmer supports SWT Browser widget, which can load URLs (including media) or render HTML (useful in embedding videos). It can even be instrumented with JavaScript when needed (though highly discouraged except for rare cases when leveraging a pre-existing web codebase in a desktop app).
         
     | 
| 
      
 159 
     | 
    
         
            +
             
     | 
| 
      
 160 
     | 
    
         
            +
            Example loading a URL:
         
     | 
| 
      
 161 
     | 
    
         
            +
             
     | 
| 
      
 162 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 163 
     | 
    
         
            +
            shell {
         
     | 
| 
      
 164 
     | 
    
         
            +
              browser {
         
     | 
| 
      
 165 
     | 
    
         
            +
                url 'http://www.google.com'
         
     | 
| 
      
 166 
     | 
    
         
            +
              }
         
     | 
| 
      
 167 
     | 
    
         
            +
            }
         
     | 
| 
      
 168 
     | 
    
         
            +
            ```
         
     | 
| 
      
 169 
     | 
    
         
            +
             
     | 
| 
      
 170 
     | 
    
         
            +
            Example rendering HTML with an embedded video:
         
     | 
| 
      
 171 
     | 
    
         
            +
             
     | 
| 
      
 172 
     | 
    
         
            +
            ```ruby
         
     | 
| 
      
 173 
     | 
    
         
            +
            shell {
         
     | 
| 
      
 174 
     | 
    
         
            +
              @browser = browser {
         
     | 
| 
      
 175 
     | 
    
         
            +
                text <<~HTML
         
     | 
| 
      
 176 
     | 
    
         
            +
                  <html>
         
     | 
| 
      
 177 
     | 
    
         
            +
                    <head>
         
     | 
| 
      
 178 
     | 
    
         
            +
                    </head>
         
     | 
| 
      
 179 
     | 
    
         
            +
                    <body>
         
     | 
| 
      
 180 
     | 
    
         
            +
                      <video id="bowling-video" width="100%" height="100%">
         
     | 
| 
      
 181 
     | 
    
         
            +
                        <source src="file://#{video_file}" type="video/mp4">
         
     | 
| 
      
 182 
     | 
    
         
            +
                      Your browser does not support the video tag.
         
     | 
| 
      
 183 
     | 
    
         
            +
                      </video>
         
     | 
| 
      
 184 
     | 
    
         
            +
                    </body>
         
     | 
| 
      
 185 
     | 
    
         
            +
                  </html>
         
     | 
| 
      
 186 
     | 
    
         
            +
                HTML
         
     | 
| 
      
 187 
     | 
    
         
            +
                on_completed { # on load of the page execute this JavaScript
         
     | 
| 
      
 188 
     | 
    
         
            +
                  @browser.widget.execute("document.getElementById('bowling-video').play()")
         
     | 
| 
      
 189 
     | 
    
         
            +
                }
         
     | 
| 
      
 190 
     | 
    
         
            +
              }
         
     | 
| 
      
 191 
     | 
    
         
            +
            }
         
     | 
| 
      
 192 
     | 
    
         
            +
            ```
         
     | 
| 
      
 193 
     | 
    
         
            +
             
     | 
| 
       155 
194 
     | 
    
         
             
            ### Widget Styles
         
     | 
| 
       156 
195 
     | 
    
         | 
| 
       157 
196 
     | 
    
         
             
            SWT widgets receive `SWT` styles in their constructor as per this guide:
         
     | 
| 
         @@ -200,7 +239,7 @@ You may check out all available `SWT` styles here: 
     | 
|
| 
       200 
239 
     | 
    
         | 
| 
       201 
240 
     | 
    
         
             
            https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/SWT.html
         
     | 
| 
       202 
241 
     | 
    
         | 
| 
       203 
     | 
    
         
            -
            ** 
     | 
| 
      
 242 
     | 
    
         
            +
            **Advanced case outside of standard Glimmer DSL**
         
     | 
| 
       204 
243 
     | 
    
         | 
| 
       205 
244 
     | 
    
         
             
            When building a widget-related SWT object manually (e.g. `GridData.new(...)`), you are expected to use `SWT::CONSTANT` directly or BIT-OR a few SWT constants together like `SWT::BORDER | SWT::V_SCROLL`.
         
     | 
| 
       206 
245 
     | 
    
         | 
| 
         @@ -219,7 +258,7 @@ shell(:no_resize) { 
     | 
|
| 
       219 
258 
     | 
    
         | 
| 
       220 
259 
     | 
    
         
             
            ### Widget Properties
         
     | 
| 
       221 
260 
     | 
    
         | 
| 
       222 
     | 
    
         
            -
            Widget properties such as value, enablement, and layout details are set within the widget block using methods matching SWT widget property names in lower snakecase. You may refer to SWT widget guide for details on available widget properties:
         
     | 
| 
      
 261 
     | 
    
         
            +
            Widget properties such as text value, enablement, visibility, and layout details are set within the widget block using methods matching SWT widget property names in lower snakecase. You may refer to SWT widget guide for details on available widget properties:
         
     | 
| 
       223 
262 
     | 
    
         | 
| 
       224 
263 
     | 
    
         
             
            https://help.eclipse.org/2019-12/topic/org.eclipse.platform.doc.isv/guide/swt_widgets_controls.htm?cp=2_0_7_0_0
         
     | 
| 
       225 
264 
     | 
    
         | 
| 
         @@ -569,7 +608,7 @@ class TicTacToe 
     | 
|
| 
       569 
608 
     | 
    
         
             
            end
         
     | 
| 
       570 
609 
     | 
    
         
             
            ```
         
     | 
| 
       571 
610 
     | 
    
         | 
| 
       572 
     | 
    
         
            -
             
     | 
| 
      
 611 
     | 
    
         
            +
            ### Custom Widgets
         
     | 
| 
       573 
612 
     | 
    
         | 
| 
       574 
613 
     | 
    
         
             
            Glimmer supports creating custom widgets with minimal code, which automatically extends Glimmer's DSL syntax with an underscored lowercase keyword.
         
     | 
| 
       575 
614 
     | 
    
         | 
    
        data/lib/glimmer/swt/g_widget.rb
    CHANGED
    
    
    
        data/lib/glimmer/swt_packages.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: glimmer
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.4. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.4.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - AndyMaleh
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire:
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2020-03- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2020-03-25 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
         @@ -43,7 +43,7 @@ dependencies: 
     | 
|
| 
       43 
43 
     | 
    
         
             
                requirements:
         
     | 
| 
       44 
44 
     | 
    
         
             
                - - '='
         
     | 
| 
       45 
45 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       46 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 46 
     | 
    
         
            +
                    version: 1.3.0
         
     | 
| 
       47 
47 
     | 
    
         
             
              name: super_module
         
     | 
| 
       48 
48 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       49 
49 
     | 
    
         
             
              prerelease: false
         
     | 
| 
         @@ -51,7 +51,7 @@ dependencies: 
     | 
|
| 
       51 
51 
     | 
    
         
             
                requirements:
         
     | 
| 
       52 
52 
     | 
    
         
             
                - - '='
         
     | 
| 
       53 
53 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       54 
     | 
    
         
            -
                    version: 1. 
     | 
| 
      
 54 
     | 
    
         
            +
                    version: 1.3.0
         
     | 
| 
       55 
55 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       56 
56 
     | 
    
         
             
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       57 
57 
     | 
    
         
             
                requirements:
         
     |