Class: ATSPI::ErrorAccessible

Inherits:
Object
  • Object
show all
Includes:
Accessible::Extents, Accessible::Selectable
Defined in:
lib/atspi/error_accessible.rb

Overview

The ErrorAccessible is used for accessibles that cannot be instantiated due to errors. It responds to the interface of Accessible and returns dummy values.

Identification collapse

Attributes & States collapse

Tree & Traversal collapse

Actions collapse

Representative for collapse

Representations collapse

Instance Method Summary collapse

Instance Method Details

#actions[]

Returns it supports no actions.

Returns:

  • ([])

    it supports no actions



133
134
135
# File 'lib/atspi/error_accessible.rb', line 133

def actions
  []
end

#applicationnil

Returns no application.

Returns:

  • (nil)

    no application



31
32
33
# File 'lib/atspi/error_accessible.rb', line 31

def application
  nil
end

#attributes{}

Returns an empty hash.

Returns:

  • ({})

    an empty hash



94
95
96
# File 'lib/atspi/error_accessible.rb', line 94

def attributes
  {}
end

#children[]

Returns no children.

Returns:

  • ([])

    no children



111
112
113
# File 'lib/atspi/error_accessible.rb', line 111

def children
  []
end

#contains?(x, y, relative_to:) ⇒ true, false Originally defined in module Accessible::Extents

Checks if the given point lies within its bounds

Examples:

accessible.contains?(1243, 323, relative_to: :screen) # => true

Parameters:

  • x (Integer)
  • y (Integer)
  • relative_to (Symbol)

    coordinate system derived from libatspi’s AtspiCoordType enum by removing the prefix ATSPI_COORD_TYPE and making it lowercase

Returns:

  • (true, false)

See Also:

#descendant_at(x, y, relative_to:) ⇒ Accessible? Originally defined in module Accessible::Extents

Returns the descendant at the given coordinates. nil if it does not implement the component interface.

Examples:

accessible.descendant_at(1243, 323, relative_to: :screen) # => #<ATSPI::Accessible:0x140839014 …>

Parameters:

  • x (Integer)
  • y (Integer)
  • relative_to (Symbol)

    coordinate system derived from libatspi’s AtspiCoordType enum by removing the prefix ATSPI_COORD_TYPE and making it lowercase

Returns:

See Also:

#descendant_by_path(*path) ⇒ nil

Returns:

  • (nil)


121
122
123
# File 'lib/atspi/error_accessible.rb', line 121

def descendant_by_path(*path)
  nil
end

#descendants[]

Returns no descendants.

Returns:

  • ([])

    no descendants



116
117
118
# File 'lib/atspi/error_accessible.rb', line 116

def descendants
  []
end

#descriptionString

Returns its inspection.

Returns:

  • (String)

    its inspection



59
60
61
# File 'lib/atspi/error_accessible.rb', line 59

def description
  inspect
end

#deselecttrue, false Originally defined in module Accessible::Selectable

Deselects it

Returns:

  • (true, false)

    indicating success of the operation. false if its parent does not implement the selection interface.

See Also:

#desktopnil

Returns no desktop.

Returns:

  • (nil)

    no desktop



26
27
28
# File 'lib/atspi/error_accessible.rb', line 26

def desktop
  nil
end

#documentnil

Returns no document.

Returns:

  • (nil)

    no document



140
141
142
# File 'lib/atspi/error_accessible.rb', line 140

def document
  nil
end

#extends?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/atspi/error_accessible.rb', line 7

def extends?
  false
end

#extents(relative_to:) ⇒ ATSPI::Extents Originally defined in module Accessible::Extents

Returns its extents. Will have a (0,0) position and a 0x0 size if it does not implement the component interface.

Examples:

accessible.extents(relative_to: :screen) # => #<ATSPI::Extents:0x10b62c814 @x=2192 @y=187 @width=655 @height=492>

Parameters:

  • relative_to (Symbol)

    coordinate system derived from libatspi’s AtspiCoordType enum by removing the prefix ATSPI_COORD_TYPE_ and making it lowercase

Returns:

See Also:

#grab_focustrue, false Originally defined in module Accessible::Extents

Sets the input focus to it.

Returns:

  • (true, false)

    indicating success of the operation. false if it does not implement the component interface.

See Also:

Returns no hyperlink.

Returns:

  • (nil)

    no hyperlink



150
151
152
# File 'lib/atspi/error_accessible.rb', line 150

def hyperlink
  nil
end

#imagenil

Returns no image.

Returns:

  • (nil)

    no image



156
157
158
# File 'lib/atspi/error_accessible.rb', line 156

def image
  nil
end

#index_in_parent-1 Also known as: index

Returns an invalid index.

Returns:

  • (-1)

    an invalid index



41
42
43
# File 'lib/atspi/error_accessible.rb', line 41

def index_in_parent
  -1
end

#inspectString

Returns itself as an inspectable string.

Returns:

  • (String)

    itself as an inspectable string



173
174
175
# File 'lib/atspi/error_accessible.rb', line 173

def inspect
  "#<#{self.class.name}:0x#{'%x14' % __id__}>"
end

#interfaces[]

Returns no interfaces.

Returns:

  • ([])

    no interfaces



99
100
101
# File 'lib/atspi/error_accessible.rb', line 99

def interfaces
  []
end

#layerSymbol Originally defined in module Accessible::Extents

Returns its layer derived from libatspi’s AtspiComponentLayer enum by removing the prefix ATSPI_LAYER_ and making it lowercase. :invalid if it does not implement the component interface.

Returns:

See Also:

#localized_role_name'Invalid'

Returns:

  • ('Invalid')


74
75
76
# File 'lib/atspi/error_accessible.rb', line 74

def localized_role_name
  'Invalid'
end

#mdi_z_orderInteger Originally defined in module Accessible::Extents

Returns its mdi_z_order. -1 if it does not implement the component interface.

Returns:

See Also:

#nameString

Returns its inspection.

Returns:

  • (String)

    its inspection



54
55
56
# File 'lib/atspi/error_accessible.rb', line 54

def name
  inspect
end

#opacityFloat Also known as: alpha Originally defined in module Accessible::Extents

Returns its opacity between 0.0 (transparent) and 1.0 (opaque). 0.0 if it does not implement the component interface.

Returns:

  • (Float)

    its opacity between 0.0 (transparent) and 1.0 (opaque). 0.0 if it does not implement the component interface.

See Also:

#parentnil

Returns no parent.

Returns:

  • (nil)

    no parent



106
107
108
# File 'lib/atspi/error_accessible.rb', line 106

def parent
  nil
end

#path{}

Returns an empty path.

Returns:

  • ({})

    an empty path



47
48
49
# File 'lib/atspi/error_accessible.rb', line 47

def path
  []
end

#relations{}

Returns no relations.

Returns:

  • ({})

    no relations



126
127
128
# File 'lib/atspi/error_accessible.rb', line 126

def relations
  {}
end

#role:invalid

Returns:

  • (:invalid)


64
65
66
# File 'lib/atspi/error_accessible.rb', line 64

def role
  :invalid
end

#role_name'Invalid'

Returns:

  • ('Invalid')


69
70
71
# File 'lib/atspi/error_accessible.rb', line 69

def role_name
  'Invalid'
end

#selecttrue, false Originally defined in module Accessible::Selectable

Selects it

Returns:

  • (true, false)

    indicating success of the operation. false if its parent does not implement the selection interface.

See Also:

#selectable?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/atspi/error_accessible.rb', line 12

def selectable?
  false
end

#selected?true, false Originally defined in module Accessible::Selectable

Checks if it currently is selected

Returns:

See Also:

#statesStateSet

Returns an empty state set.

Returns:



89
90
91
# File 'lib/atspi/error_accessible.rb', line 89

def states
  StateSet.new
end

#tablenil

Returns no table.

Returns:

  • (nil)

    no table



166
167
168
# File 'lib/atspi/error_accessible.rb', line 166

def table
  nil
end

#textnil

Returns no text.

Returns:

  • (nil)

    no text



145
146
147
# File 'lib/atspi/error_accessible.rb', line 145

def text
  nil
end

#toolkit_name''

Returns an empty string.

Returns:

  • ('')

    an empty string



79
80
81
# File 'lib/atspi/error_accessible.rb', line 79

def toolkit_name
  ''
end

#toolkit_version''

Returns an empty string.

Returns:

  • ('')

    an empty string



84
85
86
# File 'lib/atspi/error_accessible.rb', line 84

def toolkit_version
  ''
end

#valuenil

Returns no value.

Returns:

  • (nil)

    no value



161
162
163
# File 'lib/atspi/error_accessible.rb', line 161

def value
  nil
end

#windownil

Returns no window.

Returns:

  • (nil)

    no window



36
37
38
# File 'lib/atspi/error_accessible.rb', line 36

def window
  nil
end