gi-gtk4-4.0.12: Gtk 4.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.ATContext

Contents

- Exported types
- Methods
  - create
  - getAccessible
  - getAccessibleRole
- Properties
  - accessible
  - accessibleRole
  - display
- Signals
  - stateChange

Description

Communicates with platform-specific assistive technologies API.

Each platform supported by GTK implements a `GtkATContext` subclass, and is responsible for updating the accessible state in response to state changes in `GtkAccessible`.

Synopsis

- newtype ATContext = ATContext (ManagedPtr ATContext)
- class (GObject o, IsDescendantOf ATContext o) => IsATContext o
- toATContext :: (MonadIO m, IsATContext o) => o -> m ATContext
- aTContextCreate :: (HasCallStack, MonadIO m, IsAccessible a, IsDisplay b) => AccessibleRole -> a -> b -> m (Maybe ATContext)
- aTContextGetAccessible :: (HasCallStack, MonadIO m, IsATContext a) => a -> m Accessible
- aTContextGetAccessibleRole :: (HasCallStack, MonadIO m, IsATContext a) => a -> m AccessibleRole
- constructATContextAccessible :: (IsATContext o, MonadIO m, IsAccessible a) => a -> m (GValueConstruct o)
- getATContextAccessible :: (MonadIO m, IsATContext o) => o -> m Accessible
- constructATContextAccessibleRole :: (IsATContext o, MonadIO m) => AccessibleRole -> m (GValueConstruct o)
- getATContextAccessibleRole :: (MonadIO m, IsATContext o) => o -> m AccessibleRole
- setATContextAccessibleRole :: (MonadIO m, IsATContext o) => o -> AccessibleRole -> m ()
- clearATContextDisplay :: (MonadIO m, IsATContext o) => o -> m ()
- constructATContextDisplay :: (IsATContext o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getATContextDisplay :: (MonadIO m, IsATContext o) => o -> m (Maybe Display)
- setATContextDisplay :: (MonadIO m, IsATContext o, IsDisplay a) => o -> a -> m ()
- type ATContextStateChangeCallback = IO ()
- afterATContextStateChange :: (IsATContext a, MonadIO m) => a -> ((?self :: a) => ATContextStateChangeCallback) -> m SignalHandlerId
- onATContextStateChange :: (IsATContext a, MonadIO m) => a -> ((?self :: a) => ATContextStateChangeCallback) -> m SignalHandlerId

# Exported types

newtype ATContext Source #

Memory-managed wrapper type.

Constructors

ATContext (ManagedPtr ATContext) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf ATContext o) => IsATContext o Source #

Type class for types which can be safely cast to `ATContext`, for instance with `toATContext`.

#### Instances

Instances details

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

toATContext :: (MonadIO m, IsATContext o) => o -> m ATContext Source #

Cast to `ATContext`, 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

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAccessible, getAccessibleRole, getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## create

aTContextCreate Source #

Arguments

:: (HasCallStack, MonadIO m, IsAccessible a, IsDisplay b) |
=> AccessibleRole | `accessibleRole`: the accessible role used by the `GtkATContext`
-> a | `accessible`: the `GtkAccessible` implementation using the `GtkATContext`
-> b | `display`: the `GdkDisplay` used by the `GtkATContext`
-> m (Maybe ATContext) | Returns: the `GtkATContext`

Creates a new `GtkATContext` instance for the given accessible role, accessible instance, and display connection.

The `GtkATContext` implementation being instantiated will depend on the platform.

## getAccessible

aTContextGetAccessible Source #

Arguments

:: (HasCallStack, MonadIO m, IsATContext a) |
=> a | `self`: a `GtkATContext`
-> m Accessible | Returns: a `GtkAccessible`

Retrieves the `GtkAccessible` using this context.

## getAccessibleRole

aTContextGetAccessibleRole Source #

Arguments

:: (HasCallStack, MonadIO m, IsATContext a) |
=> a | `self`: a `GtkATContext`
-> m AccessibleRole | Returns: a `GtkAccessibleRole`

Retrieves the accessible role of this context.

# Properties

## accessible

The `GtkAccessible` that created the `GtkATContext` instance.

constructATContextAccessible :: (IsATContext o, MonadIO m, IsAccessible a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`accessible`” property. This is rarely needed directly, but it is used by `new`.

getATContextAccessible :: (MonadIO m, IsATContext o) => o -> m Accessible Source #

Get the value of the “`accessible`” property. When overloading is enabled, this is equivalent to

    get aTContext #accessible

## accessibleRole

The accessible role used by the AT context.

Depending on the given role, different states and properties can be set or retrieved.

constructATContextAccessibleRole :: (IsATContext o, MonadIO m) => AccessibleRole -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`accessible-role`” property. This is rarely needed directly, but it is used by `new`.

getATContextAccessibleRole :: (MonadIO m, IsATContext o) => o -> m AccessibleRole Source #

Get the value of the “`accessible-role`” property. When overloading is enabled, this is equivalent to

    get aTContext #accessibleRole

setATContextAccessibleRole :: (MonadIO m, IsATContext o) => o -> AccessibleRole -> m () Source #

Set the value of the “`accessible-role`” property. When overloading is enabled, this is equivalent to

    set aTContext [ #accessibleRole := value ]

## display

The `GdkDisplay` for the `GtkATContext`.

clearATContextDisplay :: (MonadIO m, IsATContext o) => o -> m () Source #

Set the value of the “`display`” property to `Nothing`. When overloading is enabled, this is equivalent to

    clear #display

constructATContextDisplay :: (IsATContext o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`display`” property. This is rarely needed directly, but it is used by `new`.

getATContextDisplay :: (MonadIO m, IsATContext o) => o -> m (Maybe Display) Source #

Get the value of the “`display`” property. When overloading is enabled, this is equivalent to

    get aTContext #display

setATContextDisplay :: (MonadIO m, IsATContext o, IsDisplay a) => o -> a -> m () Source #

Set the value of the “`display`” property. When overloading is enabled, this is equivalent to

    set aTContext [ #display := value ]

# Signals

## stateChange

type ATContextStateChangeCallback = IO () Source #

Emitted when the attributes of the accessible for the `GtkATContext` instance change.

afterATContextStateChange :: (IsATContext a, MonadIO m) => a -> ((?self :: a) => ATContextStateChangeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the stateChange signal, to be run after the default handler. When overloading is enabled, this is equivalent to

    after aTContext #stateChange callback

By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit `?self` parameter. Note that this requires activating the `ImplicitParams` GHC extension.

onATContextStateChange :: (IsATContext a, MonadIO m) => a -> ((?self :: a) => ATContextStateChangeCallback) -> m SignalHandlerId Source #

Connect a signal handler for the stateChange signal, to be run before the default handler. When overloading is enabled, this is equivalent to

    on aTContext #stateChange callback