Interface

Atk-1.0AtkComponentInterface

Interface for implementing Component. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_bounds_changed(bounds: Atk.Rectangle): void;
    vfunc_contains(x: number, y: number, coord_type: Atk.CoordType): boolean;
    vfunc_get_alpha(): number;
    vfunc_get_extents(
        coord_type: Atk.CoordType,
    ): [number, number, number, number];
    vfunc_get_layer(): Atk.Layer;
    vfunc_get_mdi_zorder(): number;
    vfunc_get_position(coord_type: Atk.CoordType): [number, number];
    vfunc_get_size(): [number, number];
    vfunc_grab_focus(): boolean;
    vfunc_ref_accessible_at_point(
        x: number,
        y: number,
        coord_type: Atk.CoordType,
    ): Atk.Object;
    vfunc_remove_focus_handler(handler_id: number): void;
    vfunc_scroll_to(type: Atk.ScrollType): boolean;
    vfunc_scroll_to_point(coords: Atk.CoordType, x: number, y: number): boolean;
    vfunc_set_extents(
        x: number,
        y: number,
        width: number,
        height: number,
        coord_type: Atk.CoordType,
    ): boolean;
    vfunc_set_position(
        x: number,
        y: number,
        coord_type: Atk.CoordType,
    ): boolean;
    vfunc_set_size(width: number, height: number): boolean;
}

Hierarchy (View Summary)

Index

Methods

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

    Parameters

    • x: number

      x coordinate

    • y: number

      y coordinate

    • coord_type: Atk.CoordType

      specifies whether the coordinates are relative to the screen or to the components top level window

    Returns boolean

  • Returns the alpha value (i.e. the opacity) for this component, on a scale from 0 (fully transparent) to 1.0 (fully opaque).

    Returns number

  • Gets the rectangle which gives the extent of the component.

    If the extent can not be obtained (e.g. a non-embedded plug or missing support), all of x, y, width, height are set to -1.

    Parameters

    • coord_type: Atk.CoordType

      specifies whether the coordinates are relative to the screen or to the components top level window

    Returns [number, number, number, number]

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

    Returns number

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

    If the position can not be obtained (e.g. a non-embedded plug or missing support), x and y are set to -1.

    Parameters

    • coord_type: Atk.CoordType

      specifies whether the coordinates are relative to the screen or to the components top level window

    Returns [number, number]

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

    If the size can not be obtained (e.g. a non-embedded plug or missing support), width and height are set to -1.

    Returns [number, number]

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

    Parameters

    • x: number

      x coordinate

    • y: number

      y coordinate

    • coord_type: Atk.CoordType

      specifies whether the coordinates are relative to the screen or to the components top level window

    Returns Atk.Object

  • Remove the handler specified by handler_id from the list of functions to be executed when this object receives focus events (in or out).

    Parameters

    • handler_id: number

      the handler id of the focus handler to be removed from component

    Returns void

  • Makes component visible on the screen by scrolling all necessary parents.

    Contrary to atk_component_set_position, this does not actually move component in its parent, this only makes the parents scroll so that the object shows up on the screen, given its current position within the parents.

    Parameters

    • type: Atk.ScrollType

      specify where the object should be made visible.

    Returns boolean

  • Move the top-left of component to a given position of the screen by scrolling all necessary parents.

    Parameters

    • coords: Atk.CoordType

      specify whether coordinates are relative to the screen or to the parent object.

    • x: number

      x-position where to scroll to

    • y: number

      y-position where to scroll to

    Returns boolean

  • Sets the extents of component.

    Parameters

    • x: number

      x coordinate

    • y: number

      y coordinate

    • width: number

      width to set for component

    • height: number

      height to set for component

    • coord_type: Atk.CoordType

      specifies whether the coordinates are relative to the screen or to the components top level window

    Returns boolean

  • Sets the position of component.

    Contrary to atk_component_scroll_to, this does not trigger any scrolling, this just moves component in its parent.

    Parameters

    • x: number

      x coordinate

    • y: number

      y coordinate

    • coord_type: Atk.CoordType

      specifies whether the coordinates are relative to the screen or to the component's top level window

    Returns boolean

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

    Parameters

    • width: number

      width to set for component

    • height: number

      height to set for component

    Returns boolean