-/*
- * Auxiliary typedefs and mask definitions
- */
-#include <libspi/keymasks.h>
-
-G_BEGIN_DECLS
-
-/*
- * Enumerated type for text boundary types
- */
-typedef enum
-{
- SPI_TEXT_BOUNDARY_CHAR,
- SPI_TEXT_BOUNDARY_CURSOR_POS,
- SPI_TEXT_BOUNDARY_WORD_START,
- SPI_TEXT_BOUNDARY_WORD_END,
- SPI_TEXT_BOUNDARY_SENTENCE_START,
- SPI_TEXT_BOUNDARY_SENTENCE_END,
- SPI_TEXT_BOUNDARY_LINE_START,
- SPI_TEXT_BOUNDARY_LINE_END,
- SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE
-} AccessibleTextBoundaryType;
-
-/*
- *
- * Enumerated type for relation types
- *
- */
-
-typedef enum
-{
- SPI_RELATION_LABEL_FOR,
- SPI_RELATION_LABELED_BY,
- SPI_RELATION_CONTROLLER_FOR,
- SPI_RELATION_CONTROLLED_BY,
- SPI_RELATION_MEMBER_OF
-} AccessibleRelationType;
-
-
-/* don't change the order of these ! */
-typedef enum {
- SPI_COORD_TYPE_SCREEN,
- SPI_COORD_TYPE_WINDOW
-} AccessibleCoordType;
-
-typedef enum {
- SPI_KEY_PRESS,
- SPI_KEY_RELEASE,
- SPI_KEY_PRESSRELEASE,
- SPI_KEY_SYM
-} AccessibleKeySynthType;
-
-typedef enum {
- SPI_KEYLISTENER_NOSYNC = 0,
- SPI_KEYLISTENER_SYNCHRONOUS = 1,
- SPI_KEYLISTENER_CANCONSUME = 2,
- SPI_KEYLISTENER_ALL_WINDOWS = 4
-} AccessibleKeyListenerSyncType;
-
-typedef unsigned long AccessibleKeyEventMask;
-
-/**
- * AccessibleComponentLayer:
- * @SPI_LAYER_INVALID: The layer cannot be determined or is somehow undefined.
- * @SPI_LAYER_BACKGROUND: Component belongs to the destop background.
- * @SPI_LAYER_CANVAS: Component is a canvas backdrop or drawing area.
- * @SPI_LAYER_WIDGET: Component is a 'normal' widget.
- * @SPI_LAYER_MDI: Component is drawn in the MDI layer and may have valid
- * Z-information relative to other MDI-layer components.
- * @SPI_LAYER_POPUP: Component is in the popup layer, above other widgets and
- * MDI components.
- * @SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
- * for future use.
- * @SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
- * should not be encountered.
- **/
-typedef enum {
- SPI_LAYER_INVALID,
- SPI_LAYER_BACKGROUND,
- SPI_LAYER_CANVAS,
- SPI_LAYER_WIDGET,
- SPI_LAYER_MDI,
- SPI_LAYER_POPUP,
- SPI_LAYER_OVERLAY,
- SPI_LAYER_LAST_DEFINED
-} AccessibleComponentLayer;
-
-
-/**
- * AccessibleKeySet:
- * @keysyms:
- * @keycodes:
- * @len:
- *
- * Structure containing identifying information about a set of keycode or
- * keysyms.
- **/
-typedef struct _AccessibleKeySet
-{
- unsigned long *keysyms;
- unsigned short *keycodes;
- short len;
-} 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 (SPIBoolean isGNOMEApp);
-
-/**
- * SPI_event_main:
- *
- * 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 (void);
-
-/**
- * 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.
- *
- **/
-SPIBoolean
-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.
- *
- **/
-AccessibleEvent *
-SPI_nextEvent (SPIBoolean waitForEvent);
-
-/**
- * SPI_exit:
- *
- * Disconnects from the Accessibility Registry and releases resources.
- *
- **/
-void
-SPI_exit (void);
-
-/*
- * Event Listener creation and support.
- */
-
-/**
- * createAccessibleEventListener:
- * @callback : an #AccessibleEventListenerCB callback function, or NULL.
- *
- * Create a new #AccessibleEventListener with a specified callback function.
- *
- * Returns: a pointer to a newly-created #AccessibleEventListener.
- *
- **/
-AccessibleEventListener *
-createAccessibleEventListener (AccessibleEventListenerCB callback,
- void *user_data);
-
-/**
- * AccessibleEventListener_addCallback:
- * @listener: the #AccessibleEventListener instance to modify.
- * @callback: an #AccessibleEventListenerCB function pointer.
- *
- * Add an in-process callback function to an existing AccessibleEventListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-SPIBoolean
-AccessibleEventListener_addCallback (AccessibleEventListener *listener,
- AccessibleEventListenerCB callback,
- void *user_data);
-
-/**
- * AccessibleEventListener_removeCallback:
- * @listener: the #AccessibleEventListener instance to modify.
- * @callback: an #AccessibleEventListenerCB function pointer.
- *
- * Remove an in-process callback function from an existing AccessibleEventListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-SPIBoolean
-AccessibleEventListener_removeCallback (AccessibleEventListener *listener,
- AccessibleEventListenerCB callback);
-
-/**
- * createAccessibleKeystrokeListener:
- * @callback : an #AccessibleKeystrokeListenerCB callback function, or NULL.
- *
- * Create a new #AccessibleKeystrokeListener with a specified callback function.
- *
- * Returns: a pointer to a newly-created #AccessibleKeystrokeListener.
- *
- **/
-AccessibleKeystrokeListener *
-createAccessibleKeystrokeListener (AccessibleKeystrokeListenerCB callback,
- void *user_data);
-
-/**
- * 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.
- *
- **/
-SPIBoolean
-AccessibleKeystrokeListener_addCallback (AccessibleKeystrokeListener *listener,
- AccessibleKeystrokeListenerCB callback,
- void *user_data);
-
-/**
- * AccessibleKeystrokeListener_removeCallback:
- * @listener: the #AccessibleKeystrokeListener instance to modify.
- * @callback: an #AccessibleKeystrokeListenerCB function pointer.
- *
- * Remove an in-process callback function from an existing #AccessibleKeystrokeListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-SPIBoolean
-AccessibleKeystrokeListener_removeCallback (AccessibleKeystrokeListener *listener,
- AccessibleKeystrokeListenerCB callback);
-
-void AccessibleKeystrokeListener_unref (AccessibleKeystrokeListener *listener);
-
-/*
- *
- * 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 AccessibleEventListener.
- *
- * Returns: #TRUE if successful, otherwise #FALSE.
- *
- **/
-SPIBoolean
-registerGlobalEventListener (AccessibleEventListener *listener,
- char *eventType);
-SPIBoolean
-deregisterGlobalEventListener (AccessibleEventListener *listener,
- char *eventType);
-SPIBoolean
-deregisterGlobalEventListenerAll (AccessibleEventListener *listener);
-
-
-/**
- * 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.
- *
- **/
-Accessible*
-getDesktop (int i);
-
-/**
- * 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 (Accessible **list);
-
-/**
- * registerAccessibleKeystrokeListener:
- * @listener: a pointer to the #AccessibleKeystrokeListener for which
- * keystroke events are requested.
- *
- * [Partially Implemented.]
- *
- **/
-void
-registerAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener,
- AccessibleKeySet *keys,
- AccessibleKeyMaskType modmask,
- AccessibleKeyEventMask eventmask,
- AccessibleKeyListenerSyncType sync_type);
-
-void
-deregisterAccessibleKeystrokeListener (AccessibleKeystrokeListener *listener,
- AccessibleKeyMaskType modmask);
-
-/**
- * generateKeyEvent:
- * @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) and whether to synthesize
- * SPI_KEY_PRESS, SPI_KEY_RELEASE, or both (SPI_KEY_PRESSRELEASE).
- *
- * Synthesize a keyboard event (as if a hardware keyboard event occurred in the
- * current UI context).
- *
- **/
-void
-generateKeyEvent (long int keyval, AccessibleKeySynthType synth_type);
-
-/**
- * generateMouseEvent:
- * @x: a #long int indicating the screen x coordinate of the mouse event.
- * @y: a #long int indicating the screen y coordinate of the mouse event.
- * @name: a string indicating which mouse event to be synthesized
- * (e.g. "button1", "button2", "mousemove").
- *
- * Synthesize a mouse event at a specific screen coordinate.
- * Not Yet Implemented.
- *
- **/
-void
-generateMouseEvent (long int x, long int y, char *name);