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 |
The Accessible
class is the base class for accessible
implementations for Widget
subclasses. It is a thin
wrapper around Object
, which adds facilities for associating
a widget with its accessible object.
An accessible implementation for a third-party widget should
derive from Accessible
and implement the suitable interfaces
from ATK, such as Text
or Selection
. To establish
the connection between the widget class and its corresponding
acccessible implementation, override the get_accessible vfunc
in WidgetClass
.
Synopsis
- newtype Accessible = Accessible (ManagedPtr Accessible)
- class GObject o => IsAccessible o
- toAccessible :: (MonadIO m, IsAccessible o) => o -> m Accessible
- noAccessible :: Maybe Accessible
- accessibleConnectWidgetDestroyed :: (HasCallStack, MonadIO m, IsAccessible a) => a -> m ()
- accessibleGetWidget :: (HasCallStack, MonadIO m, IsAccessible a) => a -> m (Maybe Widget)
- accessibleSetWidget :: (HasCallStack, MonadIO m, IsAccessible a, IsWidget b) => a -> Maybe b -> m ()
- clearAccessibleWidget :: (MonadIO m, IsAccessible o) => o -> m ()
- constructAccessibleWidget :: (IsAccessible o, IsWidget a) => a -> IO (GValueConstruct o)
- getAccessibleWidget :: (MonadIO m, IsAccessible o) => o -> m (Maybe Widget)
- setAccessibleWidget :: (MonadIO m, IsAccessible o, IsWidget a) => o -> a -> m ()
Exported types
newtype Accessible Source #
Memory-managed wrapper type.
Instances
GObject Accessible Source # | |
Defined in GI.Gtk.Objects.Accessible gobjectType :: Accessible -> IO GType # | |
IsObject Accessible Source # | |
Defined in GI.Gtk.Objects.Accessible | |
IsObject Accessible Source # | |
Defined in GI.Gtk.Objects.Accessible | |
IsAccessible Accessible Source # | |
Defined in GI.Gtk.Objects.Accessible |
class GObject o => IsAccessible o Source #
Type class for types which can be safely cast to Accessible
, for instance with toAccessible
.
Instances
toAccessible :: (MonadIO m, IsAccessible o) => o -> m Accessible Source #
Cast to Accessible
, for types for which this is known to be safe. For general casts, use castTo
.
noAccessible :: Maybe Accessible Source #
A convenience alias for Nothing
:: Maybe
Accessible
.
Methods
connectWidgetDestroyed
accessibleConnectWidgetDestroyed Source #
:: (HasCallStack, MonadIO m, IsAccessible a) | |
=> a |
|
-> m () |
Deprecated: (Since version 3.4)Use accessibleSetWidget
and its vfuncs.
This function specifies the callback function to be called when the widget corresponding to a GtkAccessible is destroyed.
getWidget
:: (HasCallStack, MonadIO m, IsAccessible a) | |
=> a |
|
-> m (Maybe Widget) | Returns: pointer to the |
Gets the Widget
corresponding to the Accessible
.
The returned widget does not have a reference added, so
you do not need to unref it.
Since: 2.22
setWidget
:: (HasCallStack, MonadIO m, IsAccessible a, IsWidget b) | |
=> a |
|
-> Maybe b | |
-> m () |
Sets the Widget
corresponding to the Accessible
.
accessible
will not hold a reference to widget
.
It is the caller’s responsibility to ensure that when widget
is destroyed, the widget is unset by calling this function
again with widget
set to Nothing
.
Since: 2.22
Properties
widget
No description available in the introspection data.
clearAccessibleWidget :: (MonadIO m, IsAccessible o) => o -> m () Source #
Set the value of the “widget
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#widget
constructAccessibleWidget :: (IsAccessible o, IsWidget a) => a -> IO (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “widget
” property. This is rarely needed directly, but it is used by new
.
getAccessibleWidget :: (MonadIO m, IsAccessible o) => o -> m (Maybe Widget) Source #
Get the value of the “widget
” property.
When overloading is enabled, this is equivalent to
get
accessible #widget
setAccessibleWidget :: (MonadIO m, IsAccessible o, IsWidget a) => o -> a -> m () Source #
Set the value of the “widget
” property.
When overloading is enabled, this is equivalent to
set
accessible [ #widget:=
value ]