at-spi-idl: Accessibility::Event Struct Reference

Data Fields

# Accessibility::Event Struct Reference

`import "Accessibility_Event.idl";`

## Data Fields
string | type
Accessible | source
long | detail1
long | detail2
any | any_data

## Detailed Description

A structure encapsulating information about an event for which notification was requested. Usually such notification is requested via a call to Registry::registerGlobalEventListener. The structure contains a colon-delimited string indicating the event type, a reference to the generating Accessible, two detail fields whose interpretation is event-type-specific, and a final field containing event-type-specific data.

Note:
  Since AT-SPI 1.7.0 the 'any' field contains an EventDetails struct, which encapsulates additional information about the event and its generating object.

## Field Documentation

any Accessibility::Event::any_data

A generic storage location for event-type-specific data which provides more specific information about the event; for instance, in AT-SPI versions prior to 1.7.0, in the case of ¨object:text-changed:insert¨ events, this field contains a string indicating the inserted text.

Note:
  Since AT-SPI 1.7.0, the data contained in this field is an EventDetails struct.

long Accessibility::Event::detail1

An integer whose meaning is event type dependent. It may indicate the offset of text being inserted, in the case of ¨object:text-changed:insert¨, or the index of a newly added child in the case of ¨object:children-changed:add¨.

Note:
  since most AT-SPI clients react to events via an asynchronous queue, for performance reasons, this field may be of limited utility unless the client maintains a large client-side cache of the hierarchy and contained data. This is because by the time such an event is asynchronously processed, the state of the originating object may have changed. In other words, the data in the detail1 member is not state-coherent outside of the event handler. More useful results are gotten by examination of the 'any_data' field.

long Accessibility::Event::detail2

see description of detail2

Accessible Accessibility::Event::source

The Accessible object which is the source of the event. The source object is the object to which the change inferred by the event emission occurs; for instance, the object emitting a ¨object:parent-changed¨ event is the child, not the parent. Likewise, the event source of an ¨object:children-changed:insert¨ event is the parent, not the inserted child.

string Accessibility::Event::type

A colon-delimited string indicating the type of the event. The string can be interpreted as `class:type:subtype` For instance ¨object:text-changed:insert¨ is an event from the 'Object' class, which corresponds to Accessible objects general, the type of the event is a ¨text-changed¨ event (i.e. a change in the content of an implementor of the Text interface), and the specific subtype of the change is an insertion event.

Event classes include the following:

- focus: an object has received keyboard focus. This event has no type or subtype.
- window: a toplevel window has changed state.
- object: an object (i.e. Accessible) has undergone some change in state, content, or hierarchy
- document:a change to a document's content has occurred, or its content loading status has changed.
- mouse: an event originating from the pointing device. Rarely used; in most cases clients will wish to register for pointer events via the DeviceEventController::registerDeviceEvent method instead.
- keyboard: an event indicating that the keyboard state (for example, the modifier state) has changed significantly. "keyboard:" events are not sent for individual keystrokes except as a side-effect of certain keys, for instance modifier keys. Clients interested in key events should listen for DeviceEvents via DeviceEventController::registerKeystrokeListener instead.

Note:
  For more information on specific event types, see the documentation for each of the individual interfaces supported by some Accessible objects.

See also:
  Accessible, Component, Image, Selection, Table, Text, Value.

The documentation for this struct was generated from the following file:

- /home/liyuan/src/at-spi/idl/Accessibility_Event.idl