Registry queries

Name

Registry queries -- 

Synopsis



enum        AccessibleKeySynthType;
int         getDesktopCount                 ();
Accessible* getDesktop                      (int i);
int         getDesktopList                  (Accessible **list);

typedef     AccessibleKeystrokeListenerCB;
typedef     AccessibleKeyEventMask;
typedef     AccessibleKeyMaskType;
enum        AccessibleKeyEventType;
enum        AccessibleKeyListenerSyncType;
AccessibleKeystrokeListener* createAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListenerCB callback);
boolean     registerGlobalEventListener     (AccessibleEventListener *listener,
                                             char *eventType);
boolean     deregisterGlobalEventListener   (AccessibleEventListener *listener,
                                             char *eventType);
boolean     deregisterGlobalEventListenerAll
                                            (AccessibleEventListener *listener);
void        registerAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeySet *keys,
                                             AccessibleKeyMaskType modmask,
                                             AccessibleKeyEventMask eventmask,
                                             AccessibleKeyListenerSyncType sync_type);
void        deregisterAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeyMaskType modmask);
boolean     AccessibleKeystrokeListener_removeCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback);
boolean     AccessibleKeystrokeListener_addCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback);
void        generateKeyEvent                (long int keyval,
                                             AccessibleKeySynthType synth_type);
void        generateMouseEvent              (long int x,
                                             long int y,
                                             char *name);

Description

Details

enum AccessibleKeySynthType

typedef enum {
  SPI_KEY_PRESS,
  SPI_KEY_RELEASE, 
  SPI_KEY_PRESSRELEASE,
  SPI_KEY_SYM
} AccessibleKeySynthType;


getDesktopCount ()

int         getDesktopCount                 ();

Get the number of virtual desktops. NOTE: currently multiple virtual desktops are not implemented, this function always returns '1'.

Returns : an integer indicating the number of active virtual desktops.


getDesktop ()

Accessible* getDesktop                      (int i);

Get the virtual desktop indicated by index i. NOTE: currently multiple virtual desktops are not implemented, this function always returns '1'.

i : an integer indicating which of the accessible desktops is to be returned.
Returns : a pointer to the 'i-th' virtual desktop's Accessible representation.


getDesktopList ()

int         getDesktopList                  (Accessible **list);

Get the list of virtual desktops. On return, list will point to a newly-created array of virtual desktop pointers. It is the responsibility of the caller to free this array when it is no longer needed.

Not Yet Implemented : this implementation always returns a single Accessible desktop.

list : a pointer to an array of Accessible objects.
Returns : an integer indicating how many virtual desktops have been placed in the list pointed to by parameter list.


AccessibleKeystrokeListenerCB

typedef BooleanKeystrokeListenerCB    AccessibleKeystrokeListenerCB;


AccessibleKeyEventMask

typedef unsigned long AccessibleKeyEventMask;


AccessibleKeyMaskType

typedef unsigned long AccessibleKeyMaskType;


enum AccessibleKeyEventType

typedef enum {
  SPI_KEY_PRESSED = 1,
  SPI_KEY_RELEASED = 2
} AccessibleKeyEventType;


enum AccessibleKeyListenerSyncType

typedef enum {
  SPI_KEYLISTENER_NOSYNC = 0,
  SPI_KEYLISTENER_SYNCHRONOUS = 1,
  SPI_KEYLISTENER_CANCONSUME = 2,
  SPI_KEYLISTENER_ALL_WINDOWS = 4
} AccessibleKeyListenerSyncType;


createAccessibleKeystrokeListener ()

AccessibleKeystrokeListener* createAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListenerCB callback);

Create a new AccessibleKeystrokeListener with a specified callback function.

callback : an AccessibleKeystrokeListenerCB callback function, or NULL.
Returns : a pointer to a newly-created AccessibleKeystrokeListener.


registerGlobalEventListener ()

boolean     registerGlobalEventListener     (AccessibleEventListener *listener,
                                             char *eventType);

Legal object event types:

(property change events)

object:property-change object:property-change:accessible-name object:property-change:accessible-state object:property-change:accessible-description object:property-change:accessible-parent object:property-change:accessible-value object:property-change:accessible-role object:property-change:accessible-table-caption object:property-change:accessible-table-column-description object:property-change:accessible-table-column-header object:property-change:accessible-table-row-description object:property-change:accessible-table-row-header object:property-change:accessible-table-summary

(other object events)

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

NOTE: this 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.

Add an in-process callback function to an existing AccessibleEventListener.

listener : the AccessibleEventListener to be registered against an event type.
eventType : a character string indicating the type of events for which notification is requested. Format is EventClass:major_type:minor_type: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".
Returns : TRUE if successful, otherwise FALSE.


deregisterGlobalEventListener ()

boolean     deregisterGlobalEventListener   (AccessibleEventListener *listener,
                                             char *eventType);

deregisters an AccessibleEventListener from the registry, for a specific event type.

listener : the AccessibleEventListener registered against an event type.
eventType : a string specifying the event type for which this listener is to be deregistered.
Returns : TRUE if successful, otherwise FALSE.


deregisterGlobalEventListenerAll ()

boolean     deregisterGlobalEventListenerAll
                                            (AccessibleEventListener *listener);

deregisters an AccessibleEventListener from the registry, for all event types it may be listening to.

listener : the AccessibleEventListener to be registered against an event type.
Returns : TRUE if successful, otherwise FALSE.


registerAccessibleKeystrokeListener ()

void        registerAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeySet *keys,
                                             AccessibleKeyMaskType modmask,
                                             AccessibleKeyEventMask eventmask,
                                             AccessibleKeyListenerSyncType sync_type);

Register a listener for keystroke events, either pre-emptively for all windows (SPI_KEYLISTENER_ALL_WINDOWS), or non-preemptively (SPI_KEYLISTENER_NOSYNC). ( Other sync_type values may be available in the future.)

listener : a pointer to the AccessibleKeystrokeListener for which keystroke events are requested.
keys : a pointer to the AccessibleKeySet indicating which keystroke events are requested, or SPI_KEYSET_ALL_KEYS.
modmask : an AccessibleKeyMaskType mask indicating which key event modifiers must be set in combination with keys, events will only be reported for key events for which all modifiers in modmask are set. If you wish to listen for events with multiple modifier combinations you must call registerAccessibleKeystrokeListener() once for each combination.
eventmask : an AccessibleKeyMaskType mask indicating which types of key events are requested (SPI_KEY_PRESSED, etc.).
sync_type : a AccessibleKeyListenerSyncType parameter indicating the behavior of the notification/listener transaction.


deregisterAccessibleKeystrokeListener ()

void        deregisterAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeyMaskType modmask);

Removes a keystroke event listener from the registry's listener queue, ceasing notification of events with modifiers matching modmask.

listener : a pointer to the AccessibleKeystrokeListener for which keystroke events are requested.
modmask : the key modifier mask for which this listener is to be 'deregistered' (of type AccessibleeyMaskType).


AccessibleKeystrokeListener_removeCallback ()

boolean     AccessibleKeystrokeListener_removeCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback);

Remove an in-process callback function from an existing AccessibleKeystrokeListener.

listener : the AccessibleKeystrokeListener instance to modify.
callback : an AccessibleKeystrokeListenerCB function pointer.
Returns : TRUE if successful, otherwise FALSE.


AccessibleKeystrokeListener_addCallback ()

boolean     AccessibleKeystrokeListener_addCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback);

Add an in-process callback function to an existing AccessibleKeystrokeListener.

listener : the AccessibleKeystrokeListener instance to modify.
callback : an AccessibleKeystrokeListenerCB function pointer.
Returns : TRUE if successful, otherwise FALSE.


generateKeyEvent ()

void        generateKeyEvent                (long int keyval,
                                             AccessibleKeySynthType synth_type);

Synthesize a keyboard event (as if a hardware keyboard event occurred in the current UI context).

keyval : a long integer indicating the keycode or keysym of the key event being synthesized.
synth_type : a AccessibleKeySynthType flag indicating whether keyval is to be interpreted as a keysym rather than a keycode (SPI_KEYSYM), or whether to synthesize SPI_KEY_PRESS, SPI_KEY_RELEASE, or both (SPI_KEY_PRESSRELEASE).


generateMouseEvent ()

void        generateMouseEvent              (long int x,
                                             long int y,
                                             char *name);

Synthesize a mouse event at a specific screen coordinate. Most AT clients should use the AccessibleAction interface when tempted to generate mouse events, rather than this method. Not Yet Implemented.

x : a long indicating the screen x coordinate of the mouse event.
y : a long indicating the screen y coordinate of the mouse event.
name : a string indicating which mouse event to be synthesized (e.g. "button1", "button2", "mousemove").