atk.component

Module for [Component] interface

Types 2

interfaceComponent

The ATK interface provided by UI components which occupy a physical area on the screen. which the user can activate/interact with.

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

Methods
bool contains(int x, int y, atk.types.CoordType coordType)Checks whether the specified point is within the extent of the component.
double getAlpha()Returns the alpha value (i.e. the opacity) for this component, on a scale from 0 (fully transparent) to 1.0 (fully opaque). Returns: An alpha value from 0 to 1.0, inclusive.
void getExtents(out int x, out int y, out int width, out int height, atk.types.CoordType coordType)Gets the rectangle which gives the extent of the component.
atk.types.Layer getLayer()Gets the layer of the component. Returns: an #AtkLayer which is the layer of the component
int getMdiZorder()Gets the zorder of the component. The value GMININT will be returned if the layer of the component is not ATKLAYERMDI or ATKLAYER_WINDOW. Returns: a gint which is the zorder of the component, i.e. ...
void getPosition(out int x, out int y, atk.types.CoordType coordType)Gets the position of component in the form of a point specifying component's top-left corner.
void getSize(out int width, out int height)Gets the size of the component in terms of width and height.
bool grabFocus()Grabs focus for this component. Returns: true if successful, false otherwise.
atk.object.ObjectWrap refAccessibleAtPoint(int x, int y, atk.types.CoordType coordType)Gets a reference to the accessible child, if one exists, at the coordinate point specified by `x` and `y`.
void removeFocusHandler(uint handlerId)Remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out).
bool scrollTo(atk.types.ScrollType type)Makes component visible on the screen by scrolling all necessary parents.
bool scrollToPoint(atk.types.CoordType coords, int x, int y)Move the top-left of component to a given position of the screen by scrolling all necessary parents.
bool setExtents(int x, int y, int width, int height, atk.types.CoordType coordType)Sets the extents of component.
bool setPosition(int x, int y, atk.types.CoordType coordType)Sets the position of component.
bool setSize(int width, int height)Set the size of the component in terms of width and height.
gulong connectBoundsChanged(T)(T callback, Flag!"After" after = No.After)Connect to `BoundsChanged` signal.