2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
27 #include <cspi/spi-impl.h>
29 * Definitions for AccessibleRole, AccessibleState,
30 * and event listeners.
32 #include <cspi/spi-roletypes.h>
33 #include <cspi/spi-statetypes.h>
34 #include <cspi/spi-listener.h>
37 * Auxiliary typedefs and mask definitions
39 #include <libspi/keymasks.h>
46 *AccessibleTextBoundaryType:
47 *@SPI_TEXT_BOUNDARY_CHAR: Delimiter is the current character's bounds.
48 *@SPI_TEXT_BOUNDARY_CURSOR_POS: Delimiter is the current text caret position.
49 *@SPI_TEXT_BOUNDARY_WORD_START: Bounds run from the first character of a word to the first
50 * character of the following word (i.e. including trailing whitespace, if any) within the text object.
51 *@SPI_TEXT_BOUNDARY_WORD_END: Bounds run from the last character of a word to the last
52 * character of the following word (i.e. including leading whitespace) within the text object.
53 *@SPI_TEXT_BOUNDARY_SENTENCE_START: Bounds run from the first character of a sentence to the first
54 * character of the next sentence in the text object.
55 *@SPI_TEXT_BOUNDARY_SENTENCE_END: Bounds run from the last character of a sentence to the last
56 * character of the next sentence in the text object.
57 *@SPI_TEXT_BOUNDARY_LINE_START: Bounds span one line of text, with the line delimiter at the end of the
58 * bounds, if present, within the current text object.
59 *@SPI_TEXT_BOUNDARY_LINE_END: Bounds span one line of text, including a preceding line delimiter
60 * if present within the current text object.
61 *@SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE: Bounds span the run, relative to the specified offset and
62 * text accessor API rules, over which the attributes of the text object are invariant.
64 *Text boundary types used for specifying boundaries for regions of text.
68 SPI_TEXT_BOUNDARY_CHAR,
69 SPI_TEXT_BOUNDARY_CURSOR_POS,
70 SPI_TEXT_BOUNDARY_WORD_START,
71 SPI_TEXT_BOUNDARY_WORD_END,
72 SPI_TEXT_BOUNDARY_SENTENCE_START,
73 SPI_TEXT_BOUNDARY_SENTENCE_END,
74 SPI_TEXT_BOUNDARY_LINE_START,
75 SPI_TEXT_BOUNDARY_LINE_END,
76 SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE
77 } AccessibleTextBoundaryType;
80 *AccessibleTextClipType
81 *@SPI_TEXT_CLIP_NONE: No clipping to be done
82 *@SPI_TEXT_CLIP_MIN: Text clipped by min coordinate is omitted
83 *@SPI_TEXT_CLIP_MAX: Text clipped by max coordinate is omitted
84 *@SPI_TEXT_CLIP_BOTH: Only text fully within mix/max bound is retained
86 *Describes the type of clipping required.
94 } AccessibleTextClipType;
97 *AccessibleRelationType:
98 *@SPI_RELATION_NULL: Not used, this is an invalid value for this enumeration.
99 *@SPI_RELATION_LABEL_FOR: Indicates an object is a label for one or more target objects.
100 *@SPI_RELATION_LABELED_BY: Indicates an object is labelled by one or more target objects.
101 *@SPI_RELATION_CONTROLLED_BY: Indicates an object controlled by one or more target objects.
102 *@SPI_RELATION_CONTROLLER_FOR: Indicates an object is an controller for one or more target objects.
103 *@SPI_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or
105 *@SPI_RELATION_NODE_CHILD_OF: Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell.
106 *@SPI_RELATION_EXTENDED: This value indicates that a relation other than those pre-specified by this version of AT-SPI
108 *@SPI_RELATION_FLOWS_TO: Indicates that the object has content that flows logically to another
109 * AtkObject in a sequential way, (for instance text-flow).
110 *@SPI_RELATION_FLOWS_FROM: Indicates that the object has content that flows logically from
111 * another AtkObject in a sequential way, (for instance text-flow).
112 *@SPI_RELATION_SUBWINDOW_OF: Indicates a subwindow attached to a component but otherwise has no connection in the UI heirarchy to that component.
113 *@SPI_RELATION_EMBEDS: Indicates that the object visually embeds
114 * another object's content, i.e. this object's content flows around
116 *@SPI_RELATION_EMBEDDED_BY: Inverse of %SPI_RELATION_EMBEDS, indicates that
117 * this object's content is visualy embedded in another object.
118 *@SPI_RELATION_POPUP_FOR: Indicates that an object is a popup for another objec *@SPI_RELATION_PARENT_WINDOW_OF: Indicates that an object is a parent window of another object.
119 *@SPI_RELATION_DESCRIBED_BY: Indicates that another object provides descriptive information about this object; more verbose than %SPI_RELATION_LABELLED_BY.
120 *@SPI_RELATION_DESCRIPTION_FOR: Indicates that an object provides descriptive information about another object; more verbose than %SPI_RELATION_LABEL_FOR.
121 *@SPI_RELATION_LAST_DEFINED: Do not use, this is an implementation detail used
122 * to identify the size of this enumeration.
124 *Describes the type of the relation
129 SPI_RELATION_LABEL_FOR,
130 SPI_RELATION_LABELED_BY,
131 SPI_RELATION_CONTROLLER_FOR,
132 SPI_RELATION_CONTROLLED_BY,
133 SPI_RELATION_MEMBER_OF,
134 SPI_RELATION_NODE_CHILD_OF,
135 SPI_RELATION_EXTENDED,
136 SPI_RELATION_FLOWS_TO,
137 SPI_RELATION_FLOWS_FROM,
138 SPI_RELATION_SUBWINDOW_OF,
140 SPI_RELATION_EMBEDDED_BY,
141 SPI_RELATION_POPUP_FOR,
142 SPI_RELATION_PARENT_WINDOW_OF,
143 SPI_RELATION_DESCRIPTION_FOR,
144 SPI_RELATION_DESCRIBED_BY,
145 SPI_RELATION_LAST_DEFINED
146 } AccessibleRelationType;
149 /* don't change the order of these ! */
151 *AccessibleCoordType:
152 *@SPI_COORD_TYPE_SCREEN: specifies xy coordinates relative to the screen
153 *@SPI_COORD_TYPE_WINDOW: specifies xy coordinates relative to an object's
156 *Specifies how xy coordinates are to be interpreted. Used by functions such
157 *as AccessibleComponent_getPosition() and AccessibleText_getCharacterExtents()
160 SPI_COORD_TYPE_SCREEN,
161 SPI_COORD_TYPE_WINDOW
162 } AccessibleCoordType;
165 *AccessibleKeySynthType:
166 *@SPI_KEY_PRESS: Generates a keypress event (requires a subsequent #SPI_KEY_RELEASE event)
167 *@SPI_KEY_RELEASE: Generates a key-release event
168 *@SPI_KEY_PRESSRELEASE: Generates a key press/release event pair.
169 *@SPI_KEY_SYM: Injects a "keysym" event into the stream, as if a press/release pair occurred; allows
170 * the user to specify the key via its symbolic name, as opposed to simulating a hardware press of a
172 *@SPI_KEY_STRING: Injects one or more keysym events into the keyboard buffer, or directly inserts
173 * a string value into the currently focussed text widget, if the widgets supports this.
174 * #SPI_KEY_STRING synthesis provides a shortcut for text substring insertion, and also allows the
175 * insertion of text which is not currently available via the current keyboard's keymap.
177 * Specifies the type of a generated event.
182 SPI_KEY_PRESSRELEASE,
185 } AccessibleKeySynthType;
188 *AccessibleKeyListenerSyncType:
189 *@SPI_KEYLISTENER_NOSYNC: Events may be delivered asynchronously,
190 * which means in some cases they may already have been delivered to the
191 * application before the AT client receives the notification.
192 *@SPI_KEYLISTENER_SYNCHRONOUS: Events are delivered synchronously, before the
193 * currently focussed application sees them.
194 *@SPI_KEYLISTENER_CANCONSUME: Events may be consumed by the AT client. Presumes and
195 * requires #SPI_KEYLISTENER_SYNCHRONOUS, incompatible with #SPI_KEYLISTENER_NOSYNC.
196 *@SPI_KEYLISTENER_ALL_WINDOWS: Events are received not from the application toolkit layer, but
197 * from the device driver or windowing system subsystem; such notifications are 'global' in the
198 * sense that they are not broken or defeated by applications that participate poorly
199 * in the accessibility APIs, or not at all; however because of the intrusive nature of
200 * such snooping, it can have side-effects on certain older platforms. If unconditional
201 * event notifications, even when inaccessible or "broken" applications have focus, are not
202 * required, it may be best to avoid this enum value/flag.
204 *Specified the tyupe of a key listener event.
205 * Certain of the values above can and should be bitwise-'OR'ed
206 * together, observing the compatibility limitations specified in the description of
207 * each value. For instance, #SPI_KEYLISTENER_ALL_WINDOWS | #SPI_KEYLISTENER_CANCONSUME is
208 * a commonly used combination which gives the AT complete control over the delivery of matching
209 * events. However, such filters should be used sparingly as they may have a negative impact on
210 * system performance.
213 SPI_KEYLISTENER_NOSYNC = 0,
214 SPI_KEYLISTENER_SYNCHRONOUS = 1,
215 SPI_KEYLISTENER_CANCONSUME = 2,
216 SPI_KEYLISTENER_ALL_WINDOWS = 4
217 } AccessibleKeyListenerSyncType;
221 *AccessibleStreamableContentSeekType
222 *@SPI_STREAM_SEEK_SET: seek from the 'top' of the streamable
223 *@SPI_STREAM_SEEK_CUR: seek from the current position in the stream
224 *@SPI_STREAM_SEEK_END: seek from the end of the stream (if known)
226 *The seek type for a specified offset in AccessibleStreamableContent_seek.
233 } AccessibleStreamableContentSeekType;
243 * An opaque object encapsulating information about thrown exceptions.
245 typedef struct _SPIException SPIException;
248 typedef SPIBoolean (*SPIExceptionHandler) (SPIException *err, SPIBoolean is_fatal);
252 * @SPI_EXCEPTION_UNSPECIFIED: An exception of unknown type, or which doesn't fit the other types.
253 * @SPI_EXCEPTION_DISCONNECT: Communication with the object or service has been disconnected;
254 * this usually means that the object or service has died or exited.
255 * @SPI_EXCEPTION_NO_IMPL: The object or service is missing the implementation for a request.
256 * @SPI_EXCEPTION_IO: The communications channel has become corrupted, blocked, or is otherwise in a bad state.
257 * @SPI_EXCEPTION_BAD_DATA: The data received or sent over the interface has been identified as
258 * improperly formatted or otherwise fails to match the expectations.
260 * Exception codes indicating what's gone wrong in an AT-SPI call.
263 SPI_EXCEPTION_UNSPECIFIED,
264 SPI_EXCEPTION_DISCONNECT,
265 SPI_EXCEPTION_NO_IMPL,
267 SPI_EXCEPTION_BAD_DATA
272 * @SPI_EXCEPTION_SOURCE_UNSPECIFIED: Don't know or can't tell where the problem is
273 * @SPI_EXCEPTION_SOURCE_ACCESSIBLE: The source of an event or query (i.e. an app) has thrown the exception.
274 * @SPI_EXCEPTION_SOURCE_REGISTRY: The AT-SPI registry has thrown the exception or cannot be reached.
275 * @SPI_EXCEPTION_SOURCE_DEVICE: The device event subsystem has encountered an error condition.
277 * The general source of the failure, i.e. whether the app, registry, or device system has encountered trouble.
280 SPI_EXCEPTION_SOURCE_UNSPECIFIED,
281 SPI_EXCEPTION_SOURCE_ACCESSIBLE,
282 SPI_EXCEPTION_SOURCE_REGISTRY,
283 SPI_EXCEPTION_SOURCE_DEVICE
286 typedef unsigned long AccessibleKeyEventMask;
287 typedef unsigned long AccessibleDeviceEventMask;
290 * @x: The position of the minimum x value of the rectangle (i.e. left hand corner)
291 * @y: The position of the minimum y value of the rectangle's bounds.
292 * @width: Width of the rectangle in pixels.
293 * @height: Height of the rectangle in pixels.
295 * A structure encapsulating a rectangle.
305 *AccessibleComponentLayer:
306 *@SPI_LAYER_INVALID: The layer cannot be determined or is somehow undefined.
307 *@SPI_LAYER_BACKGROUND: Component belongs to the destop background.
308 *@SPI_LAYER_CANVAS: Component is a canvas backdrop or drawing area.
309 *@SPI_LAYER_WIDGET: Component is a 'normal' widget.
310 *@SPI_LAYER_MDI: Component is drawn in the MDI layer and may have valid
311 * Z-information relative to other MDI-layer components.
312 *@SPI_LAYER_POPUP: Component is in the popup layer, above other widgets and
314 *@SPI_LAYER_OVERLAY: Component is in the overlay plane - this value is reserved
316 *@SPI_LAYER_WINDOW: Component is in the window layer and have valid Z-information
317 * relative to other window-layer components.
318 *@SPI_LAYER_LAST_DEFINED: Used to determine the last valid value in the enum,
319 * should not be encountered.
321 * Describes the layer of a component.
323 * These enumerated "layer values" are used when determining which UI
324 * rendering layer a component is drawn into, which can help in making
325 * determinations of when components occlude one another.
329 SPI_LAYER_BACKGROUND,
336 SPI_LAYER_LAST_DEFINED
337 } AccessibleComponentLayer;
341 * AccessibleTextRange:
342 * @start: the first nominal character position within the range.
343 * @end: the first nominal character position following the range.
344 * @content: The actual text content between @start and @end, as a UTF-8 string.
346 * Structure which encapsulates a text range - must be associated with an
347 * AccessibleText-implementing object.
349 typedef struct _AccessibleTextRange
354 } AccessibleTextRange;
362 * Structure containing identifying information about a set of keycode or
365 typedef struct _AccessibleKeySet
367 unsigned long *keysyms;
368 unsigned short *keycodes;
374 * A special value for an AccessibleKeySet type, which tacitly
375 * includes all keycodes and keyvals for the specified modifier set.
377 #define SPI_KEYSET_ALL_KEYS NULL
379 typedef unsigned long AccessibleModifierMaskType;
381 *AccessibleKeyMaskType:
383 *AccessibleKeyMaskType is a mask which is a set of key event modifiers
384 *which is specified in SPI_registerAccessibleKeystrokeListener.
387 typedef AccessibleModifierMaskType AccessibleKeyMaskType;
389 typedef struct _AccessibleAttributeSet
393 } AccessibleAttributeSet;
395 /* Basic SPI initialization and event loop function prototypes */
398 void SPI_event_main (void);
399 void SPI_event_quit (void);
400 SPIBoolean SPI_eventIsReady (void);
401 AccessibleEvent *SPI_nextEvent (SPIBoolean waitForEvent);
404 /* Event Listener creation and support. */
406 void SPI_freeAccessibleKeySet (
407 AccessibleKeySet *keyset);
408 AccessibleKeySet * SPI_createAccessibleKeySet (
412 const char **keystrings);
413 AccessibleEventListener * SPI_createAccessibleEventListener (
414 AccessibleEventListenerCB callback,
416 SPIBoolean AccessibleEventListener_addCallback (
417 AccessibleEventListener *listener,
418 AccessibleEventListenerCB callback,
420 SPIBoolean AccessibleEventListener_removeCallback (
421 AccessibleEventListener *listener,
422 AccessibleEventListenerCB callback);
423 void AccessibleEventListener_unref (
424 AccessibleEventListener *listener);
426 /* Device Event Listener creation and support. */
428 /* First four are deprecated in favor of the last four; really just a re-name */
430 AccessibleKeystrokeListener * SPI_createAccessibleKeystrokeListener (
431 AccessibleKeystrokeListenerCB callback,
433 SPIBoolean AccessibleKeystrokeListener_addCallback (
434 AccessibleKeystrokeListener *listener,
435 AccessibleKeystrokeListenerCB callback,
437 SPIBoolean AccessibleKeystrokeListener_removeCallback (
438 AccessibleKeystrokeListener *listener,
439 AccessibleKeystrokeListenerCB callback);
440 void AccessibleKeystrokeListener_unref (
441 AccessibleKeystrokeListener *listener);
443 AccessibleDeviceListener * SPI_createAccessibleDeviceListener (
444 AccessibleDeviceListenerCB callback,
446 SPIBoolean AccessibleDeviceListener_addCallback (
447 AccessibleDeviceListener *listener,
448 AccessibleDeviceListenerCB callback,
450 SPIBoolean AccessibleDeviceListener_removeCallback (
451 AccessibleDeviceListener *listener,
452 AccessibleDeviceListenerCB callback);
453 void AccessibleDeviceListener_unref (
454 AccessibleDeviceListener *listener);
456 /* Global functions serviced by the registry */
458 SPIBoolean SPI_registerGlobalEventListener (
459 AccessibleEventListener *listener,
460 const char *eventType);
461 SPIBoolean SPI_deregisterGlobalEventListener (
462 AccessibleEventListener *listener,
463 const char *eventType);
464 SPIBoolean SPI_deregisterGlobalEventListenerAll (
465 AccessibleEventListener *listener);
466 SPIBoolean SPI_registerAccessibleKeystrokeListener (
467 AccessibleKeystrokeListener *listener,
468 AccessibleKeySet *keys,
469 AccessibleKeyMaskType modmask,
470 AccessibleKeyEventMask eventmask,
471 AccessibleKeyListenerSyncType sync_type);
472 SPIBoolean SPI_deregisterAccessibleKeystrokeListener (
473 AccessibleKeystrokeListener *listener,
474 AccessibleKeyMaskType modmask);
476 SPIBoolean SPI_registerDeviceEventListener (
477 AccessibleDeviceListener *listener,
478 AccessibleDeviceEventMask eventmask,
480 SPIBoolean SPI_deregisterDeviceEventListener (
481 AccessibleDeviceListener *listener,
484 int SPI_getDesktopCount (void);
485 Accessible *SPI_getDesktop (int i);
486 int SPI_getDesktopList (Accessible ***desktop_list);
487 void SPI_freeDesktopList (Accessible **desktop_list);
489 SPIBoolean SPI_generateKeyboardEvent (long int keyval,
491 AccessibleKeySynthType synth_type);
493 SPIBoolean SPI_generateMouseEvent (long int x, long int y, char *name);
495 /* Accessible function prototypes */
497 void Accessible_ref (Accessible *obj);
498 void Accessible_unref (Accessible *obj);
499 char * Accessible_getName (Accessible *obj);
500 char * Accessible_getDescription (Accessible *obj);
501 Accessible * Accessible_getParent (Accessible *obj);
502 long Accessible_getChildCount (Accessible *obj);
503 Accessible * Accessible_getChildAtIndex (Accessible *obj,
504 long int childIndex);
505 long Accessible_getIndexInParent (Accessible *obj);
506 AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
507 AccessibleRole Accessible_getRole (Accessible *obj);
508 char * Accessible_getRoleName (Accessible *obj);
509 char * Accessible_getLocalizedRoleName (Accessible *obj);
510 AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
511 AccessibleAttributeSet *Accessible_getAttributes (Accessible *obj);
512 AccessibleApplication *Accessible_getHostApplication (Accessible *obj);
514 /* Interface query methods */
516 SPIBoolean Accessible_isAction (Accessible *obj);
517 SPIBoolean Accessible_isApplication (Accessible *obj);
518 SPIBoolean Accessible_isComponent (Accessible *obj);
519 SPIBoolean Accessible_isEditableText (Accessible *obj);
520 SPIBoolean Accessible_isHypertext (Accessible *obj);
521 SPIBoolean Accessible_isImage (Accessible *obj);
522 SPIBoolean Accessible_isSelection (Accessible *obj);
523 SPIBoolean Accessible_isStreamableContent (Accessible *obj);
524 SPIBoolean Accessible_isTable (Accessible *obj);
525 SPIBoolean Accessible_isText (Accessible *obj);
526 SPIBoolean Accessible_isValue (Accessible *obj);
528 AccessibleAction * Accessible_getAction (Accessible *obj);
529 AccessibleApplication * Accessible_getApplication (Accessible *obj);
530 AccessibleComponent * Accessible_getComponent (Accessible *obj);
531 AccessibleEditableText * Accessible_getEditableText (Accessible *obj);
532 AccessibleHypertext * Accessible_getHypertext (Accessible *obj);
533 AccessibleImage * Accessible_getImage (Accessible *obj);
534 AccessibleSelection * Accessible_getSelection (Accessible *obj);
535 AccessibleStreamableContent * Accessible_getStreamableContent (Accessible *obj);
536 AccessibleTable * Accessible_getTable (Accessible *obj);
537 AccessibleText * Accessible_getText (Accessible *obj);
538 AccessibleValue * Accessible_getValue (Accessible *obj);
539 AccessibleUnknown * Accessible_queryInterface (Accessible *obj,
540 const char *interface_name);
542 /* AccessibleAction function prototypes */
544 void AccessibleAction_ref (AccessibleAction *obj);
545 void AccessibleAction_unref (AccessibleAction *obj);
546 long AccessibleAction_getNActions (AccessibleAction *obj);
547 char *AccessibleAction_getName (AccessibleAction *obj,
549 char *AccessibleAction_getDescription (AccessibleAction *obj,
551 SPIBoolean AccessibleAction_doAction (AccessibleAction *obj,
553 char *AccessibleAction_getKeyBinding (AccessibleAction *obj,
556 /* AccessibleApplication function prototypes */
558 void AccessibleApplication_ref (AccessibleApplication *obj);
559 void AccessibleApplication_unref (AccessibleApplication *obj);
560 char *AccessibleApplication_getToolkitName (AccessibleApplication *obj);
561 char *AccessibleApplication_getVersion (AccessibleApplication *obj);
562 long AccessibleApplication_getID (AccessibleApplication *obj);
563 char *AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category);
564 SPIBoolean AccessibleApplication_pause (AccessibleApplication *obj);
565 SPIBoolean AccessibleApplication_resume (AccessibleApplication *obj);
567 /* AccessibleComponent function prototypes */
569 void AccessibleComponent_ref (AccessibleComponent *obj);
570 void AccessibleComponent_unref (AccessibleComponent *obj);
571 SPIBoolean AccessibleComponent_contains (AccessibleComponent *obj,
574 AccessibleCoordType ctype);
575 Accessible *AccessibleComponent_getAccessibleAtPoint (
576 AccessibleComponent *obj,
579 AccessibleCoordType ctype);
580 void AccessibleComponent_getExtents (AccessibleComponent *obj,
585 AccessibleCoordType ctype);
586 void AccessibleComponent_getPosition (AccessibleComponent *obj,
589 AccessibleCoordType ctype);
590 void AccessibleComponent_getSize (AccessibleComponent *obj,
593 AccessibleComponentLayer
594 AccessibleComponent_getLayer (AccessibleComponent *obj);
595 SPIBoolean AccessibleComponent_grabFocus (AccessibleComponent *obj);
596 short AccessibleComponent_getMDIZOrder(AccessibleComponent *obj);
597 double AccessibleComponent_getAlpha (AccessibleComponent *obj);
599 /* AccessibleEditableText function prototypes */
602 AccessibleEditableText_ref (AccessibleEditableText *obj);
605 AccessibleEditableText_unref (AccessibleEditableText *obj);
608 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
609 const char *attributes,
610 long int startOffset,
614 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
615 const char *newContents);
618 AccessibleEditableText_insertText (AccessibleEditableText *obj,
624 AccessibleEditableText_copyText (AccessibleText *obj,
629 AccessibleEditableText_cutText (AccessibleEditableText *obj,
634 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
639 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
644 * AccessibleHyperlink function prototypes
648 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
650 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
653 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
656 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
660 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
664 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
665 long int *startIndex,
669 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
673 * AccessibleHypertext function prototypes
678 AccessibleHypertext_ref (AccessibleHypertext *obj);
681 AccessibleHypertext_unref (AccessibleHypertext *obj);
684 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
686 AccessibleHyperlink *
687 AccessibleHypertext_getLink (AccessibleHypertext *obj,
691 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
692 long int characterOffset);
696 * AccessibleImage function prototypes
701 AccessibleImage_ref (AccessibleImage *obj);
704 AccessibleImage_unref (AccessibleImage *obj);
707 AccessibleImage_getImageDescription (AccessibleImage *obj);
710 AccessibleImage_getImageSize (AccessibleImage *obj,
715 AccessibleImage_getImagePosition (AccessibleImage *obj,
718 AccessibleCoordType ctype);
721 AccessibleImage_getImageExtents (AccessibleImage *obj,
726 AccessibleCoordType ctype);
728 AccessibleImage_getImageLocale (AccessibleImage *obj);
732 * AccessibleRelation function prototypes
736 void AccessibleRelation_ref (AccessibleRelation *obj);
737 void AccessibleRelation_unref (AccessibleRelation *obj);
739 AccessibleRelationType
740 AccessibleRelation_getRelationType (AccessibleRelation *obj);
743 AccessibleRelation_getNTargets (AccessibleRelation *obj);
746 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
751 * AccessibleSelection function prototypes
755 void AccessibleSelection_ref (AccessibleSelection *obj);
756 void AccessibleSelection_unref (AccessibleSelection *obj);
759 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
762 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
763 long int selectedChildIndex);
766 AccessibleSelection_selectChild (AccessibleSelection *obj,
767 long int childIndex);
770 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
771 long int selectedChildIndex);
774 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
775 long int childIndex);
778 AccessibleSelection_selectAll (AccessibleSelection *obj);
781 AccessibleSelection_clearSelection (AccessibleSelection *obj);
786 * AccessibleStateSet function prototypes
790 void AccessibleStateSet_ref (AccessibleStateSet *obj);
791 void AccessibleStateSet_unref (AccessibleStateSet *obj);
794 AccessibleStateSet_contains (AccessibleStateSet *obj,
795 AccessibleState state);
798 AccessibleStateSet_add (AccessibleStateSet *obj,
799 AccessibleState state);
802 AccessibleStateSet_remove (AccessibleStateSet *obj,
803 AccessibleState state);
806 AccessibleStateSet_equals (AccessibleStateSet *obj,
807 AccessibleStateSet *obj2);
810 AccessibleStateSet_compare (AccessibleStateSet *obj,
811 AccessibleStateSet *obj2);
814 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
817 AccessibleStreamableContent_ref (AccessibleStreamableContent *obj);
819 AccessibleStreamableContent_unref (AccessibleStreamableContent *obj);
821 AccessibleStreamableContent_getContentTypes (AccessibleStreamableContent *obj);
824 AccessibleStreamableContent_freeContentTypesList (AccessibleStreamableContent *obj,
825 char **content_types);
826 #define AccessibleStreamableContent_freeContentTypeList(a, b) AccessibleStreamableContent_freeContentTypesList(a,b)
829 AccessibleStreamableContent_open (AccessibleStreamableContent *obj,
830 const char *content_type);
832 AccessibleStreamableContent_close (AccessibleStreamableContent *obj);
835 AccessibleStreamableContent_seek (AccessibleStreamableContent *obj,
837 AccessibleStreamableContentSeekType seek_type);
839 AccessibleStreamableContent_read (AccessibleStreamableContent *obj,
842 unsigned int read_type);
845 * AccessibleTable function prototypes
849 void AccessibleTable_ref (AccessibleTable *obj);
850 void AccessibleTable_unref (AccessibleTable *obj);
853 AccessibleTable_getCaption (AccessibleTable *obj);
856 AccessibleTable_getSummary (AccessibleTable *obj);
859 AccessibleTable_getNRows (AccessibleTable *obj);
862 AccessibleTable_getNColumns (AccessibleTable *obj);
865 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
870 AccessibleTable_getIndexAt (AccessibleTable *obj,
875 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
879 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
883 AccessibleTable_getRowDescription (AccessibleTable *obj,
887 AccessibleTable_getColumnDescription (AccessibleTable *obj,
891 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
896 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
901 AccessibleTable_getRowHeader (AccessibleTable *obj,
905 AccessibleTable_getColumnHeader (AccessibleTable *obj,
909 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
912 AccessibleTable_getSelectedRows (AccessibleTable *obj,
913 long int **selectedRows);
916 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
919 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
920 long int **selectedColumns);
923 AccessibleTable_isRowSelected (AccessibleTable *obj,
927 AccessibleTable_isColumnSelected (AccessibleTable *obj,
931 AccessibleTable_isSelected (AccessibleTable *obj,
936 AccessibleTable_addRowSelection (AccessibleTable *obj,
939 AccessibleTable_addColumnSelection (AccessibleTable *obj,
943 AccessibleTable_removeRowSelection (AccessibleTable *obj,
946 AccessibleTable_removeColumnSelection (AccessibleTable *obj,
951 * AccessibleText function prototypes
955 void AccessibleText_ref (AccessibleText *obj);
956 void AccessibleText_unref (AccessibleText *obj);
959 AccessibleText_getCharacterCount (AccessibleText *obj);
962 AccessibleText_getText (AccessibleText *obj,
963 long int startOffset,
967 AccessibleText_getCaretOffset (AccessibleText *obj);
970 AccessibleText_getAttributes (AccessibleText *obj,
972 long int *startOffset,
973 long int *endOffset);
976 AccessibleText_getDefaultAttributes (AccessibleText *obj);
979 AccessibleText_setCaretOffset (AccessibleText *obj,
983 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
985 AccessibleTextBoundaryType type,
986 long int *startOffset,
987 long int *endOffset);
990 AccessibleText_getTextAtOffset (AccessibleText *obj,
992 AccessibleTextBoundaryType type,
993 long int *startOffset,
994 long int *endOffset);
997 AccessibleText_getTextAfterOffset (AccessibleText *obj,
999 AccessibleTextBoundaryType type,
1000 long int *startOffset,
1001 long int *endOffset);
1004 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1008 AccessibleText_getCharacterExtents (AccessibleText *obj,
1014 AccessibleCoordType type);
1017 AccessibleText_getRangeExtents (AccessibleText *obj,
1018 long int startOffset,
1024 AccessibleCoordType type);
1026 AccessibleTextRange **
1027 AccessibleText_getBoundedRanges (AccessibleText *obj,
1032 AccessibleCoordType type,
1033 AccessibleTextClipType clipTypeX,
1034 AccessibleTextClipType clipTypeY);
1037 AccessibleTextRange_freeRanges (AccessibleTextRange **ranges);
1040 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1043 AccessibleCoordType type);
1046 AccessibleText_getNSelections (AccessibleText *obj);
1049 AccessibleText_getSelection (AccessibleText *obj,
1050 long int selectionNum,
1051 long int *startOffset,
1052 long int *endOffset);
1056 AccessibleText_addSelection (AccessibleText *obj,
1057 long int startOffset,
1058 long int endOffset);
1061 AccessibleText_removeSelection (AccessibleText *obj,
1062 long int selectionNum);
1065 AccessibleText_setSelection (AccessibleText *obj,
1066 long int selectionNum,
1067 long int startOffset,
1068 long int endOffset);
1070 /* AccessibleValue Function Prototypes: */
1072 void AccessibleValue_ref (AccessibleValue *obj);
1073 void AccessibleValue_unref (AccessibleValue *obj);
1074 double AccessibleValue_getMinimumValue (AccessibleValue *obj);
1075 double AccessibleValue_getCurrentValue (AccessibleValue *obj);
1076 double AccessibleValue_getMaximumValue (AccessibleValue *obj);
1077 SPIBoolean AccessibleValue_setCurrentValue (AccessibleValue *obj,
1079 double AccessibleValue_getMinimumIncrement (AccessibleValue *obj);
1081 /* Persistance and lifecycle control for AccessibleEvents. */
1082 SPIBoolean AccessibleEvent_ref (const AccessibleEvent *e);
1083 void AccessibleEvent_unref (const AccessibleEvent *e);
1086 * Prototypes for accessor functions, to obtain context
1087 * information for accessible events.
1090 char* AccessibleEvent_getSourceName (const AccessibleEvent *e);
1091 AccessibleRole AccessibleEvent_getSourceRole (const AccessibleEvent *e);
1092 AccessibleApplication* AccessibleEvent_getSourceApplication (const AccessibleEvent *e);
1093 SPIBoolean AccessibleEvent_getSourceDetails (const AccessibleEvent *e, char **name,
1094 AccessibleRole *role,
1095 AccessibleApplication **app);
1097 char* AccessibleTextChangedEvent_getChangeString (const AccessibleEvent *e);
1098 Accessible * AccessibleChildChangedEvent_getChildAccessible (const AccessibleEvent *e);
1100 Accessible * AccessibleParentChangedEvent_getParentAccessible (const AccessibleEvent *e);
1102 char* AccessibleTextSelectionChangedEvent_getSelectionString (const AccessibleEvent *e);
1104 char* AccessibleWindowEvent_getTitleString (const AccessibleEvent *e);
1106 Accessible * AccessibleActiveDescendantChangedEvent_getActiveDescendant (const AccessibleEvent *e);
1108 Accessible * AccessibleTableSummaryChangedEvent_getSummaryAccessible (const AccessibleEvent *e);
1110 Accessible * AccessibleTableHeaderChangedEvent_getHeaderAccessible (const AccessibleEvent *e);
1112 char * AccessibleTableCaptionChangedEvent_getCaptionString (const AccessibleEvent *e);
1114 char * AccessibleTableRowDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1116 char * AccessibleTableColumnDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1118 char * AccessibleDescriptionChangedEvent_getDescriptionString (const AccessibleEvent *e);
1120 char * AccessibleNameChangedEvent_getNameString (const AccessibleEvent *e);
1121 SPIRect * AccessibleBoundsChangedEvent_getNewBounds (const AccessibleEvent *e);
1123 /* Misc methods and error handling */
1124 void SPI_freeString (char *s);
1126 char* SPI_dupString (char *s);
1128 void SPI_freeRect (SPIRect *r);
1130 SPIBoolean SPI_exceptionHandlerPush (SPIExceptionHandler *handler);
1132 SPIExceptionHandler* SPI_exceptionHandlerPop (void);
1134 SPIExceptionType SPIException_getSourceType (SPIException *err);
1136 SPIExceptionCode SPIException_getExceptionCode (SPIException *err);
1138 Accessible* SPIAccessibleException_getSource (SPIException *err);
1140 char* SPIException_getDescription (SPIException *err);