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>
38 * Auxiliary typedefs and mask definitions
40 #include <spi-common/keymasks.h>
47 *AccessibleCollectionMatchType:
49 *@SPI_COLLECTION_MATCH_INVALID
50 *@SPI_COLLECTION_MATCH_ALL TRUE if all of the criteria are met
51 *@SPI_COLLECTION_MATCH_ANY TRUE if any of the criteria are met
52 *@SPI_COLLECTION_MATCH_NONE TRUE if none of the criteria are met
53 *@SPI_COLLECTION_MATCH_EMPTY Same as MATCH_ALL if the criteria is non-empty;
54 * for empty criteria this rule requires returned value to also have empty set.
55 *@SPI_COLLECTION_MATCH_LAST_DEFINED
60 SPI_COLLECTION_MATCH_INVALID,
61 SPI_COLLECTION_MATCH_ALL,
62 SPI_COLLECTION_MATCH_ANY,
63 SPI_COLLECTION_MATCH_NONE,
64 SPI_COLLECTION_MATCH_EMPTY,
65 SPI_COLLECTION_MATCH_LAST_DEFINED
66 }AccessibleCollectionMatchType;
70 *AccessibleTextBoundaryType:
71 *@SPI_TEXT_BOUNDARY_CHAR: Delimiter is the current character's bounds.
72 *@SPI_TEXT_BOUNDARY_CURSOR_POS: Delimiter is the current text caret position.
73 *@SPI_TEXT_BOUNDARY_WORD_START: Bounds run from the first character of a word to the first
74 * character of the following word (i.e. including trailing whitespace, if any) within the text object.
75 *@SPI_TEXT_BOUNDARY_WORD_END: Bounds run from the last character of a word to the last
76 * character of the following word (i.e. including leading whitespace) within the text object.
77 *@SPI_TEXT_BOUNDARY_SENTENCE_START: Bounds run from the first character of a sentence to the first
78 * character of the next sentence in the text object.
79 *@SPI_TEXT_BOUNDARY_SENTENCE_END: Bounds run from the last character of a sentence to the last
80 * character of the next sentence in the text object.
81 *@SPI_TEXT_BOUNDARY_LINE_START: Bounds span one line of text, with the line delimiter at the end of the
82 * bounds, if present, within the current text object.
83 *@SPI_TEXT_BOUNDARY_LINE_END: Bounds span one line of text, including a preceding line delimiter
84 * if present within the current text object.
85 *@SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE: Bounds span the run, relative to the specified offset and
86 * text accessor API rules, over which the attributes of the text object are invariant.
88 *Text boundary types used for specifying boundaries for regions of text.
92 SPI_TEXT_BOUNDARY_CHAR,
93 SPI_TEXT_BOUNDARY_CURSOR_POS,
94 SPI_TEXT_BOUNDARY_WORD_START,
95 SPI_TEXT_BOUNDARY_WORD_END,
96 SPI_TEXT_BOUNDARY_SENTENCE_START,
97 SPI_TEXT_BOUNDARY_SENTENCE_END,
98 SPI_TEXT_BOUNDARY_LINE_START,
99 SPI_TEXT_BOUNDARY_LINE_END,
100 SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE
101 } AccessibleTextBoundaryType;
104 *AccessibleTextClipType
105 *@SPI_TEXT_CLIP_NONE: No clipping to be done
106 *@SPI_TEXT_CLIP_MIN: Text clipped by min coordinate is omitted
107 *@SPI_TEXT_CLIP_MAX: Text clipped by max coordinate is omitted
108 *@SPI_TEXT_CLIP_BOTH: Only text fully within mix/max bound is retained
110 *Describes the type of clipping required.
118 } AccessibleTextClipType;
121 *AccessibleRelationType:
122 *@SPI_RELATION_NULL: Not used, this is an invalid value for this enumeration.
123 *@SPI_RELATION_LABEL_FOR: Indicates an object is a label for one or more target objects.
124 *@SPI_RELATION_LABELED_BY: Indicates an object is labelled by one or more target objects.
125 *@SPI_RELATION_CONTROLLED_BY: Indicates an object controlled by one or more target objects.
126 *@SPI_RELATION_CONTROLLER_FOR: Indicates an object is an controller for one or more target objects.
127 *@SPI_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or
129 *@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.
130 *@SPI_RELATION_EXTENDED: This value indicates that a relation other than those pre-specified by this version of AT-SPI
132 *@SPI_RELATION_FLOWS_TO: Indicates that the object has content that flows logically to another
133 * AtkObject in a sequential way, (for instance text-flow).
134 *@SPI_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
135 * another AtkObject in a sequential way, (for instance text-flow).
136 *@SPI_RELATION_SUBWINDOW_OF: Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component.
137 *@SPI_RELATION_EMBEDS: Indicates that the object visually embeds
138 * another object's content, i.e. this object's content flows around
140 *@SPI_RELATION_EMBEDDED_BY: Inverse of %SPI_RELATION_EMBEDS, indicates that
141 * this object's content is visualy embedded in another object.
142 *@SPI_RELATION_POPUP_FOR: Indicates that an object is a popup for another object.
143 *@SPI_RELATION_PARENT_WINDOW_OF: Indicates that an object is a parent window of another object.
144 *@SPI_RELATION_DESCRIBED_BY: Indicates that another object provides descriptive information about this object; more verbose than %SPI_RELATION_LABELLED_BY.
145 *@SPI_RELATION_DESCRIPTION_FOR: Indicates that an object provides descriptive information about another object; more verbose than %SPI_RELATION_LABEL_FOR.
146 *@SPI_RELATION_LAST_DEFINED: Do not use, this is an implementation detail used
147 * to identify the size of this enumeration.
149 *Describes the type of the relation
154 SPI_RELATION_LABEL_FOR,
155 SPI_RELATION_LABELED_BY,
156 SPI_RELATION_CONTROLLER_FOR,
157 SPI_RELATION_CONTROLLED_BY,
158 SPI_RELATION_MEMBER_OF,
159 SPI_RELATION_NODE_CHILD_OF,
160 SPI_RELATION_EXTENDED,
161 SPI_RELATION_FLOWS_TO,
162 SPI_RELATION_FLOWS_FROM,
163 SPI_RELATION_SUBWINDOW_OF,
165 SPI_RELATION_EMBEDDED_BY,
166 SPI_RELATION_POPUP_FOR,
167 SPI_RELATION_PARENT_WINDOW_OF,
168 SPI_RELATION_DESCRIPTION_FOR,
169 SPI_RELATION_DESCRIBED_BY,
170 SPI_RELATION_LAST_DEFINED
171 } AccessibleRelationType;
174 /* don't change the order of these ! */
176 *AccessibleCoordType:
177 *@SPI_COORD_TYPE_SCREEN: specifies xy coordinates relative to the screen
178 *@SPI_COORD_TYPE_WINDOW: specifies xy coordinates relative to an object's
181 *Specifies how xy coordinates are to be interpreted. Used by functions such
182 *as AccessibleComponent_getPosition() and AccessibleText_getCharacterExtents()
185 SPI_COORD_TYPE_SCREEN,
186 SPI_COORD_TYPE_WINDOW
187 } AccessibleCoordType;
190 *AccessibleKeySynthType:
191 *@SPI_KEY_PRESS: Generates a keypress event (requires a subsequent #SPI_KEY_RELEASE event)
192 *@SPI_KEY_RELEASE: Generates a key-release event
193 *@SPI_KEY_PRESSRELEASE: Generates a key press/release event pair.
194 *@SPI_KEY_SYM: Injects a "keysym" event into the stream, as if a press/release pair occurred; allows
195 * the user to specify the key via its symbolic name, as opposed to simulating a hardware press of a
197 *@SPI_KEY_STRING: Injects one or more keysym events into the keyboard buffer, or directly inserts
198 * a string value into the currently focussed text widget, if the widgets supports this.
199 * #SPI_KEY_STRING synthesis provides a shortcut for text substring insertion, and also allows the
200 * insertion of text which is not currently available via the current keyboard's keymap.
202 * Specifies the type of a generated event.
207 SPI_KEY_PRESSRELEASE,
210 } AccessibleKeySynthType;
213 *AccessibleKeyListenerSyncType:
214 *@SPI_KEYLISTENER_NOSYNC: Events may be delivered asynchronously,
215 * which means in some cases they may already have been delivered to the
216 * application before the AT client receives the notification.
217 *@SPI_KEYLISTENER_SYNCHRONOUS: Events are delivered synchronously, before the
218 * currently focussed application sees them.
219 *@SPI_KEYLISTENER_CANCONSUME: Events may be consumed by the AT client. Presumes and
220 * requires #SPI_KEYLISTENER_SYNCHRONOUS, incompatible with #SPI_KEYLISTENER_NOSYNC.
221 *@SPI_KEYLISTENER_ALL_WINDOWS: Events are received not from the application toolkit layer, but
222 * from the device driver or windowing system subsystem; such notifications are 'global' in the
223 * sense that they are not broken or defeated by applications that participate poorly
224 * in the accessibility APIs, or not at all; however because of the intrusive nature of
225 * such snooping, it can have side-effects on certain older platforms. If unconditional
226 * event notifications, even when inaccessible or "broken" applications have focus, are not
227 * required, it may be best to avoid this enum value/flag.
229 *Specified the tyupe of a key listener event.
230 * Certain of the values above can and should be bitwise-'OR'ed
231 * together, observing the compatibility limitations specified in the description of
232 * each value. For instance, #SPI_KEYLISTENER_ALL_WINDOWS | #SPI_KEYLISTENER_CANCONSUME is
233 * a commonly used combination which gives the AT complete control over the delivery of matching
234 * events. However, such filters should be used sparingly as they may have a negative impact on
235 * system performance.
238 SPI_KEYLISTENER_NOSYNC = 0,
239 SPI_KEYLISTENER_SYNCHRONOUS = 1,
240 SPI_KEYLISTENER_CANCONSUME = 2,
241 SPI_KEYLISTENER_ALL_WINDOWS = 4
242 } AccessibleKeyListenerSyncType;
246 *AccessibleStreamableContentSeekType
247 *@SPI_STREAM_SEEK_SET: seek from the 'top' of the streamable
248 *@SPI_STREAM_SEEK_CUR: seek from the current position in the stream
249 *@SPI_STREAM_SEEK_END: seek from the end of the stream (if known)
251 *The seek type for a specified offset in AccessibleStreamableContent_seek.
258 } AccessibleStreamableContentSeekType;
268 * An opaque object encapsulating information about thrown exceptions.
270 typedef struct _SPIException SPIException;
273 * SPIExceptionHandler:
274 * @err: points to the SPIException opaque object.
275 * @is_fatal: indicates whether the exception is a fatal error or not.
277 * A function type for functions to be called when exceptions occur.
281 typedef SPIBoolean (*SPIExceptionHandler) (SPIException *err, SPIBoolean is_fatal);
285 * @SPI_EXCEPTION_UNSPECIFIED: An exception of unknown type, or which doesn't fit the other types.
286 * @SPI_EXCEPTION_DISCONNECT: Communication with the object or service has been disconnected;
287 * this usually means that the object or service has died or exited.
288 * @SPI_EXCEPTION_NO_IMPL: The object or service is missing the implementation for a request.
289 * @SPI_EXCEPTION_IO: The communications channel has become corrupted, blocked, or is otherwise in a bad state.
290 * @SPI_EXCEPTION_BAD_DATA: The data received or sent over the interface has been identified as
291 * improperly formatted or otherwise fails to match the expectations.
293 * Exception codes indicating what's gone wrong in an AT-SPI call.
296 SPI_EXCEPTION_UNSPECIFIED,
297 SPI_EXCEPTION_DISCONNECT,
298 SPI_EXCEPTION_NO_IMPL,
300 SPI_EXCEPTION_BAD_DATA
305 * @SPI_EXCEPTION_SOURCE_UNSPECIFIED: Don't know or can't tell where the problem is
306 * @SPI_EXCEPTION_SOURCE_ACCESSIBLE: The source of an event or query (i.e. an app) has thrown the exception.
307 * @SPI_EXCEPTION_SOURCE_REGISTRY: The AT-SPI registry has thrown the exception or cannot be reached.
308 * @SPI_EXCEPTION_SOURCE_DEVICE: The device event subsystem has encountered an error condition.
310 * The general source of the failure, i.e. whether the app, registry, or device system has encountered trouble.
313 SPI_EXCEPTION_SOURCE_UNSPECIFIED,
314 SPI_EXCEPTION_SOURCE_ACCESSIBLE,
315 SPI_EXCEPTION_SOURCE_REGISTRY,
316 SPI_EXCEPTION_SOURCE_DEVICE
319 typedef unsigned long AccessibleKeyEventMask;
320 typedef unsigned long AccessibleDeviceEventMask;
323 *AccessibleComponentLayer:
324 *@SPI_LAYER_INVALID: The layer cannot be determined or is somehow undefined.
325 *@SPI_LAYER_BACKGROUND: Component belongs to the destop background.
326 *@SPI_LAYER_CANVAS: Component is a canvas backdrop or drawing area.
327 *@SPI_LAYER_WIDGET: Component is a 'normal' widget.
328 *@SPI_LAYER_MDI: Component is drawn in the MDI layer and may have valid
329 * Z-information relative to other MDI-layer components.
330 *@SPI_LAYER_POPUP: Component is in the popup layer, above other widgets and
332 *@SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
334 *@SPI_LAYER_WINDOW: Component is in the window layer and have valid Z-information
335 * relative to other window-layer components.
336 *@SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
337 * should not be encountered.
339 * Describes the layer of a component.
341 * These enumerated "layer values" are used when determining which UI
342 * rendering layer a component is drawn into, which can help in making
343 * determinations of when components occlude one another.
347 SPI_LAYER_BACKGROUND,
354 SPI_LAYER_LAST_DEFINED
355 } AccessibleComponentLayer;
359 * AccessibleTextRange:
360 * @start: the first nominal character position within the range.
361 * @end: the first nominal character position following the range.
362 * @content: The actual text content between @start and @end, as a UTF-8 string.
364 * Structure which encapsulates a text range - must be associated with an
365 * AccessibleText-implementing object.
367 typedef struct _AccessibleTextRange
372 } AccessibleTextRange;
380 * Structure containing identifying information about a set of keycode or
383 typedef struct _AccessibleKeySet
385 unsigned long *keysyms;
386 unsigned short *keycodes;
392 * A special value for an AccessibleKeySet type, which tacitly
393 * includes all keycodes and keyvals for the specified modifier set.
395 #define SPI_KEYSET_ALL_KEYS NULL
397 typedef unsigned long AccessibleModifierMaskType;
399 *AccessibleKeyMaskType:
401 *AccessibleKeyMaskType is a mask which is a set of key event modifiers
402 *which is specified in SPI_registerAccessibleKeystrokeListener.
405 typedef AccessibleModifierMaskType AccessibleKeyMaskType;
407 typedef struct _AccessibleAttributeSet
411 } AccessibleAttributeSet;
413 typedef struct _AccessibleRoleSet
416 AccessibleRole *roles;
421 /* Basic SPI initialization and event loop function prototypes */
424 void SPI_event_main (void);
425 void SPI_event_quit (void);
426 SPIBoolean SPI_eventIsReady (void);
427 AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
430 /* Event Listener creation and support. */
432 void SPI_freeAccessibleKeySet (
433 AccessibleKeySet *keyset);
434 AccessibleKeySet * SPI_createAccessibleKeySet (
438 const char **keystrings);
439 AccessibleEventListener * SPI_createAccessibleEventListener (
440 AccessibleEventListenerCB callback,
442 SPIBoolean AccessibleEventListener_addCallback (
443 AccessibleEventListener *listener,
444 AccessibleEventListenerCB callback,
446 SPIBoolean AccessibleEventListener_removeCallback (
447 AccessibleEventListener *listener,
448 AccessibleEventListenerCB callback);
449 void AccessibleEventListener_unref (
450 AccessibleEventListener *listener);
452 /* Device Event Listener creation and support. */
454 /* First four are deprecated in favor of the last four; really just a re-name */
456 AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener (
457 AccessibleKeystrokeListenerCB callback,
459 SPIBoolean AccessibleKeystrokeListener_addCallback (
460 AccessibleKeystrokeListener *listener,
461 AccessibleKeystrokeListenerCB callback,
463 SPIBoolean AccessibleKeystrokeListener_removeCallback (
464 AccessibleKeystrokeListener *listener,
465 AccessibleKeystrokeListenerCB callback);
466 void AccessibleKeystrokeListener_unref (
467 AccessibleKeystrokeListener *listener);
469 AccessibleDeviceListener * SPI_createAccessibleDeviceListener (
470 AccessibleDeviceListenerCB callback,
472 SPIBoolean AccessibleDeviceListener_addCallback (
473 AccessibleDeviceListener *listener,
474 AccessibleDeviceListenerCB callback,
476 SPIBoolean AccessibleDeviceListener_removeCallback (
477 AccessibleDeviceListener *listener,
478 AccessibleDeviceListenerCB callback);
479 void AccessibleDeviceListener_unref (
480 AccessibleDeviceListener *listener);
482 /* Global functions serviced by the registry */
484 SPIBoolean SPI_registerGlobalEventListener (
485 AccessibleEventListener *listener,
486 const char *eventType);
487 SPIBoolean SPI_deregisterGlobalEventListener (
488 AccessibleEventListener *listener,
489 const char *eventType);
490 SPIBoolean SPI_deregisterGlobalEventListenerAll (
491 AccessibleEventListener *listener);
492 SPIBoolean SPI_registerAccessibleKeystrokeListener (
493 AccessibleKeystrokeListener *listener,
494 AccessibleKeySet *keys,
495 AccessibleKeyMaskType modmask,
496 AccessibleKeyEventMask eventmask,
497 AccessibleKeyListenerSyncType sync_type);
498 SPIBoolean SPI_deregisterAccessibleKeystrokeListener (
499 AccessibleKeystrokeListener *listener,
500 AccessibleKeyMaskType modmask);
502 SPIBoolean SPI_registerDeviceEventListener (
503 AccessibleDeviceListener *listener,
504 AccessibleDeviceEventMask eventmask,
506 SPIBoolean SPI_deregisterDeviceEventListener (
507 AccessibleDeviceListener *listener,
510 int SPI_getDesktopCount (void);
511 Accessible *SPI_getDesktop (int i);
512 int SPI_getDesktopList (Accessible ***desktop_list);
513 void SPI_freeDesktopList (Accessible **desktop_list);
515 SPIBoolean SPI_generateKeyboardEvent (long int keyval,
517 AccessibleKeySynthType synth_type);
519 SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
521 /* Accessible function prototypes */
523 void Accessible_ref (Accessible *obj);
524 void Accessible_unref (Accessible *obj);
525 char * Accessible_getName (Accessible *obj);
526 char * Accessible_getDescription (Accessible *obj);
527 Accessible * Accessible_getParent (Accessible *obj);
528 long Accessible_getChildCount (Accessible *obj);
529 Accessible * Accessible_getChildAtIndex (Accessible *obj,
530 long int childIndex);
531 long Accessible_getIndexInParent (Accessible *obj);
532 AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
533 AccessibleRole Accessible_getRole (Accessible *obj);
534 char * Accessible_getRoleName (Accessible *obj);
535 char * Accessible_getLocalizedRoleName (Accessible *obj);
536 AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
537 AccessibleAttributeSet *Accessible_getAttributes (Accessible *obj);
538 AccessibleApplication *Accessible_getHostApplication (Accessible *obj);
540 /* Interface query methods */
542 SPIBoolean Accessible_isAction (Accessible *obj);
543 SPIBoolean Accessible_isApplication (Accessible *obj);
544 SPIBoolean Accessible_isCollection (Accessible *obj);
545 SPIBoolean Accessible_isComponent (Accessible *obj);
546 SPIBoolean Accessible_isDocument (Accessible *obj);
547 SPIBoolean Accessible_isEditableText (Accessible *obj);
548 SPIBoolean Accessible_isHypertext (Accessible *obj);
549 SPIBoolean Accessible_isImage (Accessible *obj);
550 SPIBoolean Accessible_isMatchRule (Accessible *obj);
551 SPIBoolean Accessible_isSelection (Accessible *obj);
552 SPIBoolean Accessible_isStreamableContent (Accessible *obj);
553 SPIBoolean Accessible_isTable (Accessible *obj);
554 SPIBoolean Accessible_isText (Accessible *obj);
555 SPIBoolean Accessible_isValue (Accessible *obj);
557 AccessibleAction * Accessible_getAction (Accessible *obj);
558 AccessibleApplication * Accessible_getApplication (Accessible *obj);
559 AccessibleCollection * Accessible_getCollection (Accessible *obj);
560 AccessibleComponent * Accessible_getComponent (Accessible *obj);
561 AccessibleDocument * Accessible_getDocument (Accessible *obj);
562 AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
563 AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
564 AccessibleImage * Accessible_getImage (Accessible *obj);
565 AccessibleMatchRule * Accessible_getMatchRule (Accessible *obj);
566 AccessibleSelection * Accessible_getSelection (Accessible *obj);
567 AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
568 AccessibleTable * Accessible_getTable (Accessible *obj);
569 AccessibleText * Accessible_getText (Accessible *obj);
570 AccessibleValue * Accessible_getValue (Accessible *obj);
571 AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
572 const char *interface_name);
574 /* AccessibleAction function prototypes */
576 void AccessibleAction_ref (AccessibleAction *obj);
577 void AccessibleAction_unref (AccessibleAction *obj);
578 long AccessibleAction_getNActions (AccessibleAction *obj);
579 char *AccessibleAction_getName (AccessibleAction *obj,
581 char *AccessibleAction_getDescription (AccessibleAction *obj,
583 SPIBoolean AccessibleAction_doAction (AccessibleAction *obj,
585 char *AccessibleAction_getKeyBinding (AccessibleAction *obj,
588 /* AccessibleApplication function prototypes */
590 void AccessibleApplication_ref (AccessibleApplication *obj);
591 void AccessibleApplication_unref (AccessibleApplication *obj);
592 char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
593 char *AccessibleApplication_getVersion (AccessibleApplication *obj);
594 long AccessibleApplication_getID (AccessibleApplication *obj);
595 char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
596 SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
597 SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
599 /* AccessibleCollection function prototypes */
600 void AccessibleCollection_ref (AccessibleCollection *obj);
601 void AccessibleCollection_unref (AccessibleCollection *obj);
602 AccessibleMatchRule *
603 AccessibleCollection_createMatchRule (AccessibleCollection *obj,
604 AccessibleStateSet *states,
605 AccessibleCollectionMatchType statematchtype,
606 AccessibleAttributeSet *attributes,
607 AccessibleCollectionMatchType attributematchtype,
608 AccessibleRoleSet *roles,
609 AccessibleCollectionMatchType rolematchtype,
611 AccessibleCollectionMatchType interfacematchtype,
614 AccessibleCollection_freeMatchRule (AccessibleCollection *obj,
615 AccessibleMatchRule *matchrule);
616 /* AccessibleComponent function prototypes */
618 void AccessibleComponent_ref (AccessibleComponent *obj);
619 void AccessibleComponent_unref (AccessibleComponent *obj);
620 SPIBoolean AccessibleComponent_contains (AccessibleComponent *obj,
623 AccessibleCoordType ctype);
624 Accessible *AccessibleComponent_getAccessibleAtPoint (
625 AccessibleComponent *obj,
628 AccessibleCoordType ctype);
629 void AccessibleComponent_getExtents (AccessibleComponent *obj,
634 AccessibleCoordType ctype);
635 void AccessibleComponent_getPosition (AccessibleComponent *obj,
638 AccessibleCoordType ctype);
639 void AccessibleComponent_getSize (AccessibleComponent *obj,
642 AccessibleComponentLayer
643 AccessibleComponent_getLayer (AccessibleComponent *obj);
644 SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
645 short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
646 double AccessibleComponent_getAlpha (AccessibleComponent *obj);
648 /* AccessibleDocument function prototypes */
650 void AccessibleDocument_ref (AccessibleDocument *obj);
651 void AccessibleDocument_unref (AccessibleDocument *obj);
652 char *AccessibleDocument_getLocale (AccessibleDocument *obj);
653 char *AccessibleDocument_getAttributeValue (AccessibleDocument *obj,
655 AccessibleAttributeSet *AccessibleDocument_getAttributes (AccessibleDocument *obj);
657 /* AccessibleEditableText function prototypes */
660 AccessibleEditableText_ref (AccessibleEditableText *obj);
663 AccessibleEditableText_unref (AccessibleEditableText *obj);
666 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
667 const char *attributes,
668 long int startOffset,
672 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
673 const char *newContents);
676 AccessibleEditableText_insertText (AccessibleEditableText *obj,
682 AccessibleEditableText_copyText (AccessibleText *obj,
687 AccessibleEditableText_cutText (AccessibleEditableText *obj,
692 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
697 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
702 * AccessibleHyperlink function prototypes
706 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
708 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
711 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
714 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
718 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
722 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
723 long int *startIndex,
727 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
731 * AccessibleHypertext function prototypes
736 AccessibleHypertext_ref (AccessibleHypertext *obj);
739 AccessibleHypertext_unref (AccessibleHypertext *obj);
742 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
744 AccessibleHyperlink *
745 AccessibleHypertext_getLink (AccessibleHypertext *obj,
749 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
750 long int characterOffset);
754 * AccessibleImage function prototypes
759 AccessibleImage_ref (AccessibleImage *obj);
762 AccessibleImage_unref (AccessibleImage *obj);
765 AccessibleImage_getImageDescription (AccessibleImage *obj);
768 AccessibleImage_getImageSize (AccessibleImage *obj,
773 AccessibleImage_getImagePosition (AccessibleImage *obj,
776 AccessibleCoordType ctype);
779 AccessibleImage_getImageExtents (AccessibleImage *obj,
784 AccessibleCoordType ctype);
786 AccessibleImage_getImageLocale (AccessibleImage *obj);
790 * AccessibleMatchRule function prototypes
793 void AccessibleMatchRule_ref (AccessibleMatchRule *obj);
794 void AccessibleMatchRule_unref (AccessibleMatchRule *obj);
798 * AccessibleRelation function prototypes
802 void AccessibleRelation_ref (AccessibleRelation *obj);
803 void AccessibleRelation_unref (AccessibleRelation *obj);
805 AccessibleRelationType
806 AccessibleRelation_getRelationType (AccessibleRelation *obj);
809 AccessibleRelation_getNTargets (AccessibleRelation *obj);
812 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
817 * AccessibleSelection function prototypes
821 void AccessibleSelection_ref (AccessibleSelection *obj);
822 void AccessibleSelection_unref (AccessibleSelection *obj);
825 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
828 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
829 long int selectedChildIndex);
832 AccessibleSelection_selectChild (AccessibleSelection *obj,
833 long int childIndex);
836 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
837 long int selectedChildIndex);
840 AccessibleSelection_deselectChild (AccessibleSelection *obj,
841 long int childIndex);
844 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
845 long int childIndex);
848 AccessibleSelection_selectAll (AccessibleSelection *obj);
851 AccessibleSelection_clearSelection (AccessibleSelection *obj);
856 * AccessibleStateSet function prototypes
860 void AccessibleStateSet_ref (AccessibleStateSet *obj);
861 void AccessibleStateSet_unref (AccessibleStateSet *obj);
864 AccessibleStateSet_contains (AccessibleStateSet *obj,
865 AccessibleState state);
868 AccessibleStateSet_add (AccessibleStateSet *obj,
869 AccessibleState state);
872 AccessibleStateSet_remove (AccessibleStateSet *obj,
873 AccessibleState state);
876 AccessibleStateSet_equals (AccessibleStateSet *obj,
877 AccessibleStateSet *obj2);
880 AccessibleStateSet_compare (AccessibleStateSet *obj,
881 AccessibleStateSet *obj2);
884 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
887 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
889 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
891 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
894 AccessibleStreamableContent_freeContentTypesList (AccessibleStreamableContent *obj,
895 char **content_types);
896 #define AccessibleStreamableContent_freeContentTypeList(a, b) AccessibleStreamableContent_freeContentTypesList(a,b)
899 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
900 const char *content_type);
902 AccessibleStreamableContent_close (AccessibleStreamableContent *obj);
905 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
907 AccessibleStreamableContentSeekType seek_type);
909 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
912 unsigned int read_type);
915 * AccessibleTable function prototypes
919 void AccessibleTable_ref (AccessibleTable *obj);
920 void AccessibleTable_unref (AccessibleTable *obj);
923 AccessibleTable_getCaption (AccessibleTable *obj);
926 AccessibleTable_getSummary (AccessibleTable *obj);
929 AccessibleTable_getNRows (AccessibleTable *obj);
932 AccessibleTable_getNColumns (AccessibleTable *obj);
935 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
940 AccessibleTable_getIndexAt (AccessibleTable *obj,
945 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
949 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
953 AccessibleTable_getRowDescription (AccessibleTable *obj,
957 AccessibleTable_getColumnDescription (AccessibleTable *obj,
961 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
966 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
971 AccessibleTable_getRowColumnExtentsAtIndex (AccessibleTable *obj,
972 long int index, long int *row, long int *col,
973 long int *row_extents, long int *col_extents,
974 long int *is_selected);
977 AccessibleTable_getRowHeader (AccessibleTable *obj,
981 AccessibleTable_getColumnHeader (AccessibleTable *obj,
985 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
988 AccessibleTable_getSelectedRows (AccessibleTable *obj,
989 long int **selectedRows);
992 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
995 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
996 long int **selectedColumns);
999 AccessibleTable_isRowSelected (AccessibleTable *obj,
1003 AccessibleTable_isColumnSelected (AccessibleTable *obj,
1007 AccessibleTable_isSelected (AccessibleTable *obj,
1012 AccessibleTable_addRowSelection (AccessibleTable *obj,
1015 AccessibleTable_addColumnSelection (AccessibleTable *obj,
1019 AccessibleTable_removeRowSelection (AccessibleTable *obj,
1022 AccessibleTable_removeColumnSelection (AccessibleTable *obj,
1027 * AccessibleText function prototypes
1031 void AccessibleText_ref (AccessibleText *obj);
1032 void AccessibleText_unref (AccessibleText *obj);
1035 AccessibleText_getCharacterCount (AccessibleText *obj);
1038 AccessibleText_getText (AccessibleText *obj,
1039 long int startOffset,
1040 long int endOffset);
1043 AccessibleText_getCaretOffset (AccessibleText *obj);
1046 AccessibleText_getAttributes (AccessibleText *obj,
1048 long int *startOffset,
1049 long int *endOffset);
1052 AccessibleText_getDefaultAttributes (AccessibleText *obj);
1055 AccessibleText_setCaretOffset (AccessibleText *obj,
1056 long int newOffset);
1059 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
1061 AccessibleTextBoundaryType type,
1062 long int *startOffset,
1063 long int *endOffset);
1066 AccessibleText_getTextAtOffset (AccessibleText *obj,
1068 AccessibleTextBoundaryType type,
1069 long int *startOffset,
1070 long int *endOffset);
1073 AccessibleText_getTextAfterOffset (AccessibleText *obj,
1075 AccessibleTextBoundaryType type,
1076 long int *startOffset,
1077 long int *endOffset);
1080 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1084 AccessibleText_getCharacterExtents (AccessibleText *obj,
1090 AccessibleCoordType type);
1093 AccessibleText_getRangeExtents (AccessibleText *obj,
1094 long int startOffset,
1100 AccessibleCoordType type);
1102 AccessibleTextRange **
1103 AccessibleText_getBoundedRanges (AccessibleText *obj,
1108 AccessibleCoordType type,
1109 AccessibleTextClipType clipTypeX,
1110 AccessibleTextClipType clipTypeY);
1113 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges);
1116 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1119 AccessibleCoordType type);
1122 AccessibleText_getNSelections (AccessibleText *obj);
1125 AccessibleText_getSelection (AccessibleText *obj,
1126 long int selectionNum,
1127 long int *startOffset,
1128 long int *endOffset);
1132 AccessibleText_addSelection (AccessibleText *obj,
1133 long int startOffset,
1134 long int endOffset);
1137 AccessibleText_removeSelection (AccessibleText *obj,
1138 long int selectionNum);
1141 AccessibleText_setSelection (AccessibleText *obj,
1142 long int selectionNum,
1143 long int startOffset,
1144 long int endOffset);
1145 AccessibleAttributeSet *
1146 AccessibleText_getAttributeRun (AccessibleText *obj,
1148 long int *startOffset,
1149 long int *endOffset,
1150 long int includeDefaults);
1151 AccessibleAttributeSet *
1152 AccessibleText_getDefaultAttributeSet (AccessibleText *obj);
1154 /* AccessibleValue Function Prototypes: */
1156 void AccessibleValue_ref (AccessibleValue *obj);
1157 void AccessibleValue_unref (AccessibleValue *obj);
1158 double AccessibleValue_getMinimumValue (AccessibleValue *obj);
1159 double AccessibleValue_getCurrentValue (AccessibleValue *obj);
1160 double AccessibleValue_getMaximumValue (AccessibleValue *obj);
1161 SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
1163 double AccessibleValue_getMinimumIncrement (AccessibleValue *obj);
1165 /* Persistance and lifecycle control for AccessibleEvents. */
1166 SPIBoolean AccessibleEvent_ref (const AccessibleEvent *e);
1167 void AccessibleEvent_unref (const AccessibleEvent *e);
1170 * Prototypes for accessor functions, to obtain context
1171 * information for accessible events.
1174 char* AccessibleEvent_getSourceName (const AccessibleEvent *e);
1175 AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e);
1176 AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEvent *e);
1177 SPIBoolean AccessibleEvent_getSourceDetails (const AccessibleEvent *e, char **name,
1178 AccessibleRole *role,
1179 AccessibleApplication **app);
1181 char* AccessibleTextChangedEvent_getChangeString (const AccessibleEvent *e);
1182 Accessible * AccessibleChildChangedEvent_getChildAccessible (const AccessibleEvent *e);
1184 Accessible * AccessibleParentChangedEvent_getParentAccessible (const AccessibleEvent *e);
1186 char* AccessibleTextSelectionChangedEvent_getSelectionString (const AccessibleEvent *e);
1188 char* AccessibleWindowEvent_getTitleString (const AccessibleEvent *e);
1190 Accessible * AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e);
1192 Accessible * AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e);
1194 Accessible * AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e);
1196 char * AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e);
1198 char * AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1200 char * AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1202 char * AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1204 char * AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e);
1205 SPIRect * AccessibleBoundsChangedEvent_getNewBounds (const AccessibleEvent *e);
1207 /* Misc methods and error handling */
1208 void SPI_freeString (char *s);
1210 char* SPI_dupString (char *s);
1212 void SPI_freeRect (SPIRect *r);
1214 SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
1216 SPIExceptionHandler* SPI_exceptionHandlerPop (void);
1218 SPIExceptionType SPIException_getSourceType (SPIException *err);
1220 SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
1222 Accessible* SPIAccessibleException_getSource (SPIException *err);
1224 char* SPIException_getDescription (SPIException *err);