Atspi.Component

g Atspi.Component Atspi.Component GObject.GInterface GObject.GInterface GObject.GInterface->Atspi.Component

Implementations:

Atspi.Accessible

Methods

contains (x, y, ctype)

get_accessible_at_point (x, y, ctype)

get_alpha ()

get_extents (ctype)

get_layer ()

get_mdi_z_order ()

get_position (ctype)

get_size ()

grab_focus ()

scroll_to (type)

scroll_to_point (coords, x, y)

set_extents (x, y, width, height, ctype)

set_position (x, y, ctype)

set_size (width, height)

Virtual Methods

None

Properties

None

Signals

None

Fields

None

Class Details

class Atspi.Component
Bases:

GObject.GInterface

An interface implemented by objects which have onscreen visual representations.

The Component interface is implemented by objects which occupy on-screen space, e.g. objects which have onscreen visual representations. The methods in Component allow clients to identify where the objects lie in the onscreen coordinate system, their relative size, stacking order, and position. It also provides a mechanism whereby keyboard focus may be transferred to specific user interface elements programmatically. This is a 2D API. Coordinates of 3D objects are projected into the 2-dimensional screen view for purposes of this interface.

contains(x, y, ctype)
Parameters:
  • x (int) – a int specifying the x coordinate in question.

  • y (int) – a int specifying the y coordinate in question.

  • ctype (Atspi.CoordType) – the desired coordinate system of the point (x, y) (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).

Raises:

GLib.Error

Returns:

True if the specified component contains the point (x, y), False otherwise.

Return type:

bool

Queries whether a given Atspi.Component contains a particular point.

get_accessible_at_point(x, y, ctype)
Parameters:
Raises:

GLib.Error

Returns:

a pointer to an Atspi.Accessible child of the specified component which contains the point (x, y), or None if no child contains the point.

Return type:

Atspi.Accessible or None

Gets the accessible child at a given coordinate within an Atspi.Component.

get_alpha()
Raises:

GLib.Error

Returns:

the opacity value of a component, as a float between 0.0 and 1.0.

Return type:

float

Gets the opacity/alpha value of a component, if alpha blending is in use.

get_extents(ctype)
Parameters:

ctype (Atspi.CoordType) – the desired coordinate system into which to return the results, (e.g. Atspi.CoordType.WINDOW, Atspi.CoordType.SCREEN).

Raises:

GLib.Error

Returns:

An Atspi.Rect giving the accessible’s extents.

Return type:

Atspi.Rect

Gets the bounding box of the specified Atspi.Component. The returned values are meaningful only if the Component has both STATE_VISIBLE and STATE_SHOWING.

get_layer()
Raises:

GLib.Error

Returns:

the Atspi.ComponentLayer into which this component is painted.

Return type:

Atspi.ComponentLayer

Queries which layer the component is painted into, to help determine its visibility in terms of stacking order.

get_mdi_z_order()
Raises:

GLib.Error

Returns:

a #gshort indicating the stacking order of the component in the MDI layer, or -1 if the component is not in the MDI layer.

Return type:

int

Queries the z stacking order of a component which is in the MDI or window layer. (Bigger z-order numbers mean nearer the top)

get_position(ctype)
Parameters:

ctype (Atspi.CoordType) – the desired coordinate system into which to return the results, (e.g. Atspi.CoordType.WINDOW, Atspi.CoordType.SCREEN).

Raises:

GLib.Error

Returns:

An Atspi.Point giving the self's position.

Return type:

Atspi.Point

Gets the minimum x and y coordinates of the specified Atspi.Component. The returned values are meaningful only if the Component has both STATE_VISIBLE and STATE_SHOWING.

get_size()
Raises:

GLib.Error

Returns:

An Atspi.Point giving the self's size.

Return type:

Atspi.Point

Gets the size of the specified Atspi.Component. The returned values are meaningful only if the Component has both STATE_VISIBLE and STATE_SHOWING.

grab_focus()
Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Attempts to set the keyboard input focus to the specified Atspi.Component.

scroll_to(type)
Parameters:

type (Atspi.ScrollType) – a Atspi.ScrollType indicating where the object should be placed on the screen.

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Scrolls whatever container of the Atspi.Component object so it becomes visible on the screen.

scroll_to_point(coords, x, y)
Parameters:
  • coords (Atspi.CoordType) – a Atspi.CoordType indicating whether the coordinates are relative to the screen, to the window, or to the parent object.

  • x (int) – the x coordinate of the point to reach

  • y (int) – the y coordinate of the point to reach

Raises:

GLib.Error

Returns:

True if successful, False otherwise.

Return type:

bool

Scrolls whatever container of the Atspi.Component object so it becomes visible on the screen at a given position.

set_extents(x, y, width, height, ctype)
Parameters:
  • x (int) – the new horizontal position to which the component should be moved.

  • y (int) – the new vertical position to which the component should be moved.

  • width (int) – the width to which the component should be resized.

  • height (int) – the height to which the component should be resized.

  • ctype (Atspi.CoordType) – the coordinate system in which the position is specified. (e.g. Atspi.CoordType.WINDOW, Atspi.CoordType.SCREEN).

Raises:

GLib.Error

Returns:

True if successful; False otherwise.

Return type:

bool

Moves and resizes the specified component.

set_position(x, y, ctype)
Parameters:
Raises:

GLib.Error

Returns:

True if successful; False otherwise.

Return type:

bool

Moves the component to the specified position.

set_size(width, height)
Parameters:
  • width (int) – the width to which the component should be resized.

  • height (int) – the height to which the component should be resized.

Raises:

GLib.Error

Returns:

True if successful; False otherwise.

Return type:

bool

Resizes the specified component to the given pixel dimensions.