-} KeySet;
-
-#define ALL_KEYS ((void *)NULL)
-
-/*
- *
- * Basic SPI initialization and event loop function prototypes
- *
- */
-
-/**
- * SPI_init:
- *
- * Connects to the accessibility registry and initializes the SPI.
- *
- * Returns: 0 on success, otherwise an integer error code.
- **/
-int
-SPI_init (void);
-
-/**
- * SPI_event_main:
- * @isGNOMEApp: a #boolean indicating whether the client of the SPI
- * will use the Gnome event loop or not.
- *
- * Starts/enters the main event loop for the SPI services.
- *
- * (NOTE: This method does not return control, it is exited via a call to exit()
- * from within an event handler).
- *
- **/
-void
-SPI_event_main (boolean isGNOMEApp);
-
-/**
- * SPI_event_is_ready:
- *
- * Checks to see if an SPI event is waiting in the event queue.
- * Used by clients that don't wish to use SPI_event_main().
- * Not Yet Implemented.
- *
- * Returns: #TRUE if an event is waiting, otherwise #FALSE.
- *
- **/
-boolean
-SPI_eventIsReady ();
-
-/**
- * SPI_nextEvent:
- *
- * Gets the next event in the SPI event queue; blocks if no event
- * is pending.
- * Used by clients that don't wish to use SPI_event_main().
- * Not Yet Implemented.
- *
- * Returns: the next #AccessibleEvent in the SPI event queue.
- *
- **/
-SpiAccessibleEvent *
-SPI_nextEvent (boolean waitForEvent);
-
-/**
- * SPI_exit:
- *
- * Disconnects from the Accessibility SpiRegistry and releases resources.
- * Not Yet Implemented.
- *
- **/
-void
-SPI_exit (void);
-
-/*
- * Event SpiListener creation and support.
- */
-
-/**
- * createEventListener:
- * @callback : an #AccessibleEventListenerCB callback function, or NULL.
- *
- * Create a new #AccessibleEventListener with a specified callback function.
- *
- * Returns: a pointer to a newly-created #AccessibleEventListener.
- *
- **/
-SpiAccessibleEventListener *
-createEventListener (SpiAccessibleEventListenerCB callback);
-
-/**
- * EventListener_addCallback:
- * @listener: the #AccessibleEventListener instance to modify.
- * @callback: an #AccessibleEventListenerCB function pointer.
- *
- * Add an in-process callback function to an existing SpiAccessibleEventListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-boolean
-EventListener_addCallback (SpiAccessibleEventListener *listener,
- SpiAccessibleEventListenerCB callback);
-
-/**
- * EventListener_removeCallback:
- * @listener: the #AccessibleEventListener instance to modify.
- * @callback: an #AccessibleEventListenerCB function pointer.
- *
- * Remove an in-process callback function from an existing SpiAccessibleEventListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-boolean
-EventListener_removeCallback (SpiAccessibleEventListener *listener,
- SpiAccessibleEventListenerCB callback);
-
-/**
- * createKeyListener:
- * @callback : an #KeystrokeListenerCB callback function, or NULL.
- *
- * Create a new #KeystrokeListener with a specified callback function.
- *
- * Returns: a pointer to a newly-created #KeystrokeListener.
- *
- **/
-KeystrokeListener *
-createKeystrokeListener (KeystrokeListenerCB callback);
-
-/**
- * KeystrokeListener_addCallback:
- * @listener: the #KeystrokeListener instance to modify.
- * @callback: an #KeystrokeListenerCB function pointer.
- *
- * Add an in-process callback function to an existing #KeystrokeListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-boolean
-KeystrokeListener_addCallback (KeystrokeListener *listener,
- KeystrokeListenerCB callback);
-
-/**
- * KeystrokeListener_removeCallback:
- * @listener: the #KeystrokeListener instance to modify.
- * @callback: an #KeystrokeListenerCB function pointer.
- *
- * Remove an in-process callback function from an existing #KeystrokeListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-boolean
-KeystrokeListener_removeCallback (KeystrokeListener *listener,
- KeystrokeListenerCB callback);
-
-/*
- *
- * Global functions serviced by the registry
- *
- */
-
-/**
- * registerGlobalEventListener:
- * @listener: the #AccessibleEventListener to be registered against an event type.
- * @callback: 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 "Focus", "Window", "Mouse",
- * and toolkit events (e.g. "Gtk", "AWT").
- * Examples: "focus:", "Gtk:GtkWidget:button_press_event".
- *
- * 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 SpiAccessibleEventListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-boolean
-registerGlobalEventListener (SpiAccessibleEventListener *listener,
- char *eventType);
-
-/**
- * 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.
- *
- **/
-int
-getDesktopCount ();
-
-/**
- * getDesktop:
- * @i: an integer indicating which of the accessible desktops is to be returned.
- *
- * Get the virtual desktop indicated by index @i.
- * NOTE: currently multiple virtual desktops are not implemented, this
- * function always returns '1'.
- *
- * Returns: a pointer to the 'i-th' virtual desktop's #Accessible representation.
- *
- **/
-SpiAccessible*
-getDesktop (int n);
-
-/**
- * getDesktopList:
- * @list: a pointer to an array of #Accessible objects.
- *
- * 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.
- *
- * Returns: an integer indicating how many virtual desktops have been
- * placed in the list pointed to by parameter @list.
- **/
-int
-getDesktopList (SpiAccessible **list);
+} AccessibleKeySet;
+
+/**
+ * SPI_KEYSET_ALL_KEYS:
+ * @SPI_KEYSET_ALL_KEYS: A special value for an AccessibleKeySet type, which tacitly
+ * includes all keycodes and keyvals for the specified modifier set.
+ **/
+#define SPI_KEYSET_ALL_KEYS NULL
+
+typedef unsigned long AccessibleKeyMaskType;
+
+
+/* Basic SPI initialization and event loop function prototypes */
+
+int SPI_init (void);
+void SPI_event_main (void);
+void SPI_event_quit (void);
+SPIBoolean SPI_eventIsReady (void);
+AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
+int SPI_exit (void);
+
+/* Event Listener creation and support. */
+
+AccessibleEventListener *
+ createAccessibleEventListener (AccessibleEventListenerCB callback,
+ void *user_data);
+SPIBoolean AccessibleEventListener_addCallback (AccessibleEventListener *listener,
+ AccessibleEventListenerCB callback,
+ void *user_data);
+SPIBoolean AccessibleEventListener_removeCallback (AccessibleEventListener *listener,
+ AccessibleEventListenerCB callback);
+void AccessibleEventListener_unref (AccessibleEventListener *listener);
+
+/* Keystroke Listener creation and support. */
+
+AccessibleKeystrokeListener *
+ createAccessibleKeystrokeListener (AccessibleKeystrokeListenerCB callback,
+ void *user_data);
+SPIBoolean AccessibleKeystrokeListener_addCallback (AccessibleKeystrokeListener *listener,
+ AccessibleKeystrokeListenerCB callback,
+ void *user_data);
+SPIBoolean AccessibleKeystrokeListener_removeCallback (AccessibleKeystrokeListener *listener,
+ AccessibleKeystrokeListenerCB callback);
+void AccessibleKeystrokeListener_unref (AccessibleKeystrokeListener *listener);
+
+/* Global functions serviced by the registry */
+
+SPIBoolean registerGlobalEventListener (AccessibleEventListener *listener,
+ const char *eventType);
+SPIBoolean deregisterGlobalEventListener (AccessibleEventListener *listener,
+ const char *eventType);
+SPIBoolean deregisterGlobalEventListenerAll (AccessibleEventListener *listener);
+
+void registerAccessibleKeystrokeListener (
+ AccessibleKeystrokeListener *listener,
+ AccessibleKeySet *keys,
+ AccessibleKeyMaskType modmask,
+ AccessibleKeyEventMask eventmask,
+ AccessibleKeyListenerSyncType sync_type);
+void deregisterAccessibleKeystrokeListener (
+ AccessibleKeystrokeListener *listener,
+ AccessibleKeyMaskType modmask);
+
+int getDesktopCount (void);
+Accessible *getDesktop (int i);
+int getDesktopList (Accessible **list);
+
+void generateKeyEvent (long int keyval,
+ AccessibleKeySynthType synth_type);
+void generateMouseEvent (long int x, long int y, char *name);
+
+/* Accessible function prototypes */
+
+int Accessible_ref (Accessible *obj);
+int Accessible_unref (Accessible *obj);
+char * Accessible_getName (Accessible *obj);
+char * Accessible_getDescription (Accessible *obj);
+Accessible * Accessible_getParent (Accessible *obj);
+long Accessible_getChildCount (Accessible *obj);
+Accessible * Accessible_getChildAtIndex (Accessible *obj,
+ long int childIndex);
+long Accessible_getIndexInParent (Accessible *obj);
+AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
+const char * Accessible_getRole (Accessible *obj);
+AccessibleStateSet * Accessible_getStateSet (Accessible *obj);