ATK Library Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
The AtkComponent interface should be supported by any object that is rendered on the screen. The interface provides the standard mechanism for an assistive technology to determine and set the graphical representation of an object.
struct AtkComponentIface { GTypeInterface parent; guint (* add_focus_handler) (AtkComponent *component, AtkFocusHandler handler); gboolean (* contains) (AtkComponent *component, gint x, gint y); AtkObject* (* get_accessible_at_point) (AtkComponent *component, gint x, gint y); void (* get_extents) (AtkComponent *component, gint *x, gint *y, gint *width, gint *height); void (* get_position) (AtkComponent *component, gint *x, gint *y); void (* get_position_on_screen) (AtkComponent *component, gint *root_x, gint *root_y); void (* get_size) (AtkComponent *component, gint *width, gint *height); void (* grab_focus) (AtkComponent *component); void (* remove_focus_handler) (AtkComponent *component, guint handler_id); void (* set_extents) (AtkComponent *component, gint x, gint y, gint width, gint height); void (* set_position) (AtkComponent *component, gint x, gint y); void (* set_size) (AtkComponent *component, gint width, gint height); }; |
guint atk_component_add_focus_handler (AtkComponent *component, AtkFocusHandler handler); |
Add the specified handler to the set of functions to be called when this object receives focus events (in or out).
component : | The AtkComponent to attach the handler to |
handler : | The AtkFocusHandler to be attached to component |
Returns : |
gboolean atk_component_contains (AtkComponent *component, gint x, gint y); |
Checks whether the specified point is within the extent of the component, the x and y coordinates are defined to be relative to the coordinate system of the component.
component : | the AtkComponent |
x : | x coordinate relative to the coordinate system of component |
y : | y coordinate relative to the coordinate system of component |
Returns : | TRUE or FALSE indicating whether the specified point is within the extent of the component or not |
AtkObject* atk_component_get_accessible_at_point (AtkComponent *component, gint x, gint y); |
Gets the accessible child, if one exists, contained at the local coordinate point specified by x and y.
component : | the AtkComponent |
x : | local x coordinate |
y : | local y coordinate |
Returns : | the accessible child, if one exists |
void atk_component_get_extents (AtkComponent *component, gint *x, gint *y, gint *width, gint *height); |
Gets the rectangle which gives the extent of the component.
component : | an AtkComponent |
x : | address of gint to put x coordinate |
y : | address of gint to put y coordinate |
width : | address of gint to put width |
height : | address of gint to put height |
void atk_component_get_position (AtkComponent *component, gint *x, gint *y); |
Gets the position of component relative to the parent in the form of a point specifying component's top-left corner in the screen's coordinate space.
component : | an AtkComponent |
x : | address of gint to put x coordinate position |
y : | address of gint to put y coordinate position |
void atk_component_get_position_on_screen (AtkComponent *component, gint *x, gint *y); |
Gets the position of the component on the screen
component : | an AtkComponent |
x : | address of gint to put x coordinate position |
y : | address of gint to put y coordinate position |
void atk_component_get_size (AtkComponent *component, gint *width, gint *height); |
Gets the size of the component in terms of width and height.
component : | an AtkComponent |
width : | address of gint to put width of component |
height : | address of gint to put height of component |
void atk_component_grab_focus (AtkComponent *component); |
Grabs focus for this component
component : | an AtkComponent |
void atk_component_remove_focus_handler (AtkComponent *component, guint handler_id); |
Remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out).
component : | the AtkComponent to remove the focus handler from |
handler_id : | the handler id of the focus handler to be removed from component |
void atk_component_set_extents (AtkComponent *component, gint x, gint y, gint width, gint height); |
Sets the extents of component
component : | an AtkComponent |
x : | x coordinate |
y : | y coordinate |
width : | width to set for component |
height : | height to set for component |
void atk_component_set_position (AtkComponent *component, gint x, gint y); |
Sets the postition of component
component : | an AtkComponent |
x : | x coordinate |
y : | y coordinate |
void atk_component_set_size (AtkComponent *component, gint width, gint height); |
Set the size of the component in terms of width and height
component : | an AtkComponent |
width : | width to set for component |
height : | height to set for component |