fzeet 0.6.7 → 0.7.0
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 +5 -13
- data/LICENSE +1 -1
- data/README.md +33 -1
- data/RELNOTES.md +4 -0
- data/examples/Control/Button.rbw +1 -1
- data/examples/Control/WebBrowser/jQueryUI.html +3 -17
- data/examples/Menu/ContextMenu.rbw +1 -1
- data/examples/Raw/Command.rbw +19 -0
- data/examples/Raw/Hello.rbw +19 -0
- data/examples/Raw/LifeCycle.rbw +19 -0
- data/examples/Raw/Minimal.rbw +19 -0
- data/lib/fzeet.rb +19 -6
- data/lib/fzeet/windows.rb +19 -0
- data/lib/fzeet/windows/com/Common.rb +4 -3
- data/lib/fzeet/windows/comctl.rb +19 -0
- data/lib/fzeet/windows/comctl/Button.rb +19 -0
- data/lib/fzeet/windows/comctl/ComboBox.rb +19 -0
- data/lib/fzeet/windows/comctl/ComboBoxEx.rb +19 -0
- data/lib/fzeet/windows/comctl/Common.rb +19 -0
- data/lib/fzeet/windows/comctl/DateTimePicker.rb +19 -0
- data/lib/fzeet/windows/comctl/Edit.rb +19 -0
- data/lib/fzeet/windows/comctl/Header.rb +21 -2
- data/lib/fzeet/windows/comctl/ListView.rb +23 -4
- data/lib/fzeet/windows/comctl/MonthCalendar.rb +19 -0
- data/lib/fzeet/windows/comctl/ProgressBar.rb +19 -0
- data/lib/fzeet/windows/comctl/PropertySheet.rb +21 -2
- data/lib/fzeet/windows/comctl/SysLink.rb +19 -0
- data/lib/fzeet/windows/comctl/Tab.rb +19 -0
- data/lib/fzeet/windows/comctl/TreeView.rb +21 -2
- data/lib/fzeet/windows/comctl/UpDown.rb +19 -0
- data/lib/fzeet/windows/comdlg.rb +19 -0
- data/lib/fzeet/windows/comdlg/ColorDialog.rb +19 -0
- data/lib/fzeet/windows/comdlg/Common.rb +19 -0
- data/lib/fzeet/windows/comdlg/FileDialog.rb +20 -1
- data/lib/fzeet/windows/comdlg/FindReplaceDialog.rb +19 -0
- data/lib/fzeet/windows/comdlg/FontDialog.rb +19 -0
- data/lib/fzeet/windows/comdlg/PrintDialog.rb +19 -0
- data/lib/fzeet/windows/comdlg/ShellFileDialog.rb +19 -0
- data/lib/fzeet/windows/core/Common.rb +1 -1
- data/lib/fzeet/windows/scintilla.rb +19 -0
- data/lib/fzeet/windows/shell.rb +19 -0
- data/lib/fzeet/windows/shell/BrowseForFolder.rb +19 -0
- data/lib/fzeet/windows/shell/Common.rb +19 -0
- data/lib/fzeet/windows/shell/FileDialog.rb +19 -0
- data/lib/fzeet/windows/uiribbon.rb +19 -0
- data/lib/fzeet/windows/user.rb +19 -0
- data/lib/fzeet/windows/user/Control.rb +19 -0
- data/lib/fzeet/windows/user/Control/ComboBox.rb +19 -0
- data/lib/fzeet/windows/user/Control/ListBox.rb +21 -2
- data/lib/fzeet/windows/user/SystemParametersInfo.rb +2 -2
- data/lib/fzeet/windows/user/Window.rb +19 -0
- data/lib/fzeet/windows/user/Window/Common.rb +19 -0
- data/lib/fzeet/windows/user/Window/Container.rb +19 -0
- data/lib/fzeet/windows/user/Window/Dialog.rb +19 -0
- data/lib/fzeet/windows/user/Window/MDI.rb +19 -0
- data/lib/fzeet/windows/user/Window/View.rb +19 -0
- data/lib/fzeet/windows/user/Window/Window.rb +19 -0
- data/lib/fzeet/windows/user/Window/WindowMethods.rb +1 -1
- metadata +9 -9
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Common'
|
2
21
|
|
3
22
|
module Fzeet
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Common'
|
2
21
|
|
3
22
|
module Fzeet
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Common'
|
2
21
|
|
3
22
|
module Fzeet
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Common'
|
2
21
|
|
3
22
|
module Fzeet
|
@@ -157,7 +157,7 @@ module Fzeet
|
|
157
157
|
def flags(flags, *prefixes)
|
158
158
|
return flags if flags.kind_of?(Integer)
|
159
159
|
|
160
|
-
[*flags].inject(0) { |
|
160
|
+
[*flags].inject(0) { |result, flag| result |= constant(flag, *prefixes) }
|
161
161
|
end
|
162
162
|
|
163
163
|
module_function :constant, :flags
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'user'
|
2
21
|
|
3
22
|
module Fzeet
|
data/lib/fzeet/windows/shell.rb
CHANGED
@@ -1,2 +1,21 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'shell/BrowseForFolder'
|
2
21
|
require_relative 'shell/FileDialog' if Fzeet::Windows::Version >= :vista
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Common'
|
2
21
|
|
3
22
|
module Fzeet
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative '../user'
|
2
21
|
require_relative '../com'
|
3
22
|
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Common'
|
2
21
|
|
3
22
|
module Fzeet
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'ole'
|
2
21
|
require_relative 'oleaut'
|
3
22
|
require_relative 'shell'
|
data/lib/fzeet/windows/user.rb
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'user/MessageBox'
|
2
21
|
require_relative 'user/Window'
|
3
22
|
require_relative 'user/Message'
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
if __FILE__ == $0
|
2
21
|
require_relative 'Window/Common'
|
3
22
|
end
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
if __FILE__ == $0
|
2
21
|
require_relative '../Window/Common'
|
3
22
|
end
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
if __FILE__ == $0
|
2
21
|
require_relative '../Window/Common'
|
3
22
|
end
|
@@ -98,8 +117,8 @@ module Fzeet
|
|
98
117
|
|
99
118
|
def clear; sendmsg(:resetcontent); self end
|
100
119
|
|
101
|
-
def append(
|
102
|
-
[*
|
120
|
+
def append(items)
|
121
|
+
[*items].each { |item|
|
103
122
|
p = FFI::MemoryPointer.from_string(item.to_s)
|
104
123
|
|
105
124
|
raise 'ADDSTRING failed.' if [-1, -2].include?(sendmsg(:addstring, 0, p).tap { p.free })
|
@@ -219,7 +219,7 @@ module Fzeet
|
|
219
219
|
SPI_SETMESSAGEDURATION = 0x2017
|
220
220
|
|
221
221
|
class NONCLIENTMETRICS < FFI::Struct
|
222
|
-
layout
|
222
|
+
layout(*[
|
223
223
|
:cbSize, :uint,
|
224
224
|
:iBorderWidth, :int,
|
225
225
|
:iScrollWidth, :int,
|
@@ -236,7 +236,7 @@ module Fzeet
|
|
236
236
|
:lfStatusFont, LOGFONT,
|
237
237
|
:lfMessageFont, LOGFONT,
|
238
238
|
(Version >= :vista) ? [:iPaddedBorderWidth, :int] : nil
|
239
|
-
].flatten.compact
|
239
|
+
].flatten.compact)
|
240
240
|
end
|
241
241
|
|
242
242
|
attach_function :SystemParametersInfo, :SystemParametersInfoA, [:uint, :uint, :pointer, :uint], :int
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Window/Window'
|
2
21
|
require_relative 'Window/View'
|
3
22
|
require_relative 'Window/Container'
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'WindowMethods'
|
2
21
|
|
3
22
|
module Fzeet
|
@@ -1,3 +1,22 @@
|
|
1
|
+
if __FILE__ == $0
|
2
|
+
require 'ffi'
|
3
|
+
|
4
|
+
# FIXME: dirty fix to propagate FFI structs layout down the inheritance hierarchy
|
5
|
+
# TODO: switch to composition instead inheriting FFI structs
|
6
|
+
module PropagateFFIStructLayout
|
7
|
+
def inherited(child_class)
|
8
|
+
child_class.instance_variable_set '@layout', layout
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
class FFI::Struct
|
13
|
+
def self.inherited(child_class)
|
14
|
+
child_class.extend PropagateFFIStructLayout
|
15
|
+
end
|
16
|
+
end
|
17
|
+
# END FIXME
|
18
|
+
end
|
19
|
+
|
1
20
|
require_relative 'Common'
|
2
21
|
|
3
22
|
module Fzeet
|