atspi-component: libatspi Reference Manual

## atspi-component atspi-component |

## Functions

AtspiRect * | atspi_rect_copy ()
GType | atspi_point_get_type ()
AtspiPoint * | atspi_point_copy ()
GType | atspi_component_get_type ()
gboolean | atspi_component_contains ()
AtspiAccessible * | atspi_component_get_accessible_at_point ()
AtspiRect * | atspi_component_get_extents ()
AtspiPoint * | atspi_component_get_position ()
AtspiPoint * | atspi_component_get_size ()
AtspiComponentLayer | atspi_component_get_layer ()
gshort | atspi_component_get_mdi_z_order ()
gboolean | atspi_component_grab_focus ()
gdouble | atspi_component_get_alpha ()
gboolean | atspi_component_scroll_to ()
gboolean | atspi_component_scroll_to_point ()
gboolean | atspi_component_set_extents ()
gboolean | atspi_component_set_position ()
gboolean | atspi_component_set_size ()

## Types and Values

struct | AtspiRect
#define | ATSPI_TYPE_RECT
struct | AtspiPoint
#define | ATSPI_TYPE_POINT
| AtspiComponent

## Object Hierarchy

        GBoxed
        ├── AtspiPoint
        ╰── AtspiRect
        GInterface
        ╰── AtspiComponent

## Known Implementations

AtspiComponent is implemented by AtspiAccessible.

## Description

## Functions

### atspi_rect_copy ()

    AtspiRect *
    atspi_rect_copy (AtspiRect *src);

### atspi_point_get_type ()

    GType
    atspi_point_get_type ();

### atspi_point_copy ()

    AtspiPoint *
    atspi_point_copy (AtspiPoint *src);

### atspi_component_get_type ()

    GType
    atspi_component_get_type ();

### atspi_component_contains ()

    gboolean
    atspi_component_contains (AtspiComponent *obj,
                              gint x,
                              gint y,
                              AtspiCoordType ctype,
                              GError **error);

Queries whether a given AtspiComponent contains a particular point.

#### Parameters

obj | a pointer to the AtspiComponent to query. |
x | a gint specifying the x coordinate in question. |
y | a gint specifying the y coordinate in question. |
ctype | the desired coordinate system of the point (`x` , `y` ) (e.g. CSPI_COORD_TYPE_WINDOW, CSPI_COORD_TYPE_SCREEN). |

#### Returns

TRUE if the specified component contains the point (`x` , `y` ), FALSE otherwise.

### atspi_component_get_accessible_at_point ()

    AtspiAccessible *
    atspi_component_get_accessible_at_point
                                   (AtspiComponent *obj,
                                    gint x,
                                    gint y,
                                    AtspiCoordType ctype,
                                    GError **error);

Gets the accessible child at a given coordinate within an AtspiComponent.

#### Parameters

obj | a pointer to the AtspiComponent to query. |
x | a gint specifying the x coordinate of the point in question. |
y | a gint specifying the y coordinate of the point in question. |
ctype | the coordinate system of the point (`x` , `y` ) (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). |

#### Returns

a pointer to an AtspiAccessible child of the specified component which contains the point (`x` , `y` ), or NULL if no child contains the point.

[nullable][transfer full]

### atspi_component_get_extents ()

    AtspiRect *
    atspi_component_get_extents (AtspiComponent *obj,
                                 AtspiCoordType ctype,
                                 GError **error);

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

#### Parameters

obj | a pointer to the AtspiComponent to query. |
ctype | the desired coordinate system into which to return the results, (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). |

#### Returns

An AtspiRect giving the accessible's extents.

### atspi_component_get_position ()

    AtspiPoint *
    atspi_component_get_position (AtspiComponent *obj,
                                  AtspiCoordType ctype,
                                  GError **error);

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

#### Parameters

obj | a pointer to the AtspiComponent to query. |
ctype | the desired coordinate system into which to return the results, (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). |

#### Returns

An AtspiPoint giving the `obj` 's position.

### atspi_component_get_size ()

    AtspiPoint *
    atspi_component_get_size (AtspiComponent *obj,
                              GError **error);

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

#### Parameters

obj | a pointer to the AtspiComponent to query. |

#### Returns

An AtspiPoint giving the `obj` 's size.

### atspi_component_get_layer ()

    AtspiComponentLayer
    atspi_component_get_layer (AtspiComponent *obj,
                               GError **error);

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

#### Parameters

obj | a pointer to the AtspiComponent to query. |

#### Returns

the AtspiComponentLayer into which this component is painted.

### atspi_component_get_mdi_z_order ()

    gshort
    atspi_component_get_mdi_z_order (AtspiComponent *obj,
                                     GError **error);

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

#### Parameters

obj | a pointer to the AtspiComponent to query. |

#### 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.

### atspi_component_grab_focus ()

    gboolean
    atspi_component_grab_focus (AtspiComponent *obj,
                                GError **error);

Attempts to set the keyboard input focus to the specified AtspiComponent.

#### Parameters

obj | a pointer to the AtspiComponent on which to operate. |

#### Returns

TRUE if successful, FALSE otherwise.

### atspi_component_get_alpha ()

    gdouble
    atspi_component_get_alpha (AtspiComponent *obj,
                               GError **error);

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

#### Parameters

obj | The AtspiComponent to be queried. |

#### Returns

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

### atspi_component_scroll_to ()

    gboolean
    atspi_component_scroll_to (AtspiComponent *obj,
                               AtspiScrollType type,
                               GError **error);

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

#### Parameters

obj | a pointer to the AtspiComponent object on which to operate. |
type | a AtspiScrollType indicating where the object should be placed on the screen. |

#### Returns

TRUE if successful, FALSE otherwise.

### atspi_component_scroll_to_point ()

    gboolean
    atspi_component_scroll_to_point (AtspiComponent *obj,
                                     AtspiCoordType coords,
                                     gint x,
                                     gint y,
                                     GError **error);

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

#### Parameters

obj | a pointer to the AtspiComponent object on which to operate. |
coords | a AtspiCoordType indicating whether the coordinates are relative to the screen, to the window, or to the parent object. |
x | the x coordinate of the point to reach |
y | the y coordinate of the point to reach |
error | return location for a GError |

#### Returns

TRUE if successful, FALSE otherwise.

### atspi_component_set_extents ()

    gboolean
    atspi_component_set_extents (AtspiComponent *obj,
                                 gint x,
                                 gint y,
                                 gint width,
                                 gint height,
                                 AtspiCoordType ctype,
                                 GError **error);

Moves and resizes the specified component.

#### Parameters

obj | a pointer to the AtspiComponent to move. |
x | the new vertical position to which the component should be moved. |
y | the new horizontal position to which the component should be moved. |
width | the width to which the component should be resized. |
height | the height to which the component should be resized. |
ctype | the coordinate system in which the position is specified. (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). |

#### Returns

TRUE if successful; FALSE otherwise.

### atspi_component_set_position ()

    gboolean
    atspi_component_set_position (AtspiComponent *obj,
                                  gint x,
                                  gint y,
                                  AtspiCoordType ctype,
                                  GError **error);

Moves the component to the specified position.

#### Parameters

obj | a pointer to the AtspiComponent to move. |
x | the new vertical position to which the component should be moved. |
y | the new horizontal position to which the component should be moved. |
ctype | the coordinate system in which the position is specified. (e.g. ATSPI_COORD_TYPE_WINDOW, ATSPI_COORD_TYPE_SCREEN). |

#### Returns

TRUE if successful; FALSE otherwise.

### atspi_component_set_size ()

    gboolean
    atspi_component_set_size (AtspiComponent *obj,
                              gint width,
                              gint height,
                              GError **error);

Resizes the specified component to the given coordinates.

#### Parameters

obj | a pointer to the AtspiComponent to query. |
width | the width to which the component should be resized. |
height | the height to which the component should be resized. |

#### Returns

TRUE if successful; FALSE otherwise.

## Types and Values

### struct AtspiRect

    struct AtspiRect {
      gint x;
      gint y;
      gint width;
      gint height;
    };

### ATSPI_TYPE_RECT

    #define ATSPI_TYPE_RECT (atspi_rect_get_type ())

The GType for a boxed type holding a AtspiRect.

### struct AtspiPoint

    struct AtspiPoint {
      gint x;
      gint y;
    };

### ATSPI_TYPE_POINT

    #define ATSPI_TYPE_POINT (atspi_point_get_type ())

The GType for a boxed type holding a AtspiPoint.

### AtspiComponent

    typedef struct _AtspiComponent AtspiComponent;