windows_gui 3.0.0 → 3.0.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
  SHA1:
3
- metadata.gz: 3e0e923bcf857c772ac3991211447a2cd855220f
4
- data.tar.gz: 70570896e71622bcc9910319c22b8573ad0c1de1
3
+ metadata.gz: 95dd7c7c9ab71ebfc897b76fb2baa67be52d3f84
4
+ data.tar.gz: efff862e7a92f2d33ff138fdda7bd9ce760516f2
5
5
  SHA512:
6
- metadata.gz: 9d41d0b0068942cd263a688fc0b464690fc9ec15de71183b825c95e49f3f94693150d50fb64e2d01f4618df0fe7d8a26a6c5bc33f4f58a95ce44327e33952332
7
- data.tar.gz: 10ef1d3624ebdfe89505ee90f009214d120ded80ad8d58de864ce2cde81515f6539ae3586aa862d7dbd73f3f20589485523e7933dee1bc2c5a9de8b76122562a
6
+ metadata.gz: 1c4e85ee289451dd7e4aece5b74fe8aae151d7308064b932daa9b91d97790b9ae6b87a8277f387d04bc11602db72455fe69e4d820259e9749bd4348cd0c818ff
7
+ data.tar.gz: 13884d853f9d90a5a465f59d9e07e794286aba16989e680746dc86a96ecae0bcdfdfd55f2624917d71b91dc089f4668a55c68942a8452c64c7b91d77541dc529
data/RELNOTES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release Notes
2
2
 
3
+ ## 3.0.2
4
+
5
+ Add recent Windows version info
6
+
3
7
  ## 3.0.0
4
8
 
5
9
  Improve code (remove Util namespace and rename some constants)
@@ -0,0 +1,9 @@
1
+ require 'windows_gui'
2
+
3
+ include WindowsGUI
4
+
5
+ MessageBox(nil,
6
+ L("WindowsGUI #{WINDOWS_GUI_VERSION}\n\nRuby #{RUBY_VERSION} on #{WINNAME}"),
7
+ APPNAME,
8
+ MB_ICONINFORMATION
9
+ )
@@ -1,7 +1,7 @@
1
1
  require 'weakref'
2
2
  require 'ffi'
3
3
 
4
- WINDOWS_GUI_VERSION = '3.0.0'
4
+ WINDOWS_GUI_VERSION = '3.0.2'
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)
@@ -99,6 +99,13 @@ module WindowsGUI
99
99
 
100
100
  NTDDI_WIN7 = 0x0601_0000
101
101
 
102
+ NTDDI_WIN8 = 0x0602_0000
103
+ NTDDI_WINBLUE = 0x0603_0000
104
+
105
+ NTDDI_WIN10 = 0x0A00_0000
106
+ NTDDI_WIN10_TH2 = 0x0A00_0001
107
+ NTDDI_WIN10_RS1 = 0x0A00_0002
108
+
102
109
  NTDDI_VERSION = MAKELONG(
103
110
  MAKEWORD(OSVERSION[:wServicePackMinor], OSVERSION[:wServicePackMajor]),
104
111
  MAKEWORD(OSVERSION[:dwMinorVersion], OSVERSION[:dwMajorVersion])
@@ -108,9 +115,24 @@ module WindowsGUI
108
115
  WINXP = 0x0501
109
116
  WINVISTA = 0x0600
110
117
  WIN7 = 0x0601
118
+ WIN8 = 0x0602
119
+ WINBLUE = 0x0603
120
+ WIN10 = 0x0A00
111
121
 
112
122
  WINVER = HIWORD(NTDDI_VERSION)
113
123
 
124
+ WINNAME = case WINVER
125
+ when WIN2K; 'WIN2K (Windows 2000)'
126
+ when WINXP; 'WINXP (Windows XP)'
127
+ when WINVISTA; 'WINVISTA (Windows Vista)'
128
+ when WIN7; 'WIN7 (Windows 7)'
129
+ when WIN8; 'WIN8 (Windows 8)'
130
+ when WINBLUE; 'WINBLUE (Windows 8.1)'
131
+ when WIN10; 'WIN10 (Windows 10)'
132
+ else
133
+ 'unknown Windows version'
134
+ end
135
+
114
136
  def TARGETVER(version, message)
115
137
  version = MAKELONG(0x0000, version) if version < 0xffff
116
138
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: windows_gui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Radoslav Peev
@@ -49,6 +49,7 @@ files:
49
49
  - examples/Paint.rbw
50
50
  - examples/Region.rbw
51
51
  - examples/Scribble.rbw
52
+ - examples/Version.rbw
52
53
  - examples/WndExtra.rbw
53
54
  - examples/res/face-devilish.bmp
54
55
  - lib/windows_gui.rb