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 *AccessibleCollectionMatchType:
48 *@SPI_COLLECTION_MATCH_INVALID
49 *@SPI_COLLECTION_MATCH_ALL TRUE if all of the criteria are met
50 *@SPI_COLLECTION_MATCH_ANY TRUE if any of the criteria are met
51 *@SPI_COLLECTION_MATCH_NONE TRUE if none of the criteria are met
52 *@SPI_COLLECTION_MATCH_EMPTY Same as MATCH_ALL if the criteria is non-empty;
53 * for empty criteria this rule requires returned value to also have empty set.
54 *@SPI_COLLECTION_MATCH_LAST_DEFINED
59 SPI_COLLECTION_MATCH_INVALID,
60 SPI_COLLECTION_MATCH_ALL,
61 SPI_COLLECTION_MATCH_ANY,
62 SPI_COLLECTION_MATCH_NONE,
63 SPI_COLLECTION_MATCH_EMPTY,
64 SPI_COLLECTION_MATCH_LAST_DEFINED
65 }AccessibleCollectionMatchType;
69 *AccessibleTextBoundaryType:
70 *@SPI_TEXT_BOUNDARY_CHAR: Delimiter is the current character's bounds.
71 *@SPI_TEXT_BOUNDARY_CURSOR_POS: Delimiter is the current text caret position.
72 *@SPI_TEXT_BOUNDARY_WORD_START: Bounds run from the first character of a word to the first
73 * character of the following word (i.e. including trailing whitespace, if any) within the text object.
74 *@SPI_TEXT_BOUNDARY_WORD_END: Bounds run from the last character of a word to the last
75 * character of the following word (i.e. including leading whitespace) within the text object.
76 *@SPI_TEXT_BOUNDARY_SENTENCE_START: Bounds run from the first character of a sentence to the first
77 * character of the next sentence in the text object.
78 *@SPI_TEXT_BOUNDARY_SENTENCE_END: Bounds run from the last character of a sentence to the last
79 * character of the next sentence in the text object.
80 *@SPI_TEXT_BOUNDARY_LINE_START: Bounds span one line of text, with the line delimiter at the end of the
81 * bounds, if present, within the current text object.
82 *@SPI_TEXT_BOUNDARY_LINE_END: Bounds span one line of text, including a preceding line delimiter
83 * if present within the current text object.
84 *@SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE: Bounds span the run, relative to the specified offset and
85 * text accessor API rules, over which the attributes of the text object are invariant.
87 *Text boundary types used for specifying boundaries for regions of text.
91 SPI_TEXT_BOUNDARY_CHAR,
92 SPI_TEXT_BOUNDARY_CURSOR_POS,
93 SPI_TEXT_BOUNDARY_WORD_START,
94 SPI_TEXT_BOUNDARY_WORD_END,
95 SPI_TEXT_BOUNDARY_SENTENCE_START,
96 SPI_TEXT_BOUNDARY_SENTENCE_END,
97 SPI_TEXT_BOUNDARY_LINE_START,
98 SPI_TEXT_BOUNDARY_LINE_END,
99 SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE
100 } AccessibleTextBoundaryType;
103 *AccessibleTextClipType
104 *@SPI_TEXT_CLIP_NONE: No clipping to be done
105 *@SPI_TEXT_CLIP_MIN: Text clipped by min coordinate is omitted
106 *@SPI_TEXT_CLIP_MAX: Text clipped by max coordinate is omitted
107 *@SPI_TEXT_CLIP_BOTH: Only text fully within mix/max bound is retained
109 *Describes the type of clipping required.
117 } AccessibleTextClipType;
120 *AccessibleRelationType:
121 *@SPI_RELATION_NULL: Not used, this is an invalid value for this enumeration.
122 *@SPI_RELATION_LABEL_FOR: Indicates an object is a label for one or more target objects.
123 *@SPI_RELATION_LABELED_BY: Indicates an object is labelled by one or more target objects.
124 *@SPI_RELATION_CONTROLLED_BY: Indicates an object controlled by one or more target objects.
125 *@SPI_RELATION_CONTROLLER_FOR: Indicates an object is an controller for one or more target objects.
126 *@SPI_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or
128 *@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.
129 *@SPI_RELATION_EXTENDED: This value indicates that a relation other than those pre-specified by this version of AT-SPI
131 *@SPI_RELATION_FLOWS_TO: Indicates that the object has content that flows logically to another
132 * AtkObject in a sequential way, (for instance text-flow).
133 *@SPI_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
134 * another AtkObject in a sequential way, (for instance text-flow).
135 *@SPI_RELATION_SUBWINDOW_OF: Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component.
136 *@SPI_RELATION_EMBEDS: Indicates that the object visually embeds
137 * another object's content, i.e. this object's content flows around
139 *@SPI_RELATION_EMBEDDED_BY: Inverse of %SPI_RELATION_EMBEDS, indicates that
140 * this object's content is visualy embedded in another object.
141 *@SPI_RELATION_POPUP_FOR: Indicates that an object is a popup for another object.
142 *@SPI_RELATION_PARENT_WINDOW_OF: Indicates that an object is a parent window of another object.
143 *@SPI_RELATION_DESCRIBED_BY: Indicates that another object provides descriptive information about this object; more verbose than %SPI_RELATION_LABELLED_BY.
144 *@SPI_RELATION_DESCRIPTION_FOR: Indicates that an object provides descriptive information about another object; more verbose than %SPI_RELATION_LABEL_FOR.
145 *@SPI_RELATION_LAST_DEFINED: Do not use, this is an implementation detail used
146 * to identify the size of this enumeration.
148 *Describes the type of the relation
153 SPI_RELATION_LABEL_FOR,
154 SPI_RELATION_LABELED_BY,
155 SPI_RELATION_CONTROLLER_FOR,
156 SPI_RELATION_CONTROLLED_BY,
157 SPI_RELATION_MEMBER_OF,
158 SPI_RELATION_NODE_CHILD_OF,
159 SPI_RELATION_EXTENDED,
160 SPI_RELATION_FLOWS_TO,
161 SPI_RELATION_FLOWS_FROM,
162 SPI_RELATION_SUBWINDOW_OF,
164 SPI_RELATION_EMBEDDED_BY,
165 SPI_RELATION_POPUP_FOR,
166 SPI_RELATION_PARENT_WINDOW_OF,
167 SPI_RELATION_DESCRIPTION_FOR,
168 SPI_RELATION_DESCRIBED_BY,
169 SPI_RELATION_LAST_DEFINED
170 } AccessibleRelationType;
173 /* don't change the order of these ! */
175 *AccessibleCoordType:
176 *@SPI_COORD_TYPE_SCREEN: specifies xy coordinates relative to the screen
177 *@SPI_COORD_TYPE_WINDOW: specifies xy coordinates relative to an object's
180 *Specifies how xy coordinates are to be interpreted. Used by functions such
181 *as AccessibleComponent_getPosition() and AccessibleText_getCharacterExtents()
184 SPI_COORD_TYPE_SCREEN,
185 SPI_COORD_TYPE_WINDOW
186 } AccessibleCoordType;
189 *AccessibleKeySynthType:
190 *@SPI_KEY_PRESS: Generates a keypress event (requires a subsequent #SPI_KEY_RELEASE event)
191 *@SPI_KEY_RELEASE: Generates a key-release event
192 *@SPI_KEY_PRESSRELEASE: Generates a key press/release event pair.
193 *@SPI_KEY_SYM: Injects a "keysym" event into the stream, as if a press/release pair occurred; allows
194 * the user to specify the key via its symbolic name, as opposed to simulating a hardware press of a
196 *@SPI_KEY_STRING: Injects one or more keysym events into the keyboard buffer, or directly inserts
197 * a string value into the currently focussed text widget, if the widgets supports this.
198 * #SPI_KEY_STRING synthesis provides a shortcut for text substring insertion, and also allows the
199 * insertion of text which is not currently available via the current keyboard's keymap.
201 * Specifies the type of a generated event.
206 SPI_KEY_PRESSRELEASE,
209 } AccessibleKeySynthType;
212 *AccessibleKeyListenerSyncType:
213 *@SPI_KEYLISTENER_NOSYNC: Events may be delivered asynchronously,
214 * which means in some cases they may already have been delivered to the
215 * application before the AT client receives the notification.
216 *@SPI_KEYLISTENER_SYNCHRONOUS: Events are delivered synchronously, before the
217 * currently focussed application sees them.
218 *@SPI_KEYLISTENER_CANCONSUME: Events may be consumed by the AT client. Presumes and
219 * requires #SPI_KEYLISTENER_SYNCHRONOUS, incompatible with #SPI_KEYLISTENER_NOSYNC.
220 *@SPI_KEYLISTENER_ALL_WINDOWS: Events are received not from the application toolkit layer, but
221 * from the device driver or windowing system subsystem; such notifications are 'global' in the
222 * sense that they are not broken or defeated by applications that participate poorly
223 * in the accessibility APIs, or not at all; however because of the intrusive nature of
224 * such snooping, it can have side-effects on certain older platforms. If unconditional
225 * event notifications, even when inaccessible or "broken" applications have focus, are not
226 * required, it may be best to avoid this enum value/flag.
228 *Specified the tyupe of a key listener event.
229 * Certain of the values above can and should be bitwise-'OR'ed
230 * together, observing the compatibility limitations specified in the description of
231 * each value. For instance, #SPI_KEYLISTENER_ALL_WINDOWS | #SPI_KEYLISTENER_CANCONSUME is
232 * a commonly used combination which gives the AT complete control over the delivery of matching
233 * events. However, such filters should be used sparingly as they may have a negative impact on
234 * system performance.
237 SPI_KEYLISTENER_NOSYNC = 0,
238 SPI_KEYLISTENER_SYNCHRONOUS = 1,
239 SPI_KEYLISTENER_CANCONSUME = 2,
240 SPI_KEYLISTENER_ALL_WINDOWS = 4
241 } AccessibleKeyListenerSyncType;
245 *AccessibleStreamableContentSeekType
246 *@SPI_STREAM_SEEK_SET: seek from the 'top' of the streamable
247 *@SPI_STREAM_SEEK_CUR: seek from the current position in the stream
248 *@SPI_STREAM_SEEK_END: seek from the end of the stream (if known)
250 *The seek type for a specified offset in AccessibleStreamableContent_seek.
257 } AccessibleStreamableContentSeekType;
267 * An opaque object encapsulating information about thrown exceptions.
269 typedef struct _SPIException SPIException;
272 * SPIExceptionHandler:
273 * @err: points to the SPIException opaque object.
274 * @is_fatal: indicates whether the exception is a fatal error or not.
276 * A function type for functions to be called when exceptions occur.
280 typedef SPIBoolean (*SPIExceptionHandler) (SPIException *err, SPIBoolean is_fatal);
284 * @SPI_EXCEPTION_UNSPECIFIED: An exception of unknown type, or which doesn't fit the other types.
285 * @SPI_EXCEPTION_DISCONNECT: Communication with the object or service has been disconnected;
286 * this usually means that the object or service has died or exited.
287 * @SPI_EXCEPTION_NO_IMPL: The object or service is missing the implementation for a request.
288 * @SPI_EXCEPTION_IO: The communications channel has become corrupted, blocked, or is otherwise in a bad state.
289 * @SPI_EXCEPTION_BAD_DATA: The data received or sent over the interface has been identified as
290 * improperly formatted or otherwise fails to match the expectations.
292 * Exception codes indicating what's gone wrong in an AT-SPI call.
295 SPI_EXCEPTION_UNSPECIFIED,
296 SPI_EXCEPTION_DISCONNECT,
297 SPI_EXCEPTION_NO_IMPL,
299 SPI_EXCEPTION_BAD_DATA
304 * @SPI_EXCEPTION_SOURCE_UNSPECIFIED: Don't know or can't tell where the problem is
305 * @SPI_EXCEPTION_SOURCE_ACCESSIBLE: The source of an event or query (i.e. an app) has thrown the exception.
306 * @SPI_EXCEPTION_SOURCE_REGISTRY: The AT-SPI registry has thrown the exception or cannot be reached.
307 * @SPI_EXCEPTION_SOURCE_DEVICE: The device event subsystem has encountered an error condition.
309 * The general source of the failure, i.e. whether the app, registry, or device system has encountered trouble.
312 SPI_EXCEPTION_SOURCE_UNSPECIFIED,
313 SPI_EXCEPTION_SOURCE_ACCESSIBLE,
314 SPI_EXCEPTION_SOURCE_REGISTRY,
315 SPI_EXCEPTION_SOURCE_DEVICE
318 typedef unsigned long AccessibleKeyEventMask;
319 typedef unsigned long AccessibleDeviceEventMask;
322 * @x: The position of the minimum x value of the rectangle (i.e. left hand corner)
323 * @y: The position of the minimum y value of the rectangle's bounds.
324 * @width: Width of the rectangle in pixels.
325 * @height: Height of the rectangle in pixels.
327 * A structure encapsulating a rectangle.
337 *AccessibleComponentLayer:
338 *@SPI_LAYER_INVALID: The layer cannot be determined or is somehow undefined.
339 *@SPI_LAYER_BACKGROUND: Component belongs to the destop background.
340 *@SPI_LAYER_CANVAS: Component is a canvas backdrop or drawing area.
341 *@SPI_LAYER_WIDGET: Component is a 'normal' widget.
342 *@SPI_LAYER_MDI: Component is drawn in the MDI layer and may have valid
343 * Z-information relative to other MDI-layer components.
344 *@SPI_LAYER_POPUP: Component is in the popup layer, above other widgets and
346 *@SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
348 *@SPI_LAYER_WINDOW: Component is in the window layer and have valid Z-information
349 * relative to other window-layer components.
350 *@SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
351 * should not be encountered.
353 * Describes the layer of a component.
355 * These enumerated "layer values" are used when determining which UI
356 * rendering layer a component is drawn into, which can help in making
357 * determinations of when components occlude one another.
361 SPI_LAYER_BACKGROUND,
368 SPI_LAYER_LAST_DEFINED
369 } AccessibleComponentLayer;
373 * AccessibleTextRange:
374 * @start: the first nominal character position within the range.
375 * @end: the first nominal character position following the range.
376 * @content: The actual text content between @start and @end, as a UTF-8 string.
378 * Structure which encapsulates a text range - must be associated with an
379 * AccessibleText-implementing object.
381 typedef struct _AccessibleTextRange
386 } AccessibleTextRange;
394 * Structure containing identifying information about a set of keycode or
397 typedef struct _AccessibleKeySet
399 unsigned long *keysyms;
400 unsigned short *keycodes;
406 * A special value for an AccessibleKeySet type, which tacitly
407 * includes all keycodes and keyvals for the specified modifier set.
409 #define SPI_KEYSET_ALL_KEYS NULL
411 typedef unsigned long AccessibleModifierMaskType;
413 *AccessibleKeyMaskType:
415 *AccessibleKeyMaskType is a mask which is a set of key event modifiers
416 *which is specified in SPI_registerAccessibleKeystrokeListener.
419 typedef AccessibleModifierMaskType AccessibleKeyMaskType;
421 typedef struct _AccessibleAttributeSet
425 } AccessibleAttributeSet;
427 typedef struct _AccessibleRoleSet
430 AccessibleRole *roles;
435 /* Basic SPI initialization and event loop function prototypes */
438 void SPI_event_main (void);
439 void SPI_event_quit (void);
440 SPIBoolean SPI_eventIsReady (void);
441 AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
444 /* Event Listener creation and support. */
446 void SPI_freeAccessibleKeySet (
447 AccessibleKeySet *keyset);
448 AccessibleKeySet * SPI_createAccessibleKeySet (
452 const char **keystrings);
453 AccessibleEventListener * SPI_createAccessibleEventListener (
454 AccessibleEventListenerCB callback,
456 SPIBoolean AccessibleEventListener_addCallback (
457 AccessibleEventListener *listener,
458 AccessibleEventListenerCB callback,
460 SPIBoolean AccessibleEventListener_removeCallback (
461 AccessibleEventListener *listener,
462 AccessibleEventListenerCB callback);
463 void AccessibleEventListener_unref (
464 AccessibleEventListener *listener);
466 /* Device Event Listener creation and support. */
468 /* First four are deprecated in favor of the last four; really just a re-name */
470 AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener (
471 AccessibleKeystrokeListenerCB callback,
473 SPIBoolean AccessibleKeystrokeListener_addCallback (
474 AccessibleKeystrokeListener *listener,
475 AccessibleKeystrokeListenerCB callback,
477 SPIBoolean AccessibleKeystrokeListener_removeCallback (
478 AccessibleKeystrokeListener *listener,
479 AccessibleKeystrokeListenerCB callback);
480 void AccessibleKeystrokeListener_unref (
481 AccessibleKeystrokeListener *listener);
483 AccessibleDeviceListener * SPI_createAccessibleDeviceListener (
484 AccessibleDeviceListenerCB callback,
486 SPIBoolean AccessibleDeviceListener_addCallback (
487 AccessibleDeviceListener *listener,
488 AccessibleDeviceListenerCB callback,
490 SPIBoolean AccessibleDeviceListener_removeCallback (
491 AccessibleDeviceListener *listener,
492 AccessibleDeviceListenerCB callback);
493 void AccessibleDeviceListener_unref (
494 AccessibleDeviceListener *listener);
496 /* Global functions serviced by the registry */
498 SPIBoolean SPI_registerGlobalEventListener (
499 AccessibleEventListener *listener,
500 const char *eventType);
501 SPIBoolean SPI_deregisterGlobalEventListener (
502 AccessibleEventListener *listener,
503 const char *eventType);
504 SPIBoolean SPI_deregisterGlobalEventListenerAll (
505 AccessibleEventListener *listener);
506 SPIBoolean SPI_registerAccessibleKeystrokeListener (
507 AccessibleKeystrokeListener *listener,
508 AccessibleKeySet *keys,
509 AccessibleKeyMaskType modmask,
510 AccessibleKeyEventMask eventmask,
511 AccessibleKeyListenerSyncType sync_type);
512 SPIBoolean SPI_deregisterAccessibleKeystrokeListener (
513 AccessibleKeystrokeListener *listener,
514 AccessibleKeyMaskType modmask);
516 SPIBoolean SPI_registerDeviceEventListener (
517 AccessibleDeviceListener *listener,
518 AccessibleDeviceEventMask eventmask,
520 SPIBoolean SPI_deregisterDeviceEventListener (
521 AccessibleDeviceListener *listener,
524 int SPI_getDesktopCount (void);
525 Accessible *SPI_getDesktop (int i);
526 int SPI_getDesktopList (Accessible ***desktop_list);
527 void SPI_freeDesktopList (Accessible **desktop_list);
529 SPIBoolean SPI_generateKeyboardEvent (long int keyval,
531 AccessibleKeySynthType synth_type);
533 SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
535 /* Accessible function prototypes */
537 void Accessible_ref (Accessible *obj);
538 void Accessible_unref (Accessible *obj);
539 char * Accessible_getName (Accessible *obj);
540 char * Accessible_getDescription (Accessible *obj);
541 Accessible * Accessible_getParent (Accessible *obj);
542 long Accessible_getChildCount (Accessible *obj);
543 Accessible * Accessible_getChildAtIndex (Accessible *obj,
544 long int childIndex);
545 long Accessible_getIndexInParent (Accessible *obj);
546 AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
547 AccessibleRole Accessible_getRole (Accessible *obj);
548 char * Accessible_getRoleName (Accessible *obj);
549 char * Accessible_getLocalizedRoleName (Accessible *obj);
550 AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
551 AccessibleAttributeSet *Accessible_getAttributes (Accessible *obj);
552 AccessibleApplication *Accessible_getHostApplication (Accessible *obj);
554 /* Interface query methods */
556 SPIBoolean Accessible_isAction (Accessible *obj);
557 SPIBoolean Accessible_isApplication (Accessible *obj);
558 SPIBoolean Accessible_isCollection (Accessible *obj);
559 SPIBoolean Accessible_isComponent (Accessible *obj);
560 SPIBoolean Accessible_isDocument (Accessible *obj);
561 SPIBoolean Accessible_isEditableText (Accessible *obj);
562 SPIBoolean Accessible_isHypertext (Accessible *obj);
563 SPIBoolean Accessible_isImage (Accessible *obj);
564 SPIBoolean Accessible_isMatchRule (Accessible *obj);
565 SPIBoolean Accessible_isSelection (Accessible *obj);
566 SPIBoolean Accessible_isStreamableContent (Accessible *obj);
567 SPIBoolean Accessible_isTable (Accessible *obj);
568 SPIBoolean Accessible_isText (Accessible *obj);
569 SPIBoolean Accessible_isValue (Accessible *obj);
571 AccessibleAction * Accessible_getAction (Accessible *obj);
572 AccessibleApplication * Accessible_getApplication (Accessible *obj);
573 AccessibleCollection * Accessible_getCollection (Accessible *obj);
574 AccessibleComponent * Accessible_getComponent (Accessible *obj);
575 AccessibleDocument * Accessible_getDocument (Accessible *obj);
576 AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
577 AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
578 AccessibleImage * Accessible_getImage (Accessible *obj);
579 AccessibleMatchRule * Accessible_getMatchRule (Accessible *obj);
580 AccessibleSelection * Accessible_getSelection (Accessible *obj);
581 AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
582 AccessibleTable * Accessible_getTable (Accessible *obj);
583 AccessibleText * Accessible_getText (Accessible *obj);
584 AccessibleValue * Accessible_getValue (Accessible *obj);
585 AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
586 const char *interface_name);
588 /* AccessibleAction function prototypes */
590 void AccessibleAction_ref (AccessibleAction *obj);
591 void AccessibleAction_unref (AccessibleAction *obj);
592 long AccessibleAction_getNActions (AccessibleAction *obj);
593 char *AccessibleAction_getName (AccessibleAction *obj,
595 char *AccessibleAction_getDescription (AccessibleAction *obj,
597 SPIBoolean AccessibleAction_doAction (AccessibleAction *obj,
599 char *AccessibleAction_getKeyBinding (AccessibleAction *obj,
602 /* AccessibleApplication function prototypes */
604 void AccessibleApplication_ref (AccessibleApplication *obj);
605 void AccessibleApplication_unref (AccessibleApplication *obj);
606 char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
607 char *AccessibleApplication_getVersion (AccessibleApplication *obj);
608 long AccessibleApplication_getID (AccessibleApplication *obj);
609 char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
610 SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
611 SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
613 /* AccessibleCollection function prototypes */
614 void AccessibleCollection_ref (AccessibleCollection *obj);
615 void AccessibleCollection_unref (AccessibleCollection *obj);
616 AccessibleMatchRule *
617 AccessibleCollection_createMatchRule (AccessibleCollection *obj,
618 AccessibleStateSet *states,
619 AccessibleCollectionMatchType statematchtype,
620 AccessibleAttributeSet *attributes,
621 AccessibleCollectionMatchType attributematchtype,
622 AccessibleRoleSet *roles,
623 AccessibleCollectionMatchType rolematchtype,
625 AccessibleCollectionMatchType interfacematchtype,
628 AccessibleCollection_freeMatchRule (AccessibleCollection *obj,
629 AccessibleMatchRule *matchrule);
630 /* AccessibleComponent function prototypes */
632 void AccessibleComponent_ref (AccessibleComponent *obj);
633 void AccessibleComponent_unref (AccessibleComponent *obj);
634 SPIBoolean AccessibleComponent_contains (AccessibleComponent *obj,
637 AccessibleCoordType ctype);
638 Accessible *AccessibleComponent_getAccessibleAtPoint (
639 AccessibleComponent *obj,
642 AccessibleCoordType ctype);
643 void AccessibleComponent_getExtents (AccessibleComponent *obj,
648 AccessibleCoordType ctype);
649 void AccessibleComponent_getPosition (AccessibleComponent *obj,
652 AccessibleCoordType ctype);
653 void AccessibleComponent_getSize (AccessibleComponent *obj,
656 AccessibleComponentLayer
657 AccessibleComponent_getLayer (AccessibleComponent *obj);
658 SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
659 short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
660 double AccessibleComponent_getAlpha (AccessibleComponent *obj);
662 /* AccessibleDocument function prototypes */
664 void AccessibleDocument_ref (AccessibleDocument *obj);
665 void AccessibleDocument_unref (AccessibleDocument *obj);
666 char *AccessibleDocument_getLocale (AccessibleDocument *obj);
667 char *AccessibleDocument_getAttributeValue (AccessibleDocument *obj,
669 AccessibleAttributeSet *AccessibleDocument_getAttributes (AccessibleDocument *obj);
671 /* AccessibleEditableText function prototypes */
674 AccessibleEditableText_ref (AccessibleEditableText *obj);
677 AccessibleEditableText_unref (AccessibleEditableText *obj);
680 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
681 const char *attributes,
682 long int startOffset,
686 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
687 const char *newContents);
690 AccessibleEditableText_insertText (AccessibleEditableText *obj,
696 AccessibleEditableText_copyText (AccessibleText *obj,
701 AccessibleEditableText_cutText (AccessibleEditableText *obj,
706 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
711 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
716 * AccessibleHyperlink function prototypes
720 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
722 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
725 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
728 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
732 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
736 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
737 long int *startIndex,
741 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
745 * AccessibleHypertext function prototypes
750 AccessibleHypertext_ref (AccessibleHypertext *obj);
753 AccessibleHypertext_unref (AccessibleHypertext *obj);
756 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
758 AccessibleHyperlink *
759 AccessibleHypertext_getLink (AccessibleHypertext *obj,
763 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
764 long int characterOffset);
768 * AccessibleImage function prototypes
773 AccessibleImage_ref (AccessibleImage *obj);
776 AccessibleImage_unref (AccessibleImage *obj);
779 AccessibleImage_getImageDescription (AccessibleImage *obj);
782 AccessibleImage_getImageSize (AccessibleImage *obj,
787 AccessibleImage_getImagePosition (AccessibleImage *obj,
790 AccessibleCoordType ctype);
793 AccessibleImage_getImageExtents (AccessibleImage *obj,
798 AccessibleCoordType ctype);
800 AccessibleImage_getImageLocale (AccessibleImage *obj);
804 * AccessibleMatchRule function prototypes
807 void AccessibleMatchRule_ref (AccessibleMatchRule *obj);
808 void AccessibleMatchRule_unref (AccessibleMatchRule *obj);
812 * AccessibleRelation function prototypes
816 void AccessibleRelation_ref (AccessibleRelation *obj);
817 void AccessibleRelation_unref (AccessibleRelation *obj);
819 AccessibleRelationType
820 AccessibleRelation_getRelationType (AccessibleRelation *obj);
823 AccessibleRelation_getNTargets (AccessibleRelation *obj);
826 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
831 * AccessibleSelection function prototypes
835 void AccessibleSelection_ref (AccessibleSelection *obj);
836 void AccessibleSelection_unref (AccessibleSelection *obj);
839 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
842 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
843 long int selectedChildIndex);
846 AccessibleSelection_selectChild (AccessibleSelection *obj,
847 long int childIndex);
850 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
851 long int selectedChildIndex);
854 AccessibleSelection_deselectChild (AccessibleSelection *obj,
855 long int childIndex);
858 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
859 long int childIndex);
862 AccessibleSelection_selectAll (AccessibleSelection *obj);
865 AccessibleSelection_clearSelection (AccessibleSelection *obj);
870 * AccessibleStateSet function prototypes
874 void AccessibleStateSet_ref (AccessibleStateSet *obj);
875 void AccessibleStateSet_unref (AccessibleStateSet *obj);
878 AccessibleStateSet_contains (AccessibleStateSet *obj,
879 AccessibleState state);
882 AccessibleStateSet_add (AccessibleStateSet *obj,
883 AccessibleState state);
886 AccessibleStateSet_remove (AccessibleStateSet *obj,
887 AccessibleState state);
890 AccessibleStateSet_equals (AccessibleStateSet *obj,
891 AccessibleStateSet *obj2);
894 AccessibleStateSet_compare (AccessibleStateSet *obj,
895 AccessibleStateSet *obj2);
898 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
901 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
903 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
905 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
908 AccessibleStreamableContent_freeContentTypesList (AccessibleStreamableContent *obj,
909 char **content_types);
910 #define AccessibleStreamableContent_freeContentTypeList(a, b) AccessibleStreamableContent_freeContentTypesList(a,b)
913 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
914 const char *content_type);
916 AccessibleStreamableContent_close (AccessibleStreamableContent *obj);
919 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
921 AccessibleStreamableContentSeekType seek_type);
923 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
926 unsigned int read_type);
929 * AccessibleTable function prototypes
933 void AccessibleTable_ref (AccessibleTable *obj);
934 void AccessibleTable_unref (AccessibleTable *obj);
937 AccessibleTable_getCaption (AccessibleTable *obj);
940 AccessibleTable_getSummary (AccessibleTable *obj);
943 AccessibleTable_getNRows (AccessibleTable *obj);
946 AccessibleTable_getNColumns (AccessibleTable *obj);
949 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
954 AccessibleTable_getIndexAt (AccessibleTable *obj,
959 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
963 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
967 AccessibleTable_getRowDescription (AccessibleTable *obj,
971 AccessibleTable_getColumnDescription (AccessibleTable *obj,
975 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
980 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
985 AccessibleTable_getRowColumnExtentsAtIndex (AccessibleTable *obj,
986 long int index, long int *row, long int *col,
987 long int *row_extents, long int *col_extents,
988 long int *is_selected);
991 AccessibleTable_getRowHeader (AccessibleTable *obj,
995 AccessibleTable_getColumnHeader (AccessibleTable *obj,
999 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
1002 AccessibleTable_getSelectedRows (AccessibleTable *obj,
1003 long int **selectedRows);
1006 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
1009 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
1010 long int **selectedColumns);
1013 AccessibleTable_isRowSelected (AccessibleTable *obj,
1017 AccessibleTable_isColumnSelected (AccessibleTable *obj,
1021 AccessibleTable_isSelected (AccessibleTable *obj,
1026 AccessibleTable_addRowSelection (AccessibleTable *obj,
1029 AccessibleTable_addColumnSelection (AccessibleTable *obj,
1033 AccessibleTable_removeRowSelection (AccessibleTable *obj,
1036 AccessibleTable_removeColumnSelection (AccessibleTable *obj,
1041 * AccessibleText function prototypes
1045 void AccessibleText_ref (AccessibleText *obj);
1046 void AccessibleText_unref (AccessibleText *obj);
1049 AccessibleText_getCharacterCount (AccessibleText *obj);
1052 AccessibleText_getText (AccessibleText *obj,
1053 long int startOffset,
1054 long int endOffset);
1057 AccessibleText_getCaretOffset (AccessibleText *obj);
1060 AccessibleText_getAttributes (AccessibleText *obj,
1062 long int *startOffset,
1063 long int *endOffset);
1066 AccessibleText_getDefaultAttributes (AccessibleText *obj);
1069 AccessibleText_setCaretOffset (AccessibleText *obj,
1070 long int newOffset);
1073 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
1075 AccessibleTextBoundaryType type,
1076 long int *startOffset,
1077 long int *endOffset);
1080 AccessibleText_getTextAtOffset (AccessibleText *obj,
1082 AccessibleTextBoundaryType type,
1083 long int *startOffset,
1084 long int *endOffset);
1087 AccessibleText_getTextAfterOffset (AccessibleText *obj,
1089 AccessibleTextBoundaryType type,
1090 long int *startOffset,
1091 long int *endOffset);
1094 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1098 AccessibleText_getCharacterExtents (AccessibleText *obj,
1104 AccessibleCoordType type);
1107 AccessibleText_getRangeExtents (AccessibleText *obj,
1108 long int startOffset,
1114 AccessibleCoordType type);
1116 AccessibleTextRange **
1117 AccessibleText_getBoundedRanges (AccessibleText *obj,
1122 AccessibleCoordType type,
1123 AccessibleTextClipType clipTypeX,
1124 AccessibleTextClipType clipTypeY);
1127 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges);
1130 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1133 AccessibleCoordType type);
1136 AccessibleText_getNSelections (AccessibleText *obj);
1139 AccessibleText_getSelection (AccessibleText *obj,
1140 long int selectionNum,
1141 long int *startOffset,
1142 long int *endOffset);
1146 AccessibleText_addSelection (AccessibleText *obj,
1147 long int startOffset,
1148 long int endOffset);
1151 AccessibleText_removeSelection (AccessibleText *obj,
1152 long int selectionNum);
1155 AccessibleText_setSelection (AccessibleText *obj,
1156 long int selectionNum,
1157 long int startOffset,
1158 long int endOffset);
1159 AccessibleAttributeSet *
1160 AccessibleText_getAttributeRun (AccessibleText *obj,
1162 long int *startOffset,
1163 long int *endOffset,
1164 long int includeDefaults);
1165 AccessibleAttributeSet *
1166 AccessibleText_getDefaultAttributeSet (AccessibleText *obj);
1168 /* AccessibleValue Function Prototypes: */
1170 void AccessibleValue_ref (AccessibleValue *obj);
1171 void AccessibleValue_unref (AccessibleValue *obj);
1172 double AccessibleValue_getMinimumValue (AccessibleValue *obj);
1173 double AccessibleValue_getCurrentValue (AccessibleValue *obj);
1174 double AccessibleValue_getMaximumValue (AccessibleValue *obj);
1175 SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
1177 double AccessibleValue_getMinimumIncrement (AccessibleValue *obj);
1179 /* Persistance and lifecycle control for AccessibleEvents. */
1180 SPIBoolean AccessibleEvent_ref (const AccessibleEvent *e);
1181 void AccessibleEvent_unref (const AccessibleEvent *e);
1184 * Prototypes for accessor functions, to obtain context
1185 * information for accessible events.
1188 char* AccessibleEvent_getSourceName (const AccessibleEvent *e);
1189 AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e);
1190 AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEvent *e);
1191 SPIBoolean AccessibleEvent_getSourceDetails (const AccessibleEvent *e, char **name,
1192 AccessibleRole *role,
1193 AccessibleApplication **app);
1195 char* AccessibleTextChangedEvent_getChangeString (const AccessibleEvent *e);
1196 Accessible * AccessibleChildChangedEvent_getChildAccessible (const AccessibleEvent *e);
1198 Accessible * AccessibleParentChangedEvent_getParentAccessible (const AccessibleEvent *e);
1200 char* AccessibleTextSelectionChangedEvent_getSelectionString (const AccessibleEvent *e);
1202 char* AccessibleWindowEvent_getTitleString (const AccessibleEvent *e);
1204 Accessible * AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e);
1206 Accessible * AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e);
1208 Accessible * AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e);
1210 char * AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e);
1212 char * AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1214 char * AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1216 char * AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1218 char * AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e);
1219 SPIRect * AccessibleBoundsChangedEvent_getNewBounds (const AccessibleEvent *e);
1221 /* Misc methods and error handling */
1222 void SPI_freeString (char *s);
1224 char* SPI_dupString (char *s);
1226 void SPI_freeRect (SPIRect *r);
1228 SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
1230 SPIExceptionHandler* SPI_exceptionHandlerPop (void);
1232 SPIExceptionType SPIException_getSourceType (SPIException *err);
1234 SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
1236 Accessible* SPIAccessibleException_getSource (SPIException *err);
1238 char* SPIException_getDescription (SPIException *err);