Class: ATSPI::Accessible::Image

Inherits:
Object
  • Object
show all
Defined in:
lib/atspi/accessible/image.rb

Overview

Wraps libatspi’s AtspiImage

Instance Method Summary collapse

Instance Method Details

#descriptionString

Returns its description.

Returns:

  • (String)

    its description

See Also:



11
12
13
# File 'lib/atspi/accessible/image.rb', line 11

def description
  @native.image_description
end

#extents(relative_to:) ⇒ Extents

Returns its extents.

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:



19
20
21
# File 'lib/atspi/accessible/image.rb', line 19

def extents(relative_to:)
  Extents.new(@native.image_extents(relative_to))
end

#inspectString

Returns itself as an inspectable string.

Returns:

  • (String)

    itself as an inspectable string



30
31
32
33
# File 'lib/atspi/accessible/image.rb', line 30

def inspect
  "#<#{self.class.name}:0x#{'%x14' % __id__} @description=#{description.inspect} " <<
    "@extents=#{extents(relative_to: :screen).inspect}>"
end

#localeString

Returns its locale.

Returns:

  • (String)

    its locale

See Also:



25
26
27
# File 'lib/atspi/accessible/image.rb', line 25

def locale
  @native.image_locale
end