+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
#ifndef _SPI_H
#define _SPI_H
typedef enum
{
+ SPI_RELATION_NULL,
SPI_RELATION_LABEL_FOR,
SPI_RELATION_LABELED_BY,
SPI_RELATION_CONTROLLER_FOR,
SPI_RELATION_CONTROLLED_BY,
- SPI_RELATION_MEMBER_OF
+ SPI_RELATION_MEMBER_OF,
+ SPI_RELATION_NODE_CHILD_OF,
+ SPI_RELATION_EXTENDED,
+ SPI_RELATION_LAST_DEFINED
} AccessibleRelationType;
SPI_KEY_PRESS,
SPI_KEY_RELEASE,
SPI_KEY_PRESSRELEASE,
- SPI_KEY_SYM
+ SPI_KEY_SYM,
+ SPI_KEY_STRING
} AccessibleKeySynthType;
typedef enum {
**/
typedef struct _AccessibleKeySet
{
- unsigned long *keysyms;
- unsigned short *keycodes;
- short len;
+ unsigned long *keysyms;
+ unsigned short *keycodes;
+ char **keystrings;
+ short len;
} AccessibleKeySet;
/**
/* Event Listener creation and support. */
-AccessibleEventListener *
- createAccessibleEventListener (AccessibleEventListenerCB callback,
+void SPI_freeAccessibleKeySet (
+ AccessibleKeySet *keyset);
+AccessibleKeySet * SPI_createAccessibleKeySet (
+ int len,
+ const char *keysyms,
+ short *keycodes,
+ const char **keystrings);
+AccessibleEventListener * SPI_createAccessibleEventListener (
+ AccessibleEventListenerCB callback,
void *user_data);
-SPIBoolean AccessibleEventListener_addCallback (AccessibleEventListener *listener,
+SPIBoolean AccessibleEventListener_addCallback (
+ AccessibleEventListener *listener,
AccessibleEventListenerCB callback,
void *user_data);
-SPIBoolean AccessibleEventListener_removeCallback (AccessibleEventListener *listener,
+SPIBoolean AccessibleEventListener_removeCallback (
+ AccessibleEventListener *listener,
AccessibleEventListenerCB callback);
-void AccessibleEventListener_unref (AccessibleEventListener *listener);
+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);
+AccessibleKeystrokeListener * SPI_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);
-
-SPIBoolean registerAccessibleKeystrokeListener (
- AccessibleKeystrokeListener *listener,
- AccessibleKeySet *keys,
- AccessibleKeyMaskType modmask,
- AccessibleKeyEventMask eventmask,
- AccessibleKeyListenerSyncType sync_type);
-SPIBoolean deregisterAccessibleKeystrokeListener (
- AccessibleKeystrokeListener *listener,
- AccessibleKeyMaskType modmask);
-
-int getDesktopCount (void);
-Accessible *getDesktop (int i);
-int getDesktopList (Accessible **list);
-
-SPIBoolean generateKeyEvent (long int keyval,
- AccessibleKeySynthType synth_type);
-SPIBoolean generateMouseEvent (long int x, long int y, char *name);
+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);
+
+int SPI_getDesktopCount (void);
+Accessible *SPI_getDesktop (int i);
+int SPI_getDesktopList (Accessible ***desktop_list);
+void SPI_freeDesktopList (Accessible **desktop_list);
+
+SPIBoolean SPI_generateKeyboardEvent (long int keyval,
+ char *keystring,
+ AccessibleKeySynthType synth_type);
+
+SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
/* Accessible function prototypes */
long int childIndex);
long Accessible_getIndexInParent (Accessible *obj);
AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
-const char * Accessible_getRole (Accessible *obj);
+AccessibleRole Accessible_getRole (Accessible *obj);
+char * Accessible_getRoleName (Accessible *obj);
AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
/* Interface query methods */
-SPIBoolean Accessible_isAction (Accessible *obj);
-SPIBoolean Accessible_isApplication (Accessible *obj);
-SPIBoolean Accessible_isComponent (Accessible *obj);
-SPIBoolean Accessible_isEditableText (Accessible *obj);
-SPIBoolean Accessible_isHypertext (Accessible *obj);
-SPIBoolean Accessible_isImage (Accessible *obj);
-SPIBoolean Accessible_isSelection (Accessible *obj);
-SPIBoolean Accessible_isTable (Accessible *obj);
-SPIBoolean Accessible_isText (Accessible *obj);
-SPIBoolean Accessible_isValue (Accessible *obj);
-
-AccessibleAction * Accessible_getAction (Accessible *obj);
-AccessibleApplication * Accessible_getApplication (Accessible *obj);
-AccessibleComponent * Accessible_getComponent (Accessible *obj);
-AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
-AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
-AccessibleImage * Accessible_getImage (Accessible *obj);
-AccessibleSelection * Accessible_getSelection (Accessible *obj);
-AccessibleTable * Accessible_getTable (Accessible *obj);
-AccessibleText * Accessible_getText (Accessible *obj);
-AccessibleValue * Accessible_getValue (Accessible *obj);
-AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
- const char *interface_name);
+SPIBoolean Accessible_isAction (Accessible *obj);
+SPIBoolean Accessible_isApplication (Accessible *obj);
+SPIBoolean Accessible_isComponent (Accessible *obj);
+SPIBoolean Accessible_isEditableText (Accessible *obj);
+SPIBoolean Accessible_isHypertext (Accessible *obj);
+SPIBoolean Accessible_isImage (Accessible *obj);
+SPIBoolean Accessible_isSelection (Accessible *obj);
+SPIBoolean Accessible_isStreamableContent (Accessible *obj);
+SPIBoolean Accessible_isTable (Accessible *obj);
+SPIBoolean Accessible_isText (Accessible *obj);
+SPIBoolean Accessible_isValue (Accessible *obj);
+
+AccessibleAction * Accessible_getAction (Accessible *obj);
+AccessibleApplication * Accessible_getApplication (Accessible *obj);
+AccessibleComponent * Accessible_getComponent (Accessible *obj);
+AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
+AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
+AccessibleImage * Accessible_getImage (Accessible *obj);
+AccessibleSelection * Accessible_getSelection (Accessible *obj);
+AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
+AccessibleTable * Accessible_getTable (Accessible *obj);
+AccessibleText * Accessible_getText (Accessible *obj);
+AccessibleValue * Accessible_getValue (Accessible *obj);
+AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
+ const char *interface_name);
/* AccessibleAction function prototypes */
long int *height);
AccessibleComponentLayer
AccessibleComponent_getLayer (AccessibleComponent *obj);
-void AccessibleComponent_grabFocus (AccessibleComponent *obj);
+SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
/* AccessibleEditableText function prototypes */
SPIBoolean
AccessibleSelection_selectAll (AccessibleSelection *obj);
-void
+SPIBoolean
AccessibleSelection_clearSelection (AccessibleSelection *obj);
SPIBoolean
AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
-
+void
+AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
+void
+AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
+char **
+AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
+SPIBoolean
+AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
+ const char *content_type);
+SPIBoolean
+AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
+ long int offset,
+ unsigned int seek_type);
+SPIBoolean
+AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
+ void *buff,
+ long int nbytes,
+ unsigned int read_type);
/*
*
* AccessibleTable function prototypes
void AccessibleValue_ref (AccessibleValue *obj);
void AccessibleValue_unref (AccessibleValue *obj);
-float AccessibleValue_getMinimumValue (AccessibleValue *obj);
-float AccessibleValue_getCurrentValue (AccessibleValue *obj);
-float AccessibleValue_getMaximumValue (AccessibleValue *obj);
+double AccessibleValue_getMinimumValue (AccessibleValue *obj);
+double AccessibleValue_getCurrentValue (AccessibleValue *obj);
+double AccessibleValue_getMaximumValue (AccessibleValue *obj);
SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
- float newValue);
+ double newValue);
/* Misc methods */
void SPI_freeString (char *s);