fzeet 0.6.7 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +5 -13
  2. data/LICENSE +1 -1
  3. data/README.md +33 -1
  4. data/RELNOTES.md +4 -0
  5. data/examples/Control/Button.rbw +1 -1
  6. data/examples/Control/WebBrowser/jQueryUI.html +3 -17
  7. data/examples/Menu/ContextMenu.rbw +1 -1
  8. data/examples/Raw/Command.rbw +19 -0
  9. data/examples/Raw/Hello.rbw +19 -0
  10. data/examples/Raw/LifeCycle.rbw +19 -0
  11. data/examples/Raw/Minimal.rbw +19 -0
  12. data/lib/fzeet.rb +19 -6
  13. data/lib/fzeet/windows.rb +19 -0
  14. data/lib/fzeet/windows/com/Common.rb +4 -3
  15. data/lib/fzeet/windows/comctl.rb +19 -0
  16. data/lib/fzeet/windows/comctl/Button.rb +19 -0
  17. data/lib/fzeet/windows/comctl/ComboBox.rb +19 -0
  18. data/lib/fzeet/windows/comctl/ComboBoxEx.rb +19 -0
  19. data/lib/fzeet/windows/comctl/Common.rb +19 -0
  20. data/lib/fzeet/windows/comctl/DateTimePicker.rb +19 -0
  21. data/lib/fzeet/windows/comctl/Edit.rb +19 -0
  22. data/lib/fzeet/windows/comctl/Header.rb +21 -2
  23. data/lib/fzeet/windows/comctl/ListView.rb +23 -4
  24. data/lib/fzeet/windows/comctl/MonthCalendar.rb +19 -0
  25. data/lib/fzeet/windows/comctl/ProgressBar.rb +19 -0
  26. data/lib/fzeet/windows/comctl/PropertySheet.rb +21 -2
  27. data/lib/fzeet/windows/comctl/SysLink.rb +19 -0
  28. data/lib/fzeet/windows/comctl/Tab.rb +19 -0
  29. data/lib/fzeet/windows/comctl/TreeView.rb +21 -2
  30. data/lib/fzeet/windows/comctl/UpDown.rb +19 -0
  31. data/lib/fzeet/windows/comdlg.rb +19 -0
  32. data/lib/fzeet/windows/comdlg/ColorDialog.rb +19 -0
  33. data/lib/fzeet/windows/comdlg/Common.rb +19 -0
  34. data/lib/fzeet/windows/comdlg/FileDialog.rb +20 -1
  35. data/lib/fzeet/windows/comdlg/FindReplaceDialog.rb +19 -0
  36. data/lib/fzeet/windows/comdlg/FontDialog.rb +19 -0
  37. data/lib/fzeet/windows/comdlg/PrintDialog.rb +19 -0
  38. data/lib/fzeet/windows/comdlg/ShellFileDialog.rb +19 -0
  39. data/lib/fzeet/windows/core/Common.rb +1 -1
  40. data/lib/fzeet/windows/scintilla.rb +19 -0
  41. data/lib/fzeet/windows/shell.rb +19 -0
  42. data/lib/fzeet/windows/shell/BrowseForFolder.rb +19 -0
  43. data/lib/fzeet/windows/shell/Common.rb +19 -0
  44. data/lib/fzeet/windows/shell/FileDialog.rb +19 -0
  45. data/lib/fzeet/windows/uiribbon.rb +19 -0
  46. data/lib/fzeet/windows/user.rb +19 -0
  47. data/lib/fzeet/windows/user/Control.rb +19 -0
  48. data/lib/fzeet/windows/user/Control/ComboBox.rb +19 -0
  49. data/lib/fzeet/windows/user/Control/ListBox.rb +21 -2
  50. data/lib/fzeet/windows/user/SystemParametersInfo.rb +2 -2
  51. data/lib/fzeet/windows/user/Window.rb +19 -0
  52. data/lib/fzeet/windows/user/Window/Common.rb +19 -0
  53. data/lib/fzeet/windows/user/Window/Container.rb +19 -0
  54. data/lib/fzeet/windows/user/Window/Dialog.rb +19 -0
  55. data/lib/fzeet/windows/user/Window/MDI.rb +19 -0
  56. data/lib/fzeet/windows/user/Window/View.rb +19 -0
  57. data/lib/fzeet/windows/user/Window/Window.rb +19 -0
  58. data/lib/fzeet/windows/user/Window/WindowMethods.rb +1 -1
  59. 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) { |flags, flag| flags |= constant(flag, *prefixes) }
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
@@ -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'
@@ -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(item)
102
- [*item].each { |item|
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