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 /* Basic SPI initialization and event loop function prototypes */
407 void SPI_event_main (void);
408 void SPI_event_quit (void);
409 SPIBoolean SPI_eventIsReady (void);
410 AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
413 /* Event Listener creation and support. */
415 void SPI_freeAccessibleKeySet (
416 AccessibleKeySet *keyset);
417 AccessibleKeySet * SPI_createAccessibleKeySet (
421 const char **keystrings);
422 AccessibleEventListener * SPI_createAccessibleEventListener (
423 AccessibleEventListenerCB callback,
425 SPIBoolean AccessibleEventListener_addCallback (
426 AccessibleEventListener *listener,
427 AccessibleEventListenerCB callback,
429 SPIBoolean AccessibleEventListener_removeCallback (
430 AccessibleEventListener *listener,
431 AccessibleEventListenerCB callback);
432 void AccessibleEventListener_unref (
433 AccessibleEventListener *listener);
435 /* Device Event Listener creation and support. */
437 /* First four are deprecated in favor of the last four; really just a re-name */
439 AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener (
440 AccessibleKeystrokeListenerCB callback,
442 SPIBoolean AccessibleKeystrokeListener_addCallback (
443 AccessibleKeystrokeListener *listener,
444 AccessibleKeystrokeListenerCB callback,
446 SPIBoolean AccessibleKeystrokeListener_removeCallback (
447 AccessibleKeystrokeListener *listener,
448 AccessibleKeystrokeListenerCB callback);
449 void AccessibleKeystrokeListener_unref (
450 AccessibleKeystrokeListener *listener);
452 AccessibleDeviceListener * SPI_createAccessibleDeviceListener (
453 AccessibleDeviceListenerCB callback,
455 SPIBoolean AccessibleDeviceListener_addCallback (
456 AccessibleDeviceListener *listener,
457 AccessibleDeviceListenerCB callback,
459 SPIBoolean AccessibleDeviceListener_removeCallback (
460 AccessibleDeviceListener *listener,
461 AccessibleDeviceListenerCB callback);
462 void AccessibleDeviceListener_unref (
463 AccessibleDeviceListener *listener);
465 /* Global functions serviced by the registry */
467 SPIBoolean SPI_registerGlobalEventListener (
468 AccessibleEventListener *listener,
469 const char *eventType);
470 SPIBoolean SPI_deregisterGlobalEventListener (
471 AccessibleEventListener *listener,
472 const char *eventType);
473 SPIBoolean SPI_deregisterGlobalEventListenerAll (
474 AccessibleEventListener *listener);
475 SPIBoolean SPI_registerAccessibleKeystrokeListener (
476 AccessibleKeystrokeListener *listener,
477 AccessibleKeySet *keys,
478 AccessibleKeyMaskType modmask,
479 AccessibleKeyEventMask eventmask,
480 AccessibleKeyListenerSyncType sync_type);
481 SPIBoolean SPI_deregisterAccessibleKeystrokeListener (
482 AccessibleKeystrokeListener *listener,
483 AccessibleKeyMaskType modmask);
485 SPIBoolean SPI_registerDeviceEventListener (
486 AccessibleDeviceListener *listener,
487 AccessibleDeviceEventMask eventmask,
489 SPIBoolean SPI_deregisterDeviceEventListener (
490 AccessibleDeviceListener *listener,
493 int SPI_getDesktopCount (void);
494 Accessible *SPI_getDesktop (int i);
495 int SPI_getDesktopList (Accessible ***desktop_list);
496 void SPI_freeDesktopList (Accessible **desktop_list);
498 SPIBoolean SPI_generateKeyboardEvent (long int keyval,
500 AccessibleKeySynthType synth_type);
502 SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
504 /* Accessible function prototypes */
506 void Accessible_ref (Accessible *obj);
507 void Accessible_unref (Accessible *obj);
508 char * Accessible_getName (Accessible *obj);
509 char * Accessible_getDescription (Accessible *obj);
510 Accessible * Accessible_getParent (Accessible *obj);
511 long Accessible_getChildCount (Accessible *obj);
512 Accessible * Accessible_getChildAtIndex (Accessible *obj,
513 long int childIndex);
514 long Accessible_getIndexInParent (Accessible *obj);
515 AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
516 AccessibleRole Accessible_getRole (Accessible *obj);
517 char * Accessible_getRoleName (Accessible *obj);
518 char * Accessible_getLocalizedRoleName (Accessible *obj);
519 AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
520 AccessibleAttributeSet *Accessible_getAttributes (Accessible *obj);
521 AccessibleApplication *Accessible_getHostApplication (Accessible *obj);
523 /* Interface query methods */
525 SPIBoolean Accessible_isAction (Accessible *obj);
526 SPIBoolean Accessible_isApplication (Accessible *obj);
527 SPIBoolean Accessible_isComponent (Accessible *obj);
528 SPIBoolean Accessible_isDocument (Accessible *obj);
529 SPIBoolean Accessible_isEditableText (Accessible *obj);
530 SPIBoolean Accessible_isHypertext (Accessible *obj);
531 SPIBoolean Accessible_isImage (Accessible *obj);
532 SPIBoolean Accessible_isSelection (Accessible *obj);
533 SPIBoolean Accessible_isStreamableContent (Accessible *obj);
534 SPIBoolean Accessible_isTable (Accessible *obj);
535 SPIBoolean Accessible_isText (Accessible *obj);
536 SPIBoolean Accessible_isValue (Accessible *obj);
538 AccessibleAction * Accessible_getAction (Accessible *obj);
539 AccessibleApplication * Accessible_getApplication (Accessible *obj);
540 AccessibleComponent * Accessible_getComponent (Accessible *obj);
541 AccessibleDocument * Accessible_getDocument (Accessible *obj);
542 AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
543 AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
544 AccessibleImage * Accessible_getImage (Accessible *obj);
545 AccessibleSelection * Accessible_getSelection (Accessible *obj);
546 AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
547 AccessibleTable * Accessible_getTable (Accessible *obj);
548 AccessibleText * Accessible_getText (Accessible *obj);
549 AccessibleValue * Accessible_getValue (Accessible *obj);
550 AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
551 const char *interface_name);
553 /* AccessibleAction function prototypes */
555 void AccessibleAction_ref (AccessibleAction *obj);
556 void AccessibleAction_unref (AccessibleAction *obj);
557 long AccessibleAction_getNActions (AccessibleAction *obj);
558 char *AccessibleAction_getName (AccessibleAction *obj,
560 char *AccessibleAction_getDescription (AccessibleAction *obj,
562 SPIBoolean AccessibleAction_doAction (AccessibleAction *obj,
564 char *AccessibleAction_getKeyBinding (AccessibleAction *obj,
567 /* AccessibleApplication function prototypes */
569 void AccessibleApplication_ref (AccessibleApplication *obj);
570 void AccessibleApplication_unref (AccessibleApplication *obj);
571 char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
572 char *AccessibleApplication_getVersion (AccessibleApplication *obj);
573 long AccessibleApplication_getID (AccessibleApplication *obj);
574 char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
575 SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
576 SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
578 /* AccessibleComponent function prototypes */
580 void AccessibleComponent_ref (AccessibleComponent *obj);
581 void AccessibleComponent_unref (AccessibleComponent *obj);
582 SPIBoolean AccessibleComponent_contains (AccessibleComponent *obj,
585 AccessibleCoordType ctype);
586 Accessible *AccessibleComponent_getAccessibleAtPoint (
587 AccessibleComponent *obj,
590 AccessibleCoordType ctype);
591 void AccessibleComponent_getExtents (AccessibleComponent *obj,
596 AccessibleCoordType ctype);
597 void AccessibleComponent_getPosition (AccessibleComponent *obj,
600 AccessibleCoordType ctype);
601 void AccessibleComponent_getSize (AccessibleComponent *obj,
604 AccessibleComponentLayer
605 AccessibleComponent_getLayer (AccessibleComponent *obj);
606 SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
607 short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
608 double AccessibleComponent_getAlpha (AccessibleComponent *obj);
610 /* AccessibleDocument function prototypes */
612 void AccessibleDocument_ref (AccessibleDocument *obj);
613 void AccessibleDocument_unref (AccessibleDocument *obj);
614 char *AccessibleDocument_getLocale (AccessibleDocument *obj);
615 char *AccessibleDocument_getAttributeValue (AccessibleDocument *obj,
617 AccessibleAttributeSet *AccessibleDocument_getAttributes (AccessibleDocument *obj);
619 /* AccessibleEditableText function prototypes */
622 AccessibleEditableText_ref (AccessibleEditableText *obj);
625 AccessibleEditableText_unref (AccessibleEditableText *obj);
628 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
629 const char *attributes,
630 long int startOffset,
634 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
635 const char *newContents);
638 AccessibleEditableText_insertText (AccessibleEditableText *obj,
644 AccessibleEditableText_copyText (AccessibleText *obj,
649 AccessibleEditableText_cutText (AccessibleEditableText *obj,
654 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
659 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
664 * AccessibleHyperlink function prototypes
668 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
670 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
673 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
676 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
680 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
684 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
685 long int *startIndex,
689 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
693 * AccessibleHypertext function prototypes
698 AccessibleHypertext_ref (AccessibleHypertext *obj);
701 AccessibleHypertext_unref (AccessibleHypertext *obj);
704 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
706 AccessibleHyperlink *
707 AccessibleHypertext_getLink (AccessibleHypertext *obj,
711 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
712 long int characterOffset);
716 * AccessibleImage function prototypes
721 AccessibleImage_ref (AccessibleImage *obj);
724 AccessibleImage_unref (AccessibleImage *obj);
727 AccessibleImage_getImageDescription (AccessibleImage *obj);
730 AccessibleImage_getImageSize (AccessibleImage *obj,
735 AccessibleImage_getImagePosition (AccessibleImage *obj,
738 AccessibleCoordType ctype);
741 AccessibleImage_getImageExtents (AccessibleImage *obj,
746 AccessibleCoordType ctype);
748 AccessibleImage_getImageLocale (AccessibleImage *obj);
752 * AccessibleRelation function prototypes
756 void AccessibleRelation_ref (AccessibleRelation *obj);
757 void AccessibleRelation_unref (AccessibleRelation *obj);
759 AccessibleRelationType
760 AccessibleRelation_getRelationType (AccessibleRelation *obj);
763 AccessibleRelation_getNTargets (AccessibleRelation *obj);
766 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
771 * AccessibleSelection function prototypes
775 void AccessibleSelection_ref (AccessibleSelection *obj);
776 void AccessibleSelection_unref (AccessibleSelection *obj);
779 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
782 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
783 long int selectedChildIndex);
786 AccessibleSelection_selectChild (AccessibleSelection *obj,
787 long int childIndex);
790 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
791 long int selectedChildIndex);
794 AccessibleSelection_deselectChild (AccessibleSelection *obj,
795 long int childIndex);
798 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
799 long int childIndex);
802 AccessibleSelection_selectAll (AccessibleSelection *obj);
805 AccessibleSelection_clearSelection (AccessibleSelection *obj);
810 * AccessibleStateSet function prototypes
814 void AccessibleStateSet_ref (AccessibleStateSet *obj);
815 void AccessibleStateSet_unref (AccessibleStateSet *obj);
818 AccessibleStateSet_contains (AccessibleStateSet *obj,
819 AccessibleState state);
822 AccessibleStateSet_add (AccessibleStateSet *obj,
823 AccessibleState state);
826 AccessibleStateSet_remove (AccessibleStateSet *obj,
827 AccessibleState state);
830 AccessibleStateSet_equals (AccessibleStateSet *obj,
831 AccessibleStateSet *obj2);
834 AccessibleStateSet_compare (AccessibleStateSet *obj,
835 AccessibleStateSet *obj2);
838 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
841 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
843 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
845 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
848 AccessibleStreamableContent_freeContentTypesList (AccessibleStreamableContent *obj,
849 char **content_types);
850 #define AccessibleStreamableContent_freeContentTypeList(a, b) AccessibleStreamableContent_freeContentTypesList(a,b)
853 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
854 const char *content_type);
856 AccessibleStreamableContent_close (AccessibleStreamableContent *obj);
859 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
861 AccessibleStreamableContentSeekType seek_type);
863 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
866 unsigned int read_type);
869 * AccessibleTable function prototypes
873 void AccessibleTable_ref (AccessibleTable *obj);
874 void AccessibleTable_unref (AccessibleTable *obj);
877 AccessibleTable_getCaption (AccessibleTable *obj);
880 AccessibleTable_getSummary (AccessibleTable *obj);
883 AccessibleTable_getNRows (AccessibleTable *obj);
886 AccessibleTable_getNColumns (AccessibleTable *obj);
889 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
894 AccessibleTable_getIndexAt (AccessibleTable *obj,
899 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
903 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
907 AccessibleTable_getRowDescription (AccessibleTable *obj,
911 AccessibleTable_getColumnDescription (AccessibleTable *obj,
915 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
920 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
925 AccessibleTable_getRowColumnExtentsAtIndex (AccessibleTable *obj,
926 long int index, long int *row, long int *col,
927 long int *row_extents, long int *col_extents,
928 long int *is_selected);
931 AccessibleTable_getRowHeader (AccessibleTable *obj,
935 AccessibleTable_getColumnHeader (AccessibleTable *obj,
939 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
942 AccessibleTable_getSelectedRows (AccessibleTable *obj,
943 long int **selectedRows);
946 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
949 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
950 long int **selectedColumns);
953 AccessibleTable_isRowSelected (AccessibleTable *obj,
957 AccessibleTable_isColumnSelected (AccessibleTable *obj,
961 AccessibleTable_isSelected (AccessibleTable *obj,
966 AccessibleTable_addRowSelection (AccessibleTable *obj,
969 AccessibleTable_addColumnSelection (AccessibleTable *obj,
973 AccessibleTable_removeRowSelection (AccessibleTable *obj,
976 AccessibleTable_removeColumnSelection (AccessibleTable *obj,
981 * AccessibleText function prototypes
985 void AccessibleText_ref (AccessibleText *obj);
986 void AccessibleText_unref (AccessibleText *obj);
989 AccessibleText_getCharacterCount (AccessibleText *obj);
992 AccessibleText_getText (AccessibleText *obj,
993 long int startOffset,
997 AccessibleText_getCaretOffset (AccessibleText *obj);
1000 AccessibleText_getAttributes (AccessibleText *obj,
1002 long int *startOffset,
1003 long int *endOffset);
1006 AccessibleText_getDefaultAttributes (AccessibleText *obj);
1009 AccessibleText_setCaretOffset (AccessibleText *obj,
1010 long int newOffset);
1013 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
1015 AccessibleTextBoundaryType type,
1016 long int *startOffset,
1017 long int *endOffset);
1020 AccessibleText_getTextAtOffset (AccessibleText *obj,
1022 AccessibleTextBoundaryType type,
1023 long int *startOffset,
1024 long int *endOffset);
1027 AccessibleText_getTextAfterOffset (AccessibleText *obj,
1029 AccessibleTextBoundaryType type,
1030 long int *startOffset,
1031 long int *endOffset);
1034 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1038 AccessibleText_getCharacterExtents (AccessibleText *obj,
1044 AccessibleCoordType type);
1047 AccessibleText_getRangeExtents (AccessibleText *obj,
1048 long int startOffset,
1054 AccessibleCoordType type);
1056 AccessibleTextRange **
1057 AccessibleText_getBoundedRanges (AccessibleText *obj,
1062 AccessibleCoordType type,
1063 AccessibleTextClipType clipTypeX,
1064 AccessibleTextClipType clipTypeY);
1067 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges);
1070 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1073 AccessibleCoordType type);
1076 AccessibleText_getNSelections (AccessibleText *obj);
1079 AccessibleText_getSelection (AccessibleText *obj,
1080 long int selectionNum,
1081 long int *startOffset,
1082 long int *endOffset);
1086 AccessibleText_addSelection (AccessibleText *obj,
1087 long int startOffset,
1088 long int endOffset);
1091 AccessibleText_removeSelection (AccessibleText *obj,
1092 long int selectionNum);
1095 AccessibleText_setSelection (AccessibleText *obj,
1096 long int selectionNum,
1097 long int startOffset,
1098 long int endOffset);
1099 AccessibleAttributeSet *
1100 AccessibleText_getAttributeRun (AccessibleText *obj,
1102 long int *startOffset,
1103 long int *endOffset,
1104 long int includeDefaults);
1105 AccessibleAttributeSet *
1106 AccessibleText_getDefaultAttributeSet (AccessibleText *obj);
1108 /* AccessibleValue Function Prototypes: */
1110 void AccessibleValue_ref (AccessibleValue *obj);
1111 void AccessibleValue_unref (AccessibleValue *obj);
1112 double AccessibleValue_getMinimumValue (AccessibleValue *obj);
1113 double AccessibleValue_getCurrentValue (AccessibleValue *obj);
1114 double AccessibleValue_getMaximumValue (AccessibleValue *obj);
1115 SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
1117 double AccessibleValue_getMinimumIncrement (AccessibleValue *obj);
1119 /* Persistance and lifecycle control for AccessibleEvents. */
1120 SPIBoolean AccessibleEvent_ref (const AccessibleEvent *e);
1121 void AccessibleEvent_unref (const AccessibleEvent *e);
1124 * Prototypes for accessor functions, to obtain context
1125 * information for accessible events.
1128 char* AccessibleEvent_getSourceName (const AccessibleEvent *e);
1129 AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e);
1130 AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEvent *e);
1131 SPIBoolean AccessibleEvent_getSourceDetails (const AccessibleEvent *e, char **name,
1132 AccessibleRole *role,
1133 AccessibleApplication **app);
1135 char* AccessibleTextChangedEvent_getChangeString (const AccessibleEvent *e);
1136 Accessible * AccessibleChildChangedEvent_getChildAccessible (const AccessibleEvent *e);
1138 Accessible * AccessibleParentChangedEvent_getParentAccessible (const AccessibleEvent *e);
1140 char* AccessibleTextSelectionChangedEvent_getSelectionString (const AccessibleEvent *e);
1142 char* AccessibleWindowEvent_getTitleString (const AccessibleEvent *e);
1144 Accessible * AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e);
1146 Accessible * AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e);
1148 Accessible * AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e);
1150 char * AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e);
1152 char * AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1154 char * AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1156 char * AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1158 char * AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e);
1159 SPIRect * AccessibleBoundsChangedEvent_getNewBounds (const AccessibleEvent *e);
1161 /* Misc methods and error handling */
1162 void SPI_freeString (char *s);
1164 char* SPI_dupString (char *s);
1166 void SPI_freeRect (SPIRect *r);
1168 SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
1170 SPIExceptionHandler* SPI_exceptionHandlerPop (void);
1172 SPIExceptionType SPIException_getSourceType (SPIException *err);
1174 SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
1176 Accessible* SPIAccessibleException_getSource (SPIException *err);
1178 char* SPIException_getDescription (SPIException *err);