windows_com 2.1.0 → 2.1.1
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 +4 -4
- data/RELNOTES.md +5 -1
- data/examples/UIRibbon/Command.dll +0 -0
- data/examples/UIRibbon/Command.rb +4 -0
- data/examples/UIRibbon/Command.rbw +20 -1
- data/examples/UIRibbon/Command.xml +16 -12
- data/examples/res/go-next-big.bmp +0 -0
- data/examples/res/go-next-small.bmp +0 -0
- data/examples/res/go-next.bmp +0 -0
- data/examples/res/go-previous-big.bmp +0 -0
- data/examples/res/go-previous-small.bmp +0 -0
- data/examples/res/go-previous.bmp +0 -0
- data/lib/windows_com/common.rb +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2cf9e8a660759ec930af827e7e189d0f2ca8cd96
|
4
|
+
data.tar.gz: 4d0195894da766f1ec56e1d66eb422c52e2ffe72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b6fa145975b6469efef29eee55bb70c6b734619492ffa98b1970748e13238a57bcff5726209055920d1d204112414490ba6ab5f8c59adb3bc986aa58991e440
|
7
|
+
data.tar.gz: d0ab45045ea7207551f392caf37d71ae148113f392c2c851c0962952e7d097ebdbde8cba9c40e26927d24070b7a7740f44c56b6a72ce18adef31f021e2eb91fc
|
data/RELNOTES.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Release Notes
|
2
2
|
|
3
|
+
## 2.1.1
|
4
|
+
|
5
|
+
Sync important example with changes in related gem (windows_gui)
|
6
|
+
|
3
7
|
## 2.1.0
|
4
8
|
|
5
9
|
`COMVtbl_` doesn't prepend `this` pointers to vtbl specs
|
@@ -14,7 +18,7 @@ Allow `COMInterface_` instances to be passed to code expecting pointers without
|
|
14
18
|
|
15
19
|
## 2.0.0
|
16
20
|
|
17
|
-
- Add `COMCallback` module for __implementing__ COM
|
21
|
+
- Add `COMCallback` module for __implementing__ COM interfaces in Ruby
|
18
22
|
- enhance some bound FFI structs with useful methods
|
19
23
|
- improve code
|
20
24
|
|
Binary file
|
@@ -28,3 +28,7 @@ CmdButton1_SmallImages_RESID = 60019
|
|
28
28
|
CmdButton1_SmallImages_120__RESID = 60020
|
29
29
|
CmdButton1_LargeImages_RESID = 60021
|
30
30
|
CmdButton1_LargeImages_120__RESID = 60022
|
31
|
+
CmdAOT = 8
|
32
|
+
CmdAOT_LabelTitle_RESID = 60023
|
33
|
+
CmdAOT_LabelDescription_RESID = 60024
|
34
|
+
CmdAOT_TooltipDescription_RESID = 60025
|
@@ -26,6 +26,16 @@ class UICH < IUICommandHandlerImpl
|
|
26
26
|
|
27
27
|
attr_reader :uif
|
28
28
|
|
29
|
+
def OnAOT(*args)
|
30
|
+
UsingFFIStructs(PROPVARIANT.new) { |v|
|
31
|
+
uif.GetUICommandProperty(CmdAOT, UI_PKEY_BooleanValue, v)
|
32
|
+
|
33
|
+
SetWindowPos(uif.hwnd,
|
34
|
+
(v[:boolVal] == -1) ? HWND_TOPMOST : HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE
|
35
|
+
)
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
29
39
|
def OnItem1(*args)
|
30
40
|
MessageBox(uif.hwnd,
|
31
41
|
L("#{self}.#{__method__}"),
|
@@ -50,6 +60,8 @@ class UICH < IUICommandHandlerImpl
|
|
50
60
|
|
51
61
|
def Execute(*args)
|
52
62
|
case args[0]
|
63
|
+
when CmdAOT
|
64
|
+
OnAOT(*args)
|
53
65
|
when CmdItem1
|
54
66
|
OnItem1(*args)
|
55
67
|
when CmdButton1
|
@@ -87,12 +99,18 @@ def OnCreate(hwnd,
|
|
87
99
|
)
|
88
100
|
xtra = Id2Ref[GetWindowLong(hwnd, GWL_USERDATA)]
|
89
101
|
|
102
|
+
UIResources.Build(clean: true) if UIResources.BuildNeeded?()
|
103
|
+
|
90
104
|
xtra[:uif] = UIF.new(hwnd)
|
91
105
|
xtra[:uich] = UICH.new(xtra[:uif])
|
92
106
|
xtra[:uia] = UIA.new(xtra[:uich])
|
93
107
|
|
94
108
|
xtra[:uif].Initialize(hwnd, xtra[:uia])
|
95
|
-
xtra[:uif].LoadUI(
|
109
|
+
xtra[:uif].LoadUI(UIResources.Load(), L('APPLICATION_RIBBON'))
|
110
|
+
|
111
|
+
UsingFFIStructs(PROPVARIANT[VT_BOOL, :boolVal, -1]) { |v|
|
112
|
+
xtra[:uif].SetUICommandProperty(CmdAOT, UI_PKEY_BooleanValue, v)
|
113
|
+
}
|
96
114
|
|
97
115
|
0
|
98
116
|
end
|
@@ -179,6 +197,7 @@ def WinMain
|
|
179
197
|
exit(0) if hwnd.null?
|
180
198
|
|
181
199
|
ShowWindow(hwnd, SW_SHOWNORMAL)
|
200
|
+
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE)
|
182
201
|
UpdateWindow(hwnd)
|
183
202
|
|
184
203
|
UsingFFIStructs(MSG.new) { |msg|
|
@@ -8,35 +8,38 @@
|
|
8
8
|
<Command Name='cmdTab1' LabelTitle='Tab1' />
|
9
9
|
<Command Name='cmdTab1Group1' LabelTitle='&Group1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
10
10
|
<Command.SmallImages>
|
11
|
-
<Image
|
12
|
-
<Image MinDPI='120'
|
11
|
+
<Image>../res/go-next-small.bmp</Image>
|
12
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
13
13
|
</Command.SmallImages>
|
14
14
|
<Command.LargeImages>
|
15
|
-
<Image
|
16
|
-
<Image MinDPI='120'
|
15
|
+
<Image>../res/go-next.bmp</Image>
|
16
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
17
17
|
</Command.LargeImages>
|
18
18
|
</Command>
|
19
19
|
|
20
20
|
<Command Name='cmdItem1' LabelTitle='&Item1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
21
21
|
<Command.SmallImages>
|
22
|
-
<Image
|
23
|
-
<Image MinDPI='120'
|
22
|
+
<Image>../res/go-previous-small.bmp</Image>
|
23
|
+
<Image MinDPI='120'>../res/go-previous.bmp</Image>
|
24
24
|
</Command.SmallImages>
|
25
25
|
<Command.LargeImages>
|
26
|
-
<Image
|
27
|
-
<Image MinDPI='120'
|
26
|
+
<Image>../res/go-previous.bmp</Image>
|
27
|
+
<Image MinDPI='120'>../res/go-previous-big.bmp</Image>
|
28
28
|
</Command.LargeImages>
|
29
29
|
</Command>
|
30
30
|
|
31
31
|
<Command Name='cmdButton1' LabelTitle='&Button1' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
32
32
|
<Command.SmallImages>
|
33
|
-
<Image
|
34
|
-
<Image MinDPI='120'
|
33
|
+
<Image>../res/go-next-small.bmp</Image>
|
34
|
+
<Image MinDPI='120'>../res/go-next.bmp</Image>
|
35
35
|
</Command.SmallImages>
|
36
36
|
<Command.LargeImages>
|
37
|
-
<Image
|
38
|
-
<Image MinDPI='120'
|
37
|
+
<Image>../res/go-next.bmp</Image>
|
38
|
+
<Image MinDPI='120'>../res/go-next-big.bmp</Image>
|
39
39
|
</Command.LargeImages>
|
40
|
+
</Command>
|
41
|
+
|
42
|
+
<Command Name='cmdAOT' LabelTitle='&Always On Top' LabelDescription='LabelDescription...' TooltipDescription='TooltipDescription...'>
|
40
43
|
</Command>
|
41
44
|
</Application.Commands>
|
42
45
|
|
@@ -53,6 +56,7 @@
|
|
53
56
|
<Ribbon.QuickAccessToolbar>
|
54
57
|
<QuickAccessToolbar CommandName='cmdQAT'>
|
55
58
|
<QuickAccessToolbar.ApplicationDefaults>
|
59
|
+
<CheckBox CommandName='cmdAOT' />
|
56
60
|
<Button CommandName='cmdItem1' />
|
57
61
|
<Button CommandName='cmdButton1' />
|
58
62
|
</QuickAccessToolbar.ApplicationDefaults>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/lib/windows_com/common.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: windows_com
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
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-02-
|
11
|
+
date: 2017-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -39,6 +39,12 @@ files:
|
|
39
39
|
- examples/UIRibbon/Command.rb
|
40
40
|
- examples/UIRibbon/Command.rbw
|
41
41
|
- examples/UIRibbon/Command.xml
|
42
|
+
- examples/res/go-next-big.bmp
|
43
|
+
- examples/res/go-next-small.bmp
|
44
|
+
- examples/res/go-next.bmp
|
45
|
+
- examples/res/go-previous-big.bmp
|
46
|
+
- examples/res/go-previous-small.bmp
|
47
|
+
- examples/res/go-previous.bmp
|
42
48
|
- lib/windows_com.rb
|
43
49
|
- lib/windows_com/common.rb
|
44
50
|
- lib/windows_com/libc.rb
|