SocketProtocol

public protocol SocketProtocol : ComponentProtocol, ObjectProtocol

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 SocketProtocol protocol exposes the methods and properties of an underlying AtkSocket instance. The default implementation of these can be found in the protocol extension below. For a concrete class that implements these methods and properties, see Socket. Alternatively, use SocketRef as a lighweight, unowned reference if you already have an instance you just want to use.

  • ptr

    Untyped pointer to the underlying AtkSocket instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • socket_ptr Default implementation

    Typed pointer to the underlying AtkSocket instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the AtkSocket instance.

    Declaration

    Swift

    var socket_ptr: UnsafeMutablePointer<AtkSocket>! { get }
  • Required Initialiser for types conforming to SocketProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

Socket Class

  • Bind a SocketPropertyName source property to a given target object.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func bind<Q, T>(property source_property: SocketPropertyName, to target: T, _ target_property: Q, flags f: BindingFlags = .default, transformFrom transform_from: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }, transformTo transform_to: @escaping GLibObject.ValueTransformer = { $0.transform(destValue: $1) }) -> BindingRef! where Q : PropertyNameProtocol, T : ObjectProtocol

    Parameters

    source_property

    the source property to bind

    target

    the target object to bind to

    target_property

    the target property to bind to

    flags

    the flags to pass to the Binding

    transform_from

    ValueTransformer to use for forward transformation

    transform_to

    ValueTransformer to use for backwards transformation

    Return Value

    binding reference or nil in case of an error

  • get(property:) Extension method

    Get the value of a Socket property

    Declaration

    Swift

    @inlinable
    func get(property: SocketPropertyName) -> GLibObject.Value

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

  • set(property:value:) Extension method

    Set the value of a Socket property. Note that this will only have an effect on properties that are writable and not construct-only!

    Declaration

    Swift

    @inlinable
    func set(property: SocketPropertyName, value v: GLibObject.Value)

    Parameters

    property

    the property to get the value for

    Return Value

    the value of the named property

Socket Class: SocketProtocol extension (methods and fields)

  • embed(plugId:) Extension method

    Embeds the children of an AtkPlug as the children of the AtkSocket. 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 atk_plug_get_id(). It is the responsibility of the application to pass the plug id on to the process implementing the AtkSocket as needed.

    Declaration

    Swift

    @inlinable
    func embed(plugId: UnsafePointer<gchar>!)
  • isOccupied Extension method

    Determines whether or not the socket has an embedded plug.

    Declaration

    Swift

    @inlinable
    var isOccupied: Bool { get }
  • parent Extension method

    Undocumented

    Declaration

    Swift

    @inlinable
    var parent: AtkObject { get }