atspi 0.8.0
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 +7 -0
- data/.gitignore +9 -0
- data/.yardopts +2 -0
- data/Gemfile +3 -0
- data/LICENSE.txt +21 -0
- data/README.md +69 -0
- data/Rakefile +2 -0
- data/atspi.gemspec +23 -0
- data/bin/console +7 -0
- data/lib/atspi/accessible/action.rb +45 -0
- data/lib/atspi/accessible/children/selected.rb +32 -0
- data/lib/atspi/accessible/children.rb +72 -0
- data/lib/atspi/accessible/descendants/attribute_filter.rb +32 -0
- data/lib/atspi/accessible/descendants/interface_filter.rb +24 -0
- data/lib/atspi/accessible/descendants/name_filter.rb +18 -0
- data/lib/atspi/accessible/descendants/options.rb +49 -0
- data/lib/atspi/accessible/descendants/role_filter.rb +23 -0
- data/lib/atspi/accessible/descendants/state_filter.rb +23 -0
- data/lib/atspi/accessible/descendants.rb +278 -0
- data/lib/atspi/accessible/document.rb +26 -0
- data/lib/atspi/accessible/extents.rb +129 -0
- data/lib/atspi/accessible/hyperlink/anchor.rb +30 -0
- data/lib/atspi/accessible/hyperlink.rb +31 -0
- data/lib/atspi/accessible/image.rb +35 -0
- data/lib/atspi/accessible/selectable.rb +47 -0
- data/lib/atspi/accessible/table/cell/columns.rb +44 -0
- data/lib/atspi/accessible/table/cell/rows.rb +44 -0
- data/lib/atspi/accessible/table/cell.rb +18 -0
- data/lib/atspi/accessible/table/cells.rb +37 -0
- data/lib/atspi/accessible/table/column.rb +59 -0
- data/lib/atspi/accessible/table/columns/selected.rb +42 -0
- data/lib/atspi/accessible/table/columns.rb +34 -0
- data/lib/atspi/accessible/table/row.rb +59 -0
- data/lib/atspi/accessible/table/rows/selected.rb +42 -0
- data/lib/atspi/accessible/table/rows.rb +31 -0
- data/lib/atspi/accessible/table.rb +50 -0
- data/lib/atspi/accessible/text/caret.rb +31 -0
- data/lib/atspi/accessible/text/character.rb +45 -0
- data/lib/atspi/accessible/text/editable.rb +90 -0
- data/lib/atspi/accessible/text/hyperlink.rb +19 -0
- data/lib/atspi/accessible/text/hypertext.rb +29 -0
- data/lib/atspi/accessible/text/offset.rb +59 -0
- data/lib/atspi/accessible/text/range.rb +66 -0
- data/lib/atspi/accessible/text/selection.rb +48 -0
- data/lib/atspi/accessible/text.rb +120 -0
- data/lib/atspi/accessible/value.rb +47 -0
- data/lib/atspi/accessible.rb +267 -0
- data/lib/atspi/application.rb +46 -0
- data/lib/atspi/collection.rb +60 -0
- data/lib/atspi/desktop.rb +52 -0
- data/lib/atspi/extents.rb +28 -0
- data/lib/atspi/libatspi.rb +7 -0
- data/lib/atspi/requires.rb +76 -0
- data/lib/atspi/selectable_collection/selected.rb +23 -0
- data/lib/atspi/selectable_collection.rb +32 -0
- data/lib/atspi/state_set.rb +141 -0
- data/lib/atspi/version.rb +4 -0
- data/lib/atspi/window.rb +33 -0
- data/lib/atspi.rb +58 -0
- metadata +132 -0
@@ -0,0 +1,52 @@
|
|
1
|
+
module ATSPI
|
2
|
+
# Desktops are Accessibles having a few exceptions.
|
3
|
+
class Desktop < Accessible
|
4
|
+
# @!group Identification
|
5
|
+
# It has no parent.
|
6
|
+
# @return [nil]
|
7
|
+
def parent
|
8
|
+
nil
|
9
|
+
end
|
10
|
+
|
11
|
+
# It has no path.
|
12
|
+
# @return [[]]
|
13
|
+
def path
|
14
|
+
[]
|
15
|
+
end
|
16
|
+
|
17
|
+
# Its desktop is itself.
|
18
|
+
# @return [self]
|
19
|
+
def desktop
|
20
|
+
self
|
21
|
+
end
|
22
|
+
|
23
|
+
# It belongs to no application.
|
24
|
+
# @return nil
|
25
|
+
def application
|
26
|
+
nil
|
27
|
+
end
|
28
|
+
|
29
|
+
# It has no window.
|
30
|
+
# @return nil
|
31
|
+
def window
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
# @!endgroup
|
35
|
+
|
36
|
+
# @!group Tree & Traversal
|
37
|
+
# Its applications are its children.
|
38
|
+
# @param (see Accessible#children)
|
39
|
+
# @return (see Accessible#children)
|
40
|
+
def applications
|
41
|
+
children
|
42
|
+
end
|
43
|
+
# @!endgroup
|
44
|
+
|
45
|
+
# @!group Representations
|
46
|
+
# @return [String] itself as an inspectable string
|
47
|
+
def inspect
|
48
|
+
"#<#{self.class.name}:0x#{'%x14' % __id__} @index=#{index} @name=#{name.inspect}>"
|
49
|
+
end
|
50
|
+
# @!endgroup
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module ATSPI
|
2
|
+
# Wraps libatspi's AtspiRect[https://developer.gnome.org/libatspi/stable/libatspi-atspi-component.html#AtspiRect-struct]
|
3
|
+
class Extents
|
4
|
+
extend Forwardable
|
5
|
+
|
6
|
+
# @api private
|
7
|
+
def initialize(native)
|
8
|
+
@native = native
|
9
|
+
end
|
10
|
+
|
11
|
+
# @return [Integer] its x position
|
12
|
+
delegate :x => :@native
|
13
|
+
|
14
|
+
# @return [Integer] its y position
|
15
|
+
delegate :y => :@native
|
16
|
+
|
17
|
+
# @return [Integer] its width
|
18
|
+
delegate :width => :@native
|
19
|
+
|
20
|
+
# @return [Integer] its height
|
21
|
+
delegate :height => :@native
|
22
|
+
|
23
|
+
# @return [String] itself as an inspectable string
|
24
|
+
def inspect
|
25
|
+
"#<#{self.class.name}:0x#{'%x14' % __id__} @x=#{x} @y=#{y} @width=#{width} @height=#{height}>"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# FFI
|
2
|
+
require 'atspi/libatspi'
|
3
|
+
|
4
|
+
require 'forwardable'
|
5
|
+
|
6
|
+
# General
|
7
|
+
require 'atspi/state_set'
|
8
|
+
require 'atspi/extents'
|
9
|
+
|
10
|
+
# Collection modules
|
11
|
+
require 'atspi/collection'
|
12
|
+
require 'atspi/selectable_collection'
|
13
|
+
require 'atspi/selectable_collection/selected'
|
14
|
+
|
15
|
+
# Accessible
|
16
|
+
require 'atspi/accessible/selectable'
|
17
|
+
require 'atspi/accessible/extents'
|
18
|
+
require 'atspi/accessible'
|
19
|
+
|
20
|
+
# Action
|
21
|
+
require 'atspi/accessible/action'
|
22
|
+
|
23
|
+
# Children
|
24
|
+
require 'atspi/accessible/children'
|
25
|
+
require 'atspi/accessible/children/selected'
|
26
|
+
|
27
|
+
# Descendants
|
28
|
+
require 'atspi/accessible/descendants'
|
29
|
+
require 'atspi/accessible/descendants/state_filter'
|
30
|
+
require 'atspi/accessible/descendants/attribute_filter'
|
31
|
+
require 'atspi/accessible/descendants/role_filter'
|
32
|
+
require 'atspi/accessible/descendants/interface_filter'
|
33
|
+
require 'atspi/accessible/descendants/name_filter'
|
34
|
+
require 'atspi/accessible/descendants/options'
|
35
|
+
|
36
|
+
# Document
|
37
|
+
require 'atspi/accessible/document'
|
38
|
+
|
39
|
+
# Hyperlink
|
40
|
+
require 'atspi/accessible/hyperlink'
|
41
|
+
require 'atspi/accessible/hyperlink/anchor'
|
42
|
+
|
43
|
+
# Text
|
44
|
+
require 'atspi/accessible/text/editable'
|
45
|
+
require 'atspi/accessible/text/hypertext'
|
46
|
+
require 'atspi/accessible/text'
|
47
|
+
require 'atspi/accessible/text/character'
|
48
|
+
require 'atspi/accessible/text/offset'
|
49
|
+
require 'atspi/accessible/text/caret'
|
50
|
+
require 'atspi/accessible/text/range'
|
51
|
+
require 'atspi/accessible/text/selection'
|
52
|
+
require 'atspi/accessible/text/hyperlink'
|
53
|
+
|
54
|
+
# Table
|
55
|
+
require 'atspi/accessible/table'
|
56
|
+
require 'atspi/accessible/table/columns'
|
57
|
+
require 'atspi/accessible/table/columns/selected'
|
58
|
+
require 'atspi/accessible/table/column'
|
59
|
+
require 'atspi/accessible/table/rows'
|
60
|
+
require 'atspi/accessible/table/rows/selected'
|
61
|
+
require 'atspi/accessible/table/row'
|
62
|
+
require 'atspi/accessible/table/cells'
|
63
|
+
require 'atspi/accessible/table/cell'
|
64
|
+
require 'atspi/accessible/table/cell/rows'
|
65
|
+
require 'atspi/accessible/table/cell/columns'
|
66
|
+
|
67
|
+
# Image
|
68
|
+
require 'atspi/accessible/image'
|
69
|
+
|
70
|
+
# Value
|
71
|
+
require 'atspi/accessible/value'
|
72
|
+
|
73
|
+
# Specific accessibles
|
74
|
+
require 'atspi/desktop'
|
75
|
+
require 'atspi/application'
|
76
|
+
require 'atspi/window'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module ATSPI
|
2
|
+
# Included in classes representing the selected subset of a selectable collection
|
3
|
+
module SelectableCollection::Selected
|
4
|
+
include Collection
|
5
|
+
|
6
|
+
# @api private
|
7
|
+
INDEX_METHOD = :index_in_parent
|
8
|
+
|
9
|
+
def indices(limit: count)
|
10
|
+
[*first(limit)].map(&self.class::INDEX_METHOD)
|
11
|
+
end
|
12
|
+
private :indices
|
13
|
+
|
14
|
+
# @!group Representation
|
15
|
+
# @return [String] instance as inspectable string
|
16
|
+
def inspect
|
17
|
+
indices = self.indices(limit: 5).inspect
|
18
|
+
indices[-1] = ", …]" if count > 5
|
19
|
+
"#<#{self.class.name}:0x#{'%x14' % __id__} @count=#{count} @indices=#{indices}>"
|
20
|
+
end
|
21
|
+
# @!endgroup
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
module ATSPI
|
2
|
+
# Included in classes representing a collection having selectable items
|
3
|
+
module SelectableCollection
|
4
|
+
include Collection
|
5
|
+
|
6
|
+
# @!group Selection
|
7
|
+
# @return [Selected] its selected subset
|
8
|
+
def selected
|
9
|
+
self.class::Selected.new(@native)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Selects all items
|
13
|
+
# @return [true,false] indicating success
|
14
|
+
def select_all
|
15
|
+
map(&:select).all?
|
16
|
+
end
|
17
|
+
|
18
|
+
# Deselects all items
|
19
|
+
# @return [true,false] indicating success
|
20
|
+
def deselect_all
|
21
|
+
selected.map(&:deselect).all?
|
22
|
+
end
|
23
|
+
# @!endgroup
|
24
|
+
|
25
|
+
# @!group Representation
|
26
|
+
# @return [String] instance as inspectable string
|
27
|
+
def inspect
|
28
|
+
"#<#{self.class.name}:0x#{'%x14' % __id__} @count=#{count} @selected=#{selected.inspect}>"
|
29
|
+
end
|
30
|
+
# @!endgroup
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
Libatspi.load_class :StateSet
|
2
|
+
|
3
|
+
module ATSPI
|
4
|
+
# ATSPI::StateSet wraps libatspi's AtspiStateSet[https://developer.gnome.org/libatspi/stable/AtspiStateSet.html]
|
5
|
+
class StateSet
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
# @api private
|
9
|
+
def self.new_from_native(native)
|
10
|
+
new(*native.states)
|
11
|
+
end
|
12
|
+
|
13
|
+
# @!group Lifecycle
|
14
|
+
# @param states [Symbols] zero, one or more symbols derived from
|
15
|
+
# libatspi's {AtspiStateType enum}[https://developer.gnome.org/libatspi/stable/libatspi-atspi-constants.html#AtspiStateType]
|
16
|
+
# by removing the prefix +ATSPI_STATE_+ and making it lowercase.
|
17
|
+
#
|
18
|
+
# @return [StateSet]
|
19
|
+
#
|
20
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-new atspi_state_set_new
|
21
|
+
def initialize(*states)
|
22
|
+
@native = Libatspi::StateSet.new(states)
|
23
|
+
end
|
24
|
+
# @!endgroup
|
25
|
+
|
26
|
+
attr_reader :native
|
27
|
+
private :native
|
28
|
+
|
29
|
+
# @!group Modification
|
30
|
+
# Adds states to the set
|
31
|
+
#
|
32
|
+
# @param states [Symbols] zero, one or more symbols derived from
|
33
|
+
# libatspi's {AtspiStateType enum}[https://developer.gnome.org/libatspi/stable/libatspi-atspi-constants.html#AtspiStateType]
|
34
|
+
# by removing the prefix +ATSPI_STATE_+ and making it lowercase.
|
35
|
+
#
|
36
|
+
# @return [self]
|
37
|
+
#
|
38
|
+
# @example
|
39
|
+
# s = ATSPI::StateSet.new # => #<ATSPI::StateSet:0x15ae28014 @states=[]>
|
40
|
+
# s.add(:active, :enabled) # => #<ATSPI::StateSet:0x15ae28014 @states=[:active, :enabled]>
|
41
|
+
#
|
42
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-add atspi_state_set_add
|
43
|
+
def add(*states)
|
44
|
+
states.each{ |state| @native.add(state) }
|
45
|
+
self
|
46
|
+
end
|
47
|
+
|
48
|
+
# Removes states from the set
|
49
|
+
#
|
50
|
+
# @param states [Symbols] zero, one or more symbols derived from
|
51
|
+
# libatspi's {AtspiStateType enum}[https://developer.gnome.org/libatspi/stable/libatspi-atspi-constants.html#AtspiStateType]
|
52
|
+
# by removing the prefix +ATSPI_STATE_+ and making it lowercase.
|
53
|
+
#
|
54
|
+
# @return [self]
|
55
|
+
#
|
56
|
+
# @example
|
57
|
+
# s = ATSPI::StateSet.new(:active, :enabled) # => #<ATSPI::StateSet:0x15ae28014 @states=[:active, :enabled]>
|
58
|
+
# s.remove(:active) # => #<ATSPI::StateSet:0x15ae28014 @states=[:enabled]>
|
59
|
+
#
|
60
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-remove atspi_state_set_remove
|
61
|
+
def remove(*states)
|
62
|
+
states.each{ |state| @native.remove(state) }
|
63
|
+
self
|
64
|
+
end
|
65
|
+
# @!endgroup
|
66
|
+
|
67
|
+
# @!group Queries
|
68
|
+
# Checks if it contains the given state
|
69
|
+
#
|
70
|
+
# @param state [Symbol] the state as symbol derived from libatspi's
|
71
|
+
# {AtspiStateType enum}[https://developer.gnome.org/libatspi/stable/libatspi-atspi-constants.html#AtspiStateType]
|
72
|
+
# by removing the prefix +ATSPI_STATE_+ and making it lowercase.
|
73
|
+
#
|
74
|
+
# @return [true,false]
|
75
|
+
#
|
76
|
+
# @example
|
77
|
+
# ATSPI::StateSet.new(:active, :editable).contains?(:active) # => true
|
78
|
+
#
|
79
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-contains atspi_state_set_contains
|
80
|
+
def contains?(state)
|
81
|
+
@native.contains(state)
|
82
|
+
end
|
83
|
+
|
84
|
+
# Checks if it is empty
|
85
|
+
#
|
86
|
+
# @return [true,false]
|
87
|
+
#
|
88
|
+
# @example
|
89
|
+
# ATSPI::StateSet.new(:active, :editable).empty? # => false
|
90
|
+
#
|
91
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-is-empty atspi_state_set_is_empty
|
92
|
+
def empty?
|
93
|
+
@native.is_empty
|
94
|
+
end
|
95
|
+
|
96
|
+
# Returns the difference between it and another set
|
97
|
+
#
|
98
|
+
# @return [StateSet] the difference to the given set
|
99
|
+
#
|
100
|
+
# @example
|
101
|
+
# s1 = ATSPI::StateSet.new(:active, :editable) # => #<ATSPI::StateSet:0x15ae28014 @states=[:active, :editable]>
|
102
|
+
# s2 = ATSPI::StateSet.new(:active, :enabled) # => #<ATSPI::StateSet:0x119ea8c14 @states=[:active, :enabled]>
|
103
|
+
# s1.difference_to(s2) # => #<ATSPI::StateSet:0x110b2b414 @states=[:editable, :enabled]>
|
104
|
+
#
|
105
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-compare atspi_state_set_compare
|
106
|
+
def difference_to(state_set)
|
107
|
+
StateSet.new_from_native @native.compare(state_set.__send__(:native))
|
108
|
+
end
|
109
|
+
alias_method :^, :difference_to
|
110
|
+
|
111
|
+
# Checks if it equals another set
|
112
|
+
#
|
113
|
+
# @return [true, false]
|
114
|
+
#
|
115
|
+
# @example
|
116
|
+
# s1 = ATSPI::StateSet.new(:active, :editable) # => #<ATSPI::StateSet:0x15ae28014 @states=[:active, :editable]>
|
117
|
+
# s2 = ATSPI::StateSet.new(:active, :enabled) # => #<ATSPI::StateSet:0x119ea8c14 @states=[:active, :enabled]>
|
118
|
+
# s1.equals?(s2) # => false
|
119
|
+
#
|
120
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-equals atspi_state_set_equals
|
121
|
+
def equals?(state_set)
|
122
|
+
@native.equals state_set.__send__(:native)
|
123
|
+
end
|
124
|
+
alias_method :==, :equals?
|
125
|
+
# @!endgroup
|
126
|
+
|
127
|
+
# @!group Representations
|
128
|
+
# @return [Array<Symbol>] the states it contains
|
129
|
+
#
|
130
|
+
# @see https://developer.gnome.org/libatspi/stable/AtspiStateSet.html#atspi-state-set-get-states atspi_state_set_get_states
|
131
|
+
def to_a
|
132
|
+
@native.states.to_a
|
133
|
+
end
|
134
|
+
|
135
|
+
# @return [String] itself as an inspectable string
|
136
|
+
def inspect
|
137
|
+
"#<#{self.class.name}:0x#{'%x14' % __id__} @states=#{to_a.inspect}>"
|
138
|
+
end
|
139
|
+
# @!endgroup
|
140
|
+
end
|
141
|
+
end
|
data/lib/atspi/window.rb
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
module ATSPI
|
2
|
+
# Windows are Accessibles having a few exceptions.
|
3
|
+
class Window < Accessible
|
4
|
+
# @!group Identification
|
5
|
+
# It has no path.
|
6
|
+
# @return [[]]
|
7
|
+
def path
|
8
|
+
[]
|
9
|
+
end
|
10
|
+
|
11
|
+
# Its parent is its application
|
12
|
+
# @return [Application]
|
13
|
+
def parent
|
14
|
+
application
|
15
|
+
end
|
16
|
+
|
17
|
+
# Its window is itself
|
18
|
+
# @return [self]
|
19
|
+
def window
|
20
|
+
self
|
21
|
+
end
|
22
|
+
# @!endgroup
|
23
|
+
|
24
|
+
# @!group Representations
|
25
|
+
# @return [String] itself as an inspectable string
|
26
|
+
def inspect
|
27
|
+
"#<#{self.class.name}:0x#{'%x14' % __id__} @desktop=#{desktop.index} " <<
|
28
|
+
"@application=#{application.name} @name=#{name.inspect} " <<
|
29
|
+
"@extents=#{extents(relative_to: :screen).inspect}>"
|
30
|
+
end
|
31
|
+
# @!endgroup
|
32
|
+
end
|
33
|
+
end
|
data/lib/atspi.rb
ADDED
@@ -0,0 +1,58 @@
|
|
1
|
+
require 'atspi/requires'
|
2
|
+
|
3
|
+
# ATSPI is the entry point to access accessible objects.
|
4
|
+
module ATSPI
|
5
|
+
class << self
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
# Returns all desktops known to AT-SPI.
|
9
|
+
#
|
10
|
+
# @return [Array<Desktop>]
|
11
|
+
#
|
12
|
+
# @example
|
13
|
+
# ATSPI.desktops # => [#<ATSPI::Desktop:0xd4e81014 @index=0 @name="main">]
|
14
|
+
#
|
15
|
+
# @see https://developer.gnome.org/libatspi/stable/libatspi-atspi-registry.html#atspi-get-desktop atspi_get_desktop
|
16
|
+
# @see https://developer.gnome.org/libatspi/stable/libatspi-atspi-registry.html#atspi-get-desktop-count atspi_get_desktop_count
|
17
|
+
def desktops
|
18
|
+
@desktops ||= Libatspi.get_desktop_count.times.map do |idx|
|
19
|
+
Desktop.new(Libatspi.get_desktop(idx))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
# Returns all applications for the given desktop.
|
24
|
+
#
|
25
|
+
# @param desktop [Desktop]
|
26
|
+
#
|
27
|
+
# @return [Array<Application>]
|
28
|
+
#
|
29
|
+
# @example
|
30
|
+
# ATSPI.applications # => [#<ATSPI::Application:0x71d18014 @desktop=0 @name="gnome-terminal-server">, …]
|
31
|
+
def applications(desktop = desktops.first)
|
32
|
+
desktop.applications
|
33
|
+
end
|
34
|
+
|
35
|
+
#@!method generate_keyboard_event(keyval, keystring, synth_type)
|
36
|
+
# Generates a custom keyboard event.
|
37
|
+
#
|
38
|
+
# Delegates directly to libatspi's generate_keyboard_event[https://developer.gnome.org/libatspi/stable/libatspi-atspi-registry.html#atspi-generate-keyboard-event]
|
39
|
+
#
|
40
|
+
# @param keyval [Integer]
|
41
|
+
# @param keystring [String]
|
42
|
+
# @param synth_type [Symbol] one of :sym, :string, :press, :release or :pressrelease
|
43
|
+
#
|
44
|
+
# @return [true, false]
|
45
|
+
#
|
46
|
+
#@!method generate_mouse_event(x, y, name)
|
47
|
+
# Generates a custom mouse event.
|
48
|
+
#
|
49
|
+
# Delegates directly to libatspi's generate_mouse_event[https://developer.gnome.org/libatspi/stable/libatspi-atspi-registry.html#atspi-generate-mouse-event]
|
50
|
+
#
|
51
|
+
# @param x [Integer]
|
52
|
+
# @param y [Integer]
|
53
|
+
# @param name [String]
|
54
|
+
#
|
55
|
+
# @return [true, false]
|
56
|
+
delegate %i(generate_keyboard_event generate_mouse_event) => :Libatspi
|
57
|
+
end
|
58
|
+
end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: atspi
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.8.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Christopher Aue
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-04-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gir_ffi
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.10.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.10.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.8'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.8'
|
41
|
+
description: It is a high level wrapper around libatspi.
|
42
|
+
email:
|
43
|
+
- mail@christopheraue.net
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- ".yardopts"
|
50
|
+
- Gemfile
|
51
|
+
- LICENSE.txt
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- atspi.gemspec
|
55
|
+
- bin/console
|
56
|
+
- lib/atspi.rb
|
57
|
+
- lib/atspi/accessible.rb
|
58
|
+
- lib/atspi/accessible/action.rb
|
59
|
+
- lib/atspi/accessible/children.rb
|
60
|
+
- lib/atspi/accessible/children/selected.rb
|
61
|
+
- lib/atspi/accessible/descendants.rb
|
62
|
+
- lib/atspi/accessible/descendants/attribute_filter.rb
|
63
|
+
- lib/atspi/accessible/descendants/interface_filter.rb
|
64
|
+
- lib/atspi/accessible/descendants/name_filter.rb
|
65
|
+
- lib/atspi/accessible/descendants/options.rb
|
66
|
+
- lib/atspi/accessible/descendants/role_filter.rb
|
67
|
+
- lib/atspi/accessible/descendants/state_filter.rb
|
68
|
+
- lib/atspi/accessible/document.rb
|
69
|
+
- lib/atspi/accessible/extents.rb
|
70
|
+
- lib/atspi/accessible/hyperlink.rb
|
71
|
+
- lib/atspi/accessible/hyperlink/anchor.rb
|
72
|
+
- lib/atspi/accessible/image.rb
|
73
|
+
- lib/atspi/accessible/selectable.rb
|
74
|
+
- lib/atspi/accessible/table.rb
|
75
|
+
- lib/atspi/accessible/table/cell.rb
|
76
|
+
- lib/atspi/accessible/table/cell/columns.rb
|
77
|
+
- lib/atspi/accessible/table/cell/rows.rb
|
78
|
+
- lib/atspi/accessible/table/cells.rb
|
79
|
+
- lib/atspi/accessible/table/column.rb
|
80
|
+
- lib/atspi/accessible/table/columns.rb
|
81
|
+
- lib/atspi/accessible/table/columns/selected.rb
|
82
|
+
- lib/atspi/accessible/table/row.rb
|
83
|
+
- lib/atspi/accessible/table/rows.rb
|
84
|
+
- lib/atspi/accessible/table/rows/selected.rb
|
85
|
+
- lib/atspi/accessible/text.rb
|
86
|
+
- lib/atspi/accessible/text/caret.rb
|
87
|
+
- lib/atspi/accessible/text/character.rb
|
88
|
+
- lib/atspi/accessible/text/editable.rb
|
89
|
+
- lib/atspi/accessible/text/hyperlink.rb
|
90
|
+
- lib/atspi/accessible/text/hypertext.rb
|
91
|
+
- lib/atspi/accessible/text/offset.rb
|
92
|
+
- lib/atspi/accessible/text/range.rb
|
93
|
+
- lib/atspi/accessible/text/selection.rb
|
94
|
+
- lib/atspi/accessible/value.rb
|
95
|
+
- lib/atspi/application.rb
|
96
|
+
- lib/atspi/collection.rb
|
97
|
+
- lib/atspi/desktop.rb
|
98
|
+
- lib/atspi/extents.rb
|
99
|
+
- lib/atspi/libatspi.rb
|
100
|
+
- lib/atspi/requires.rb
|
101
|
+
- lib/atspi/selectable_collection.rb
|
102
|
+
- lib/atspi/selectable_collection/selected.rb
|
103
|
+
- lib/atspi/state_set.rb
|
104
|
+
- lib/atspi/version.rb
|
105
|
+
- lib/atspi/window.rb
|
106
|
+
homepage: https://github.com/christopheraue/ruby-atspi
|
107
|
+
licenses:
|
108
|
+
- MIT
|
109
|
+
metadata: {}
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.4.5.1
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: The atspi gem lets you comfortably call the Assistive Technology Service
|
130
|
+
Provider Interface on Linux.
|
131
|
+
test_files: []
|
132
|
+
has_rdoc:
|