atspi 0.8.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/atspi/accessible.rb +24 -0
- data/lib/atspi/accessible/table/cells.rb +1 -1
- data/lib/atspi/application.rb +7 -0
- data/lib/atspi/desktop.rb +7 -0
- data/lib/atspi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 098653bbb4fcf2ebee3ccb274d9a1b5d7bf73035
|
4
|
+
data.tar.gz: fbf3a9680dc2a95dd6ead1803b23ae6bcffd7f93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f609ffa1b51a3e0e8bf4373ad5ca187995cd5a917a7a7c928ccfeaf3430ad5f59b0cf8f6848e50721fc80f987645daf1af65898accd0c31200b5a4052710a25
|
7
|
+
data.tar.gz: 807b5aa658a532c1d61f55d18c0c1c5aae78a94bab9f27f2f1a1ec7c72992e780624ecf28b2c84d3d2c4991d1e9bdca65d8d975d4a1763d9f369afe3fd83e387
|
data/lib/atspi/accessible.rb
CHANGED
@@ -157,6 +157,30 @@ module ATSPI
|
|
157
157
|
end
|
158
158
|
end
|
159
159
|
|
160
|
+
# @return [Accessible] its descendant found at the given path
|
161
|
+
#
|
162
|
+
# @overload descendant_by_path(path)
|
163
|
+
# @param path [Array] a path as returned by {#path}
|
164
|
+
#
|
165
|
+
# @example
|
166
|
+
# descendant # => #<ATSPI::Accessible:0xc1f18814 … @path=0/0/2/1 … >
|
167
|
+
# descendant.path # => [0, 0, 2, 1]
|
168
|
+
# accessible.descendant_by_path(descendant.path) # => #<ATSPI::Accessible:0xc1f18814 … @path=0/0/2/1 … >
|
169
|
+
#
|
170
|
+
# @overload descendant_by_path(child_idx, grand_child_idx, *further_indices)
|
171
|
+
# @param child_idx [Integer] the child's {#index_in_parent}
|
172
|
+
# @param grand_child_idx [Integer] the grand child's {#index_in_parent}
|
173
|
+
# @param further_indices [Integer] additional {#index_in_parent}s of further descendants
|
174
|
+
#
|
175
|
+
# @example
|
176
|
+
# accessible.descendant_by_path(0, 0, 2, 1) # => #<ATSPI::Accessible:0xc1f18814 … @path=0/0/2/1 … >
|
177
|
+
def descendant_by_path(*path)
|
178
|
+
path = path.flatten
|
179
|
+
child = children[path.shift]
|
180
|
+
found = child.nil? || path.empty?
|
181
|
+
found ? child : child.descendant_by_path(path)
|
182
|
+
end
|
183
|
+
|
160
184
|
# @return [Hash<Symbol => Array<Accessible>>] its relations to other
|
161
185
|
# accessibles. Keys name the relation type and values are relation
|
162
186
|
# targets.
|
data/lib/atspi/application.rb
CHANGED
@@ -34,6 +34,13 @@ module ATSPI
|
|
34
34
|
def windows
|
35
35
|
children
|
36
36
|
end
|
37
|
+
|
38
|
+
# It cannot get descendants by path since the path begins not until
|
39
|
+
# reaching the children of windows.
|
40
|
+
# @return [nil]
|
41
|
+
def descendant_by_path(*path)
|
42
|
+
nil
|
43
|
+
end
|
37
44
|
# @!endgroup
|
38
45
|
|
39
46
|
# @!group Representations
|
data/lib/atspi/desktop.rb
CHANGED
@@ -40,6 +40,13 @@ module ATSPI
|
|
40
40
|
def applications
|
41
41
|
children
|
42
42
|
end
|
43
|
+
|
44
|
+
# It cannot get descendants by path since the path begins not until
|
45
|
+
# reaching the children of windows.
|
46
|
+
# @return [nil]
|
47
|
+
def descendant_by_path(*path)
|
48
|
+
nil
|
49
|
+
end
|
43
50
|
# @!endgroup
|
44
51
|
|
45
52
|
# @!group Representations
|
data/lib/atspi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atspi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Aue
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gir_ffi
|