atspi 0.8.4 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/atspi.gemspec +1 -0
- data/lib/atspi/accessible.rb +5 -3
- data/lib/atspi/accessible/children.rb +0 -40
- data/lib/atspi/accessible/selectable.rb +4 -4
- data/lib/atspi/error_accessible.rb +2 -2
- data/lib/atspi/requires.rb +0 -1
- data/lib/atspi/version.rb +1 -1
- metadata +17 -4
- data/lib/atspi/accessible/children/selected.rb +0 -32
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b381921221f326d93dcfc8e7f5b54bf03c562fe
|
4
|
+
data.tar.gz: b98b064c005bac799a37b8aa0407255601ed01ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecdc4dd73b12639dcb5b7c0f144949ac92734962ab6acd80c2a2095cd47e8332aa20d1c33e7707cc4adb7824aecb0d8a3275316d5a62a890c3d8b98fa076f0c5
|
7
|
+
data.tar.gz: 6c3df87e1fd8b8c71dee6a8ae2c052a8614d3aeece389f9a6e52ceb8197edf1519b908b32fc3b00502290721c0566bc7bc0f757668357695ecdd85ad240ec591
|
data/atspi.gemspec
CHANGED
data/lib/atspi/accessible.rb
CHANGED
@@ -112,11 +112,13 @@ module ATSPI
|
|
112
112
|
# @see https://developer.gnome.org/libatspi/stable/AtspiAccessible.html#atspi-accessible-get-toolkit-version atspi_accessible_get_toolkit_version
|
113
113
|
delegate :toolkit_version => :@native
|
114
114
|
|
115
|
-
# @return [
|
115
|
+
# @return [Array<Symbol>] its states. They are symbols derived from libatspi's
|
116
|
+
# {AtspiStateType enum}[https://developer.gnome.org/libatspi/stable/libatspi-atspi-constants.html#AtspiStateType]
|
117
|
+
# by removing the prefix +ATSPI_STATE_+ and making them lowercase.
|
116
118
|
#
|
117
119
|
# @see https://developer.gnome.org/libatspi/stable/AtspiAccessible.html#atspi-accessible-get-state-set atspi_accessible_get_state_set
|
118
120
|
def states
|
119
|
-
StateSet.new_from_native(@native.state_set)
|
121
|
+
StateSet.new_from_native(@native.state_set).to_a
|
120
122
|
end
|
121
123
|
|
122
124
|
# @return [Hash<String => String>] its attributes
|
@@ -147,7 +149,7 @@ module ATSPI
|
|
147
149
|
Children.new(@native)
|
148
150
|
end
|
149
151
|
|
150
|
-
# @return [Descendants, []] its descendants. It will be an empty array it
|
152
|
+
# @return [Descendants, []] its descendants. It will be an empty array if it
|
151
153
|
# does not implement the {https://developer.gnome.org/libatspi/stable/AtspiAccessible.html#atspi-accessible-get-collection collection interface}
|
152
154
|
#
|
153
155
|
# @see https://developer.gnome.org/libatspi/stable/AtspiAccessible.html#atspi-accessible-get-collection atspi_accessible_get_collection
|
@@ -28,45 +28,5 @@ module ATSPI
|
|
28
28
|
@native.child_count
|
29
29
|
end
|
30
30
|
# @!endgroup
|
31
|
-
|
32
|
-
# @!group Selection
|
33
|
-
# Checks if the accessible the children belong to implements the selection
|
34
|
-
# interface.
|
35
|
-
#
|
36
|
-
# @return [true,false]
|
37
|
-
#
|
38
|
-
# @see https://developer.gnome.org/libatspi/stable/AtspiAccessible.html#atspi-accessible-get-selection atspi_accessible_get_selection
|
39
|
-
def selectable?
|
40
|
-
not @native.selection_iface.nil?
|
41
|
-
end
|
42
|
-
|
43
|
-
# @return [Selected,[]] its selected subset. It will be an empty array if
|
44
|
-
# children are not selectable.
|
45
|
-
def selected
|
46
|
-
if selectable?
|
47
|
-
Selected.new(@native)
|
48
|
-
else
|
49
|
-
[]
|
50
|
-
end
|
51
|
-
end
|
52
|
-
|
53
|
-
# Tries to select all children
|
54
|
-
#
|
55
|
-
# @return [true,false] indicates success
|
56
|
-
#
|
57
|
-
# @see https://developer.gnome.org/libatspi/stable/libatspi-atspi-selection.html#atspi-selection-select-all atspi_selection_select_all
|
58
|
-
def select_all
|
59
|
-
selectable? and @native.select_all
|
60
|
-
end
|
61
|
-
|
62
|
-
# Tries to deselect all children
|
63
|
-
#
|
64
|
-
# @return [true,false] indicates success
|
65
|
-
#
|
66
|
-
# @see https://developer.gnome.org/libatspi/stable/libatspi-atspi-selection.html#atspi-selection-clear-selection atspi_selection_clear_selection
|
67
|
-
def deselect_all
|
68
|
-
selectable? and @native.clear_selection
|
69
|
-
end
|
70
|
-
# @!endgroup
|
71
31
|
end
|
72
32
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class ATSPI::Accessible
|
2
2
|
# Wraps libatspi's AtspiSelection[https://developer.gnome.org/libatspi/stable/libatspi-atspi-selection.html]
|
3
|
-
# together with parts of {Children}
|
3
|
+
# together with parts of {Children}
|
4
4
|
module Selectable
|
5
5
|
# @!group Attributes & States
|
6
6
|
# Checks if it can be selected. Accessibles which parent's native
|
@@ -9,7 +9,7 @@ class ATSPI::Accessible
|
|
9
9
|
#
|
10
10
|
# @return [true, false]
|
11
11
|
def selectable?
|
12
|
-
parent.
|
12
|
+
not parent.__send__(:native).selection_iface.nil?
|
13
13
|
end
|
14
14
|
# @!endgroup
|
15
15
|
|
@@ -24,12 +24,12 @@ class ATSPI::Accessible
|
|
24
24
|
end
|
25
25
|
|
26
26
|
# Deselects it
|
27
|
-
# @return [true, false] indicating success of the operation. +
|
27
|
+
# @return [true, false] indicating success of the operation. +true+ if its
|
28
28
|
# parent does not implement the {https://developer.gnome.org/libatspi/stable/AtspiAccessible.html#atspi-accessible-get-selection selection interface}.
|
29
29
|
#
|
30
30
|
# @see https://developer.gnome.org/libatspi/stable/libatspi-atspi-selection.html#atspi-selection-deselect-child atspi_selection_deselect_child
|
31
31
|
def deselect
|
32
|
-
selectable?
|
32
|
+
not selectable? or parent.__send__(:native).deselect_child(index_in_parent)
|
33
33
|
end
|
34
34
|
# @!endgroup
|
35
35
|
|
data/lib/atspi/requires.rb
CHANGED
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.
|
4
|
+
version: 0.9.0
|
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-
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gir_ffi
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.8'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.8'
|
55
69
|
description: The atspi gem lets you comfortably call the Assistive Technology Service
|
56
70
|
Provider Interface (AT-SPI) on Linux.
|
57
71
|
email:
|
@@ -72,7 +86,6 @@ files:
|
|
72
86
|
- lib/atspi/accessible.rb
|
73
87
|
- lib/atspi/accessible/action.rb
|
74
88
|
- lib/atspi/accessible/children.rb
|
75
|
-
- lib/atspi/accessible/children/selected.rb
|
76
89
|
- lib/atspi/accessible/descendants.rb
|
77
90
|
- lib/atspi/accessible/descendants/attribute_filter.rb
|
78
91
|
- lib/atspi/accessible/descendants/interface_filter.rb
|
@@ -139,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
152
|
version: '0'
|
140
153
|
requirements: []
|
141
154
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
155
|
+
rubygems_version: 2.5.1
|
143
156
|
signing_key:
|
144
157
|
specification_version: 4
|
145
158
|
summary: A high level wrapper around libatspi.
|
@@ -1,32 +0,0 @@
|
|
1
|
-
module ATSPI
|
2
|
-
# Wraps libatspi's AtspiSelection[https://developer.gnome.org/libatspi/stable/libatspi-atspi-selection.html]
|
3
|
-
# together with parts of {Selectable} and {Children}
|
4
|
-
class Accessible::Children::Selected
|
5
|
-
include SelectableCollection::Selected
|
6
|
-
|
7
|
-
# @api private
|
8
|
-
def initialize(native)
|
9
|
-
@native = native
|
10
|
-
end
|
11
|
-
|
12
|
-
# @!group Enumerable interface
|
13
|
-
# @param idx [Integer]
|
14
|
-
#
|
15
|
-
# @return [Accessible] its child at index +idx+
|
16
|
-
#
|
17
|
-
# @see https://developer.gnome.org/libatspi/stable/libatspi-atspi-selection.html#atspi-selection-get-selected-child atspi_selection_get_selected_child
|
18
|
-
def at(idx)
|
19
|
-
super do |mapped_idx|
|
20
|
-
Accessible.new(@native.selected_child(mapped_idx))
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# @return [Integer] its number of children
|
25
|
-
#
|
26
|
-
# @see https://developer.gnome.org/libatspi/stable/libatspi-atspi-selection.html#atspi-selection-get-n-selected-children atspi_selection_get_n_selected_children
|
27
|
-
def count
|
28
|
-
@native.n_selected_children
|
29
|
-
end
|
30
|
-
# @!endgroup
|
31
|
-
end
|
32
|
-
end
|