windows_gui 4.0.1 → 4.0.3

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
  SHA1:
3
- metadata.gz: 1e252645f441188b5153bc976d7f207dda3229df
4
- data.tar.gz: 455f36ab22546e9f48f4de1d3fcdbfbed06d0fc2
3
+ metadata.gz: b24126d4848b0fcbe9a1f2b36329486cb82cb515
4
+ data.tar.gz: 3c00c4590f48bf96be33a1c9862c3bc710896598
5
5
  SHA512:
6
- metadata.gz: a42a9d6d3b6c3f8fa00195a0762801ec1c41837d6c91ede5c88aa42383683515c6410ccf68e28fe3f7c25509168f183bac6691600e5573efa098a78f3478a2a1
7
- data.tar.gz: ed34353ffe28a1cf53451084ce27369471462a11020e3e23c383857fead66d4cd60330f7fdc02be60395c5713e76933919554c4da2dd9fb6d8f8dbe06bf3c63c
6
+ metadata.gz: b47573f09c2a65b50b30c8f322bb9d16a48a406dc9baaf24bc2d22650d16f01c071a815ed72cd51c5c4992392f44c321586f4729d4588420d7d577533514f175
7
+ data.tar.gz: 27173f247903abbe80d6bbbb75ef18a59638c23f3a009d80ff65201fb639c9e213908a2655f36ec25f6020befe0e41fa16b899f37038ca16d2f56190f2a75e3e
data/RELNOTES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release Notes
2
2
 
3
+ ## 4.0.3
4
+
5
+ Minor fixes
6
+
3
7
  ## 4.0.1
4
8
 
5
9
  Fix example and debug call
@@ -30,7 +30,7 @@ def OnContextMenu(hwnd,
30
30
  )
31
31
  xtra = Id2Ref[GetWindowLong(hwnd, GWL_USERDATA)]
32
32
 
33
- POINT.new { |point|
33
+ UsingFFIStructs(POINT.new) { |point|
34
34
  GetCursorPos(point)
35
35
 
36
36
  x, y = point.values
data/examples/Paint.rbw CHANGED
@@ -128,7 +128,7 @@ def WinMain
128
128
 
129
129
  exit(0) if hwnd.null?
130
130
 
131
- AnimateWindow(hwnd, 1000, AW_ACTIVATE | AW_BLEND)
131
+ AnimateWindow(hwnd, 5000, AW_ACTIVATE | AW_BLEND)
132
132
 
133
133
  UsingFFIStructs(MSG.new) { |msg|
134
134
  until DetonateLastError(-1, :GetMessage,
@@ -1,7 +1,7 @@
1
1
  require 'weakref'
2
2
  require 'ffi'
3
3
 
4
- WINDOWS_GUI_VERSION = '4.0.1'
4
+ WINDOWS_GUI_VERSION = '4.0.3'
5
5
 
6
6
  WINDOWS_GUI_VISUAL_STYLES = true unless defined?(WINDOWS_GUI_VISUAL_STYLES)
7
7
  WINDOWS_GUI_DPI_AWARE = true unless defined?(WINDOWS_GUI_DPI_AWARE)
@@ -64,6 +64,7 @@ module WindowsGUI
64
64
  yield result if failed && block_given?
65
65
  end
66
66
 
67
+ # TODO: GetLastError always returns 0
67
68
  def DetonateLastError(on, name, *args)
68
69
  result = send(name, *args)
69
70
  failed = [*on].include?(result)
@@ -30,6 +30,9 @@ module WindowsGUI
30
30
  :wReserved, :uchar
31
31
  end
32
32
 
33
+ # TODO: GetVersionEx is deprecated and will report WIN8 on later Windows versions
34
+ # unless a manifest file is used
35
+ # https://msdn.microsoft.com/en-us/library/windows/desktop/dn481241.aspx
33
36
  attach_function :GetVersionEx, :GetVersionExW, [
34
37
  OSVERSIONINFOEX.by_ref
35
38
  ], :int
@@ -184,11 +187,9 @@ module WindowsGUI
184
187
  ReleaseActCtx(COMMON_CONTROLS_ACTCTX[:handle]) unless
185
188
  COMMON_CONTROLS_ACTCTX[:handle] == INVALID_HANDLE_VALUE
186
189
 
187
- COMMON_CONTROLS_ACTCTX[:cookie].free unless
188
- COMMON_CONTROLS_ACTCTX[:cookie] == FFI::Pointer::NULL
190
+ COMMON_CONTROLS_ACTCTX[:cookie].free
189
191
 
190
192
  COMMON_CONTROLS_ACTCTX[:handle] = INVALID_HANDLE_VALUE
191
- COMMON_CONTROLS_ACTCTX[:cookie] = FFI::Pointer::NULL
192
193
  COMMON_CONTROLS_ACTCTX[:activated] = false
193
194
 
194
195
  STDERR.puts "Visual styles cleanup (COMMON_CONTROLS_ACTCTX: #{COMMON_CONTROLS_ACTCTX})" if $DEBUG
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: windows_gui
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.1
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Radoslav Peev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-27 00:00:00.000000000 Z
11
+ date: 2017-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi