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'.


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'.


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.


SPI_freeDesktopList ()

void        SPI_freeDesktopList             (Accessible **desktop_list);

This routine frees the memory associated with the list.


AccessibleKeystrokeListenerCB ()

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


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.


SPI_freeAccessibleKeySet ()

void        SPI_freeAccessibleKeySet        (AccessibleKeySet *keyset);

Release the memory used by an AccessibleKeySet.


SPI_createAccessibleKeystrokeListener ()

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

Create a new AccessibleKeystrokeListener with a specified callback function.


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-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: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

(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

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.


SPI_deregisterGlobalEventListener ()

SPIBoolean  SPI_deregisterGlobalEventListener
                                            (AccessibleEventListener *listener,
                                             const char *eventType);

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


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.


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.)


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.


AccessibleKeystrokeListener_unref ()

void        AccessibleKeystrokeListener_unref
                                            (AccessibleKeystrokeListener *listener);

Decrements an AccessibleKeystrokeListener's reference count.


AccessibleKeystrokeListener_removeCallback ()

SPIBoolean  AccessibleKeystrokeListener_removeCallback
                                            (AccessibleKeystrokeListener *listener,
                                             AccessibleKeystrokeListenerCB callback);

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


AccessibleKeystrokeListener_addCallback ()

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

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


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).


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.