Atk.Socket

g Atk.Component Atk.Component Atk.Socket Atk.Socket Atk.Component->Atk.Socket Atk.Object Atk.Object Atk.Object->Atk.Socket GObject.GInterface GObject.GInterface GObject.GInterface->Atk.Component GObject.Object GObject.Object GObject.Object->Atk.Object

Subclasses:

None

Methods

Inherited:

Atk.Object (27), GObject.Object (37), Atk.Component (15)

Structs:

GObject.ObjectClass (5)

class

new ()

embed (plug_id)

is_occupied ()

Virtual Methods

Inherited:

Atk.Object (24), GObject.Object (7), Atk.Component (16)

do_embed (plug_id)

Properties

Inherited:

Atk.Object (17)

Signals

Inherited:

Atk.Object (9), GObject.Object (1), Atk.Component (1)

Fields

Inherited:

Atk.Object (9), GObject.Object (1), Atk.Component (1)

Name

Type

Access

Description

embedded_plug_id

str

r

parent

Atk.Object

r

Class Details

class Atk.Socket(**kwargs)
Bases:

Atk.Object, Atk.Component

Abstract:

No

Structure:

Atk.SocketClass

Container for Atk.Plug objects from other processes

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

The communication between a Atk.Socket and a Atk.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 Atk.Plug.get_id() and Atk.Socket.embed(), so an ATK implementor shouldn’t reimplement them. The process that contains the Atk.Plug is responsible to send the ID returned by atk_plug_id() to the process that contains the Atk.Socket, 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.

See [class`AtkPlug`]

classmethod new()[source]
Returns:

the newly created Atk.Socket instance

Return type:

Atk.Object

Creates a new Atk.Socket.

embed(plug_id)[source]
Parameters:

plug_id (str) – the ID of an Atk.Plug

Embeds the children of an Atk.Plug as the children of the Atk.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 Atk.Socket 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 Atk.Socket as needed.

New in version 1.30.

is_occupied()[source]
Returns:

True if a plug is embedded in the socket

Return type:

bool

Determines whether or not the socket has an embedded plug.

New in version 1.30.

do_embed(plug_id) virtual
Parameters:

plug_id (str) – the ID of an Atk.Plug

Embeds the children of an Atk.Plug as the children of the Atk.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 Atk.Socket 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 Atk.Socket as needed.

New in version 1.30.