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.
28 #include <spi-common/spi-types.h>
29 #include <cspi/spi-impl.h>
31 * Definitions for AccessibleRole, AccessibleState,
32 * and event listeners.
34 #include <cspi/spi-roletypes.h>
35 #include <cspi/spi-statetypes.h>
36 #include <cspi/spi-listener.h>
40 * Auxiliary typedefs and mask definitions
42 #include <spi-common/keymasks.h>
49 *AccessibleCollectionMatchType:
51 *@SPI_COLLECTION_MATCH_INVALID
52 *@SPI_COLLECTION_MATCH_ALL TRUE if all of the criteria are met
53 *@SPI_COLLECTION_MATCH_ANY TRUE if any of the criteria are met
54 *@SPI_COLLECTION_MATCH_NONE TRUE if none of the criteria are met
55 *@SPI_COLLECTION_MATCH_EMPTY Same as MATCH_ALL if the criteria is non-empty;
56 * for empty criteria this rule requires returned value to also have empty set.
57 *@SPI_COLLECTION_MATCH_LAST_DEFINED
62 SPI_COLLECTION_MATCH_INVALID,
63 SPI_COLLECTION_MATCH_ALL,
64 SPI_COLLECTION_MATCH_ANY,
65 SPI_COLLECTION_MATCH_NONE,
66 SPI_COLLECTION_MATCH_EMPTY,
67 SPI_COLLECTION_MATCH_LAST_DEFINED
68 }AccessibleCollectionMatchType;
72 *AccessibleTextBoundaryType:
73 *@SPI_TEXT_BOUNDARY_CHAR: Delimiter is the current character's bounds.
74 *@SPI_TEXT_BOUNDARY_CURSOR_POS: Delimiter is the current text caret position.
75 *@SPI_TEXT_BOUNDARY_WORD_START: Bounds run from the first character of a word to the first
76 * character of the following word (i.e. including trailing whitespace, if any) within the text object.
77 *@SPI_TEXT_BOUNDARY_WORD_END: Bounds run from the last character of a word to the last
78 * character of the following word (i.e. including leading whitespace) within the text object.
79 *@SPI_TEXT_BOUNDARY_SENTENCE_START: Bounds run from the first character of a sentence to the first
80 * character of the next sentence in the text object.
81 *@SPI_TEXT_BOUNDARY_SENTENCE_END: Bounds run from the last character of a sentence to the last
82 * character of the next sentence in the text object.
83 *@SPI_TEXT_BOUNDARY_LINE_START: Bounds span one line of text, with the line delimiter at the end of the
84 * bounds, if present, within the current text object.
85 *@SPI_TEXT_BOUNDARY_LINE_END: Bounds span one line of text, including a preceding line delimiter
86 * if present within the current text object.
87 *@SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE: Bounds span the run, relative to the specified offset and
88 * text accessor API rules, over which the attributes of the text object are invariant.
90 *Text boundary types used for specifying boundaries for regions of text.
94 SPI_TEXT_BOUNDARY_CHAR,
95 SPI_TEXT_BOUNDARY_CURSOR_POS,
96 SPI_TEXT_BOUNDARY_WORD_START,
97 SPI_TEXT_BOUNDARY_WORD_END,
98 SPI_TEXT_BOUNDARY_SENTENCE_START,
99 SPI_TEXT_BOUNDARY_SENTENCE_END,
100 SPI_TEXT_BOUNDARY_LINE_START,
101 SPI_TEXT_BOUNDARY_LINE_END,
102 SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE
103 } AccessibleTextBoundaryType;
106 *AccessibleTextClipType
107 *@SPI_TEXT_CLIP_NONE: No clipping to be done
108 *@SPI_TEXT_CLIP_MIN: Text clipped by min coordinate is omitted
109 *@SPI_TEXT_CLIP_MAX: Text clipped by max coordinate is omitted
110 *@SPI_TEXT_CLIP_BOTH: Only text fully within mix/max bound is retained
112 *Describes the type of clipping required.
120 } AccessibleTextClipType;
123 *AccessibleRelationType:
124 *@SPI_RELATION_NULL: Not used, this is an invalid value for this enumeration.
125 *@SPI_RELATION_LABEL_FOR: Indicates an object is a label for one or more target objects.
126 *@SPI_RELATION_LABELED_BY: Indicates an object is labelled by one or more target objects.
127 *@SPI_RELATION_CONTROLLED_BY: Indicates an object controlled by one or more target objects.
128 *@SPI_RELATION_CONTROLLER_FOR: Indicates an object is an controller for one or more target objects.
129 *@SPI_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or
131 *@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.
132 *@SPI_RELATION_EXTENDED: This value indicates that a relation other than those pre-specified by this version of AT-SPI
134 *@SPI_RELATION_FLOWS_TO: Indicates that the object has content that flows logically to another
135 * AtkObject in a sequential way, (for instance text-flow).
136 *@SPI_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
137 * another AtkObject in a sequential way, (for instance text-flow).
138 *@SPI_RELATION_SUBWINDOW_OF: Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component.
139 *@SPI_RELATION_EMBEDS: Indicates that the object visually embeds
140 * another object's content, i.e. this object's content flows around
142 *@SPI_RELATION_EMBEDDED_BY: Inverse of %SPI_RELATION_EMBEDS, indicates that
143 * this object's content is visualy embedded in another object.
144 *@SPI_RELATION_POPUP_FOR: Indicates that an object is a popup for another object.
145 *@SPI_RELATION_PARENT_WINDOW_OF: Indicates that an object is a parent window of another object.
146 *@SPI_RELATION_DESCRIBED_BY: Indicates that another object provides descriptive information about this object; more verbose than %SPI_RELATION_LABELLED_BY.
147 *@SPI_RELATION_DESCRIPTION_FOR: Indicates that an object provides descriptive information about another object; more verbose than %SPI_RELATION_LABEL_FOR.
148 *@SPI_RELATION_LAST_DEFINED: Do not use, this is an implementation detail used
149 * to identify the size of this enumeration.
151 *Describes the type of the relation
156 SPI_RELATION_LABEL_FOR,
157 SPI_RELATION_LABELED_BY,
158 SPI_RELATION_CONTROLLER_FOR,
159 SPI_RELATION_CONTROLLED_BY,
160 SPI_RELATION_MEMBER_OF,
161 SPI_RELATION_NODE_CHILD_OF,
162 SPI_RELATION_EXTENDED,
163 SPI_RELATION_FLOWS_TO,
164 SPI_RELATION_FLOWS_FROM,
165 SPI_RELATION_SUBWINDOW_OF,
167 SPI_RELATION_EMBEDDED_BY,
168 SPI_RELATION_POPUP_FOR,
169 SPI_RELATION_PARENT_WINDOW_OF,
170 SPI_RELATION_DESCRIPTION_FOR,
171 SPI_RELATION_DESCRIBED_BY,
172 SPI_RELATION_LAST_DEFINED
173 } AccessibleRelationType;
176 /* don't change the order of these ! */
178 *AccessibleCoordType:
179 *@SPI_COORD_TYPE_SCREEN: specifies xy coordinates relative to the screen
180 *@SPI_COORD_TYPE_WINDOW: specifies xy coordinates relative to an object's
183 *Specifies how xy coordinates are to be interpreted. Used by functions such
184 *as AccessibleComponent_getPosition() and AccessibleText_getCharacterExtents()
187 SPI_COORD_TYPE_SCREEN,
188 SPI_COORD_TYPE_WINDOW
189 } AccessibleCoordType;
192 *AccessibleKeySynthType:
193 *@SPI_KEY_PRESS: Generates a keypress event (requires a subsequent #SPI_KEY_RELEASE event)
194 *@SPI_KEY_RELEASE: Generates a key-release event
195 *@SPI_KEY_PRESSRELEASE: Generates a key press/release event pair.
196 *@SPI_KEY_SYM: Injects a "keysym" event into the stream, as if a press/release pair occurred; allows
197 * the user to specify the key via its symbolic name, as opposed to simulating a hardware press of a
199 *@SPI_KEY_STRING: Injects one or more keysym events into the keyboard buffer, or directly inserts
200 * a string value into the currently focussed text widget, if the widgets supports this.
201 * #SPI_KEY_STRING synthesis provides a shortcut for text substring insertion, and also allows the
202 * insertion of text which is not currently available via the current keyboard's keymap.
204 * Specifies the type of a generated event.
209 SPI_KEY_PRESSRELEASE,
212 } AccessibleKeySynthType;
215 *AccessibleKeyListenerSyncType:
216 *@SPI_KEYLISTENER_NOSYNC: Events may be delivered asynchronously,
217 * which means in some cases they may already have been delivered to the
218 * application before the AT client receives the notification.
219 *@SPI_KEYLISTENER_SYNCHRONOUS: Events are delivered synchronously, before the
220 * currently focussed application sees them.
221 *@SPI_KEYLISTENER_CANCONSUME: Events may be consumed by the AT client. Presumes and
222 * requires #SPI_KEYLISTENER_SYNCHRONOUS, incompatible with #SPI_KEYLISTENER_NOSYNC.
223 *@SPI_KEYLISTENER_ALL_WINDOWS: Events are received not from the application toolkit layer, but
224 * from the device driver or windowing system subsystem; such notifications are 'global' in the
225 * sense that they are not broken or defeated by applications that participate poorly
226 * in the accessibility APIs, or not at all; however because of the intrusive nature of
227 * such snooping, it can have side-effects on certain older platforms. If unconditional
228 * event notifications, even when inaccessible or "broken" applications have focus, are not
229 * required, it may be best to avoid this enum value/flag.
231 *Specified the tyupe of a key listener event.
232 * Certain of the values above can and should be bitwise-'OR'ed
233 * together, observing the compatibility limitations specified in the description of
234 * each value. For instance, #SPI_KEYLISTENER_ALL_WINDOWS | #SPI_KEYLISTENER_CANCONSUME is
235 * a commonly used combination which gives the AT complete control over the delivery of matching
236 * events. However, such filters should be used sparingly as they may have a negative impact on
237 * system performance.
240 SPI_KEYLISTENER_NOSYNC = 0,
241 SPI_KEYLISTENER_SYNCHRONOUS = 1,
242 SPI_KEYLISTENER_CANCONSUME = 2,
243 SPI_KEYLISTENER_ALL_WINDOWS = 4
244 } AccessibleKeyListenerSyncType;
248 *AccessibleStreamableContentSeekType
249 *@SPI_STREAM_SEEK_SET: seek from the 'top' of the streamable
250 *@SPI_STREAM_SEEK_CUR: seek from the current position in the stream
251 *@SPI_STREAM_SEEK_END: seek from the end of the stream (if known)
253 *The seek type for a specified offset in AccessibleStreamableContent_seek.
260 } AccessibleStreamableContentSeekType;
270 * An opaque object encapsulating information about thrown exceptions.
272 typedef struct _SPIException SPIException;
275 * SPIExceptionHandler:
276 * @err: points to the SPIException opaque object.
277 * @is_fatal: indicates whether the exception is a fatal error or not.
279 * A function type for functions to be called when exceptions occur.
283 typedef SPIBoolean (*SPIExceptionHandler) (SPIException *err, SPIBoolean is_fatal);
287 * @SPI_EXCEPTION_UNSPECIFIED: An exception of unknown type, or which doesn't fit the other types.
288 * @SPI_EXCEPTION_DISCONNECT: Communication with the object or service has been disconnected;
289 * this usually means that the object or service has died or exited.
290 * @SPI_EXCEPTION_NO_IMPL: The object or service is missing the implementation for a request.
291 * @SPI_EXCEPTION_IO: The communications channel has become corrupted, blocked, or is otherwise in a bad state.
292 * @SPI_EXCEPTION_BAD_DATA: The data received or sent over the interface has been identified as
293 * improperly formatted or otherwise fails to match the expectations.
295 * Exception codes indicating what's gone wrong in an AT-SPI call.
298 SPI_EXCEPTION_UNSPECIFIED,
299 SPI_EXCEPTION_DISCONNECT,
300 SPI_EXCEPTION_NO_IMPL,
302 SPI_EXCEPTION_BAD_DATA
307 * @SPI_EXCEPTION_SOURCE_UNSPECIFIED: Don't know or can't tell where the problem is
308 * @SPI_EXCEPTION_SOURCE_ACCESSIBLE: The source of an event or query (i.e. an app) has thrown the exception.
309 * @SPI_EXCEPTION_SOURCE_REGISTRY: The AT-SPI registry has thrown the exception or cannot be reached.
310 * @SPI_EXCEPTION_SOURCE_DEVICE: The device event subsystem has encountered an error condition.
312 * The general source of the failure, i.e. whether the app, registry, or device system has encountered trouble.
315 SPI_EXCEPTION_SOURCE_UNSPECIFIED,
316 SPI_EXCEPTION_SOURCE_ACCESSIBLE,
317 SPI_EXCEPTION_SOURCE_REGISTRY,
318 SPI_EXCEPTION_SOURCE_DEVICE
321 typedef unsigned long AccessibleKeyEventMask;
322 typedef unsigned long AccessibleDeviceEventMask;
325 *AccessibleComponentLayer:
326 *@SPI_LAYER_INVALID: The layer cannot be determined or is somehow undefined.
327 *@SPI_LAYER_BACKGROUND: Component belongs to the destop background.
328 *@SPI_LAYER_CANVAS: Component is a canvas backdrop or drawing area.
329 *@SPI_LAYER_WIDGET: Component is a 'normal' widget.
330 *@SPI_LAYER_MDI: Component is drawn in the MDI layer and may have valid
331 * Z-information relative to other MDI-layer components.
332 *@SPI_LAYER_POPUP: Component is in the popup layer, above other widgets and
334 *@SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
336 *@SPI_LAYER_WINDOW: Component is in the window layer and have valid Z-information
337 * relative to other window-layer components.
338 *@SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
339 * should not be encountered.
341 * Describes the layer of a component.
343 * These enumerated "layer values" are used when determining which UI
344 * rendering layer a component is drawn into, which can help in making
345 * determinations of when components occlude one another.
349 SPI_LAYER_BACKGROUND,
356 SPI_LAYER_LAST_DEFINED
357 } AccessibleComponentLayer;
361 * AccessibleTextRange:
362 * @start: the first nominal character position within the range.
363 * @end: the first nominal character position following the range.
364 * @content: The actual text content between @start and @end, as a UTF-8 string.
366 * Structure which encapsulates a text range - must be associated with an
367 * AccessibleText-implementing object.
369 typedef struct _AccessibleTextRange
374 } AccessibleTextRange;
382 * Structure containing identifying information about a set of keycode or
385 typedef struct _AccessibleKeySet
387 unsigned long *keysyms;
388 unsigned short *keycodes;
394 * A special value for an AccessibleKeySet type, which tacitly
395 * includes all keycodes and keyvals for the specified modifier set.
397 #define SPI_KEYSET_ALL_KEYS NULL
399 typedef unsigned long AccessibleModifierMaskType;
401 *AccessibleKeyMaskType:
403 *AccessibleKeyMaskType is a mask which is a set of key event modifiers
404 *which is specified in SPI_registerAccessibleKeystrokeListener.
407 typedef AccessibleModifierMaskType AccessibleKeyMaskType;
409 typedef struct _AccessibleAttributeSet
413 } AccessibleAttributeSet;
415 typedef struct _AccessibleRoleSet
418 AccessibleRole *roles;
423 /* Basic SPI initialization and event loop function prototypes */
426 void SPI_event_main (void);
427 void SPI_event_quit (void);
428 SPIBoolean SPI_eventIsReady (void);
429 AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
432 /* Event Listener creation and support. */
434 void SPI_freeAccessibleKeySet (
435 AccessibleKeySet *keyset);
436 AccessibleKeySet * SPI_createAccessibleKeySet (
440 const char **keystrings);
441 AccessibleEventListener * SPI_createAccessibleEventListener (
442 AccessibleEventListenerCB callback,
444 SPIBoolean AccessibleEventListener_addCallback (
445 AccessibleEventListener *listener,
446 AccessibleEventListenerCB callback,
448 SPIBoolean AccessibleEventListener_removeCallback (
449 AccessibleEventListener *listener,
450 AccessibleEventListenerCB callback);
451 void AccessibleEventListener_unref (
452 AccessibleEventListener *listener);
454 /* Device Event Listener creation and support. */
456 /* First four are deprecated in favor of the last four; really just a re-name */
458 AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener (
459 AccessibleKeystrokeListenerCB callback,
461 SPIBoolean AccessibleKeystrokeListener_addCallback (
462 AccessibleKeystrokeListener *listener,
463 AccessibleKeystrokeListenerCB callback,
465 SPIBoolean AccessibleKeystrokeListener_removeCallback (
466 AccessibleKeystrokeListener *listener,
467 AccessibleKeystrokeListenerCB callback);
468 void AccessibleKeystrokeListener_unref (
469 AccessibleKeystrokeListener *listener);
471 AccessibleDeviceListener * SPI_createAccessibleDeviceListener (
472 AccessibleDeviceListenerCB callback,
474 SPIBoolean AccessibleDeviceListener_addCallback (
475 AccessibleDeviceListener *listener,
476 AccessibleDeviceListenerCB callback,
478 SPIBoolean AccessibleDeviceListener_removeCallback (
479 AccessibleDeviceListener *listener,
480 AccessibleDeviceListenerCB callback);
481 void AccessibleDeviceListener_unref (
482 AccessibleDeviceListener *listener);
484 /* Global functions serviced by the registry */
486 SPIBoolean SPI_registerGlobalEventListener (
487 AccessibleEventListener *listener,
488 const char *eventType);
489 SPIBoolean SPI_deregisterGlobalEventListener (
490 AccessibleEventListener *listener,
491 const char *eventType);
492 SPIBoolean SPI_deregisterGlobalEventListenerAll (
493 AccessibleEventListener *listener);
494 SPIBoolean SPI_registerAccessibleKeystrokeListener (
495 AccessibleKeystrokeListener *listener,
496 AccessibleKeySet *keys,
497 AccessibleKeyMaskType modmask,
498 AccessibleKeyEventMask eventmask,
499 AccessibleKeyListenerSyncType sync_type);
500 SPIBoolean SPI_deregisterAccessibleKeystrokeListener (
501 AccessibleKeystrokeListener *listener,
502 AccessibleKeyMaskType modmask);
504 SPIBoolean SPI_registerDeviceEventListener (
505 AccessibleDeviceListener *listener,
506 AccessibleDeviceEventMask eventmask,
508 SPIBoolean SPI_deregisterDeviceEventListener (
509 AccessibleDeviceListener *listener,
512 int SPI_getDesktopCount (void);
513 Accessible *SPI_getDesktop (int i);
514 int SPI_getDesktopList (Accessible ***desktop_list);
515 void SPI_freeDesktopList (Accessible **desktop_list);
517 SPIBoolean SPI_generateKeyboardEvent (long int keyval,
519 AccessibleKeySynthType synth_type);
521 SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
523 /* Accessible function prototypes */
525 void Accessible_ref (Accessible *obj);
526 void Accessible_unref (Accessible *obj);
527 char * Accessible_getName (Accessible *obj);
528 char * Accessible_getDescription (Accessible *obj);
529 Accessible * Accessible_getParent (Accessible *obj);
530 long Accessible_getChildCount (Accessible *obj);
531 Accessible * Accessible_getChildAtIndex (Accessible *obj,
532 long int childIndex);
533 long Accessible_getIndexInParent (Accessible *obj);
534 AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
535 AccessibleRole Accessible_getRole (Accessible *obj);
536 char * Accessible_getRoleName (Accessible *obj);
537 char * Accessible_getLocalizedRoleName (Accessible *obj);
538 AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
539 AccessibleAttributeSet *Accessible_getAttributes (Accessible *obj);
540 AccessibleApplication *Accessible_getHostApplication (Accessible *obj);
542 /* Interface query methods */
544 SPIBoolean Accessible_isAction (Accessible *obj);
545 SPIBoolean Accessible_isApplication (Accessible *obj);
546 SPIBoolean Accessible_isCollection (Accessible *obj);
547 SPIBoolean Accessible_isComponent (Accessible *obj);
548 SPIBoolean Accessible_isDocument (Accessible *obj);
549 SPIBoolean Accessible_isEditableText (Accessible *obj);
550 SPIBoolean Accessible_isHypertext (Accessible *obj);
551 SPIBoolean Accessible_isImage (Accessible *obj);
552 SPIBoolean Accessible_isMatchRule (Accessible *obj);
553 SPIBoolean Accessible_isSelection (Accessible *obj);
554 SPIBoolean Accessible_isStreamableContent (Accessible *obj);
555 SPIBoolean Accessible_isTable (Accessible *obj);
556 SPIBoolean Accessible_isText (Accessible *obj);
557 SPIBoolean Accessible_isValue (Accessible *obj);
559 AccessibleAction * Accessible_getAction (Accessible *obj);
560 AccessibleApplication * Accessible_getApplication (Accessible *obj);
561 AccessibleCollection * Accessible_getCollection (Accessible *obj);
562 AccessibleComponent * Accessible_getComponent (Accessible *obj);
563 AccessibleDocument * Accessible_getDocument (Accessible *obj);
564 AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
565 AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
566 AccessibleImage * Accessible_getImage (Accessible *obj);
567 AccessibleMatchRule * Accessible_getMatchRule (Accessible *obj);
568 AccessibleSelection * Accessible_getSelection (Accessible *obj);
569 AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
570 AccessibleTable * Accessible_getTable (Accessible *obj);
571 AccessibleText * Accessible_getText (Accessible *obj);
572 AccessibleValue * Accessible_getValue (Accessible *obj);
573 AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
574 const char *interface_name);
576 /* AccessibleAction function prototypes */
578 void AccessibleAction_ref (AccessibleAction *obj);
579 void AccessibleAction_unref (AccessibleAction *obj);
580 long AccessibleAction_getNActions (AccessibleAction *obj);
581 char *AccessibleAction_getName (AccessibleAction *obj,
583 char *AccessibleAction_getDescription (AccessibleAction *obj,
585 SPIBoolean AccessibleAction_doAction (AccessibleAction *obj,
587 char *AccessibleAction_getKeyBinding (AccessibleAction *obj,
590 /* AccessibleApplication function prototypes */
592 void AccessibleApplication_ref (AccessibleApplication *obj);
593 void AccessibleApplication_unref (AccessibleApplication *obj);
594 char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
595 char *AccessibleApplication_getVersion (AccessibleApplication *obj);
596 long AccessibleApplication_getID (AccessibleApplication *obj);
597 char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
598 SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
599 SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
601 /* AccessibleCollection function prototypes */
602 void AccessibleCollection_ref (AccessibleCollection *obj);
603 void AccessibleCollection_unref (AccessibleCollection *obj);
604 AccessibleMatchRule *
605 AccessibleCollection_createMatchRule (AccessibleCollection *obj,
606 AccessibleStateSet *states,
607 AccessibleCollectionMatchType statematchtype,
608 AccessibleAttributeSet *attributes,
609 AccessibleCollectionMatchType attributematchtype,
610 AccessibleRoleSet *roles,
611 AccessibleCollectionMatchType rolematchtype,
613 AccessibleCollectionMatchType interfacematchtype,
616 AccessibleCollection_freeMatchRule (AccessibleCollection *obj,
617 AccessibleMatchRule *matchrule);
618 /* AccessibleComponent function prototypes */
620 void AccessibleComponent_ref (AccessibleComponent *obj);
621 void AccessibleComponent_unref (AccessibleComponent *obj);
622 SPIBoolean AccessibleComponent_contains (AccessibleComponent *obj,
625 AccessibleCoordType ctype);
626 Accessible *AccessibleComponent_getAccessibleAtPoint (
627 AccessibleComponent *obj,
630 AccessibleCoordType ctype);
631 void AccessibleComponent_getExtents (AccessibleComponent *obj,
636 AccessibleCoordType ctype);
637 void AccessibleComponent_getPosition (AccessibleComponent *obj,
640 AccessibleCoordType ctype);
641 void AccessibleComponent_getSize (AccessibleComponent *obj,
644 AccessibleComponentLayer
645 AccessibleComponent_getLayer (AccessibleComponent *obj);
646 SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
647 short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
648 double AccessibleComponent_getAlpha (AccessibleComponent *obj);
650 /* AccessibleDocument function prototypes */
652 void AccessibleDocument_ref (AccessibleDocument *obj);
653 void AccessibleDocument_unref (AccessibleDocument *obj);
654 char *AccessibleDocument_getLocale (AccessibleDocument *obj);
655 char *AccessibleDocument_getAttributeValue (AccessibleDocument *obj,
657 AccessibleAttributeSet *AccessibleDocument_getAttributes (AccessibleDocument *obj);
659 /* AccessibleEditableText function prototypes */
662 AccessibleEditableText_ref (AccessibleEditableText *obj);
665 AccessibleEditableText_unref (AccessibleEditableText *obj);
668 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
669 const char *attributes,
670 long int startOffset,
674 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
675 const char *newContents);
678 AccessibleEditableText_insertText (AccessibleEditableText *obj,
684 AccessibleEditableText_copyText (AccessibleText *obj,
689 AccessibleEditableText_cutText (AccessibleEditableText *obj,
694 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
699 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
704 * AccessibleHyperlink function prototypes
708 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
710 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
713 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
716 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
720 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
724 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
725 long int *startIndex,
729 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
733 * AccessibleHypertext function prototypes
738 AccessibleHypertext_ref (AccessibleHypertext *obj);
741 AccessibleHypertext_unref (AccessibleHypertext *obj);
744 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
746 AccessibleHyperlink *
747 AccessibleHypertext_getLink (AccessibleHypertext *obj,
751 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
752 long int characterOffset);
756 * AccessibleImage function prototypes
761 AccessibleImage_ref (AccessibleImage *obj);
764 AccessibleImage_unref (AccessibleImage *obj);
767 AccessibleImage_getImageDescription (AccessibleImage *obj);
770 AccessibleImage_getImageSize (AccessibleImage *obj,
775 AccessibleImage_getImagePosition (AccessibleImage *obj,
778 AccessibleCoordType ctype);
781 AccessibleImage_getImageExtents (AccessibleImage *obj,
786 AccessibleCoordType ctype);
788 AccessibleImage_getImageLocale (AccessibleImage *obj);
792 * AccessibleMatchRule function prototypes
795 void AccessibleMatchRule_ref (AccessibleMatchRule *obj);
796 void AccessibleMatchRule_unref (AccessibleMatchRule *obj);
800 * AccessibleRelation function prototypes
804 void AccessibleRelation_ref (AccessibleRelation *obj);
805 void AccessibleRelation_unref (AccessibleRelation *obj);
807 AccessibleRelationType
808 AccessibleRelation_getRelationType (AccessibleRelation *obj);
811 AccessibleRelation_getNTargets (AccessibleRelation *obj);
814 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
819 * AccessibleSelection function prototypes
823 void AccessibleSelection_ref (AccessibleSelection *obj);
824 void AccessibleSelection_unref (AccessibleSelection *obj);
827 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
830 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
831 long int selectedChildIndex);
834 AccessibleSelection_selectChild (AccessibleSelection *obj,
835 long int childIndex);
838 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
839 long int selectedChildIndex);
842 AccessibleSelection_deselectChild (AccessibleSelection *obj,
843 long int childIndex);
846 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
847 long int childIndex);
850 AccessibleSelection_selectAll (AccessibleSelection *obj);
853 AccessibleSelection_clearSelection (AccessibleSelection *obj);
858 * AccessibleStateSet function prototypes
862 void AccessibleStateSet_ref (AccessibleStateSet *obj);
863 void AccessibleStateSet_unref (AccessibleStateSet *obj);
866 AccessibleStateSet_contains (AccessibleStateSet *obj,
867 AccessibleState state);
870 AccessibleStateSet_add (AccessibleStateSet *obj,
871 AccessibleState state);
874 AccessibleStateSet_remove (AccessibleStateSet *obj,
875 AccessibleState state);
878 AccessibleStateSet_equals (AccessibleStateSet *obj,
879 AccessibleStateSet *obj2);
882 AccessibleStateSet_compare (AccessibleStateSet *obj,
883 AccessibleStateSet *obj2);
886 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
889 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
891 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
893 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
896 AccessibleStreamableContent_freeContentTypesList (AccessibleStreamableContent *obj,
897 char **content_types);
898 #define AccessibleStreamableContent_freeContentTypeList(a, b) AccessibleStreamableContent_freeContentTypesList(a,b)
901 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
902 const char *content_type);
904 AccessibleStreamableContent_close (AccessibleStreamableContent *obj);
907 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
909 AccessibleStreamableContentSeekType seek_type);
911 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
914 unsigned int read_type);
917 * AccessibleTable function prototypes
921 void AccessibleTable_ref (AccessibleTable *obj);
922 void AccessibleTable_unref (AccessibleTable *obj);
925 AccessibleTable_getCaption (AccessibleTable *obj);
928 AccessibleTable_getSummary (AccessibleTable *obj);
931 AccessibleTable_getNRows (AccessibleTable *obj);
934 AccessibleTable_getNColumns (AccessibleTable *obj);
937 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
942 AccessibleTable_getIndexAt (AccessibleTable *obj,
947 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
951 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
955 AccessibleTable_getRowDescription (AccessibleTable *obj,
959 AccessibleTable_getColumnDescription (AccessibleTable *obj,
963 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
968 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
973 AccessibleTable_getRowColumnExtentsAtIndex (AccessibleTable *obj,
974 long int index, long int *row, long int *col,
975 long int *row_extents, long int *col_extents,
976 long int *is_selected);
979 AccessibleTable_getRowHeader (AccessibleTable *obj,
983 AccessibleTable_getColumnHeader (AccessibleTable *obj,
987 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
990 AccessibleTable_getSelectedRows (AccessibleTable *obj,
991 long int **selectedRows);
994 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
997 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
998 long int **selectedColumns);
1001 AccessibleTable_isRowSelected (AccessibleTable *obj,
1005 AccessibleTable_isColumnSelected (AccessibleTable *obj,
1009 AccessibleTable_isSelected (AccessibleTable *obj,
1014 AccessibleTable_addRowSelection (AccessibleTable *obj,
1017 AccessibleTable_addColumnSelection (AccessibleTable *obj,
1021 AccessibleTable_removeRowSelection (AccessibleTable *obj,
1024 AccessibleTable_removeColumnSelection (AccessibleTable *obj,
1029 * AccessibleText function prototypes
1033 void AccessibleText_ref (AccessibleText *obj);
1034 void AccessibleText_unref (AccessibleText *obj);
1037 AccessibleText_getCharacterCount (AccessibleText *obj);
1040 AccessibleText_getText (AccessibleText *obj,
1041 long int startOffset,
1042 long int endOffset);
1045 AccessibleText_getCaretOffset (AccessibleText *obj);
1048 AccessibleText_getAttributes (AccessibleText *obj,
1050 long int *startOffset,
1051 long int *endOffset);
1054 AccessibleText_getDefaultAttributes (AccessibleText *obj);
1057 AccessibleText_setCaretOffset (AccessibleText *obj,
1058 long int newOffset);
1061 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
1063 AccessibleTextBoundaryType type,
1064 long int *startOffset,
1065 long int *endOffset);
1068 AccessibleText_getTextAtOffset (AccessibleText *obj,
1070 AccessibleTextBoundaryType type,
1071 long int *startOffset,
1072 long int *endOffset);
1075 AccessibleText_getTextAfterOffset (AccessibleText *obj,
1077 AccessibleTextBoundaryType type,
1078 long int *startOffset,
1079 long int *endOffset);
1082 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1086 AccessibleText_getCharacterExtents (AccessibleText *obj,
1092 AccessibleCoordType type);
1095 AccessibleText_getRangeExtents (AccessibleText *obj,
1096 long int startOffset,
1102 AccessibleCoordType type);
1104 AccessibleTextRange **
1105 AccessibleText_getBoundedRanges (AccessibleText *obj,
1110 AccessibleCoordType type,
1111 AccessibleTextClipType clipTypeX,
1112 AccessibleTextClipType clipTypeY);
1115 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges);
1118 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1121 AccessibleCoordType type);
1124 AccessibleText_getNSelections (AccessibleText *obj);
1127 AccessibleText_getSelection (AccessibleText *obj,
1128 long int selectionNum,
1129 long int *startOffset,
1130 long int *endOffset);
1134 AccessibleText_addSelection (AccessibleText *obj,
1135 long int startOffset,
1136 long int endOffset);
1139 AccessibleText_removeSelection (AccessibleText *obj,
1140 long int selectionNum);
1143 AccessibleText_setSelection (AccessibleText *obj,
1144 long int selectionNum,
1145 long int startOffset,
1146 long int endOffset);
1147 AccessibleAttributeSet *
1148 AccessibleText_getAttributeRun (AccessibleText *obj,
1150 long int *startOffset,
1151 long int *endOffset,
1152 long int includeDefaults);
1153 AccessibleAttributeSet *
1154 AccessibleText_getDefaultAttributeSet (AccessibleText *obj);
1156 /* AccessibleValue Function Prototypes: */
1158 void AccessibleValue_ref (AccessibleValue *obj);
1159 void AccessibleValue_unref (AccessibleValue *obj);
1160 double AccessibleValue_getMinimumValue (AccessibleValue *obj);
1161 double AccessibleValue_getCurrentValue (AccessibleValue *obj);
1162 double AccessibleValue_getMaximumValue (AccessibleValue *obj);
1163 SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
1165 double AccessibleValue_getMinimumIncrement (AccessibleValue *obj);
1167 /* Persistance and lifecycle control for AccessibleEvents. */
1168 SPIBoolean AccessibleEvent_ref (const AccessibleEvent *e);
1169 void AccessibleEvent_unref (const AccessibleEvent *e);
1172 * Prototypes for accessor functions, to obtain context
1173 * information for accessible events.
1176 char* AccessibleEvent_getSourceName (const AccessibleEvent *e);
1177 AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e);
1178 AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEvent *e);
1179 SPIBoolean AccessibleEvent_getSourceDetails (const AccessibleEvent *e, char **name,
1180 AccessibleRole *role,
1181 AccessibleApplication **app);
1183 char* AccessibleTextChangedEvent_getChangeString (const AccessibleEvent *e);
1184 Accessible * AccessibleChildChangedEvent_getChildAccessible (const AccessibleEvent *e);
1186 Accessible * AccessibleParentChangedEvent_getParentAccessible (const AccessibleEvent *e);
1188 char* AccessibleTextSelectionChangedEvent_getSelectionString (const AccessibleEvent *e);
1190 char* AccessibleWindowEvent_getTitleString (const AccessibleEvent *e);
1192 Accessible * AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e);
1194 Accessible * AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e);
1196 Accessible * AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e);
1198 char * AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e);
1200 char * AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1202 char * AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1204 char * AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1206 char * AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e);
1207 SPIRect * AccessibleBoundsChangedEvent_getNewBounds (const AccessibleEvent *e);
1209 /* Misc methods and error handling */
1210 void SPI_freeString (char *s);
1212 char* SPI_dupString (char *s);
1214 void SPI_freeRect (SPIRect *r);
1216 SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
1218 SPIExceptionHandler* SPI_exceptionHandlerPop (void);
1220 SPIExceptionType SPIException_getSourceType (SPIException *err);
1222 SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
1224 Accessible* SPIAccessibleException_getSource (SPIException *err);
1226 char* SPIException_getDescription (SPIException *err);