| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Atk.Interfaces.Component
Contents
Description
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 Component implementations provided
for their corresponding 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 Text.
- newtype Component = Component (ManagedPtr Component)
- noComponent :: Maybe Component
- class GObject o => IsComponent o
- toComponent :: (MonadIO m, IsComponent o) => o -> m Component
- data ComponentContainsMethodInfo
- componentContains :: (HasCallStack, MonadIO m, IsComponent a) => a -> Int32 -> Int32 -> CoordType -> m Bool
- data ComponentGetAlphaMethodInfo
- componentGetAlpha :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Double
- data ComponentGetExtentsMethodInfo
- componentGetExtents :: (HasCallStack, MonadIO m, IsComponent a) => a -> CoordType -> m (Int32, Int32, Int32, Int32)
- data ComponentGetLayerMethodInfo
- componentGetLayer :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Layer
- data ComponentGetMdiZorderMethodInfo
- componentGetMdiZorder :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Int32
- data ComponentGetPositionMethodInfo
- componentGetPosition :: (HasCallStack, MonadIO m, IsComponent a) => a -> CoordType -> m (Int32, Int32)
- data ComponentGetSizeMethodInfo
- componentGetSize :: (HasCallStack, MonadIO m, IsComponent a) => a -> m (Int32, Int32)
- data ComponentGrabFocusMethodInfo
- componentGrabFocus :: (HasCallStack, MonadIO m, IsComponent a) => a -> m Bool
- data ComponentRefAccessibleAtPointMethodInfo
- componentRefAccessibleAtPoint :: (HasCallStack, MonadIO m, IsComponent a) => a -> Int32 -> Int32 -> CoordType -> m (Maybe Object)
- data ComponentRemoveFocusHandlerMethodInfo
- componentRemoveFocusHandler :: (HasCallStack, MonadIO m, IsComponent a) => a -> Word32 -> m ()
- data ComponentSetExtentsMethodInfo
- componentSetExtents :: (HasCallStack, MonadIO m, IsComponent a) => a -> Int32 -> Int32 -> Int32 -> Int32 -> CoordType -> m Bool
- data ComponentSetPositionMethodInfo
- componentSetPosition :: (HasCallStack, MonadIO m, IsComponent a) => a -> Int32 -> Int32 -> CoordType -> m Bool
- data ComponentSetSizeMethodInfo
- componentSetSize :: (HasCallStack, MonadIO m, IsComponent a) => a -> Int32 -> Int32 -> m Bool
- type C_ComponentBoundsChangedCallback = Ptr () -> Ptr Rectangle -> Ptr () -> IO ()
- type ComponentBoundsChangedCallback = Rectangle -> IO ()
- data ComponentBoundsChangedSignalInfo
- afterComponentBoundsChanged :: (IsComponent a, MonadIO m) => a -> ComponentBoundsChangedCallback -> m SignalHandlerId
- genClosure_ComponentBoundsChanged :: ComponentBoundsChangedCallback -> IO Closure
- mk_ComponentBoundsChangedCallback :: C_ComponentBoundsChangedCallback -> IO (FunPtr C_ComponentBoundsChangedCallback)
- noComponentBoundsChangedCallback :: Maybe ComponentBoundsChangedCallback
- onComponentBoundsChanged :: (IsComponent a, MonadIO m) => a -> ComponentBoundsChangedCallback -> m SignalHandlerId
- wrap_ComponentBoundsChangedCallback :: ComponentBoundsChangedCallback -> Ptr () -> Ptr Rectangle -> Ptr () -> IO ()
Exported types
Constructors
| Component (ManagedPtr Component) |
Instances
| GObject Component # | |
| IsObject Component # | |
| IsComponent Component # | |
| ((~) * info (ResolveComponentMethod t Component), MethodInfo * info Component p) => IsLabel t (Component -> p) # | |
| ((~) * info (ResolveComponentMethod t Component), MethodInfo * info Component p) => IsLabelProxy t (Component -> p) # | |
| HasAttributeList * Component # | |
| type AttributeList Component # | |
| type SignalList Component # | |
class GObject o => IsComponent o #
Instances
toComponent :: (MonadIO m, IsComponent o) => o -> m Component #
Methods
contains
data ComponentContainsMethodInfo #
Instances
| ((~) * signature (Int32 -> Int32 -> CoordType -> m Bool), MonadIO m, IsComponent a) => MethodInfo * ComponentContainsMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> CoordType |
|
| -> m Bool | Returns: |
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.
getAlpha
data ComponentGetAlphaMethodInfo #
Instances
| ((~) * signature (m Double), MonadIO m, IsComponent a) => MethodInfo * ComponentGetAlphaMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> m Double | Returns: An alpha value from 0 to 1.0, inclusive. |
Returns the alpha value (i.e. the opacity) for this
component, on a scale from 0 (fully transparent) to 1.0
(fully opaque).
Since: 1.12
getExtents
data ComponentGetExtentsMethodInfo #
Instances
| ((~) * signature (CoordType -> m (Int32, Int32, Int32, Int32)), MonadIO m, IsComponent a) => MethodInfo * ComponentGetExtentsMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> CoordType |
|
| -> m (Int32, Int32, Int32, Int32) |
Gets the rectangle which gives the extent of the component.
getLayer
data ComponentGetLayerMethodInfo #
Instances
| ((~) * signature (m Layer), MonadIO m, IsComponent a) => MethodInfo * ComponentGetLayerMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> m Layer | Returns: an |
Gets the layer of the component.
getMdiZorder
data ComponentGetMdiZorderMethodInfo #
Instances
| ((~) * signature (m Int32), MonadIO m, IsComponent a) => MethodInfo * ComponentGetMdiZorderMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> m Int32 | 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. |
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.
getPosition
data ComponentGetPositionMethodInfo #
Instances
| ((~) * signature (CoordType -> m (Int32, Int32)), MonadIO m, IsComponent a) => MethodInfo * ComponentGetPositionMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> CoordType |
|
| -> m (Int32, Int32) |
Deprecated: Since 2.12. Use componentGetExtents instead.
Gets the position of component in the form of
a point specifying component's top-left corner.
getSize
data ComponentGetSizeMethodInfo #
Instances
| ((~) * signature (m (Int32, Int32)), MonadIO m, IsComponent a) => MethodInfo * ComponentGetSizeMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> m (Int32, Int32) |
Deprecated: Since 2.12. Use componentGetExtents instead.
Gets the size of the component in terms of width and height.
grabFocus
data ComponentGrabFocusMethodInfo #
Instances
| ((~) * signature (m Bool), MonadIO m, IsComponent a) => MethodInfo * ComponentGrabFocusMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> m Bool |
Grabs focus for this component.
refAccessibleAtPoint
data ComponentRefAccessibleAtPointMethodInfo #
Instances
| ((~) * signature (Int32 -> Int32 -> CoordType -> m (Maybe Object)), MonadIO m, IsComponent a) => MethodInfo * ComponentRefAccessibleAtPointMethodInfo a signature # | |
componentRefAccessibleAtPoint #
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> CoordType |
|
| -> m (Maybe Object) | Returns: a reference to the accessible child, if one exists |
Gets a reference to the accessible child, if one exists, at the
coordinate point specified by x and y.
removeFocusHandler
data ComponentRemoveFocusHandlerMethodInfo #
Instances
| ((~) * signature (Word32 -> m ()), MonadIO m, IsComponent a) => MethodInfo * ComponentRemoveFocusHandlerMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> Word32 |
|
| -> m () |
Deprecated: (Since version 2.9.4)If you need to track when an object gains orlose the focus, use the Object::state-change "focused" notification instead.
Remove the handler specified by handlerId from the list of
functions to be executed when this object receives focus events
(in or out).
setExtents
data ComponentSetExtentsMethodInfo #
Instances
| ((~) * signature (Int32 -> Int32 -> Int32 -> Int32 -> CoordType -> m Bool), MonadIO m, IsComponent a) => MethodInfo * ComponentSetExtentsMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> Int32 |
|
| -> Int32 |
|
| -> CoordType |
|
| -> m Bool |
Sets the extents of component.
setPosition
data ComponentSetPositionMethodInfo #
Instances
| ((~) * signature (Int32 -> Int32 -> CoordType -> m Bool), MonadIO m, IsComponent a) => MethodInfo * ComponentSetPositionMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> CoordType |
|
| -> m Bool | Returns: |
Sets the postition of component.
setSize
data ComponentSetSizeMethodInfo #
Instances
| ((~) * signature (Int32 -> Int32 -> m Bool), MonadIO m, IsComponent a) => MethodInfo * ComponentSetSizeMethodInfo a signature # | |
Arguments
| :: (HasCallStack, MonadIO m, IsComponent a) | |
| => a |
|
| -> Int32 |
|
| -> Int32 |
|
| -> m Bool |
Set the size of the component in terms of width and height.
Signals
boundsChanged
type ComponentBoundsChangedCallback = Rectangle -> IO () #
afterComponentBoundsChanged :: (IsComponent a, MonadIO m) => a -> ComponentBoundsChangedCallback -> m SignalHandlerId #
mk_ComponentBoundsChangedCallback :: C_ComponentBoundsChangedCallback -> IO (FunPtr C_ComponentBoundsChangedCallback) #
onComponentBoundsChanged :: (IsComponent a, MonadIO m) => a -> ComponentBoundsChangedCallback -> m SignalHandlerId #
wrap_ComponentBoundsChangedCallback :: ComponentBoundsChangedCallback -> Ptr () -> Ptr Rectangle -> Ptr () -> IO () #