Top | Description | Object Hierarchy | Known Implementations | Signals | ![]() |
![]() |
![]() |
![]() |
AtkComponentAtkComponent — The ATK interface provided by UI components which occupy a physical area on the screen. which the user can activate/interact with. |
AtkComponent; struct AtkComponentIface; void (*AtkFocusHandler) (AtkObject *object
,gboolean focus_in
); struct AtkRectangle; 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
); gdouble atk_component_get_alpha (AtkComponent *component
);
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.
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); /* * signal handlers */ void (* bounds_changed) (AtkComponent *component, AtkRectangle *bounds); gdouble (* get_alpha) (AtkComponent *component); };
This virtual function is deprecated since 2.9.4
and it should not be overriden. See
|
|
This virtual function is deprecated since 2.12 and
it should not be overriden. Use |
|
This virtual function is deprecated since 2.12 and it
should not be overriden. Use |
|
This virtual function is deprecated since
2.9.4 and it should not be overriden. See
|
|
void (*AtkFocusHandler) (AtkObject *object
,gboolean focus_in
);
AtkFocusHandler
is deprecated and should not be used in newly-written code.
This type is deprecated since ATK version 2.9.4. as
atk_component_add_focus_handler()
and
atk_component_remove_focus_handler()
are deprecated. See those
methods for more information.
The type of callback function used for
atk_component_add_focus_handler()
and
atk_component_remove_focus_handler()
|
the AtkObject that receives/lose the focus |
|
TRUE if the object receives the focus |
struct AtkRectangle { gint x; gint y; gint width; gint height; };
A data structure for holding a rectangle. Those coordinates are relative to the component top-level parent.
guint atk_component_add_focus_handler (AtkComponent *component
,AtkFocusHandler handler
);
atk_component_add_focus_handler
is deprecated and should not be used in newly-written code.
This method is deprecated since ATK version 2.9.4. If you need to track when an object gains or lose the focus, use state-changed:focused notification instead.
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
|
The AtkComponent to attach the |
|
The AtkFocusHandler to be attached to |
Returns : |
a handler id which can be used in |
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
.
Toolkit implementor note: ATK provides a default implementation for this virtual method. In general there are little reason to re-implement it.
|
the AtkComponent |
|
x coordinate |
|
y coordinate |
|
specifies whether the coordinates are relative to the screen or to the components top level window |
Returns : |
|
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
.
|
an AtkComponent |
|
address of gint to put x coordinate |
|
address of gint to put y coordinate |
|
address of gint to put width |
|
address of gint to put height |
|
specifies whether the coordinates are relative to the screen or to the components top level window |
AtkLayer atk_component_get_layer (AtkComponent *component
);
Gets the layer of the component.
|
an AtkComponent |
Returns : |
an AtkLayer which is the layer of the component |
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 or ATK_LAYER_WINDOW.
|
an AtkComponent |
Returns : |
a gint which is the zorder of the component, i.e. the depth at which the component is shown in relation to other components in the same container. |
void atk_component_get_position (AtkComponent *component
,gint *x
,gint *y
,AtkCoordType coord_type
);
atk_component_get_position
is deprecated and should not be used in newly-written code.
Since 2.12. Use atk_component_get_extents()
instead.
Gets the position of component
in the form of
a point specifying component
's top-left corner.
|
an AtkComponent |
|
address of gint to put x coordinate position |
|
address of gint to put y coordinate position |
|
specifies whether the coordinates are relative to the screen or to the components top level window |
void atk_component_get_size (AtkComponent *component
,gint *width
,gint *height
);
atk_component_get_size
is deprecated and should not be used in newly-written code.
Since 2.12. Use atk_component_get_extents()
instead.
Gets the size of the component
in terms of width and height.
|
an AtkComponent |
|
address of gint to put width of |
|
address of gint to put height of |
gboolean atk_component_grab_focus (AtkComponent *component
);
Grabs focus for this component
.
|
an AtkComponent |
Returns : |
|
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
.
|
the AtkComponent |
|
x coordinate |
|
y coordinate |
|
specifies whether the coordinates are relative to the screen or to the components top level window |
Returns : |
a reference to the accessible child, if one exists. [transfer full] |
void atk_component_remove_focus_handler (AtkComponent *component
,guint handler_id
);
atk_component_remove_focus_handler
is deprecated and should not be used in newly-written code.
This method is deprecated since ATK version 2.9.4. If you need to track when an object gains or lose the focus, use state-changed:focused notification instead.
Remove the handler specified by handler_id
from the list of
functions to be executed when this object receives focus events
(in or out).
|
the AtkComponent to remove the focus handler from |
|
the handler id of the focus handler to be removed
from |
gboolean atk_component_set_extents (AtkComponent *component
,gint x
,gint y
,gint width
,gint height
,AtkCoordType coord_type
);
Sets the extents of component
.
|
an AtkComponent |
|
x coordinate |
|
y coordinate |
|
width to set for |
|
height to set for |
|
specifies whether the coordinates are relative to the screen or to the components top level window |
Returns : |
|
gboolean atk_component_set_position (AtkComponent *component
,gint x
,gint y
,AtkCoordType coord_type
);
Sets the postition of component
.
|
an AtkComponent |
|
x coordinate |
|
y coordinate |
|
specifies whether the coordinates are relative to the screen or to the components top level window |
Returns : |
|
gboolean atk_component_set_size (AtkComponent *component
,gint width
,gint height
);
Set the size of the component
in terms of width and height.
|
an AtkComponent |
|
width to set for |
|
height to set for |
Returns : |
|
gdouble atk_component_get_alpha (AtkComponent *component
);
Returns the alpha value (i.e. the opacity) for this
component
, on a scale from 0 (fully transparent) to 1.0
(fully opaque).
|
an AtkComponent |
Returns : |
An alpha value from 0 to 1.0, inclusive. |
Since 1.12
"bounds-changed"
signalvoid user_function (AtkComponent *atkcomponent,
AtkRectangle *arg1,
gpointer user_data) : Run Last
The 'bounds-changed" signal is emitted when the bposition or size of the component changes.
|
the object which received the signal. |
|
The AtkRectangle giving the new position and size. |
|
user data set when the signal handler was connected. |