Registry queries

Name

Registry queries -- 

Synopsis



enum        AccessibleKeySynthType;
int         SPI_getDesktopCount             (void);
Accessible* SPI_getDesktop                  (int i);
int         SPI_getDesktopList              (Accessible ***desktop_list);
void        SPI_freeDesktopList             (Accessible **desktop_list);

SPIBoolean  (*AccessibleKeystrokeListenerCB)
                                            (const AccessibleKeystroke *stroke,
                                             void *user_data);
typedef     AccessibleKeyEventMask;
typedef     AccessibleKeyMaskType;
enum        AccessibleKeyEventType;
enum        AccessibleKeyListenerSyncType;
typedef     AccessibleKeystroke;
#define     SPI_KEYSET_ALL_KEYS
AccessibleKeySet* SPI_createAccessibleKeySet
                                            (int len,
                                             const char *keysyms,
                                             short *keycodes,
                                             const char **keystrings);
void        SPI_freeAccessibleKeySet        (AccessibleKeySet *keyset);
AccessibleKeystrokeListener* SPI_createAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListenerCB callback,
                                             void *user_data);
SPIBoolean  SPI_registerGlobalEventListener (AccessibleEventListener *listener,
                                             const char *eventType);
SPIBoolean  SPI_deregisterGlobalEventListener
                                            (AccessibleEventListener *listener,
                                             const char *eventType);
SPIBoolean  SPI_deregisterGlobalEventListenerAll
                                            (AccessibleEventListener *listener);
SPIBoolean  SPI_registerAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeySet *keys,
                                             AccessibleKeyMaskType modmask,
                                             AccessibleKeyEventMask eventmask,
                                             AccessibleKeyListenerSyncType sync_type);
SPIBoolean  SPI_deregisterAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeyMaskType modmask);
void        AccessibleKeystrokeListener_unref
                                            (AccessibleKeystrokeListener *listener);
SPIBoolean  AccessibleKeystrokeListener_removeCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback);
SPIBoolean  AccessibleKeystrokeListener_addCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback,
                                             void *user_data);
SPIBoolean  SPI_generateKeyboardEvent       (long int keyval,
                                             char *keystring,
                                             AccessibleKeySynthType synth_type);
SPIBoolean  SPI_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,
  SPI_KEY_STRING
} AccessibleKeySynthType;


SPI_getDesktopCount ()

int         SPI_getDesktopCount             (void);

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.


SPI_getDesktop ()

Accessible* SPI_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.


SPI_getDesktopList ()

int         SPI_getDesktopList              (Accessible ***desktop_list);

Get the list of virtual desktops. On return, list will point to a newly-created, NULL terminated 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.

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


SPI_freeDesktopList ()

void        SPI_freeDesktopList             (Accessible **desktop_list);

This routine frees the memory associated with the list.

desktop_list : a pointer to an array of Accessible objects as returned from SPI_getDesktopList


AccessibleKeystrokeListenerCB ()

SPIBoolean  (*AccessibleKeystrokeListenerCB)
                                            (const AccessibleKeystroke *stroke,
                                             void *user_data);

stroke : 
user_data : 
Returns : 


AccessibleKeyEventMask

typedef unsigned long AccessibleKeyEventMask;


AccessibleKeyMaskType

typedef unsigned long AccessibleKeyMaskType;


enum AccessibleKeyEventType

typedef enum {
  SPI_KEY_PRESSED  = 1<<0,
  SPI_KEY_RELEASED = 1<<1
} AccessibleKeyEventType;


enum AccessibleKeyListenerSyncType

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


AccessibleKeystroke

typedef struct {
  long                   keyID;
  short                  keycode;
  char *                 keystring;
  long                   timestamp;
  AccessibleKeyEventType type;
  unsigned short         modifiers;
  SPIBoolean             is_text;	
} AccessibleKeystroke;


SPI_KEYSET_ALL_KEYS

#define SPI_KEYSET_ALL_KEYS NULL


SPI_createAccessibleKeySet ()

AccessibleKeySet* SPI_createAccessibleKeySet
                                            (int len,
                                             const char *keysyms,
                                             short *keycodes,
                                             const char **keystrings);

Create a new AccessibleKeySet of a specified length. A KeySet is used typically to match key event values, and a matches are made using the following criteria: a match exists with a key event if all non-null i-th members of the keyset match the key event. If both keystring and keysym values are NULL, a keycode value match is forced, thus the match for keysym=0, keycode=0, keystring=NULL is keycode 0.

len : the number of key values in the key set.
keysyms : a UTF-8 string containing symbolic key values to be matched, or NULL if matching is performed against other key values instead.
keycodes : an array of unsigned short values which are the hardware keycodes to be matched, or NULL if the keyset is specified solely by keysyms and/or keystrings.
keystrings : an array of null-terminated character strings which specify key name values to match, or NULL if the keyset is specified solely by keycodes and/or keysyms.
Returns : a pointer to a newly-created AccessibleKeySet.


SPI_freeAccessibleKeySet ()

void        SPI_freeAccessibleKeySet        (AccessibleKeySet *keyset);

Release the memory used by an AccessibleKeySet.

keyset : An AccessibleKeyset to free.


SPI_createAccessibleKeystrokeListener ()

AccessibleKeystrokeListener* SPI_createAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListenerCB callback,
                                             void *user_data);

callback : 
user_data : 
Returns : 


SPI_registerGlobalEventListener ()

SPIBoolean  SPI_registerGlobalEventListener (AccessibleEventListener *listener,
                                             const 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

(window events)

window:minimize window:maximize window:restore window:close window:create window:reparent window:desktop-create window:desktop-destroy window:focus-in window:focus-out window:raise window:lower window:move window:resize window:shade window:unshade window:restyle

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.


SPI_deregisterGlobalEventListener ()

SPIBoolean  SPI_deregisterGlobalEventListener
                                            (AccessibleEventListener *listener,
                                             const 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.


SPI_deregisterGlobalEventListenerAll ()

SPIBoolean  SPI_deregisterGlobalEventListenerAll
                                            (AccessibleEventListener *listener);

deregisters an AccessibleEventListener from the registry, for all event types it may be listening to. Use AccessibleEventListener_unref to release the listener reference.

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


SPI_registerAccessibleKeystrokeListener ()

SPIBoolean  SPI_registerAccessibleKeystrokeListener
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeySet *keys,
                                             AccessibleKeyMaskType modmask,
                                             AccessibleKeyEventMask eventmask,
                                             AccessibleKeyListenerSyncType sync_type);

Register a listener for keystroke events, either pre-emptively for all windows (CSPI_KEYLISTENER_ALL_WINDOWS), or non-preemptively (CSPI_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 CSPI_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.
Returns : TRUE if successful, otherwise FALSE.


SPI_deregisterAccessibleKeystrokeListener ()

SPIBoolean  SPI_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).
Returns : TRUE if successful, otherwise FALSE.


AccessibleKeystrokeListener_unref ()

void        AccessibleKeystrokeListener_unref
                                            (AccessibleKeystrokeListener *listener);

Decrements an AccessibleKeystrokeListener's reference count.

listener : a pointer to the AccessibleKeystrokeListener being operated on.


AccessibleKeystrokeListener_removeCallback ()

SPIBoolean  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 ()

SPIBoolean  AccessibleKeystrokeListener_addCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback,
                                             void *user_data);

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

listener : the AccessibleKeystrokeListener instance to modify.
callback : an AccessibleKeystrokeListenerCB function pointer.
user_data : a pointer to data which will be passed to the callback when invoked.
Returns : TRUE if successful, otherwise FALSE.


SPI_generateKeyboardEvent ()

SPIBoolean  SPI_generateKeyboardEvent       (long int keyval,
                                             char *keystring,
                                             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.
keystring : an (optional) UTF-8 string which, if keyval is NULL, indicates a 'composed' keyboard input string which is being synthesized; this type of keyboard event synthesis does not emulate hardware keypresses but injects the string as though a composing input method (such as XIM) were used.
synth_type : a AccessibleKeySynthType flag indicating whether keyval is to be interpreted as a keysym rather than a keycode (CSPI_KEYSYM), or whether to synthesize SPI_KEY_PRESS, SPI_KEY_RELEASE, or both (SPI_KEY_PRESSRELEASE).
Returns : TRUE if successful, otherwise FALSE.


SPI_generateMouseEvent ()

SPIBoolean  SPI_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. Event names: b1p = button 1 press; b2r = button 2 release; b3c = button 3 click; b2d = button 2 double-click; abs = absolute motion; rel = relative motion.

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. "b1p", "b1c", "b2r", "rel", "abs").
Returns : TRUE if successful, otherwise FALSE.