| 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.Objects.Socket
Contents
Description
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.
Synopsis
- newtype Socket = Socket (ManagedPtr Socket)
- class GObject o => IsSocket o
- toSocket :: (MonadIO m, IsSocket o) => o -> m Socket
- noSocket :: Maybe 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
Memory-managed wrapper type.
Constructors
| Socket (ManagedPtr Socket) |
Instances
| GObject Socket Source # | |
Defined in GI.Atk.Objects.Socket Methods gobjectType :: Socket -> IO GType # | |
| IsObject Socket Source # | |
Defined in GI.Atk.Objects.Socket | |
| IsComponent Socket Source # | |
Defined in GI.Atk.Objects.Socket | |
| IsObject Socket Source # | |
Defined in GI.Atk.Objects.Socket | |
| IsSocket Socket Source # | |
Defined in GI.Atk.Objects.Socket | |
class GObject o => IsSocket o Source #
Instances
| (GObject a, (UnknownAncestorError Socket a :: Constraint)) => IsSocket a Source # | |
Defined in GI.Atk.Objects.Socket | |
| IsSocket Socket Source # | |
Defined in GI.Atk.Objects.Socket | |
Methods
embed
Arguments
| :: (HasCallStack, MonadIO m, IsSocket a) | |
| => a |
|
| -> Text |
|
| -> 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
Arguments
| :: (HasCallStack, MonadIO m, IsSocket a) | |
| => a |
|
| -> 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