uia 0.0.6.1 → 0.0.7
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.
- data/ChangeLog +14 -0
- data/README.md +127 -46
- data/ext/UiaDll/Release/UIA.Helper.dll +0 -0
- data/ext/UiaDll/Release/UiaDll.dll +0 -0
- data/ext/UiaDll/UiaDll/ElementMethods.cpp +15 -11
- data/ext/UiaDll/UiaDll/ElementStructures.h +15 -1
- data/ext/UiaDll/UiaDll/PatternInformationStructures.h +77 -1
- data/ext/UiaDll/UiaDll/SelectionItemMethods.cpp +1 -0
- data/ext/UiaDll/UiaDll/TableItemMethods.cpp +16 -0
- data/ext/UiaDll/UiaDll/TableMethods.cpp +16 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj +4 -0
- data/ext/UiaDll/UiaDll/UiaDll.vcxproj.filters +9 -0
- data/ext/UiaDll/UiaDll/WindowMethods.cpp +24 -0
- data/ext/UiaDll/UiaDll.Test/ElementInformationTest.cpp +15 -0
- data/ext/UiaDll/UiaDll.Test/PatternInformationTest.cpp +14 -1
- data/ext/UiaDll/UiaDll.Test/UiaDll.Test.vcxproj +2 -0
- data/lib/core_ext/string.rb +5 -0
- data/lib/core_ext/symbol.rb +5 -0
- data/lib/uia/element.rb +26 -17
- data/lib/uia/library/element_structs.rb +95 -0
- data/lib/uia/library/pattern_structs.rb +155 -0
- data/lib/uia/library.rb +36 -12
- data/lib/uia/patterns/expand_collapse.rb +1 -1
- data/lib/uia/patterns/table.rb +32 -0
- data/lib/uia/patterns/table_item.rb +18 -0
- data/lib/uia/patterns/toggle.rb +1 -1
- data/lib/uia/patterns/window.rb +38 -0
- data/lib/uia/version.rb +1 -1
- data/lib/uia.rb +6 -2
- data/spec/uia/element_spec.rb +20 -0
- data/spec/uia/patterns/table_item_spec.rb +21 -0
- data/spec/uia/patterns/table_spec.rb +34 -0
- data/spec/uia/patterns/window_spec.rb +31 -0
- data/uia.gemspec +1 -0
- metadata +36 -5
- data/lib/uia/library/structs.rb +0 -174
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-11-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -27,6 +27,22 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '0'
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: require_all
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :runtime
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
30
46
|
- !ruby/object:Gem::Dependency
|
31
47
|
name: bundler
|
32
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,26 +176,35 @@ files:
|
|
160
176
|
- ext/UiaDll/UiaDll/Stdafx.cpp
|
161
177
|
- ext/UiaDll/UiaDll/Stdafx.h
|
162
178
|
- ext/UiaDll/UiaDll/StringHelper.h
|
179
|
+
- ext/UiaDll/UiaDll/TableItemMethods.cpp
|
180
|
+
- ext/UiaDll/UiaDll/TableMethods.cpp
|
163
181
|
- ext/UiaDll/UiaDll/ToggleMethods.cpp
|
164
182
|
- ext/UiaDll/UiaDll/UiaDll.cpp
|
165
183
|
- ext/UiaDll/UiaDll/UiaDll.h
|
166
184
|
- ext/UiaDll/UiaDll/UiaDll.vcxproj
|
167
185
|
- ext/UiaDll/UiaDll/UiaDll.vcxproj.filters
|
168
186
|
- ext/UiaDll/UiaDll/ValuePatternMethods.cpp
|
187
|
+
- ext/UiaDll/UiaDll/WindowMethods.cpp
|
169
188
|
- ext/UiaDll/UiaDll/app.rc
|
189
|
+
- lib/core_ext/string.rb
|
190
|
+
- lib/core_ext/symbol.rb
|
170
191
|
- lib/uia.rb
|
171
192
|
- lib/uia/element.rb
|
172
193
|
- lib/uia/finder.rb
|
173
194
|
- lib/uia/library.rb
|
174
195
|
- lib/uia/library/constants.rb
|
175
196
|
- lib/uia/library/element_attributes.rb
|
176
|
-
- lib/uia/library/
|
197
|
+
- lib/uia/library/element_structs.rb
|
198
|
+
- lib/uia/library/pattern_structs.rb
|
177
199
|
- lib/uia/patterns/expand_collapse.rb
|
178
200
|
- lib/uia/patterns/invoke.rb
|
179
201
|
- lib/uia/patterns/selection.rb
|
180
202
|
- lib/uia/patterns/selection_item.rb
|
203
|
+
- lib/uia/patterns/table.rb
|
204
|
+
- lib/uia/patterns/table_item.rb
|
181
205
|
- lib/uia/patterns/toggle.rb
|
182
206
|
- lib/uia/patterns/value.rb
|
207
|
+
- lib/uia/patterns/window.rb
|
183
208
|
- lib/uia/version.rb
|
184
209
|
- spec/app/FizzWare.NBuilder.dll
|
185
210
|
- spec/app/UIA.Extensions.dll
|
@@ -190,8 +215,11 @@ files:
|
|
190
215
|
- spec/uia/patterns/invoke_spec.rb
|
191
216
|
- spec/uia/patterns/selection_item_spec.rb
|
192
217
|
- spec/uia/patterns/selection_spec.rb
|
218
|
+
- spec/uia/patterns/table_item_spec.rb
|
219
|
+
- spec/uia/patterns/table_spec.rb
|
193
220
|
- spec/uia/patterns/toggle_spec.rb
|
194
221
|
- spec/uia/patterns/value_spec.rb
|
222
|
+
- spec/uia/patterns/window_spec.rb
|
195
223
|
- spec/uia_spec.rb
|
196
224
|
- uia.gemspec
|
197
225
|
- ext/UiaDll/Release/UiaDll.dll
|
@@ -211,7 +239,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
211
239
|
version: '0'
|
212
240
|
segments:
|
213
241
|
- 0
|
214
|
-
hash:
|
242
|
+
hash: 1065096623
|
215
243
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
216
244
|
none: false
|
217
245
|
requirements:
|
@@ -220,7 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
220
248
|
version: '0'
|
221
249
|
segments:
|
222
250
|
- 0
|
223
|
-
hash:
|
251
|
+
hash: 1065096623
|
224
252
|
requirements: []
|
225
253
|
rubyforge_project:
|
226
254
|
rubygems_version: 1.8.24
|
@@ -237,6 +265,9 @@ test_files:
|
|
237
265
|
- spec/uia/patterns/invoke_spec.rb
|
238
266
|
- spec/uia/patterns/selection_item_spec.rb
|
239
267
|
- spec/uia/patterns/selection_spec.rb
|
268
|
+
- spec/uia/patterns/table_item_spec.rb
|
269
|
+
- spec/uia/patterns/table_spec.rb
|
240
270
|
- spec/uia/patterns/toggle_spec.rb
|
241
271
|
- spec/uia/patterns/value_spec.rb
|
272
|
+
- spec/uia/patterns/window_spec.rb
|
242
273
|
- spec/uia_spec.rb
|
data/lib/uia/library/structs.rb
DELETED
@@ -1,174 +0,0 @@
|
|
1
|
-
require 'ffi'
|
2
|
-
|
3
|
-
module Uia
|
4
|
-
module Library
|
5
|
-
module ElementLayout
|
6
|
-
def self.included(base)
|
7
|
-
base.class_eval do
|
8
|
-
layout :handle, :int,
|
9
|
-
:runtime_id, :pointer,
|
10
|
-
:number_of_ids, :int,
|
11
|
-
:name, :string,
|
12
|
-
:class_name, :string,
|
13
|
-
:control_type_id, :int,
|
14
|
-
:patterns, :pointer,
|
15
|
-
:patterns_length, :int,
|
16
|
-
:id, :string,
|
17
|
-
:is_enabled, :bool
|
18
|
-
|
19
|
-
def id
|
20
|
-
self[:id]
|
21
|
-
end
|
22
|
-
|
23
|
-
def name
|
24
|
-
self[:name]
|
25
|
-
end
|
26
|
-
|
27
|
-
def handle
|
28
|
-
self[:handle]
|
29
|
-
end
|
30
|
-
|
31
|
-
def runtime_id
|
32
|
-
self[:runtime_id].read_array_of_int(number_of_ids)
|
33
|
-
end
|
34
|
-
|
35
|
-
def control_type_id
|
36
|
-
self[:control_type_id]
|
37
|
-
end
|
38
|
-
|
39
|
-
def pattern_ids
|
40
|
-
self[:patterns].read_array_of_int(self[:patterns_length])
|
41
|
-
end
|
42
|
-
|
43
|
-
def children
|
44
|
-
Library.children(self).children
|
45
|
-
end
|
46
|
-
|
47
|
-
def descendants
|
48
|
-
Library.descendants(self).children
|
49
|
-
end
|
50
|
-
|
51
|
-
def empty?
|
52
|
-
to_ptr.address == 0
|
53
|
-
end
|
54
|
-
|
55
|
-
def enabled?
|
56
|
-
self[:is_enabled]
|
57
|
-
end
|
58
|
-
|
59
|
-
def class_name
|
60
|
-
self[:class_name]
|
61
|
-
end
|
62
|
-
|
63
|
-
private
|
64
|
-
def number_of_ids
|
65
|
-
self[:number_of_ids]
|
66
|
-
end
|
67
|
-
end
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
class ElementStruct < FFI::ManagedStruct
|
72
|
-
include ElementLayout
|
73
|
-
|
74
|
-
def self.release(pointer)
|
75
|
-
Library.release_element(pointer)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
class ElementCast < FFI::Struct
|
80
|
-
include ElementLayout
|
81
|
-
end
|
82
|
-
|
83
|
-
class ElementChildrenStruct < FFI::ManagedStruct
|
84
|
-
layout :length, :int,
|
85
|
-
:items, :pointer
|
86
|
-
|
87
|
-
def children
|
88
|
-
self[:length].times.collect do |i|
|
89
|
-
pointer = self[:items] + i * ElementCast.size
|
90
|
-
Uia::Element.new(ElementCast.new(pointer))
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
def self.release(pointer)
|
95
|
-
Library.release_elements(pointer)
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
class ValueInformation < FFI::ManagedStruct
|
100
|
-
layout :is_read_only, :bool,
|
101
|
-
:value, :string
|
102
|
-
|
103
|
-
def read_only?
|
104
|
-
self[:is_read_only]
|
105
|
-
end
|
106
|
-
|
107
|
-
def value
|
108
|
-
self[:value]
|
109
|
-
end
|
110
|
-
|
111
|
-
def self.release(pointer)
|
112
|
-
Library.release_value_info(pointer)
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
class ToggleInformation < FFI::ManagedStruct
|
117
|
-
layout :state, :string
|
118
|
-
|
119
|
-
def state
|
120
|
-
self[:state]
|
121
|
-
end
|
122
|
-
|
123
|
-
def self.release(pointer)
|
124
|
-
Library.release_toggle_info(pointer)
|
125
|
-
end
|
126
|
-
end
|
127
|
-
|
128
|
-
class SelectionInformation < FFI::ManagedStruct
|
129
|
-
layout :can_multi_select, :bool,
|
130
|
-
:is_selection_required, :bool
|
131
|
-
|
132
|
-
def multi_select?
|
133
|
-
self[:can_multi_select]
|
134
|
-
end
|
135
|
-
|
136
|
-
def selection_required?
|
137
|
-
self[:is_selection_required]
|
138
|
-
end
|
139
|
-
|
140
|
-
def self.release(pointer)
|
141
|
-
Library.release_selection_info(pointer)
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
class SelectionItemInformation < FFI::ManagedStruct
|
146
|
-
layout :is_selected, :bool,
|
147
|
-
:container, ElementCast.ptr
|
148
|
-
|
149
|
-
def selected?
|
150
|
-
self[:is_selected]
|
151
|
-
end
|
152
|
-
|
153
|
-
def container
|
154
|
-
self[:container] unless self[:container].empty?
|
155
|
-
end
|
156
|
-
|
157
|
-
def self.release(pointer)
|
158
|
-
Library.release_selection_item_info(pointer)
|
159
|
-
end
|
160
|
-
end
|
161
|
-
|
162
|
-
class ExpandCollapseInformation < FFI::ManagedStruct
|
163
|
-
layout :expand_collapse_state, :string
|
164
|
-
|
165
|
-
def expand_collapse_state
|
166
|
-
self[:expand_collapse_state]
|
167
|
-
end
|
168
|
-
|
169
|
-
def self.release(pointer)
|
170
|
-
Library.release_expand_collapse_info(pointer)
|
171
|
-
end
|
172
|
-
end
|
173
|
-
end
|
174
|
-
end
|