The ATK interface provided by UI components which occupy a physical area on the screen.
<atk-component>
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
<atk-component>
implementations provided for their corresponding
<atk-object>
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
<atk-text>
.
<atk-rectangle>
)The 'bounds-changed" signal is emitted when the bposition or size of the a component changes.
<atk-component>
) (x int
) (y int
) (coord_type <atk-coord-type>
) ⇒ (ret bool
)Checks whether the specified point is within the extent of the component.
- component
- the
<atk-component>
- x
- x coordinate
- y
- y coordinate
- coord-type
- specifies whether the coordinates are relative to the screen or to the components top level window
- ret
- ‘
#t
’ or ‘#f
’ indicating whether the specified point is within the extent of the component or not
<atk-component>
) (coord_type <atk-coord-type>
) ⇒ (x int
) (y int
) (width int
) (height int
)Gets the rectangle which gives the extent of the component.
- component
- an
<atk-component>
- 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- coord-type
- specifies whether the coordinates are relative to the screen or to the components top level window
<atk-component>
) ⇒ (ret <atk-layer>
)Gets the layer of the component.
- component
- an
<atk-component>
- ret
- an
<atk-layer>
which is the layer of the component
<atk-component>
) ⇒ (ret int
)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.
- component
- an
<atk-component>
- ret
- 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.
<atk-component>
) (coord_type <atk-coord-type>
) ⇒ (x int
) (y int
)Gets the position of component in the form of a point specifying component's top-left corner.
- component
- an
<atk-component>
- x
- address of
<gint>
to put x coordinate position- y
- address of
<gint>
to put y coordinate position- coord-type
- specifies whether the coordinates are relative to the screen or to the components top level window
<atk-component>
) ⇒ (width int
) (height int
)Gets the size of the component in terms of width and height.
- component
- an
<atk-component>
- width
- address of
<gint>
to put width of component- height
- address of
<gint>
to put height of component
<atk-component>
) ⇒ (ret bool
)Grabs focus for this component.
- component
- an
<atk-component>
- ret
- ‘
#t
’ if successful, ‘#f
’ otherwise.
<atk-component>
) (x int
) (y int
) (width int
) (height int
) (coord_type <atk-coord-type>
) ⇒ (ret bool
)Sets the extents of component.
- component
- an
<atk-component>
- x
- x coordinate
- y
- y coordinate
- width
- width to set for component
- height
- height to set for component
- coord-type
- specifies whether the coordinates are relative to the screen or to the components top level window
- ret
- ‘
#t
’ or ‘#f
’ whether the extents were set or not
<atk-component>
) (x int
) (y int
) (coord_type <atk-coord-type>
) ⇒ (ret bool
)Sets the postition of component.
- component
- an
<atk-component>
- x
- x coordinate
- y
- y coordinate
- coord-type
- specifies whether the coordinates are relative to the screen or to the components top level window
- ret
- ‘
#t
’ or ‘#f
’ whether or not the position was set or not
<atk-component>
) (width int
) (height int
) ⇒ (ret bool
)Set the size of the component in terms of width and height.
- component
- an
<atk-component>
- width
- width to set for component
- height
- height to set for component
- ret
- ‘
#t
’ or ‘#f
’ whether the size was set or not
<atk-component>
) ⇒ (ret double
)Returns the alpha value (i.e. the opacity) for this component, on a scale from 0 (fully transparent) to 1.0 (fully opaque).
- component
- an
<atk-component>
- ret
- An alpha value from 0 to 1.0, inclusive.
Since ATK 1.12