Atspi.Component¶
- Implementations:
Methods¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
None
Properties¶
None
Signals¶
None
Fields¶
None
Class Details¶
- class Atspi.Component¶
- Bases:
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:
ctype (
Atspi.CoordType) – the desired coordinate system of the point (x, y) (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN).
- Raises:
- Returns:
Trueif the specified component contains the point (x, y),Falseotherwise.- Return type:
Queries whether a given
Atspi.Componentcontains a particular point.
- get_accessible_at_point(x, y, ctype)¶
- Parameters:
x (
int) – aintspecifying the x coordinate of the point in question.y (
int) – aintspecifying the y coordinate of the point in question.ctype (
Atspi.CoordType) – the coordinate system of the point (x, y) (e.g.Atspi.CoordType.WINDOW,Atspi.CoordType.SCREEN).
- Raises:
- Returns:
a pointer to an
Atspi.Accessiblechild of the specified component which contains the point (x, y), orNoneif no child contains the point.- Return type:
Gets the accessible child at a given coordinate within an
Atspi.Component.
- get_alpha()¶
- Raises:
- Returns:
the opacity value of a component, as a
floatbetween 0.0 and 1.0.- Return type:
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:
- Returns:
An
Atspi.Rectgiving the accessible’s extents.- Return type:
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:
- Returns:
the
Atspi.ComponentLayerinto which this component is painted.- Return type:
Queries which layer the component is painted into, to help determine its visibility in terms of stacking order.
- get_mdi_z_order()¶
- Raises:
- 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:
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:
- Returns:
An
Atspi.Pointgiving the self's position.- Return type:
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:
- Returns:
An
Atspi.Pointgiving the self's size.- Return type:
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:
- Returns:
- Return type:
Attempts to set the keyboard input focus to the specified
Atspi.Component.
- scroll_to(type)¶
- Parameters:
type (
Atspi.ScrollType) – aAtspi.ScrollTypeindicating where the object should be placed on the screen.- Raises:
- Returns:
- Return type:
Scrolls whatever container of the
Atspi.Componentobject so it becomes visible on the screen.
- scroll_to_point(coords, x, y)¶
- Parameters:
coords (
Atspi.CoordType) – aAtspi.CoordTypeindicating 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 reachy (
int) – the y coordinate of the point to reach
- Raises:
- Returns:
- Return type:
Scrolls whatever container of the
Atspi.Componentobject 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:
- Returns:
- Return type:
Moves and resizes the specified component.
- set_position(x, y, 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.ctype (
Atspi.CoordType) – the coordinate system in which the position is specified. (e.g.Atspi.CoordType.WINDOW,Atspi.CoordType.SCREEN).
- Raises:
- Returns:
- Return type:
Moves the component to the specified position.
- set_size(width, height)¶
- Parameters:
- Raises:
- Returns:
- Return type:
Resizes the specified component to the given pixel dimensions.