gi-gtk3-3.0.44: Gtk 3.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.Accessible

Contents

- Exported types
- Methods
  - connectWidgetDestroyed
  - getWidget
  - setWidget
- Properties
  - widget

Description

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, IsDescendantOf Accessible o) => IsAccessible o
- toAccessible :: (MonadIO m, IsAccessible o) => o -> m 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, MonadIO m, IsWidget a) => a -> m (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.

Constructors

Accessible (ManagedPtr Accessible) |

#### Instances

Instances details

Eq Accessible Source # |
Instance details Defined in GI.Gtk.Objects.Accessible Methods (==) :: Accessible -> Accessible -> Bool Source # (/=) :: Accessible -> Accessible -> Bool Source #
GObject Accessible Source # |
Instance details Defined in GI.Gtk.Objects.Accessible
ManagedPtrNewtype Accessible Source # |
Instance details Defined in GI.Gtk.Objects.Accessible Methods toManagedPtr :: Accessible -> ManagedPtr Accessible Source #
TypedObject Accessible Source # |
Instance details Defined in GI.Gtk.Objects.Accessible Methods glibType :: IO GType Source #
HasParentTypes Accessible Source # |
Instance details Defined in GI.Gtk.Objects.Accessible
IsGValue (Maybe Accessible) Source # | Convert `Accessible` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.Accessible Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe Accessible -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe Accessible) Source #
type ParentTypes Accessible Source # |
Instance details Defined in GI.Gtk.Objects.Accessible type ParentTypes Accessible = '[Object, Object]

class (GObject o, IsDescendantOf Accessible o) => IsAccessible o Source #

Type class for types which can be safely cast to `Accessible`, for instance with `toAccessible`.

#### Instances

Instances details

(GObject o, IsDescendantOf Accessible o) => IsAccessible o Source # |
Instance details Defined in GI.Gtk.Objects.Accessible

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

# Methods

### Click to display all available methods, including inherited ones

Expand

#### Methods

addRelationship, bindProperty, bindPropertyFull, connectWidgetDestroyed, forceFloating, freezeNotify, getv, initialize, isFloating, notify, notifyByPspec, notifyStateChange, peekParent, ref, refAccessibleChild, refRelationSet, refSink, refStateSet, removePropertyChangeHandler, removeRelationship, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAccessibleId, getAttributes, getData, getDescription, getHelpText, getIndexInParent, getLayer, getMdiZorder, getNAccessibleChildren, getName, getObjectLocale, getParent, getProperty, getQdata, getRole, getWidget.

#### Setters

setAccessibleId, setData, setDataFull, setDescription, setHelpText, setName, setParent, setProperty, setRole, setWidget.

## connectWidgetDestroyed

accessibleConnectWidgetDestroyed Source #

Arguments

:: (HasCallStack, MonadIO m, IsAccessible a) |
=> a | `accessible`: a `Accessible`
-> 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

accessibleGetWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsAccessible a) |
=> a | `accessible`: a `Accessible`
-> m (Maybe Widget) | Returns: pointer to the `Widget` corresponding to the `Accessible`, or `Nothing`.

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

accessibleSetWidget Source #

Arguments

:: (HasCallStack, MonadIO m, IsAccessible a, IsWidget b) |
=> a | `accessible`: a `Accessible`
-> Maybe b | `widget`: a `Widget` or `Nothing` to unset
-> 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, MonadIO m, IsWidget a) => a -> m (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 ]