SocketRef
public struct SocketRef : SocketProtocol, GWeakCapturing
Together with AtkPlug
, AtkSocket
provides the ability to embed
accessibles from one process into another in a fashion that is
transparent to assistive technologies. AtkSocket
works as the
container of AtkPlug
, embedding it using the method
atk_socket_embed()
. Any accessible contained in the AtkPlug
will
appear to the assistive technologies as being inside the
application that created the AtkSocket
.
The communication between a AtkSocket
and a AtkPlug
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 atk_plug_get_id()
and atk_socket_embed()
, so an ATK
implementor shouldn’t reimplement them. The process that contains
the AtkPlug
is responsible to send the ID returned by
atk_plug_id()
to the process that contains the AtkSocket
, so it
could call the method atk_socket_embed()
in order to embed it.
For the same reasons, an implementor doesn’t need to implement
atk_object_get_n_accessible_children()
and
atk_object_ref_accessible_child()
. All the logic related to those
functions will be implemented by the IPC layer.
The SocketRef
type acts as a lightweight Swift reference to an underlying AtkSocket
instance.
It exposes methods that can operate on this data type through SocketProtocol
conformance.
Use SocketRef
only as an unowned
reference to an existing AtkSocket
instance.
-
Untyped pointer to the underlying `AtkSocket` instance.
For type-safe access, use the generated, typed pointer
socket_ptr
property instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<AtkSocket>)
-
Designated initialiser from a constant pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<AtkSocket>)
-
Conditional initialiser from an optional pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<AtkSocket>?)
-
Conditional initialiser from an optional, non-mutable pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<AtkSocket>?)
-
Conditional initialiser from an optional
gpointer
Declaration
Swift
@inlinable init!(gpointer g: gpointer?)
-
Conditional initialiser from an optional, non-mutable
gconstpointer
Declaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?)
-
Reference intialiser for a related type that implements
SocketProtocol
Declaration
Swift
@inlinable init<T>(_ other: T) where T : SocketProtocol
-
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>
Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> SocketRef where T : SocketProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SocketProtocol
.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>)
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SocketProtocol
.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SocketProtocol
.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SocketProtocol
.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
SocketProtocol
.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)
-
Creates a new
AtkSocket
.Declaration
Swift
@inlinable init()