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 object.
119 *@SPI_RELATION_PARENT_WINDOW_OF: Indicates that an object is a parent window of another object.
120 *@SPI_RELATION_DESCRIBED_BY: Indicates that another object provides descriptive information about this object; more verbose than %SPI_RELATION_LABELLED_BY.
121 *@SPI_RELATION_DESCRIPTION_FOR: Indicates that an object provides descriptive information about another object; more verbose than %SPI_RELATION_LABEL_FOR.
122 *@SPI_RELATION_LAST_DEFINED: Do not use, this is an implementation detail used
123 * to identify the size of this enumeration.
125 *Describes the type of the relation
130 SPI_RELATION_LABEL_FOR,
131 SPI_RELATION_LABELED_BY,
132 SPI_RELATION_CONTROLLER_FOR,
133 SPI_RELATION_CONTROLLED_BY,
134 SPI_RELATION_MEMBER_OF,
135 SPI_RELATION_NODE_CHILD_OF,
136 SPI_RELATION_EXTENDED,
137 SPI_RELATION_FLOWS_TO,
138 SPI_RELATION_FLOWS_FROM,
139 SPI_RELATION_SUBWINDOW_OF,
141 SPI_RELATION_EMBEDDED_BY,
142 SPI_RELATION_POPUP_FOR,
143 SPI_RELATION_PARENT_WINDOW_OF,
144 SPI_RELATION_DESCRIPTION_FOR,
145 SPI_RELATION_DESCRIBED_BY,
146 SPI_RELATION_LAST_DEFINED
147 } AccessibleRelationType;
150 /* don't change the order of these ! */
152 *AccessibleCoordType:
153 *@SPI_COORD_TYPE_SCREEN: specifies xy coordinates relative to the screen
154 *@SPI_COORD_TYPE_WINDOW: specifies xy coordinates relative to an object's
157 *Specifies how xy coordinates are to be interpreted. Used by functions such
158 *as AccessibleComponent_getPosition() and AccessibleText_getCharacterExtents()
161 SPI_COORD_TYPE_SCREEN,
162 SPI_COORD_TYPE_WINDOW
163 } AccessibleCoordType;
166 *AccessibleKeySynthType:
167 *@SPI_KEY_PRESS: Generates a keypress event (requires a subsequent #SPI_KEY_RELEASE event)
168 *@SPI_KEY_RELEASE: Generates a key-release event
169 *@SPI_KEY_PRESSRELEASE: Generates a key press/release event pair.
170 *@SPI_KEY_SYM: Injects a "keysym" event into the stream, as if a press/release pair occurred; allows
171 * the user to specify the key via its symbolic name, as opposed to simulating a hardware press of a
173 *@SPI_KEY_STRING: Injects one or more keysym events into the keyboard buffer, or directly inserts
174 * a string value into the currently focussed text widget, if the widgets supports this.
175 * #SPI_KEY_STRING synthesis provides a shortcut for text substring insertion, and also allows the
176 * insertion of text which is not currently available via the current keyboard's keymap.
178 * Specifies the type of a generated event.
183 SPI_KEY_PRESSRELEASE,
186 } AccessibleKeySynthType;
189 *AccessibleKeyListenerSyncType:
190 *@SPI_KEYLISTENER_NOSYNC: Events may be delivered asynchronously,
191 * which means in some cases they may already have been delivered to the
192 * application before the AT client receives the notification.
193 *@SPI_KEYLISTENER_SYNCHRONOUS: Events are delivered synchronously, before the
194 * currently focussed application sees them.
195 *@SPI_KEYLISTENER_CANCONSUME: Events may be consumed by the AT client. Presumes and
196 * requires #SPI_KEYLISTENER_SYNCHRONOUS, incompatible with #SPI_KEYLISTENER_NOSYNC.
197 *@SPI_KEYLISTENER_ALL_WINDOWS: Events are received not from the application toolkit layer, but
198 * from the device driver or windowing system subsystem; such notifications are 'global' in the
199 * sense that they are not broken or defeated by applications that participate poorly
200 * in the accessibility APIs, or not at all; however because of the intrusive nature of
201 * such snooping, it can have side-effects on certain older platforms. If unconditional
202 * event notifications, even when inaccessible or "broken" applications have focus, are not
203 * required, it may be best to avoid this enum value/flag.
205 *Specified the tyupe of a key listener event.
206 * Certain of the values above can and should be bitwise-'OR'ed
207 * together, observing the compatibility limitations specified in the description of
208 * each value. For instance, #SPI_KEYLISTENER_ALL_WINDOWS | #SPI_KEYLISTENER_CANCONSUME is
209 * a commonly used combination which gives the AT complete control over the delivery of matching
210 * events. However, such filters should be used sparingly as they may have a negative impact on
211 * system performance.
214 SPI_KEYLISTENER_NOSYNC = 0,
215 SPI_KEYLISTENER_SYNCHRONOUS = 1,
216 SPI_KEYLISTENER_CANCONSUME = 2,
217 SPI_KEYLISTENER_ALL_WINDOWS = 4
218 } AccessibleKeyListenerSyncType;
222 *AccessibleStreamableContentSeekType
223 *@SPI_STREAM_SEEK_SET: seek from the 'top' of the streamable
224 *@SPI_STREAM_SEEK_CUR: seek from the current position in the stream
225 *@SPI_STREAM_SEEK_END: seek from the end of the stream (if known)
227 *The seek type for a specified offset in AccessibleStreamableContent_seek.
234 } AccessibleStreamableContentSeekType;
244 * An opaque object encapsulating information about thrown exceptions.
246 typedef struct _SPIException SPIException;
249 * SPIExceptionHandler:
250 * @err: points to the SPIException opaque object.
251 * @is_fatal: indicates whether the exception is a fatal error or not.
253 * A function type for functions to be called when exceptions occur.
257 typedef SPIBoolean (*SPIExceptionHandler) (SPIException *err, SPIBoolean is_fatal);
261 * @SPI_EXCEPTION_UNSPECIFIED: An exception of unknown type, or which doesn't fit the other types.
262 * @SPI_EXCEPTION_DISCONNECT: Communication with the object or service has been disconnected;
263 * this usually means that the object or service has died or exited.
264 * @SPI_EXCEPTION_NO_IMPL: The object or service is missing the implementation for a request.
265 * @SPI_EXCEPTION_IO: The communications channel has become corrupted, blocked, or is otherwise in a bad state.
266 * @SPI_EXCEPTION_BAD_DATA: The data received or sent over the interface has been identified as
267 * improperly formatted or otherwise fails to match the expectations.
269 * Exception codes indicating what's gone wrong in an AT-SPI call.
272 SPI_EXCEPTION_UNSPECIFIED,
273 SPI_EXCEPTION_DISCONNECT,
274 SPI_EXCEPTION_NO_IMPL,
276 SPI_EXCEPTION_BAD_DATA
281 * @SPI_EXCEPTION_SOURCE_UNSPECIFIED: Don't know or can't tell where the problem is
282 * @SPI_EXCEPTION_SOURCE_ACCESSIBLE: The source of an event or query (i.e. an app) has thrown the exception.
283 * @SPI_EXCEPTION_SOURCE_REGISTRY: The AT-SPI registry has thrown the exception or cannot be reached.
284 * @SPI_EXCEPTION_SOURCE_DEVICE: The device event subsystem has encountered an error condition.
286 * The general source of the failure, i.e. whether the app, registry, or device system has encountered trouble.
289 SPI_EXCEPTION_SOURCE_UNSPECIFIED,
290 SPI_EXCEPTION_SOURCE_ACCESSIBLE,
291 SPI_EXCEPTION_SOURCE_REGISTRY,
292 SPI_EXCEPTION_SOURCE_DEVICE
295 typedef unsigned long AccessibleKeyEventMask;
296 typedef unsigned long AccessibleDeviceEventMask;
299 * @x: The position of the minimum x value of the rectangle (i.e. left hand corner)
300 * @y: The position of the minimum y value of the rectangle's bounds.
301 * @width: Width of the rectangle in pixels.
302 * @height: Height of the rectangle in pixels.
304 * A structure encapsulating a rectangle.
314 *AccessibleComponentLayer:
315 *@SPI_LAYER_INVALID: The layer cannot be determined or is somehow undefined.
316 *@SPI_LAYER_BACKGROUND: Component belongs to the destop background.
317 *@SPI_LAYER_CANVAS: Component is a canvas backdrop or drawing area.
318 *@SPI_LAYER_WIDGET: Component is a 'normal' widget.
319 *@SPI_LAYER_MDI: Component is drawn in the MDI layer and may have valid
320 * Z-information relative to other MDI-layer components.
321 *@SPI_LAYER_POPUP: Component is in the popup layer, above other widgets and
323 *@SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
325 *@SPI_LAYER_WINDOW: Component is in the window layer and have valid Z-information
326 * relative to other window-layer components.
327 *@SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
328 * should not be encountered.
330 * Describes the layer of a component.
332 * These enumerated "layer values" are used when determining which UI
333 * rendering layer a component is drawn into, which can help in making
334 * determinations of when components occlude one another.
338 SPI_LAYER_BACKGROUND,
345 SPI_LAYER_LAST_DEFINED
346 } AccessibleComponentLayer;
350 * AccessibleTextRange:
351 * @start: the first nominal character position within the range.
352 * @end: the first nominal character position following the range.
353 * @content: The actual text content between @start and @end, as a UTF-8 string.
355 * Structure which encapsulates a text range - must be associated with an
356 * AccessibleText-implementing object.
358 typedef struct _AccessibleTextRange
363 } AccessibleTextRange;
371 * Structure containing identifying information about a set of keycode or
374 typedef struct _AccessibleKeySet
376 unsigned long *keysyms;
377 unsigned short *keycodes;
383 * A special value for an AccessibleKeySet type, which tacitly
384 * includes all keycodes and keyvals for the specified modifier set.
386 #define SPI_KEYSET_ALL_KEYS NULL
388 typedef unsigned long AccessibleModifierMaskType;
390 *AccessibleKeyMaskType:
392 *AccessibleKeyMaskType is a mask which is a set of key event modifiers
393 *which is specified in SPI_registerAccessibleKeystrokeListener.
396 typedef AccessibleModifierMaskType AccessibleKeyMaskType;
398 typedef struct _AccessibleAttributeSet
402 } AccessibleAttributeSet;
404 typedef struct _AccessibleRoleSet
407 AccessibleRole *roles;
411 /* Basic SPI initialization and event loop function prototypes */
414 void SPI_event_main (void);
415 void SPI_event_quit (void);
416 SPIBoolean SPI_eventIsReady (void);
417 AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
420 /* Event Listener creation and support. */
422 void SPI_freeAccessibleKeySet (
423 AccessibleKeySet *keyset);
424 AccessibleKeySet * SPI_createAccessibleKeySet (
428 const char **keystrings);
429 AccessibleEventListener * SPI_createAccessibleEventListener (
430 AccessibleEventListenerCB callback,
432 SPIBoolean AccessibleEventListener_addCallback (
433 AccessibleEventListener *listener,
434 AccessibleEventListenerCB callback,
436 SPIBoolean AccessibleEventListener_removeCallback (
437 AccessibleEventListener *listener,
438 AccessibleEventListenerCB callback);
439 void AccessibleEventListener_unref (
440 AccessibleEventListener *listener);
442 /* Device Event Listener creation and support. */
444 /* First four are deprecated in favor of the last four; really just a re-name */
446 AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener (
447 AccessibleKeystrokeListenerCB callback,
449 SPIBoolean AccessibleKeystrokeListener_addCallback (
450 AccessibleKeystrokeListener *listener,
451 AccessibleKeystrokeListenerCB callback,
453 SPIBoolean AccessibleKeystrokeListener_removeCallback (
454 AccessibleKeystrokeListener *listener,
455 AccessibleKeystrokeListenerCB callback);
456 void AccessibleKeystrokeListener_unref (
457 AccessibleKeystrokeListener *listener);
459 AccessibleDeviceListener * SPI_createAccessibleDeviceListener (
460 AccessibleDeviceListenerCB callback,
462 SPIBoolean AccessibleDeviceListener_addCallback (
463 AccessibleDeviceListener *listener,
464 AccessibleDeviceListenerCB callback,
466 SPIBoolean AccessibleDeviceListener_removeCallback (
467 AccessibleDeviceListener *listener,
468 AccessibleDeviceListenerCB callback);
469 void AccessibleDeviceListener_unref (
470 AccessibleDeviceListener *listener);
472 /* Global functions serviced by the registry */
474 SPIBoolean SPI_registerGlobalEventListener (
475 AccessibleEventListener *listener,
476 const char *eventType);
477 SPIBoolean SPI_deregisterGlobalEventListener (
478 AccessibleEventListener *listener,
479 const char *eventType);
480 SPIBoolean SPI_deregisterGlobalEventListenerAll (
481 AccessibleEventListener *listener);
482 SPIBoolean SPI_registerAccessibleKeystrokeListener (
483 AccessibleKeystrokeListener *listener,
484 AccessibleKeySet *keys,
485 AccessibleKeyMaskType modmask,
486 AccessibleKeyEventMask eventmask,
487 AccessibleKeyListenerSyncType sync_type);
488 SPIBoolean SPI_deregisterAccessibleKeystrokeListener (
489 AccessibleKeystrokeListener *listener,
490 AccessibleKeyMaskType modmask);
492 SPIBoolean SPI_registerDeviceEventListener (
493 AccessibleDeviceListener *listener,
494 AccessibleDeviceEventMask eventmask,
496 SPIBoolean SPI_deregisterDeviceEventListener (
497 AccessibleDeviceListener *listener,
500 int SPI_getDesktopCount (void);
501 Accessible *SPI_getDesktop (int i);
502 int SPI_getDesktopList (Accessible ***desktop_list);
503 void SPI_freeDesktopList (Accessible **desktop_list);
505 SPIBoolean SPI_generateKeyboardEvent (long int keyval,
507 AccessibleKeySynthType synth_type);
509 SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
511 /* Accessible function prototypes */
513 void Accessible_ref (Accessible *obj);
514 void Accessible_unref (Accessible *obj);
515 char * Accessible_getName (Accessible *obj);
516 char * Accessible_getDescription (Accessible *obj);
517 Accessible * Accessible_getParent (Accessible *obj);
518 long Accessible_getChildCount (Accessible *obj);
519 Accessible * Accessible_getChildAtIndex (Accessible *obj,
520 long int childIndex);
521 long Accessible_getIndexInParent (Accessible *obj);
522 AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
523 AccessibleRole Accessible_getRole (Accessible *obj);
524 char * Accessible_getRoleName (Accessible *obj);
525 char * Accessible_getLocalizedRoleName (Accessible *obj);
526 AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
527 AccessibleAttributeSet *Accessible_getAttributes (Accessible *obj);
528 AccessibleApplication *Accessible_getHostApplication (Accessible *obj);
530 /* Interface query methods */
532 SPIBoolean Accessible_isAction (Accessible *obj);
533 SPIBoolean Accessible_isApplication (Accessible *obj);
534 SPIBoolean Accessible_isComponent (Accessible *obj);
535 SPIBoolean Accessible_isDocument (Accessible *obj);
536 SPIBoolean Accessible_isEditableText (Accessible *obj);
537 SPIBoolean Accessible_isHypertext (Accessible *obj);
538 SPIBoolean Accessible_isImage (Accessible *obj);
539 SPIBoolean Accessible_isSelection (Accessible *obj);
540 SPIBoolean Accessible_isStreamableContent (Accessible *obj);
541 SPIBoolean Accessible_isTable (Accessible *obj);
542 SPIBoolean Accessible_isText (Accessible *obj);
543 SPIBoolean Accessible_isValue (Accessible *obj);
545 AccessibleAction * Accessible_getAction (Accessible *obj);
546 AccessibleApplication * Accessible_getApplication (Accessible *obj);
547 AccessibleComponent * Accessible_getComponent (Accessible *obj);
548 AccessibleDocument * Accessible_getDocument (Accessible *obj);
549 AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
550 AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
551 AccessibleImage * Accessible_getImage (Accessible *obj);
552 AccessibleSelection * Accessible_getSelection (Accessible *obj);
553 AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
554 AccessibleTable * Accessible_getTable (Accessible *obj);
555 AccessibleText * Accessible_getText (Accessible *obj);
556 AccessibleValue * Accessible_getValue (Accessible *obj);
557 AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
558 const char *interface_name);
560 /* AccessibleAction function prototypes */
562 void AccessibleAction_ref (AccessibleAction *obj);
563 void AccessibleAction_unref (AccessibleAction *obj);
564 long AccessibleAction_getNActions (AccessibleAction *obj);
565 char *AccessibleAction_getName (AccessibleAction *obj,
567 char *AccessibleAction_getDescription (AccessibleAction *obj,
569 SPIBoolean AccessibleAction_doAction (AccessibleAction *obj,
571 char *AccessibleAction_getKeyBinding (AccessibleAction *obj,
574 /* AccessibleApplication function prototypes */
576 void AccessibleApplication_ref (AccessibleApplication *obj);
577 void AccessibleApplication_unref (AccessibleApplication *obj);
578 char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
579 char *AccessibleApplication_getVersion (AccessibleApplication *obj);
580 long AccessibleApplication_getID (AccessibleApplication *obj);
581 char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
582 SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
583 SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
585 /* AccessibleComponent function prototypes */
587 void AccessibleComponent_ref (AccessibleComponent *obj);
588 void AccessibleComponent_unref (AccessibleComponent *obj);
589 SPIBoolean AccessibleComponent_contains (AccessibleComponent *obj,
592 AccessibleCoordType ctype);
593 Accessible *AccessibleComponent_getAccessibleAtPoint (
594 AccessibleComponent *obj,
597 AccessibleCoordType ctype);
598 void AccessibleComponent_getExtents (AccessibleComponent *obj,
603 AccessibleCoordType ctype);
604 void AccessibleComponent_getPosition (AccessibleComponent *obj,
607 AccessibleCoordType ctype);
608 void AccessibleComponent_getSize (AccessibleComponent *obj,
611 AccessibleComponentLayer
612 AccessibleComponent_getLayer (AccessibleComponent *obj);
613 SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
614 short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
615 double AccessibleComponent_getAlpha (AccessibleComponent *obj);
617 /* AccessibleDocument function prototypes */
619 void AccessibleDocument_ref (AccessibleDocument *obj);
620 void AccessibleDocument_unref (AccessibleDocument *obj);
621 char *AccessibleDocument_getLocale (AccessibleDocument *obj);
622 char *AccessibleDocument_getAttributeValue (AccessibleDocument *obj,
624 AccessibleAttributeSet *AccessibleDocument_getAttributes (AccessibleDocument *obj);
626 /* AccessibleEditableText function prototypes */
629 AccessibleEditableText_ref (AccessibleEditableText *obj);
632 AccessibleEditableText_unref (AccessibleEditableText *obj);
635 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
636 const char *attributes,
637 long int startOffset,
641 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
642 const char *newContents);
645 AccessibleEditableText_insertText (AccessibleEditableText *obj,
651 AccessibleEditableText_copyText (AccessibleText *obj,
656 AccessibleEditableText_cutText (AccessibleEditableText *obj,
661 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
666 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
671 * AccessibleHyperlink function prototypes
675 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
677 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
680 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
683 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
687 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
691 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
692 long int *startIndex,
696 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
700 * AccessibleHypertext function prototypes
705 AccessibleHypertext_ref (AccessibleHypertext *obj);
708 AccessibleHypertext_unref (AccessibleHypertext *obj);
711 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
713 AccessibleHyperlink *
714 AccessibleHypertext_getLink (AccessibleHypertext *obj,
718 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
719 long int characterOffset);
723 * AccessibleImage function prototypes
728 AccessibleImage_ref (AccessibleImage *obj);
731 AccessibleImage_unref (AccessibleImage *obj);
734 AccessibleImage_getImageDescription (AccessibleImage *obj);
737 AccessibleImage_getImageSize (AccessibleImage *obj,
742 AccessibleImage_getImagePosition (AccessibleImage *obj,
745 AccessibleCoordType ctype);
748 AccessibleImage_getImageExtents (AccessibleImage *obj,
753 AccessibleCoordType ctype);
755 AccessibleImage_getImageLocale (AccessibleImage *obj);
759 * AccessibleRelation function prototypes
763 void AccessibleRelation_ref (AccessibleRelation *obj);
764 void AccessibleRelation_unref (AccessibleRelation *obj);
766 AccessibleRelationType
767 AccessibleRelation_getRelationType (AccessibleRelation *obj);
770 AccessibleRelation_getNTargets (AccessibleRelation *obj);
773 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
778 * AccessibleSelection function prototypes
782 void AccessibleSelection_ref (AccessibleSelection *obj);
783 void AccessibleSelection_unref (AccessibleSelection *obj);
786 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
789 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
790 long int selectedChildIndex);
793 AccessibleSelection_selectChild (AccessibleSelection *obj,
794 long int childIndex);
797 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
798 long int selectedChildIndex);
801 AccessibleSelection_deselectChild (AccessibleSelection *obj,
802 long int childIndex);
805 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
806 long int childIndex);
809 AccessibleSelection_selectAll (AccessibleSelection *obj);
812 AccessibleSelection_clearSelection (AccessibleSelection *obj);
817 * AccessibleStateSet function prototypes
821 void AccessibleStateSet_ref (AccessibleStateSet *obj);
822 void AccessibleStateSet_unref (AccessibleStateSet *obj);
825 AccessibleStateSet_contains (AccessibleStateSet *obj,
826 AccessibleState state);
829 AccessibleStateSet_add (AccessibleStateSet *obj,
830 AccessibleState state);
833 AccessibleStateSet_remove (AccessibleStateSet *obj,
834 AccessibleState state);
837 AccessibleStateSet_equals (AccessibleStateSet *obj,
838 AccessibleStateSet *obj2);
841 AccessibleStateSet_compare (AccessibleStateSet *obj,
842 AccessibleStateSet *obj2);
845 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
848 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
850 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
852 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
855 AccessibleStreamableContent_freeContentTypesList (AccessibleStreamableContent *obj,
856 char **content_types);
857 #define AccessibleStreamableContent_freeContentTypeList(a, b) AccessibleStreamableContent_freeContentTypesList(a,b)
860 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
861 const char *content_type);
863 AccessibleStreamableContent_close (AccessibleStreamableContent *obj);
866 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
868 AccessibleStreamableContentSeekType seek_type);
870 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
873 unsigned int read_type);
876 * AccessibleTable function prototypes
880 void AccessibleTable_ref (AccessibleTable *obj);
881 void AccessibleTable_unref (AccessibleTable *obj);
884 AccessibleTable_getCaption (AccessibleTable *obj);
887 AccessibleTable_getSummary (AccessibleTable *obj);
890 AccessibleTable_getNRows (AccessibleTable *obj);
893 AccessibleTable_getNColumns (AccessibleTable *obj);
896 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
901 AccessibleTable_getIndexAt (AccessibleTable *obj,
906 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
910 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
914 AccessibleTable_getRowDescription (AccessibleTable *obj,
918 AccessibleTable_getColumnDescription (AccessibleTable *obj,
922 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
927 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
932 AccessibleTable_getRowColumnExtentsAtIndex (AccessibleTable *obj,
933 long int index, long int *row, long int *col,
934 long int *row_extents, long int *col_extents,
935 long int *is_selected);
938 AccessibleTable_getRowHeader (AccessibleTable *obj,
942 AccessibleTable_getColumnHeader (AccessibleTable *obj,
946 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
949 AccessibleTable_getSelectedRows (AccessibleTable *obj,
950 long int **selectedRows);
953 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
956 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
957 long int **selectedColumns);
960 AccessibleTable_isRowSelected (AccessibleTable *obj,
964 AccessibleTable_isColumnSelected (AccessibleTable *obj,
968 AccessibleTable_isSelected (AccessibleTable *obj,
973 AccessibleTable_addRowSelection (AccessibleTable *obj,
976 AccessibleTable_addColumnSelection (AccessibleTable *obj,
980 AccessibleTable_removeRowSelection (AccessibleTable *obj,
983 AccessibleTable_removeColumnSelection (AccessibleTable *obj,
988 * AccessibleText function prototypes
992 void AccessibleText_ref (AccessibleText *obj);
993 void AccessibleText_unref (AccessibleText *obj);
996 AccessibleText_getCharacterCount (AccessibleText *obj);
999 AccessibleText_getText (AccessibleText *obj,
1000 long int startOffset,
1001 long int endOffset);
1004 AccessibleText_getCaretOffset (AccessibleText *obj);
1007 AccessibleText_getAttributes (AccessibleText *obj,
1009 long int *startOffset,
1010 long int *endOffset);
1013 AccessibleText_getDefaultAttributes (AccessibleText *obj);
1016 AccessibleText_setCaretOffset (AccessibleText *obj,
1017 long int newOffset);
1020 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
1022 AccessibleTextBoundaryType type,
1023 long int *startOffset,
1024 long int *endOffset);
1027 AccessibleText_getTextAtOffset (AccessibleText *obj,
1029 AccessibleTextBoundaryType type,
1030 long int *startOffset,
1031 long int *endOffset);
1034 AccessibleText_getTextAfterOffset (AccessibleText *obj,
1036 AccessibleTextBoundaryType type,
1037 long int *startOffset,
1038 long int *endOffset);
1041 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1045 AccessibleText_getCharacterExtents (AccessibleText *obj,
1051 AccessibleCoordType type);
1054 AccessibleText_getRangeExtents (AccessibleText *obj,
1055 long int startOffset,
1061 AccessibleCoordType type);
1063 AccessibleTextRange **
1064 AccessibleText_getBoundedRanges (AccessibleText *obj,
1069 AccessibleCoordType type,
1070 AccessibleTextClipType clipTypeX,
1071 AccessibleTextClipType clipTypeY);
1074 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges);
1077 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1080 AccessibleCoordType type);
1083 AccessibleText_getNSelections (AccessibleText *obj);
1086 AccessibleText_getSelection (AccessibleText *obj,
1087 long int selectionNum,
1088 long int *startOffset,
1089 long int *endOffset);
1093 AccessibleText_addSelection (AccessibleText *obj,
1094 long int startOffset,
1095 long int endOffset);
1098 AccessibleText_removeSelection (AccessibleText *obj,
1099 long int selectionNum);
1102 AccessibleText_setSelection (AccessibleText *obj,
1103 long int selectionNum,
1104 long int startOffset,
1105 long int endOffset);
1106 AccessibleAttributeSet *
1107 AccessibleText_getAttributeRun (AccessibleText *obj,
1109 long int *startOffset,
1110 long int *endOffset,
1111 long int includeDefaults);
1112 AccessibleAttributeSet *
1113 AccessibleText_getDefaultAttributeSet (AccessibleText *obj);
1115 /* AccessibleValue Function Prototypes: */
1117 void AccessibleValue_ref (AccessibleValue *obj);
1118 void AccessibleValue_unref (AccessibleValue *obj);
1119 double AccessibleValue_getMinimumValue (AccessibleValue *obj);
1120 double AccessibleValue_getCurrentValue (AccessibleValue *obj);
1121 double AccessibleValue_getMaximumValue (AccessibleValue *obj);
1122 SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
1124 double AccessibleValue_getMinimumIncrement (AccessibleValue *obj);
1126 /* Persistance and lifecycle control for AccessibleEvents. */
1127 SPIBoolean AccessibleEvent_ref (const AccessibleEvent *e);
1128 void AccessibleEvent_unref (const AccessibleEvent *e);
1131 * Prototypes for accessor functions, to obtain context
1132 * information for accessible events.
1135 char* AccessibleEvent_getSourceName (const AccessibleEvent *e);
1136 AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e);
1137 AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEvent *e);
1138 SPIBoolean AccessibleEvent_getSourceDetails (const AccessibleEvent *e, char **name,
1139 AccessibleRole *role,
1140 AccessibleApplication **app);
1142 char* AccessibleTextChangedEvent_getChangeString (const AccessibleEvent *e);
1143 Accessible * AccessibleChildChangedEvent_getChildAccessible (const AccessibleEvent *e);
1145 Accessible * AccessibleParentChangedEvent_getParentAccessible (const AccessibleEvent *e);
1147 char* AccessibleTextSelectionChangedEvent_getSelectionString (const AccessibleEvent *e);
1149 char* AccessibleWindowEvent_getTitleString (const AccessibleEvent *e);
1151 Accessible * AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e);
1153 Accessible * AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e);
1155 Accessible * AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e);
1157 char * AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e);
1159 char * AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1161 char * AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1163 char * AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1165 char * AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e);
1166 SPIRect * AccessibleBoundsChangedEvent_getNewBounds (const AccessibleEvent *e);
1168 /* Misc methods and error handling */
1169 void SPI_freeString (char *s);
1171 char* SPI_dupString (char *s);
1173 void SPI_freeRect (SPIRect *r);
1175 SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
1177 SPIExceptionHandler* SPI_exceptionHandlerPop (void);
1179 SPIExceptionType SPIException_getSourceType (SPIException *err);
1181 SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
1183 Accessible* SPIAccessibleException_getSource (SPIException *err);
1185 char* SPIException_getDescription (SPIException *err);