gi-atk-2.0.27: Atk bindings

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

GI.Atk.Objects.Socket

Contents

- Exported types
- Methods
  - embed
  - isOccupied
  - new

Description

Container for AtkPlug objects from other processes

Together with `Plug`, `Socket` provides the ability to embed accessibles from one process into another in a fashion that is transparent to assistive technologies. `Socket` works as the container of `Plug`, embedding it using the method `socketEmbed`. Any accessible contained in the `Plug` will appear to the assistive technologies as being inside the application that created the `Socket`.

The communication between a `Socket` and a `Plug` is done by the IPC layer of the accessibility framework, normally implemented by the D-Bus based implementation of AT-SPI (at-spi2). If that is the case, at-spi-atk2 is the responsible to implement the abstract methods `plugGetId` and `socketEmbed`, so an ATK implementor shouldn't reimplement them. The process that contains the `Plug` is responsible to send the ID returned by `atk_plug_id()` to the process that contains the `Socket`, so it could call the method `socketEmbed` in order to embed it.

For the same reasons, an implementor doesn't need to implement `objectGetNAccessibleChildren` and `objectRefAccessibleChild`. All the logic related to those functions will be implemented by the IPC layer.

See [class`atkPlug`]

Synopsis

- newtype Socket = Socket (ManagedPtr Socket)
- class (GObject o, IsDescendantOf Socket o) => IsSocket o
- toSocket :: (MonadIO m, IsSocket o) => o -> m Socket
- socketEmbed :: (HasCallStack, MonadIO m, IsSocket a) => a -> Text -> m ()
- socketIsOccupied :: (HasCallStack, MonadIO m, IsSocket a) => a -> m Bool
- socketNew :: (HasCallStack, MonadIO m) => m Socket

# Exported types

newtype Socket Source #

Memory-managed wrapper type.

Constructors

Socket (ManagedPtr Socket) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf Socket o) => IsSocket o Source #

Type class for types which can be safely cast to `Socket`, for instance with `toSocket`.

#### Instances

Instances details

(GObject o, IsDescendantOf Socket o) => IsSocket o Source # |
Instance details Defined in GI.Atk.Objects.Socket

toSocket :: (MonadIO m, IsSocket o) => o -> m Socket Source #

Cast to `Socket`, 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, contains, embed, forceFloating, freezeNotify, getv, grabFocus, initialize, isFloating, isOccupied, notify, notifyByPspec, notifyStateChange, peekParent, ref, refAccessibleAtPoint, refAccessibleChild, refRelationSet, refSink, refStateSet, removeFocusHandler, removePropertyChangeHandler, removeRelationship, runDispose, scrollTo, scrollToPoint, stealData, stealQdata, thawNotify, unref, watchClosure.

#### Getters

getAccessibleId, getAlpha, getAttributes, getData, getDescription, getExtents, getHelpText, getIndexInParent, getLayer, getMdiZorder, getNAccessibleChildren, getName, getObjectLocale, getParent, getPosition, getProperty, getQdata, getRole, getSize.

#### Setters

setAccessibleId, setData, setDataFull, setDescription, setExtents, setHelpText, setName, setParent, setPosition, setProperty, setRole, setSize.

## embed

socketEmbed Source #

Arguments

:: (HasCallStack, MonadIO m, IsSocket a) |
=> a | `obj`: an `Socket`
-> Text | `plugId`: the ID of an `Plug`
-> m () |

Embeds the children of an `Plug` as the children of the `Socket`. The plug may be in the same process or in a different process.

The class item used by this function should be filled in by the IPC layer (usually at-spi2-atk). The implementor of the AtkSocket should call this function and pass the id for the plug as returned by `plugGetId`. It is the responsibility of the application to pass the plug id on to the process implementing the `Socket` as needed.

Since: 1.30

## isOccupied

socketIsOccupied Source #

Arguments

:: (HasCallStack, MonadIO m, IsSocket a) |
=> a | `obj`: an `Socket`
-> m Bool | Returns: TRUE if a plug is embedded in the socket

Determines whether or not the socket has an embedded plug.

Since: 1.30

## new

socketNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> m Socket | Returns: the newly created `Socket` instance

Creates a new `Socket`.