2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
27 #include <cspi/spi-impl.h>
29 * Definitions for AccessibleRole, AccessibleState,
30 * and event listeners.
32 #include <cspi/spi-roletypes.h>
33 #include <cspi/spi-statetypes.h>
34 #include <cspi/spi-listener.h>
37 * Auxiliary typedefs and mask definitions
39 #include <libspi/keymasks.h>
46 *AccessibleTextBoundaryType:
47 *@SPI_TEXT_BOUNDARY_CHAR: Delimiter is the current character's bounds.
48 *@SPI_TEXT_BOUNDARY_CURSOR_POS: Delimiter is the current text caret position.
49 *@SPI_TEXT_BOUNDARY_WORD_START: Bounds run from the first character of a word to the first
50 * character of the following word (i.e. including trailing whitespace, if any) within the text object.
51 *@SPI_TEXT_BOUNDARY_WORD_END: Bounds run from the last character of a word to the last
52 * character of the following word (i.e. including leading whitespace) within the text object.
53 *@SPI_TEXT_BOUNDARY_SENTENCE_START: Bounds run from the first character of a sentence to the first
54 * character of the next sentence in the text object.
55 *@SPI_TEXT_BOUNDARY_SENTENCE_END: Bounds run from the last character of a sentence to the last
56 * character of the next sentence in the text object.
57 *@SPI_TEXT_BOUNDARY_LINE_START: Bounds span one line of text, with the line delimiter at the end of the
58 * bounds, if present, within the current text object.
59 *@SPI_TEXT_BOUNDARY_LINE_END: Bounds span one line of text, including a preceding line delimiter
60 * if present within the current text object.
61 *@SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE: Bounds span the run, relative to the specified offset and
62 * text accessor API rules, over which the attributes of the text object are invariant.
64 *Text boundary types used for specifying boundaries for regions of text.
68 SPI_TEXT_BOUNDARY_CHAR,
69 SPI_TEXT_BOUNDARY_CURSOR_POS,
70 SPI_TEXT_BOUNDARY_WORD_START,
71 SPI_TEXT_BOUNDARY_WORD_END,
72 SPI_TEXT_BOUNDARY_SENTENCE_START,
73 SPI_TEXT_BOUNDARY_SENTENCE_END,
74 SPI_TEXT_BOUNDARY_LINE_START,
75 SPI_TEXT_BOUNDARY_LINE_END,
76 SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE
77 } AccessibleTextBoundaryType;
80 *AccessibleTextClipType
81 *@SPI_TEXT_CLIP_NONE: No clipping to be done
82 *@SPI_TEXT_CLIP_MIN: Text clipped by min coordinate is omitted
83 *@SPI_TEXT_CLIP_MAX: Text clipped by max coordinate is omitted
84 *@SPI_TEXT_CLIP_BOTH: Only text fully within mix/max bound is retained
86 *Describes the type of clipping required.
94 } AccessibleTextClipType;
97 *AccessibleRelationType:
98 *@SPI_RELATION_NULL: Not used, this is an invalid value for this enumeration.
99 *@SPI_RELATION_LABEL_FOR: Indicates an object is a label for one or more target objects.
100 *@SPI_RELATION_LABELED_BY: Indicates an object is labelled by one or more target objects.
101 *@SPI_RELATION_CONTROLLED_BY: Indicates an object controlled by one or more target objects.
102 *@SPI_RELATION_CONTROLLER_FOR: Indicates an object is an controller for one or more target objects.
103 *@SPI_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or
105 *@SPI_RELATION_NODE_CHILD_OF: Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell.
106 *@SPI_RELATION_EXTENDED: This value indicates that a relation other than those pre-specified by this version of AT-SPI
108 *@SPI_RELATION_FLOWS_TO: Indicates that the object has content that flows logically to another
109 * AtkObject in a sequential way, (for instance text-flow).
110 *@SPI_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
111 * another AtkObject in a sequential way, (for instance text-flow).
112 *@SPI_RELATION_SUBWINDOW_OF: Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component.
113 *@SPI_RELATION_EMBEDS: Indicates that the object visually embeds
114 * another object's content, i.e. this object's content flows around
116 *@SPI_RELATION_EMBEDDED_BY: Inverse of %SPI_RELATION_EMBEDS, indicates that
117 * this object's content is visualy embedded in another object.
118 *@SPI_RELATION_POPUP_FOR: Indicates that an object is a popup for another objec
120 *@SPI_RELATION_LAST_DEFINED: Do not use, this is an implementation detail used
121 * to identify the size of this enumeration.
123 *Describes the type of the relation
128 SPI_RELATION_LABEL_FOR,
129 SPI_RELATION_LABELED_BY,
130 SPI_RELATION_CONTROLLER_FOR,
131 SPI_RELATION_CONTROLLED_BY,
132 SPI_RELATION_MEMBER_OF,
133 SPI_RELATION_NODE_CHILD_OF,
134 SPI_RELATION_EXTENDED,
135 SPI_RELATION_FLOWS_TO,
136 SPI_RELATION_FLOWS_FROM,
137 SPI_RELATION_SUBWINDOW_OF,
139 SPI_RELATION_EMBEDDED_BY,
140 SPI_RELATION_POPUP_FOR,
141 SPI_RELATION_LAST_DEFINED
142 } AccessibleRelationType;
145 /* don't change the order of these ! */
147 *AccessibleCoordType:
148 *@SPI_COORD_TYPE_SCREEN: specifies xy coordinates relative to the screen
149 *@SPI_COORD_TYPE_WINDOW: specifies xy coordinates relative to an object's
152 *Specifies how xy coordinates are to be interpreted. Used by functions such
153 *as AccessibleComponent_getPosition() and AccessibleText_getCharacterExtents()
156 SPI_COORD_TYPE_SCREEN,
157 SPI_COORD_TYPE_WINDOW
158 } AccessibleCoordType;
161 *AccessibleKeySynthType:
162 *@SPI_KEY_PRESS: Generates a keypress event (requires a subsequent #SPI_KEY_RELEASE event)
163 *@SPI_KEY_RELEASE: Generates a key-release event
164 *@SPI_KEY_PRESSRELEASE: Generates a key press/release event pair.
165 *@SPI_KEY_SYM: Injects a "keysym" event into the stream, as if a press/release pair occurred; allows
166 * the user to specify the key via its symbolic name, as opposed to simulating a hardware press of a
168 *@SPI_KEY_STRING: Injects one or more keysym events into the keyboard buffer, or directly inserts
169 * a string value into the currently focussed text widget, if the widgets supports this.
170 * #SPI_KEY_STRING synthesis provides a shortcut for text substring insertion, and also allows the
171 * insertion of text which is not currently available via the current keyboard's keymap.
173 * Specifies the type of a generated event.
178 SPI_KEY_PRESSRELEASE,
181 } AccessibleKeySynthType;
184 *AccessibleKeyListenerSyncType:
185 *@SPI_KEYLISTENER_NOSYNC: Events may be delivered asynchronously,
186 * which means in some cases they may already have been delivered to the
187 * application before the AT client receives the notification.
188 *@SPI_KEYLISTENER_SYNCHRONOUS: Events are delivered synchronously, before the
189 * currently focussed application sees them.
190 *@SPI_KEYLISTENER_CANCONSUME: Events may be consumed by the AT client. Presumes and
191 * requires #SPI_KEYLISTENER_SYNCHRONOUS, incompatible with #SPI_KEYLISTENER_NOSYNC.
192 *@SPI_KEYLISTENER_ALL_WINDOWS: Events are received not from the application toolkit layer, but
193 * from the device driver or windowing system subsystem; such notifications are 'global' in the
194 * sense that they are not broken or defeated by applications that participate poorly
195 * in the accessibility APIs, or not at all; however because of the intrusive nature of
196 * such snooping, it can have side-effects on certain older platforms. If unconditional
197 * event notifications, even when inaccessible or "broken" applications have focus, are not
198 * required, it may be best to avoid this enum value/flag.
200 *Specified the tyupe of a key listener event.
201 * Certain of the values above can and should be bitwise-'OR'ed
202 * together, observing the compatibility limitations specified in the description of
203 * each value. For instance, #SPI_KEYLISTENER_ALL_WINDOWS | #SPI_KEYLISTENER_CANCONSUME is
204 * a commonly used combination which gives the AT complete control over the delivery of matching
205 * events. However, such filters should be used sparingly as they may have a negative impact on
206 * system performance.
209 SPI_KEYLISTENER_NOSYNC = 0,
210 SPI_KEYLISTENER_SYNCHRONOUS = 1,
211 SPI_KEYLISTENER_CANCONSUME = 2,
212 SPI_KEYLISTENER_ALL_WINDOWS = 4
213 } AccessibleKeyListenerSyncType;
217 *AccessibleStreamableContentSeekType
218 *@SPI_STREAM_SEEK_SET: seek from the 'top' of the streamable
219 *@SPI_STREAM_SEEK_CUR: seek from the current position in the stream
220 *@SPI_STREAM_SEEK_END: seek from the end of the stream (if known)
222 *The seek type for a specified offset in AccessibleStreamableContent_seek.
229 } AccessibleStreamableContentSeekType;
239 * An opaque object encapsulating information about thrown exceptions.
241 typedef struct _SPIException SPIException;
244 typedef SPIBoolean (*SPIExceptionHandler) (SPIException *err, SPIBoolean is_fatal);
248 * @SPI_EXCEPTION_UNSPECIFIED: An exception of unknown type, or which doesn't fit the other types.
249 * @SPI_EXCEPTION_DISCONNECT: Communication with the object or service has been disconnected;
250 * this usually means that the object or service has died or exited.
251 * @SPI_EXCEPTION_NO_IMPL: The object or service is missing the implementation for a request.
252 * @SPI_EXCEPTION_IO: The communications channel has become corrupted, blocked, or is otherwise in a bad state.
253 * @SPI_EXCEPTION_BAD_DATA: The data received or sent over the interface has been identified as
254 * improperly formatted or otherwise fails to match the expectations.
256 * Exception codes indicating what's gone wrong in an AT-SPI call.
259 SPI_EXCEPTION_UNSPECIFIED,
260 SPI_EXCEPTION_DISCONNECT,
261 SPI_EXCEPTION_NO_IMPL,
263 SPI_EXCEPTION_BAD_DATA
268 * @SPI_EXCEPTION_SOURCE_UNSPECIFIED: Don't know or can't tell where the problem is
269 * @SPI_EXCEPTION_SOURCE_ACCESSIBLE: The source of an event or query (i.e. an app) has thrown the exception.
270 * @SPI_EXCEPTION_SOURCE_REGISTRY: The AT-SPI registry has thrown the exception or cannot be reached.
271 * @SPI_EXCEPTION_SOURCE_DEVICE: The device event subsystem has encountered an error condition.
273 * The general source of the failure, i.e. whether the app, registry, or device system has encountered trouble.
276 SPI_EXCEPTION_SOURCE_UNSPECIFIED,
277 SPI_EXCEPTION_SOURCE_ACCESSIBLE,
278 SPI_EXCEPTION_SOURCE_REGISTRY,
279 SPI_EXCEPTION_SOURCE_DEVICE
282 typedef unsigned long AccessibleKeyEventMask;
283 typedef unsigned long AccessibleDeviceEventMask;
286 * @x: The position of the minimum x value of the rectangle (i.e. left hand corner)
287 * @y: The position of the minimum y value of the rectangle's bounds.
288 * @width: Width of the rectangle in pixels.
289 * @height: Height of the rectangle in pixels.
291 * A structure encapsulating a rectangle.
301 *AccessibleComponentLayer:
302 *@SPI_LAYER_INVALID: The layer cannot be determined or is somehow undefined.
303 *@SPI_LAYER_BACKGROUND: Component belongs to the destop background.
304 *@SPI_LAYER_CANVAS: Component is a canvas backdrop or drawing area.
305 *@SPI_LAYER_WIDGET: Component is a 'normal' widget.
306 *@SPI_LAYER_MDI: Component is drawn in the MDI layer and may have valid
307 * Z-information relative to other MDI-layer components.
308 *@SPI_LAYER_POPUP: Component is in the popup layer, above other widgets and
310 *@SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
312 *@SPI_LAYER_WINDOW: Component is in the window layer and have valid Z-information
313 * relative to other window-layer components.
314 *@SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
315 * should not be encountered.
317 * Describes the layer of a component.
319 * These enumerated "layer values" are used when determining which UI
320 * rendering layer a component is drawn into, which can help in making
321 * determinations of when components occlude one another.
325 SPI_LAYER_BACKGROUND,
332 SPI_LAYER_LAST_DEFINED
333 } AccessibleComponentLayer;
337 * AccessibleTextRange:
338 * @start: the first nominal character position within the range.
339 * @end: the first nominal character position following the range.
340 * @content: The actual text content between @start and @end, as a UTF-8 string.
342 * Structure which encapsulates a text range - must be associated with an
343 * AccessibleText-implementing object.
345 typedef struct _AccessibleTextRange
350 } AccessibleTextRange;
358 * Structure containing identifying information about a set of keycode or
361 typedef struct _AccessibleKeySet
363 unsigned long *keysyms;
364 unsigned short *keycodes;
370 * A special value for an AccessibleKeySet type, which tacitly
371 * includes all keycodes and keyvals for the specified modifier set.
373 #define SPI_KEYSET_ALL_KEYS NULL
375 typedef unsigned long AccessibleModifierMaskType;
377 *AccessibleKeyMaskType:
379 *AccessibleKeyMaskType is a mask which is a set of key event modifiers
380 *which is specified in SPI_registerAccessibleKeystrokeListener.
383 typedef AccessibleModifierMaskType AccessibleKeyMaskType;
385 typedef struct _AccessibleAttributeSet
389 } AccessibleAttributeSet;
391 /* Basic SPI initialization and event loop function prototypes */
394 void SPI_event_main (void);
395 void SPI_event_quit (void);
396 SPIBoolean SPI_eventIsReady (void);
397 AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
400 /* Event Listener creation and support. */
402 void SPI_freeAccessibleKeySet (
403 AccessibleKeySet *keyset);
404 AccessibleKeySet * SPI_createAccessibleKeySet (
408 const char **keystrings);
409 AccessibleEventListener * SPI_createAccessibleEventListener (
410 AccessibleEventListenerCB callback,
412 SPIBoolean AccessibleEventListener_addCallback (
413 AccessibleEventListener *listener,
414 AccessibleEventListenerCB callback,
416 SPIBoolean AccessibleEventListener_removeCallback (
417 AccessibleEventListener *listener,
418 AccessibleEventListenerCB callback);
419 void AccessibleEventListener_unref (
420 AccessibleEventListener *listener);
422 /* Device Event Listener creation and support. */
424 /* First four are deprecated in favor of the last four; really just a re-name */
426 AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener (
427 AccessibleKeystrokeListenerCB callback,
429 SPIBoolean AccessibleKeystrokeListener_addCallback (
430 AccessibleKeystrokeListener *listener,
431 AccessibleKeystrokeListenerCB callback,
433 SPIBoolean AccessibleKeystrokeListener_removeCallback (
434 AccessibleKeystrokeListener *listener,
435 AccessibleKeystrokeListenerCB callback);
436 void AccessibleKeystrokeListener_unref (
437 AccessibleKeystrokeListener *listener);
439 AccessibleDeviceListener * SPI_createAccessibleDeviceListener (
440 AccessibleDeviceListenerCB callback,
442 SPIBoolean AccessibleDeviceListener_addCallback (
443 AccessibleDeviceListener *listener,
444 AccessibleDeviceListenerCB callback,
446 SPIBoolean AccessibleDeviceListener_removeCallback (
447 AccessibleDeviceListener *listener,
448 AccessibleDeviceListenerCB callback);
449 void AccessibleDeviceListener_unref (
450 AccessibleDeviceListener *listener);
452 /* Global functions serviced by the registry */
454 SPIBoolean SPI_registerGlobalEventListener (
455 AccessibleEventListener *listener,
456 const char *eventType);
457 SPIBoolean SPI_deregisterGlobalEventListener (
458 AccessibleEventListener *listener,
459 const char *eventType);
460 SPIBoolean SPI_deregisterGlobalEventListenerAll (
461 AccessibleEventListener *listener);
462 SPIBoolean SPI_registerAccessibleKeystrokeListener (
463 AccessibleKeystrokeListener *listener,
464 AccessibleKeySet *keys,
465 AccessibleKeyMaskType modmask,
466 AccessibleKeyEventMask eventmask,
467 AccessibleKeyListenerSyncType sync_type);
468 SPIBoolean SPI_deregisterAccessibleKeystrokeListener (
469 AccessibleKeystrokeListener *listener,
470 AccessibleKeyMaskType modmask);
472 SPIBoolean SPI_registerDeviceEventListener (
473 AccessibleDeviceListener *listener,
474 AccessibleDeviceEventMask eventmask,
476 SPIBoolean SPI_deregisterDeviceEventListener (
477 AccessibleDeviceListener *listener,
480 int SPI_getDesktopCount (void);
481 Accessible *SPI_getDesktop (int i);
482 int SPI_getDesktopList (Accessible ***desktop_list);
483 void SPI_freeDesktopList (Accessible **desktop_list);
485 SPIBoolean SPI_generateKeyboardEvent (long int keyval,
487 AccessibleKeySynthType synth_type);
489 SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
491 /* Accessible function prototypes */
493 void Accessible_ref (Accessible *obj);
494 void Accessible_unref (Accessible *obj);
495 char * Accessible_getName (Accessible *obj);
496 char * Accessible_getDescription (Accessible *obj);
497 Accessible * Accessible_getParent (Accessible *obj);
498 long Accessible_getChildCount (Accessible *obj);
499 Accessible * Accessible_getChildAtIndex (Accessible *obj,
500 long int childIndex);
501 long Accessible_getIndexInParent (Accessible *obj);
502 AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
503 AccessibleRole Accessible_getRole (Accessible *obj);
504 char * Accessible_getRoleName (Accessible *obj);
505 char * Accessible_getLocalizedRoleName (Accessible *obj);
506 AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
507 AccessibleAttributeSet *Accessible_getAttributes (Accessible *obj);
508 AccessibleApplication *Accessible_getHostApplication (Accessible *obj);
510 /* Interface query methods */
512 SPIBoolean Accessible_isAction (Accessible *obj);
513 SPIBoolean Accessible_isApplication (Accessible *obj);
514 SPIBoolean Accessible_isComponent (Accessible *obj);
515 SPIBoolean Accessible_isEditableText (Accessible *obj);
516 SPIBoolean Accessible_isHypertext (Accessible *obj);
517 SPIBoolean Accessible_isImage (Accessible *obj);
518 SPIBoolean Accessible_isSelection (Accessible *obj);
519 SPIBoolean Accessible_isStreamableContent (Accessible *obj);
520 SPIBoolean Accessible_isTable (Accessible *obj);
521 SPIBoolean Accessible_isText (Accessible *obj);
522 SPIBoolean Accessible_isValue (Accessible *obj);
524 AccessibleAction * Accessible_getAction (Accessible *obj);
525 AccessibleApplication * Accessible_getApplication (Accessible *obj);
526 AccessibleComponent * Accessible_getComponent (Accessible *obj);
527 AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
528 AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
529 AccessibleImage * Accessible_getImage (Accessible *obj);
530 AccessibleSelection * Accessible_getSelection (Accessible *obj);
531 AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
532 AccessibleTable * Accessible_getTable (Accessible *obj);
533 AccessibleText * Accessible_getText (Accessible *obj);
534 AccessibleValue * Accessible_getValue (Accessible *obj);
535 AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
536 const char *interface_name);
538 /* AccessibleAction function prototypes */
540 void AccessibleAction_ref (AccessibleAction *obj);
541 void AccessibleAction_unref (AccessibleAction *obj);
542 long AccessibleAction_getNActions (AccessibleAction *obj);
543 char *AccessibleAction_getName (AccessibleAction *obj,
545 char *AccessibleAction_getDescription (AccessibleAction *obj,
547 SPIBoolean AccessibleAction_doAction (AccessibleAction *obj,
549 char *AccessibleAction_getKeyBinding (AccessibleAction *obj,
552 /* AccessibleApplication function prototypes */
554 void AccessibleApplication_ref (AccessibleApplication *obj);
555 void AccessibleApplication_unref (AccessibleApplication *obj);
556 char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
557 char *AccessibleApplication_getVersion (AccessibleApplication *obj);
558 long AccessibleApplication_getID (AccessibleApplication *obj);
559 char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
560 SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
561 SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
563 /* AccessibleComponent function prototypes */
565 void AccessibleComponent_ref (AccessibleComponent *obj);
566 void AccessibleComponent_unref (AccessibleComponent *obj);
567 SPIBoolean AccessibleComponent_contains (AccessibleComponent *obj,
570 AccessibleCoordType ctype);
571 Accessible *AccessibleComponent_getAccessibleAtPoint (
572 AccessibleComponent *obj,
575 AccessibleCoordType ctype);
576 void AccessibleComponent_getExtents (AccessibleComponent *obj,
581 AccessibleCoordType ctype);
582 void AccessibleComponent_getPosition (AccessibleComponent *obj,
585 AccessibleCoordType ctype);
586 void AccessibleComponent_getSize (AccessibleComponent *obj,
589 AccessibleComponentLayer
590 AccessibleComponent_getLayer (AccessibleComponent *obj);
591 SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
592 short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
593 double AccessibleComponent_getAlpha (AccessibleComponent *obj);
595 /* AccessibleEditableText function prototypes */
598 AccessibleEditableText_ref (AccessibleEditableText *obj);
601 AccessibleEditableText_unref (AccessibleEditableText *obj);
604 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
605 const char *attributes,
606 long int startOffset,
610 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
611 const char *newContents);
614 AccessibleEditableText_insertText (AccessibleEditableText *obj,
620 AccessibleEditableText_copyText (AccessibleText *obj,
625 AccessibleEditableText_cutText (AccessibleEditableText *obj,
630 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
635 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
640 * AccessibleHyperlink function prototypes
644 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
646 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
649 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
652 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
656 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
660 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
661 long int *startIndex,
665 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
669 * AccessibleHypertext function prototypes
674 AccessibleHypertext_ref (AccessibleHypertext *obj);
677 AccessibleHypertext_unref (AccessibleHypertext *obj);
680 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
682 AccessibleHyperlink *
683 AccessibleHypertext_getLink (AccessibleHypertext *obj,
687 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
688 long int characterOffset);
692 * AccessibleImage function prototypes
697 AccessibleImage_ref (AccessibleImage *obj);
700 AccessibleImage_unref (AccessibleImage *obj);
703 AccessibleImage_getImageDescription (AccessibleImage *obj);
706 AccessibleImage_getImageSize (AccessibleImage *obj,
711 AccessibleImage_getImagePosition (AccessibleImage *obj,
714 AccessibleCoordType ctype);
717 AccessibleImage_getImageExtents (AccessibleImage *obj,
722 AccessibleCoordType ctype);
724 AccessibleImage_getImageLocale (AccessibleImage *obj);
728 * AccessibleRelation function prototypes
732 void AccessibleRelation_ref (AccessibleRelation *obj);
733 void AccessibleRelation_unref (AccessibleRelation *obj);
735 AccessibleRelationType
736 AccessibleRelation_getRelationType (AccessibleRelation *obj);
739 AccessibleRelation_getNTargets (AccessibleRelation *obj);
742 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
747 * AccessibleSelection function prototypes
751 void AccessibleSelection_ref (AccessibleSelection *obj);
752 void AccessibleSelection_unref (AccessibleSelection *obj);
755 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
758 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
759 long int selectedChildIndex);
762 AccessibleSelection_selectChild (AccessibleSelection *obj,
763 long int childIndex);
766 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
767 long int selectedChildIndex);
770 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
771 long int childIndex);
774 AccessibleSelection_selectAll (AccessibleSelection *obj);
777 AccessibleSelection_clearSelection (AccessibleSelection *obj);
782 * AccessibleStateSet function prototypes
786 void AccessibleStateSet_ref (AccessibleStateSet *obj);
787 void AccessibleStateSet_unref (AccessibleStateSet *obj);
790 AccessibleStateSet_contains (AccessibleStateSet *obj,
791 AccessibleState state);
794 AccessibleStateSet_add (AccessibleStateSet *obj,
795 AccessibleState state);
798 AccessibleStateSet_remove (AccessibleStateSet *obj,
799 AccessibleState state);
802 AccessibleStateSet_equals (AccessibleStateSet *obj,
803 AccessibleStateSet *obj2);
806 AccessibleStateSet_compare (AccessibleStateSet *obj,
807 AccessibleStateSet *obj2);
810 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
813 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
815 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
817 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
820 AccessibleStreamableContent_freeContentTypesList (AccessibleStreamableContent *obj,
821 char **content_types);
822 #define AccessibleStreamableContent_freeContentTypeList(a, b) AccessibleStreamableContent_freeContentTypesList(a,b)
825 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
826 const char *content_type);
828 AccessibleStreamableContent_close (AccessibleStreamableContent *obj);
831 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
833 AccessibleStreamableContentSeekType seek_type);
835 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
838 unsigned int read_type);
841 * AccessibleTable function prototypes
845 void AccessibleTable_ref (AccessibleTable *obj);
846 void AccessibleTable_unref (AccessibleTable *obj);
849 AccessibleTable_getCaption (AccessibleTable *obj);
852 AccessibleTable_getSummary (AccessibleTable *obj);
855 AccessibleTable_getNRows (AccessibleTable *obj);
858 AccessibleTable_getNColumns (AccessibleTable *obj);
861 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
866 AccessibleTable_getIndexAt (AccessibleTable *obj,
871 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
875 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
879 AccessibleTable_getRowDescription (AccessibleTable *obj,
883 AccessibleTable_getColumnDescription (AccessibleTable *obj,
887 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
892 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
897 AccessibleTable_getRowHeader (AccessibleTable *obj,
901 AccessibleTable_getColumnHeader (AccessibleTable *obj,
905 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
908 AccessibleTable_getSelectedRows (AccessibleTable *obj,
909 long int **selectedRows);
912 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
915 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
916 long int **selectedColumns);
919 AccessibleTable_isRowSelected (AccessibleTable *obj,
923 AccessibleTable_isColumnSelected (AccessibleTable *obj,
927 AccessibleTable_isSelected (AccessibleTable *obj,
932 AccessibleTable_addRowSelection (AccessibleTable *obj,
935 AccessibleTable_addColumnSelection (AccessibleTable *obj,
939 AccessibleTable_removeRowSelection (AccessibleTable *obj,
942 AccessibleTable_removeColumnSelection (AccessibleTable *obj,
947 * AccessibleText function prototypes
951 void AccessibleText_ref (AccessibleText *obj);
952 void AccessibleText_unref (AccessibleText *obj);
955 AccessibleText_getCharacterCount (AccessibleText *obj);
958 AccessibleText_getText (AccessibleText *obj,
959 long int startOffset,
963 AccessibleText_getCaretOffset (AccessibleText *obj);
966 AccessibleText_getAttributes (AccessibleText *obj,
968 long int *startOffset,
969 long int *endOffset);
972 AccessibleText_getDefaultAttributes (AccessibleText *obj);
975 AccessibleText_setCaretOffset (AccessibleText *obj,
979 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
981 AccessibleTextBoundaryType type,
982 long int *startOffset,
983 long int *endOffset);
986 AccessibleText_getTextAtOffset (AccessibleText *obj,
988 AccessibleTextBoundaryType type,
989 long int *startOffset,
990 long int *endOffset);
993 AccessibleText_getTextAfterOffset (AccessibleText *obj,
995 AccessibleTextBoundaryType type,
996 long int *startOffset,
997 long int *endOffset);
1000 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1004 AccessibleText_getCharacterExtents (AccessibleText *obj,
1010 AccessibleCoordType type);
1013 AccessibleText_getRangeExtents (AccessibleText *obj,
1014 long int startOffset,
1020 AccessibleCoordType type);
1022 AccessibleTextRange **
1023 AccessibleText_getBoundedRanges (AccessibleText *obj,
1028 AccessibleCoordType type,
1029 AccessibleTextClipType clipTypeX,
1030 AccessibleTextClipType clipTypeY);
1033 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges);
1036 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1039 AccessibleCoordType type);
1042 AccessibleText_getNSelections (AccessibleText *obj);
1045 AccessibleText_getSelection (AccessibleText *obj,
1046 long int selectionNum,
1047 long int *startOffset,
1048 long int *endOffset);
1052 AccessibleText_addSelection (AccessibleText *obj,
1053 long int startOffset,
1054 long int endOffset);
1057 AccessibleText_removeSelection (AccessibleText *obj,
1058 long int selectionNum);
1061 AccessibleText_setSelection (AccessibleText *obj,
1062 long int selectionNum,
1063 long int startOffset,
1064 long int endOffset);
1066 /* AccessibleValue Function Prototypes: */
1068 void AccessibleValue_ref (AccessibleValue *obj);
1069 void AccessibleValue_unref (AccessibleValue *obj);
1070 double AccessibleValue_getMinimumValue (AccessibleValue *obj);
1071 double AccessibleValue_getCurrentValue (AccessibleValue *obj);
1072 double AccessibleValue_getMaximumValue (AccessibleValue *obj);
1073 SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
1076 /* Persistance and lifecycle control for AccessibleEvents. */
1077 SPIBoolean AccessibleEvent_ref (const AccessibleEvent *e);
1078 void AccessibleEvent_unref (const AccessibleEvent *e);
1081 * Prototypes for accessor functions, to obtain context
1082 * information for accessible events.
1085 char* AccessibleEvent_getSourceName (const AccessibleEvent *e);
1086 AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e);
1087 AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEvent *e);
1088 SPIBoolean AccessibleEvent_getSourceDetails (const AccessibleEvent *e, char **name,
1089 AccessibleRole *role,
1090 AccessibleApplication **app);
1092 char* AccessibleTextChangedEvent_getChangeString (const AccessibleEvent *e);
1093 Accessible * AccessibleChildChangedEvent_getChildAccessible (const AccessibleEvent *e);
1095 Accessible * AccessibleParentChangedEvent_getParentAccessible (const AccessibleEvent *e);
1097 char* AccessibleTextSelectionChangedEvent_getSelectionString (const AccessibleEvent *e);
1099 char* AccessibleWindowEvent_getTitleString (const AccessibleEvent *e);
1101 Accessible * AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e);
1103 Accessible * AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e);
1105 Accessible * AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e);
1107 char * AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e);
1109 char * AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1111 char * AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1113 char * AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1115 char * AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e);
1116 SPIRect * AccessibleBoundsChangedEvent_getNewBounds (const AccessibleEvent *e);
1118 /* Misc methods and error handling */
1119 void SPI_freeString (char *s);
1121 char* SPI_dupString (char *s);
1123 void SPI_freeRect (SPIRect *r);
1125 SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
1127 SPIExceptionHandler* SPI_exceptionHandlerPop (void);
1129 SPIExceptionType SPIException_getSourceType (SPIException *err);
1131 SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
1133 Accessible* SPIAccessibleException_getSource (SPIException *err);
1135 char* SPIException_getDescription (SPIException *err);