atspi 0.8.1 → 0.8.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4c9a8989642ebeaed237d1a6a7303c658c21118a
4
- data.tar.gz: 9dcbccead68aaa7f03028ebb29dd1927eb31a92e
3
+ metadata.gz: 098653bbb4fcf2ebee3ccb274d9a1b5d7bf73035
4
+ data.tar.gz: fbf3a9680dc2a95dd6ead1803b23ae6bcffd7f93
5
5
  SHA512:
6
- metadata.gz: b649ff610b5943803b27962c89b3073b2456a17ac5a9df21eb691f512ae5d54c0766f3cc12102cc9840f179d2094e7aad2496f4d5218e6e525cd1fd4e81d6ab5
7
- data.tar.gz: 859022e872dd60a0422be635957334fc5c3f05c3d8aebb3f75ad66a5fd86ba5669cb2347b2d23aff7495263acfb349f4b8ac554d9ad756abf800fbd781f283fd
6
+ metadata.gz: 1f609ffa1b51a3e0e8bf4373ad5ca187995cd5a917a7a7c928ccfeaf3430ad5f59b0cf8f6848e50721fc80f987645daf1af65898accd0c31200b5a4052710a25
7
+ data.tar.gz: 807b5aa658a532c1d61f55d18c0c1c5aae78a94bab9f27f2f1a1ec7c72992e780624ecf28b2c84d3d2c4991d1e9bdca65d8d975d4a1763d9f369afe3fd83e387
@@ -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.
@@ -23,7 +23,7 @@ class ATSPI::Accessible
23
23
  end
24
24
 
25
25
  # @param row [Integer]
26
- # @param colum [Integer]
26
+ # @param column [Integer]
27
27
  #
28
28
  # @return [Cell] the cell at (+row+,+column+)
29
29
  #
@@ -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
@@ -1,4 +1,4 @@
1
1
  module ATSPI
2
2
  # this library's version
3
- VERSION = "0.8.1"
3
+ VERSION = "0.8.2"
4
4
  end
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.1
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-26 00:00:00.000000000 Z
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gir_ffi