Atspi.EventListener

g Atspi.EventListener Atspi.EventListener GObject.Object GObject.Object GObject.Object->Atspi.EventListener

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

deregister_from_callback (callback, user_data, event_type)

class

new (callback, *user_data)

class

register_from_callback (callback, user_data, event_type)

class

register_from_callback_full (user_data, event_type, properties)

class

register_from_callback_with_app (user_data, event_type, properties, app)

deregister (event_type)

register (event_type)

register_full (event_type, properties)

register_with_app (event_type, properties, app)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

callback

Atspi.EventListenerCB

r

cb_destroyed

GLib.DestroyNotify

r

parent

GObject.Object

r

user_data

object

r

Class Details

class Atspi.EventListener(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Atspi.EventListenerClass

A generic interface implemented by objects for the receipt of event notifications.

A generic interface implemented by objects for the receipt of event notifications. atspi-event-listener is the interface via which clients of the atspi-registry receive notification of changes to an application’s user interface and content.

classmethod deregister_from_callback(callback, user_data, event_type)
Parameters:
  • callback (Atspi.EventListenerCB) – the Atspi.EventListenerCB registered against an event type.

  • user_data (object or None) – User data that was passed in for this callback.

  • event_type (str) – a string specifying the event type for which this listener is to be deregistered.

Raises:

GLib.Error

Returns:

True if successful, otherwise False.

Return type:

bool

Deregisters an Atspi.EventListenerCB from the registry, for a specific event type.

classmethod new(callback, *user_data)
Parameters:
Returns:

A new Atspi.EventListener.

Return type:

Atspi.EventListener

Creates a new Atspi.EventListener associated with a specified callback.

classmethod register_from_callback(callback, user_data, event_type)
Parameters:
Raises:

GLib.Error

Returns:

True if successfull, otherwise False.

Return type:

bool

Registers an Atspi.EventListenerCB against an event_type.

classmethod register_from_callback_full(user_data, event_type, properties)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, otherwise False.

Return type:

bool

classmethod register_from_callback_with_app(user_data, event_type, properties, app)
Parameters:
Raises:

GLib.Error

Returns:

True if successful, otherwise False.

Return type:

bool

deregister(event_type)
Parameters:

event_type (str) – a string specifying the event type for which this listener is to be deregistered.

Raises:

GLib.Error

Returns:

True if successful, otherwise False.

Return type:

bool

Deregisters an Atspi.EventListener from the registry, for a specific event type.

register(event_type)
Parameters:

event_type (str) – a character string indicating the type of events for which notification is requested. Format is EventClass:major_type:minor_type:py:data::detail<Atspi.EventListener.props.detail> where all subfields other than EventClass are optional. EventClasses include “object”, “window”, “mouse”, and toolkit events (e.g. “Gtk”, “AWT”). Examples: “focus:”, “Gtk:GtkWidget:button_press_event”.

Raises:

GLib.Error

Returns:

True if successful, otherwise False.

Return type:

bool

Adds an in-process callback function to an existing Atspi.EventListener.

Legal object event types:

(property change events)

object:property-change object:property-change:py:data::accessible-name<Atspi.EventListener.props.accessible_name> object:property-change:py:data::accessible-description<Atspi.EventListener.props.accessible_description> object:property-change:py:data::accessible-parent<Atspi.EventListener.props.accessible_parent> object:property-change:py:data::accessible-value<Atspi.EventListener.props.accessible_value> object:property-change:py:data::accessible-role<Atspi.EventListener.props.accessible_role> object:property-change:py:data::accessible-table-caption<Atspi.EventListener.props.accessible_table_caption> object:property-change:py:data::accessible-table-column-description<Atspi.EventListener.props.accessible_table_column_description> object:property-change:py:data::accessible-table-column-header<Atspi.EventListener.props.accessible_table_column_header> object:property-change:py:data::accessible-table-row-description<Atspi.EventListener.props.accessible_table_row_description> object:property-change:py:data::accessible-table-row-header<Atspi.EventListener.props.accessible_table_row_header> object:property-change:py:data::accessible-table-summary<Atspi.EventListener.props.accessible_table_summary>

(other object events)

object:state-changed object:children-changed object:visible-data-changed object:selection-changed object:text-selection-changed object:text-changed object:text-caret-moved object:row-inserted object:row-reordered object:row-deleted object:column-inserted object:column-reordered object:column-deleted object:model-changed object:active-descendant-changed object:announcement

(screen reader events) screen-reader:region-changed

(window events)

window:minimize window:maximize window:restore window:close window:create window:reparent window:desktop-create window:desktop-destroy window:activate window:deactivate window:raise window:lower window:move window:resize window:shade window:unshade window:restyle

(other events)

focus: mouse:abs mouse:rel mouse:b1p mouse:b1r mouse:b2p mouse:b2r mouse:b3p mouse:b3r

NOTE: this character string may be UTF-8, but should not contain byte value 56 (ascii ‘:’), except as a delimiter, since non-UTF-8 string delimiting functions are used internally. In general, listening to toolkit-specific events is not recommended.

Currently, object:text-reading-position needs to be specified explicitly (it is not implied by object:text), since it is generated by the screen reader and is thus a special case internally.

register_full(event_type, properties)
Parameters:
  • event_type (str) – a character string indicating the type of events for which notification is requested. See Atspi.EventListener.register for a description of the format and legal event types.

  • properties ([str] or None) – a list of properties that should be sent along with the event. The properties are valued for the duration of the event callback. TODO: Document.

Raises:

GLib.Error

Returns:

True if successful, otherwise False.

Return type:

bool

Adds an in-process callback function to an existing Atspi.EventListener.

register_with_app(event_type, properties, app)
Parameters:
  • event_type (str) – a character string indicating the type of events for which notification is requested. See Atspi.EventListener.register for a description of the format and legal event types.

  • properties ([str] or None) – a list of properties that should be sent along with the event. The properties are valued for the duration of the event callback.

  • app (Atspi.Accessible or None) – the application whose events should be reported, or %null for all applications.

Raises:

GLib.Error

Returns:

True if successful, otherwise False.

Return type:

bool

Adds an in-process callback function to an existing Atspi.EventListener.