AtkComponent

Name

AtkComponent -- The ATK interface provided by UI components which occupy a physical area on the screen.

Synopsis



struct      AtkComponent;
struct      AtkComponentIface;
guint       atk_component_add_focus_handler (AtkComponent *component,
                                             AtkFocusHandler handler);
gboolean    atk_component_contains          (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             AtkCoordType coord_type);
void        atk_component_get_extents       (AtkComponent *component,
                                             gint *x,
                                             gint *y,
                                             gint *width,
                                             gint *height,
                                             AtkCoordType coord_type);
AtkLayer    atk_component_get_layer         (AtkComponent *component);
gint        atk_component_get_mdi_zorder    (AtkComponent *component);
void        atk_component_get_position      (AtkComponent *component,
                                             gint *x,
                                             gint *y,
                                             AtkCoordType coord_type);
void        atk_component_get_size          (AtkComponent *component,
                                             gint *width,
                                             gint *height);
gboolean    atk_component_grab_focus        (AtkComponent *component);
AtkObject*  atk_component_ref_accessible_at_point
                                            (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             AtkCoordType coord_type);
void        atk_component_remove_focus_handler
                                            (AtkComponent *component,
                                             guint handler_id);
gboolean    atk_component_set_extents       (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             gint width,
                                             gint height,
                                             AtkCoordType coord_type);
gboolean    atk_component_set_position      (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             AtkCoordType coord_type);
gboolean    atk_component_set_size          (AtkComponent *component,
                                             gint width,
                                             gint height);

Description

AtkComponent should be implemented by most if not all UI elements with an actual on-screen presence, i.e. components which can be said to have a screen-coordinate bounding box. Virtually all widgets will need to have AtkComponent implementations provided for their corresponding AtkObject class. In short, only UI elements which are *not* GUI elements will omit this ATK interface.

A possible exception might be textual information with a transparent background, in which case text glyph bounding box information is provided by AtkText.

Details

struct AtkComponent

struct AtkComponent;


struct AtkComponentIface

struct AtkComponentIface
{
  GTypeInterface parent;

  guint          (* add_focus_handler)  (AtkComponent          *component,
                                         AtkFocusHandler        handler);

  gboolean       (* contains)           (AtkComponent          *component,
                                         gint                   x,
                                         gint                   y,
                                         AtkCoordType           coord_type);

  AtkObject*    (* ref_accessible_at_point)  (AtkComponent     *component,
                                         gint                   x,
                                         gint                   y,
                                         AtkCoordType           coord_type);
  void          (* get_extents)         (AtkComponent          *component,
                                         gint                  *x,
                                         gint                  *y,
                                         gint                  *width,
                                         gint                  *height,
                                         AtkCoordType          coord_type);
  void                     (* get_position)     (AtkComponent   *component,
                                                 gint           *x,
                                                 gint           *y,
                                                 AtkCoordType   coord_type);
  void                     (* get_size)                 (AtkComponent   *component,
                                                         gint           *width,
                                                         gint           *height);
  gboolean                 (* grab_focus)               (AtkComponent   *component);
  void                     (* remove_focus_handler)      (AtkComponent  *component,
                                                          guint         handler_id);
  gboolean                 (* set_extents)      (AtkComponent   *component,
                                                 gint           x,
                                                 gint           y,
                                                 gint           width,
                                                 gint           height,
                                                 AtkCoordType   coord_type);
  gboolean                 (* set_position)     (AtkComponent   *component,
                                                 gint           x,
                                                 gint           y,
                                                 AtkCoordType   coord_type);
  gboolean                 (* set_size)         (AtkComponent   *component,
                                                 gint           width,
                                                 gint           height);
  	
  AtkLayer                 (* get_layer)        (AtkComponent   *component);
  gint                     (* get_mdi_zorder)   (AtkComponent   *component);

  AtkFunction              pad1;
  AtkFunction              pad2;
};


atk_component_add_focus_handler ()

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). If the handler is already added it is not added again


atk_component_contains ()

gboolean    atk_component_contains          (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             AtkCoordType coord_type);

Checks whether the specified point is within the extent of the component.


atk_component_get_extents ()

void        atk_component_get_extents       (AtkComponent *component,
                                             gint *x,
                                             gint *y,
                                             gint *width,
                                             gint *height,
                                             AtkCoordType coord_type);

Gets the rectangle which gives the extent of the component.


atk_component_get_layer ()

AtkLayer    atk_component_get_layer         (AtkComponent *component);

Gets the layer of the component.


atk_component_get_mdi_zorder ()

gint        atk_component_get_mdi_zorder    (AtkComponent *component);

Gets the zorder of the component. The value G_MININT will be returned if the layer of the component is not ATK_LAYER_MDI.


atk_component_get_position ()

void        atk_component_get_position      (AtkComponent *component,
                                             gint *x,
                                             gint *y,
                                             AtkCoordType coord_type);

Gets the position of component in the form of a point specifying component's top-left corner.


atk_component_get_size ()

void        atk_component_get_size          (AtkComponent *component,
                                             gint *width,
                                             gint *height);

Gets the size of the component in terms of width and height.


atk_component_grab_focus ()

gboolean    atk_component_grab_focus        (AtkComponent *component);

Grabs focus for this component.


atk_component_ref_accessible_at_point ()

AtkObject*  atk_component_ref_accessible_at_point
                                            (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             AtkCoordType coord_type);

Gets a reference to the accessible child, if one exists, at the coordinate point specified by x and y.


atk_component_remove_focus_handler ()

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


atk_component_set_extents ()

gboolean    atk_component_set_extents       (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             gint width,
                                             gint height,
                                             AtkCoordType coord_type);

Sets the extents of component.


atk_component_set_position ()

gboolean    atk_component_set_position      (AtkComponent *component,
                                             gint x,
                                             gint y,
                                             AtkCoordType coord_type);

Sets the postition of component.


atk_component_set_size ()

gboolean    atk_component_set_size          (AtkComponent *component,
                                             gint width,
                                             gint height);

Set the size of the component in terms of width and height.