19d1fa33d9195d27dddc74d0b63da3caaa321cdb
[platform/core/uifw/at-spi2-atk.git] / cspi / spi.h
1
2 #ifndef _SPI_H
3 #define _SPI_H
4
5 /* Implementation private definitions */
6 #include "spi-impl.h"
7
8 /*
9  * Definitions for ACCESSIBLE_STATE , ACCESSIBLE_ROLE, AccessibleEvent,
10  *      and event listeners.
11  */
12
13 #include "spi-roletypes.h"
14 #include "spi-statetypes.h"
15 #include "spi-listener.h"
16
17 /*
18  *
19  * Enumerated type for text boundary types
20  *
21  */
22
23 typedef enum
24 {
25   TEXT_BOUNDARY_CHAR,
26   TEXT_BOUNDARY_CURSOR_POS,
27   TEXT_BOUNDARY_WORD_START,
28   TEXT_BOUNDARY_WORD_END,
29   TEXT_BOUNDARY_SENTENCE_START,
30   TEXT_BOUNDARY_SENTENCE_END,
31   TEXT_BOUNDARY_LINE_START,
32   TEXT_BOUNDARY_LINE_END,
33   TEXT_BOUNDARY_ATTRIBUTE_RANGE
34 } TEXT_BOUNDARY_TYPE;
35
36
37
38 /*
39  *
40  * Enumerated type for relation types
41  *
42  */
43
44 typedef enum
45 {
46   RELATION_LABEL_FOR,
47   RELATION_LABELED_BY,
48   RELATION_CONTROLLER_FOR,
49   RELATION_CONTROLLED_BY,
50   RELATION_MEMBER_OF
51 } RELATION_TYPE;
52
53
54 /* don't change the order of these ! */
55 typedef enum _AccessibleCoordType {
56   COORD_TYPE_SCREEN,
57   COORD_TYPE_WINDOW
58 } AccessibleCoordType;
59
60 typedef enum _KeyEventType {
61   KEY_PRESSED,
62   KEY_RELEASED
63 } KeyEventType;
64
65 typedef struct _KeyStroke
66 {
67         long keyID;
68         KeyEventType type;
69         unsigned short modifiers;
70 } KeyStroke;
71
72
73 /*
74  *
75  * Basic SPI initialization and event loop function prototypes
76  *
77  */
78
79 /**
80  * SPI_init:
81  *
82  * Connects to the accessibility registry and initializes the SPI.
83  *
84  * Returns: 0 on success, otherwise an integer error code.
85  **/
86 int
87 SPI_init (void);
88
89 /**
90  * SPI_event_main:
91  * @isGNOMEApp: a #boolean indicating whether the client of the SPI
92  *              will use the Gnome event loop or not.
93  *
94  * Starts/enters the main event loop for the SPI services.
95  *
96  * (NOTE: This method does not return control, it is exited via a call to exit()
97  * from within an event handler).
98  *
99  **/
100 void
101 SPI_event_main (boolean isGNOMEApp);
102
103 /**
104  * SPI_event_is_ready:
105  *
106  * Checks to see if an SPI event is waiting in the event queue.
107  * Used by clients that don't wish to use SPI_event_main().
108  * Not Yet Implemented.
109  *
110  * Returns: #TRUE if an event is waiting, otherwise #FALSE.
111  *
112  **/
113 boolean
114 SPI_eventIsReady ();
115
116 /**
117  * SPI_nextEvent:
118  *
119  * Gets the next event in the SPI event queue; blocks if no event
120  * is pending.
121  * Used by clients that don't wish to use SPI_event_main().
122  * Not Yet Implemented.
123  *
124  * Returns: the next #AccessibleEvent in the SPI event queue.
125  *
126  **/
127 AccessibleEvent *
128 SPI_nextEvent (boolean waitForEvent);
129
130 /**
131  * SPI_exit:
132  *
133  * Disconnects from the Accessibility Registry and releases resources.
134  * Not Yet Implemented.
135  *
136  **/
137 void
138 SPI_exit (void);
139
140 /*
141  * Event Listener creation and support.
142  */
143
144 /**
145  * createEventListener:
146  * @callback : an #AccessibleEventListenerCB callback function, or NULL.
147  *
148  * Create a new #AccessibleEventListener with a specified callback function.
149  *
150  * Returns: a pointer to a newly-created #AccessibleEventListener.
151  *
152  **/
153 AccessibleEventListener *
154 createEventListener (AccessibleEventListenerCB callback);
155
156 /**
157  * EventListener_addCallback:
158  * @listener: the #AccessibleEventListener instance to modify.
159  * @callback: an #AccessibleEventListenerCB function pointer.
160  *
161  * Add an in-process callback function to an existing AccessibleEventListener.
162  *
163  * Returns: #TRUE if successful, otherwise #FALSE.
164  *
165  **/
166 boolean
167 EventListener_addCallback (AccessibleEventListener *listener,
168                            AccessibleEventListenerCB callback);
169
170 /**
171  * EventListener_removeCallback:
172  * @listener: the #AccessibleEventListener instance to modify.
173  * @callback: an #AccessibleEventListenerCB function pointer.
174  *
175  * Remove an in-process callback function from an existing AccessibleEventListener.
176  *
177  * Returns: #TRUE if successful, otherwise #FALSE.
178  *
179  **/
180 boolean
181 EventListener_removeCallback (AccessibleEventListener *listener,
182                               AccessibleEventListenerCB callback);
183
184 /**
185  * createKeyListener:
186  * @callback : an #KeystrokeListenerCB callback function, or NULL.
187  *
188  * Create a new #KeystrokeListener with a specified callback function.
189  *
190  * Returns: a pointer to a newly-created #KeystrokeListener.
191  *
192  **/
193 KeystrokeListener *
194 createKeystrokeListener (KeystrokeListenerCB callback);
195
196 /**
197  * KeystrokeListener_addCallback:
198  * @listener: the #KeystrokeListener instance to modify.
199  * @callback: an #KeystrokeListenerCB function pointer.
200  *
201  * Add an in-process callback function to an existing #KeystrokeListener.
202  *
203  * Returns: #TRUE if successful, otherwise #FALSE.
204  *
205  **/
206 boolean
207 KeystrokeListener_addCallback (KeystrokeListener *listener,
208                                KeystrokeListenerCB callback);
209
210 /**
211  * KeystrokeListener_removeCallback:
212  * @listener: the #KeystrokeListener instance to modify.
213  * @callback: an #KeystrokeListenerCB function pointer.
214  *
215  * Remove an in-process callback function from an existing #KeystrokeListener.
216  *
217  * Returns: #TRUE if successful, otherwise #FALSE.
218  *
219  **/
220 boolean
221 KeystrokeListener_removeCallback (KeystrokeListener *listener,
222                                   KeystrokeListenerCB callback);
223
224 /*
225  *
226  * Global functions serviced by the registry
227  *
228  */
229
230 /**
231  * registerGlobalEventListener:
232  * @listener: the #AccessibleEventListener to be registered against an event type.
233  * @callback: a character string indicating the type of events for which
234  *            notification is requested.  Format is
235  *            EventClass:major_type:minor_type:detail
236  *            where all subfields other than EventClass are optional.
237  *            EventClasses include "Focus", "Window", "Mouse",
238  *            and toolkit events (e.g. "Gtk", "AWT").
239  *            Examples: "focus:", "Gtk:GtkWidget:button_press_event".
240  *
241  * NOTE: this string may be UTF-8, but should not contain byte value 56 (ascii ':'),
242  *            except as a delimiter, since non-UTF-8 string delimiting
243  *            functions are used internally.  In general, listening to
244  *            toolkit-specific events is not recommended.
245  *
246  * Add an in-process callback function to an existing AccessibleEventListener.
247  *
248  * Returns: #TRUE if successful, otherwise #FALSE.
249  *
250  **/
251 boolean
252 registerGlobalEventListener (AccessibleEventListener *listener,
253                              char *eventType);
254
255 /**
256  * getDesktopCount:
257  *
258  * Get the number of virtual desktops.
259  * NOTE: currently multiple virtual desktops are not implemented, this
260  *       function always returns '1'.
261  *
262  * Returns: an integer indicating the number of active virtual desktops.
263  *
264  **/
265 int
266 getDesktopCount ();
267
268 /**
269  * getDesktop:
270  * @i: an integer indicating which of the accessible desktops is to be returned.
271  *
272  * Get the virtual desktop indicated by index @i.
273  * NOTE: currently multiple virtual desktops are not implemented, this
274  *       function always returns '1'.
275  *
276  * Returns: a pointer to the 'i-th' virtual desktop's #Accessible representation.
277  *
278  **/
279 Accessible*
280 getDesktop (int n);
281
282 /**
283  * getDesktopList:
284  * @list: a pointer to an array of #Accessible objects.
285  *
286  * Get the list of virtual desktops.  On return, @list will point
287  *     to a newly-created array of virtual desktop pointers.
288  *     It is the responsibility of the caller to free this array when
289  *     it is no longer needed.
290  *
291  * Not Yet Implemented.
292  *
293  * Returns: an integer indicating how many virtual desktops have been
294  *          placed in the list pointed to by parameter @list.
295  **/
296 int
297 getDesktopList (Accessible **list);
298
299 /**
300  * registerKeystrokeListener:
301  * @listener: a pointer to the #KeystrokeListener for which
302  *            keystroke events are requested.
303  *
304  * Not Yet Implemented.
305  *
306  **/
307 void
308 registerKeystrokeListener (KeystrokeListener *listener, KeyMaskType keymask);
309
310 /**
311  * generateKeyEvent:
312  * @keycode: a #long indicating the keycode of the key event
313  *           being synthesized.
314  * @meta: a #long indicating the key modifiers to be sent
315  *        with the event, if any.
316  *
317  * Synthesize a keyboard event (as if a hardware keyboard event occurred in the
318  * current UI context).
319  * Not Yet Implemented.
320  *
321  **/
322 void
323 generateKeyEvent (long keyCode, long meta);
324
325 /**
326  * generateMouseEvent:
327  * @x: a #long indicating the screen x coordinate of the mouse event.
328  * @y: a #long indicating the screen y coordinate of the mouse event.
329  * @name: a string indicating which mouse event to be synthesized
330  *        (e.g. "button1", "button2", "mousemove").
331  *
332  * Synthesize a mouse event at a specific screen coordinate.
333  * Not Yet Implemented.
334  *
335  **/
336 void
337 generateMouseEvent (long x, long y, char *name);
338
339 /*
340  *
341  * Accessible function prototypes
342  *
343  */
344
345 /**
346  * Accessible_ref:
347  * @obj: a pointer to the #Accessible object on which to operate.
348  *
349  * Increment the reference count for an #Accessible object.
350  *
351  * Returns: (no return code implemented yet).
352  *
353  **/
354 int
355 Accessible_ref (Accessible *obj);
356
357 /**
358  * Accessible_unref:
359  * @obj: a pointer to the #Accessible object on which to operate.
360  *
361  * Decrement the reference count for an #Accessible object.
362  *
363  * Returns: (no return code implemented yet).
364  *
365  **/
366 int
367 Accessible_unref (Accessible *obj);
368
369 /**
370  * Accessible_getName:
371  * @obj: a pointer to the #Accessible object on which to operate.
372  *
373  * Get the name of an #Accessible object.
374  *
375  * Returns: a UTF-8 string indicating the name of the #Accessible object.
376  *
377  **/
378 char *
379 Accessible_getName (Accessible *obj);
380
381 /**
382  * Accessible_getDescription:
383  * @obj: a pointer to the #Accessible object on which to operate.
384  *
385  * Get the description of an #Accessible object.
386  *
387  * Returns: a UTF-8 string describing the #Accessible object.
388  *
389  **/
390 char *
391 Accessible_getDescription (Accessible *obj);
392
393 /**
394  * Accessible_getParent:
395  * @obj: a pointer to the #Accessible object to query.
396  *
397  * Get an #Accessible object's parent container.
398  *
399  * Returns: a pointer to the #Accessible object which contains the given
400  *          #Accessible instance, or NULL if the @obj has no parent container.
401  *
402  **/
403 Accessible *
404 Accessible_getParent (Accessible *obj);
405
406 /**
407  * Accessible_getChildCount:
408  *
409  * @obj: a pointer to the #Accessible object on which to operate.
410  *
411  * Get the number of children contained by an #Accessible object.
412  *
413  * Returns: a #long indicating the number of #Accessible children
414  *          contained by an #Accessible object.
415  *
416  **/
417 long
418 Accessible_getChildCount (Accessible *obj);
419
420 /**
421  * Accessible_getChildAtIndex:
422  *
423  * @obj: a pointer to the #Accessible object on which to operate.
424  * @childIndex: a #long indicating which child is specified.
425  *
426  * Get the #Accessible child of an #Accessible object at a given index.
427  *
428  * Returns: a pointer to the #Accessible child object at index
429  *          @childIndex.
430  *
431  **/
432 Accessible *
433 Accessible_getChildAtIndex (Accessible *obj,
434                             long childIndex);
435
436 /**
437  * Accessible_getIndexInParent:
438  *
439  * @obj: a pointer to the #Accessible object on which to operate.
440  *
441  * Get the index of an #Accessible object in its containing #Accessible.
442  *
443  * Returns: a #long indicating the index of the #Accessible object
444  *          in its parent (i.e. containing) #Accessible instance,
445  *          or -1 if @obj has no containing parent.
446  *
447  **/
448 long
449 Accessible_getIndexInParent (Accessible *obj);
450
451 /**
452  * Accessible_getRelationSet:
453  *
454  * Not Yet Implemented.
455  *
456  **/
457 AccessibleRelation **
458 Accessible_getRelationSet (Accessible *obj);
459
460 /**
461  * Accessible_getRole:
462  * @obj: a pointer to the #Accessible object on which to operate.
463  *
464  * Get the UI role of an #Accessible object.
465  *
466  * Returns: a UTF-8 string indicating the UI role of the #Accessible object.
467  *
468  **/
469 char *
470 Accessible_getRole (Accessible *obj);
471
472 /**
473  * Accessible_getStateSet:
474  *
475  * Not Yet Implemented.
476  *
477  **/
478 AccessibleStateSet *
479 Accessible_getStateSet (Accessible *obj);
480
481 /* Interface query methods */
482
483 /**
484  * Accessible_isAction:
485  * @obj: a pointer to the #Accessible instance to query.
486  *
487  * Query whether the specified #Accessible implements #AccessibleAction.
488  * Not Yet Implemented.
489  *
490  * Returns: #TRUE if @obj implements the #AccessibleAction interface,
491  *          #FALSE otherwise.
492  **/
493 boolean
494 Accessible_isAction (Accessible *obj);
495
496 /**
497  * Accessible_isComponent:
498  * @obj: a pointer to the #Accessible instance to query.
499  *
500  * Query whether the specified #Accessible implements #AccessibleComponent.
501  *
502  * Returns: #TRUE if @obj implements the #AccessibleComponent interface,
503  *          #FALSE otherwise.
504  **/
505 boolean
506 Accessible_isComponent (Accessible *obj);
507
508 /**
509  * Accessible_isEditableText:
510  * @obj: a pointer to the #Accessible instance to query.
511  *
512  * Query whether the specified #Accessible implements #AccessibleEditableText.
513  * Not Yet Implemented.
514  *
515  * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
516  *          #FALSE otherwise.
517  **/
518 boolean
519 Accessible_isEditableText (Accessible *obj);
520
521 /**
522  * Accessible_isHypertext:
523  * @obj: a pointer to the #Accessible instance to query.
524  *
525  * Query whether the specified #Accessible implements #AccessibleHypertext.
526  * Not Yet Implemented.
527  *
528  * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
529  *          #FALSE otherwise.
530  **/
531 boolean
532 Accessible_isHypertext (Accessible *obj);
533
534 /**
535  * Accessible_isImage:
536  * @obj: a pointer to the #Accessible instance to query.
537  *
538  * Query whether the specified #Accessible implements #AccessibleImage.
539  * Not Yet Implemented.
540  *
541  * Returns: #TRUE if @obj implements the #AccessibleImage interface,
542  *          #FALSE otherwise.
543 **/
544 boolean
545 Accessible_isImage (Accessible *obj);
546
547 /**
548   * Accessible_isSelection:
549  * @obj: a pointer to the #Accessible instance to query.
550  *
551  * Query whether the specified #Accessible implements #AccessibleSelection.
552  * Not Yet Implemented.
553  *
554  * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
555  *          #FALSE otherwise.
556 **/
557 boolean
558 Accessible_isSelection (Accessible *obj);
559
560 /**
561  * Accessible_isTable:
562  * @obj: a pointer to the #Accessible instance to query.
563  *
564  * Query whether the specified #Accessible implements #AccessibleTable.
565  * Not Yet Implemented.
566  *
567  * Returns: #TRUE if @obj implements the #AccessibleTable interface,
568  *          #FALSE otherwise.
569 **/
570 boolean
571 Accessible_isTable (Accessible *obj);
572
573 /**
574  * Accessible_isText:
575  * @obj: a pointer to the #Accessible instance to query.
576  *
577  * Query whether the specified #Accessible implements #AccessibleText.
578  * Not Yet Implemented.
579  *
580  * Returns: #TRUE if @obj implements the #AccessibleText interface,
581  *          #FALSE otherwise.
582 **/
583 boolean
584 Accessible_isText (Accessible *obj);
585
586 /**
587  * Accessible_getAction:
588  *
589  * Not Yet Implemented.
590  *
591  **/
592 AccessibleAction *
593 Accessible_getAction (Accessible *obj);
594
595 /**
596  * Accessible_getComponent:
597  * @obj: a pointer to the #Accessible instance to query.
598  *
599  * Get the #AccessibleComponent interface for an #Accessible.
600  *
601  * Returns: a pointer to an #AccessibleComponent interface instance, or
602  *          NULL if @obj does not implement #AccessibleComponent.
603  **/
604 AccessibleComponent *
605 Accessible_getComponent (Accessible *obj);
606
607 /**
608  * Accessible_getEditableText:
609  *
610  * Not Yet Implemented.
611  *
612  **/
613 AccessibleEditableText *
614 Accessible_getEditableText (Accessible *obj);
615
616 /**
617  * Accessible_getHypertext:
618  *
619  * Not Yet Implemented.
620  *
621  **/
622 AccessibleHypertext *
623 Accessible_getHypertext (Accessible *obj);
624
625 /**
626  * Accessible_getImage:
627  *
628  * Not Yet Implemented.
629  *
630  **/
631 AccessibleImage *
632 Accessible_getImage (Accessible *obj);
633
634 /**
635  * Accessible_getSelection:
636  *
637  * Not Yet Implemented.
638  *
639  **/
640 AccessibleSelection *
641 Accessible_getSelection (Accessible *obj);
642
643 /**
644  * Accessible_getTable:
645  *
646  * Not Yet Implemented.
647  *
648  **/
649 AccessibleTable *
650 Accessible_getTable (Accessible *obj);
651
652 /**
653  * Accessible_getText:
654  *
655  * Not Yet Implemented.
656  *
657  **/
658 AccessibleText *
659 Accessible_getText (Accessible *obj);
660
661 /**
662  * Accessible_queryInterface:
663  * @obj: a pointer to the #Accessible instance to query.
664  * @interface_name: a UTF-8 character string specifiying the requested interface.
665  *
666  * Query an #Accessible object to for a named interface.
667  *
668  * Returns: an instance of the named interface object, if it is implemented
669  *          by @obj, or NULL otherwise.
670  *
671  **/
672 GenericInterface *
673 Accessible_queryInterface (Accessible *obj, char *interface_name);
674
675 /*
676  *
677  * AccessibleAction function prototypes
678  *
679  */
680
681 int
682 AccessibleAction_ref (
683                       AccessibleAction *obj);
684
685 int
686 AccessibleAction_unref (AccessibleAction *obj);
687
688 long
689 AccessibleAction_getNActions (AccessibleAction *obj);
690
691 /**
692  * AccessibleAction_getDescription:
693  * @obj: a pointer to the #AccessibleAction to query.
694  *
695  * Get the description of 'i-th' action invokable on an
696  *      object implementing #AccessibleAction.
697  *
698  * Not Yet Implemented.
699  *
700  * Returns: a UTF-8 string describing the 'i-th' invokable action.
701  *
702  **/
703 char *
704 AccessibleAction_getDescription (AccessibleAction *obj,
705                                  long index);
706
707 boolean
708 AccessibleAction_doAction (AccessibleAction *obj,
709                            long index);
710
711 char *
712 AccessibleAction_getKeyBinding (AccessibleAction *obj,
713                                 long index);
714
715 /*
716  *
717  * AccessibleApplication function prototypes
718  *
719  */
720
721 /**
722  * AccessibleApplication_unref:
723  * @obj: a pointer to the #AccessibleApplication on which to operate.
724  *
725  * Decrement the reference count for an #AccessibleApplication.
726  *
727  * Returns: (no return code implemented yet).
728  *
729  **/
730 int
731 AccessibleApplication_ref (AccessibleApplication *obj);
732
733 /**
734  * AccessibleApplication_unref:
735  * @obj: a pointer to the #AccessibleApplication object on which to operate.
736  *
737  * Decrement the reference count for an #AccessibleApplication.
738  *
739  * Returns: (no return code implemented yet).
740  *
741  **/
742 int
743 AccessibleApplication_unref (AccessibleApplication *obj);
744
745 /**
746  * AccessibleApplication_getToolkitName:
747  * @obj: a pointer to the #AccessibleApplication to query.
748  *
749  * Get the name of the UI toolkit used by an #AccessibleApplication.
750  *
751  * Returns: a UTF-8 string indicating which UI toolkit is
752  *          used by an application.
753  *
754  **/
755 char *
756 AccessibleApplication_getToolkitName (AccessibleApplication *obj);
757
758 /**
759  * AccessibleApplication_getVersion:
760  * @obj: a pointer to the #AccessibleApplication being queried.
761  *
762  * Get the version of the at-spi bridge exported by an
763  *      #AccessibleApplication instance.
764  *
765  * Returns: a UTF-8 string indicating the application's
766  *          at-spi version.
767  *
768  **/
769 char *
770 AccessibleApplication_getVersion (AccessibleApplication *obj);
771
772 /**
773  * AccessibleApplication_getID:
774  * @obj: a pointer to the #AccessibleApplication being queried.
775  *
776  * Get the unique ID assigned by the Registry to an
777  *      #AccessibleApplication instance.
778  * (Not Yet Implemented by the registry).
779  *
780  * Returns: a unique #long integer associated with the application
781  *          by the Registry, or 0 if the application is not registered.
782  **/
783 long
784 AccessibleApplication_getID (AccessibleApplication *obj);
785
786 /**
787  * AccessibleApplication_pause:
788  *
789  * Attempt to pause the application (used when client event queue is
790  *  over-full).
791  * Not Yet Implemented.
792  *
793  * Returns: #TRUE if the application was paused successfully, #FALSE otherwise.
794  *
795  **/
796 boolean
797 AccessibleApplication_pause (AccessibleApplication *obj);
798
799 /**
800  * AccessibleApplication_pause:
801  *
802  * Attempt to resume the application (used after #AccessibleApplication_pause).
803  * Not Yet Implemented.
804  *
805  * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise.
806  *
807  **/
808 boolean
809 AccessibleApplication_resume (AccessibleApplication *obj);
810
811 /*
812  *
813  * AccessibleComponent function prototypes
814  *
815  */
816
817 int
818 AccessibleComponent_ref (AccessibleComponent *obj);
819
820 int
821 AccessibleComponent_unref (AccessibleComponent *obj);
822
823 boolean
824 AccessibleComponent_contains (AccessibleComponent *obj,
825                               long x,
826                               long y,
827                               AccessibleCoordType ctype);
828
829 Accessible *
830 AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj,
831                                           long x,
832                                           long y,
833                                           AccessibleCoordType ctype);
834
835 /**
836  * AccessibleComponent_getExtents:
837  * @obj: a pointer to the #AccessibleComponent to query.
838  * @x: a pointer to a #long into which the minimum x coordinate will be returned.
839  * @y: a pointer to a #long into which the minimum y coordinate will be returned.
840  * @width: a pointer to a #long into which the x extents (width) will be returned.
841  * @height: a pointer to a #long into which the y extents (height) will be returned.
842  * @ctype: the desired coordinate system into which to return the results,
843  *         (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN).
844  *
845  * Get the bounding box of the specified #AccessibleComponent.
846  *
847  **/
848 void
849 AccessibleComponent_getExtents (AccessibleComponent *obj,
850                                 long *x,
851                                 long *y,
852                                 long *width,
853                                 long *height,
854                                 AccessibleCoordType ctype);
855
856 void
857 AccessibleComponent_getPosition (AccessibleComponent *obj,
858                                  long *x,
859                                  long *y,
860                                  AccessibleCoordType ctype);
861
862 void
863 AccessibleComponent_getSize (AccessibleComponent *obj,
864                              long *width,
865                              long *height);
866
867 void
868 AccessibleComponent_grabFocus (AccessibleComponent *obj);
869
870 /*
871  *
872  * AccessibleEditableText function prototypes
873  *
874  */
875
876 int
877 AccessibleEditableText_ref (AccessibleEditableText *obj);
878
879 int
880 AccessibleEditableText_unref (AccessibleEditableText *obj);
881
882 boolean
883 AccessibleEditableText_setRunAttributes (AccessibleEditableText *obj,
884                                          const char *attributes,
885                                          long startPos, long endPos);
886
887 void
888 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
889                                         const char *newContents);
890
891 void
892 AccessibleEditableText_insertText (AccessibleEditableText *obj,
893                                    long position,
894                                    char *text,
895                                    long length);
896
897 void
898 AccessibleEditableText_copyText (AccessibleText *obj,
899                                  long startPos,
900                                  long endPos);
901
902 void
903 AccessibleEditableText_cutText (AccessibleEditableText *obj,
904                                 long startPos,
905                                 long endPos);
906
907 void
908 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
909                                    long startPos,
910                                    long endPos);
911
912 void
913 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
914                                   long position);
915
916 /*
917  *
918  * AccessibleHyperlink function prototypes
919  *
920  */
921
922 int
923 AccessibleHyperlink_ref (AccessibleHyperlink *obj);
924
925 int
926 AccessibleHyperlink_unref (AccessibleHyperlink *obj);
927
928 long
929 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
930
931 char *
932 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
933                             long i);
934
935 Accessible
936 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
937                                long i);
938
939 void
940 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
941                                    long *startIndex,
942                                    long *endIndex);
943
944 boolean
945 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
946
947 /*
948  *
949  * AccessibleHypertext function prototypes
950  *
951  */
952
953 int
954 AccessibleHypertext_ref (AccessibleHypertext *obj);
955
956 int
957 AccessibleHypertext_unref (AccessibleHypertext *obj);
958
959 long
960 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
961
962 AccessibleHyperlink *
963 AccessibleHyperText_getLink (AccessibleHypertext *obj,
964                              long linkIndex);
965
966 long
967 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
968                                   long characterIndex);
969
970 /*
971  *
972  * AccessibleImage function prototypes
973  *
974  */
975
976 int
977 AccessibleImage_ref (AccessibleImage *obj);
978
979 int
980 AccessibleImage_unref (AccessibleImage *obj);
981
982 char *
983 AccessibleImage_getImageDescription (AccessibleImage *obj);
984
985 void
986 AccessibleImage_getImageSize (AccessibleImage *obj,
987                               long *width,
988                               long *height);
989
990 void
991 AccessibleImage_getImagePosition (AccessibleImage *obj,
992                                   long *x,
993                                   long *y,
994                                   AccessibleCoordType ctype);
995
996 /*
997  *
998  * AccessibleRelation function prototypes
999  *
1000  */
1001
1002 int
1003 AccessibleRelation_ref (AccessibleRelation *obj);
1004
1005 int
1006 AccessibleRelation_unref (AccessibleRelation *obj);
1007
1008 RELATION_TYPE
1009 AccessibleRelation_getRelationType (AccessibleRelation *obj);
1010
1011 Accessible *
1012 AccessibleRelation_getTarget (AccessibleRelation *obj);
1013
1014
1015
1016 /*
1017  *
1018  * AccessibleSelection function prototypes
1019  *
1020  */
1021
1022 int
1023 AccessibleSelection_ref (AccessibleSelection *obj);
1024
1025 int
1026 AccessibleSelection_unref (AccessibleSelection *obj);
1027
1028 long
1029 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
1030
1031 Accessible *
1032 AccessibleSelection_refSelectedChild (AccessibleSelection *obj,
1033                                       long selectedChildIndex);
1034
1035 boolean
1036 AccessibleSelection_selectChild (AccessibleSelection *obj,
1037                                  long childIndex);
1038
1039 boolean
1040 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
1041                                            long selectedChildIndex);
1042
1043 boolean
1044 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
1045                                      long childIndex);
1046
1047 void
1048 AccessibleSelection_selectAll (AccessibleSelection *obj);
1049
1050 void
1051 AccessibleSelection_clearSelection (AccessibleSelection *obj);
1052
1053
1054 /*
1055  *
1056  * AccessibleStateSet function prototypes
1057  *
1058  */
1059
1060 int
1061 AccessibleStateSet_ref (AccessibleStateSet *obj);
1062
1063 int
1064 AccessibleStateSet_unref (AccessibleStateSet *obj);
1065
1066 boolean
1067 AccessibleStateSet_contains (AccessibleStateSet *obj,
1068                              ACCESSIBLE_STATE state);
1069
1070 void
1071 AccessibleStateSet_add (AccessibleStateSet *obj,
1072                         ACCESSIBLE_STATE state);
1073
1074 void
1075 AccessibleStateSet_remove (AccessibleStateSet *obj,
1076                            ACCESSIBLE_STATE state);
1077
1078 boolean
1079 AccessibleStateSet_equals (AccessibleStateSet *obj,
1080                            AccessibleStateSet *obj2);
1081
1082 void
1083 AccessibleStateSet_compare (AccessibleStateSet *obj,
1084                             AccessibleStateSet *obj2,
1085                             AccessibleStateSet **differenceSet);
1086
1087 boolean
1088 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
1089
1090
1091 /*
1092  *
1093  * AccessibleTable function prototypes
1094  *
1095  */
1096
1097 int
1098 AccessibleTable_ref (AccessibleTable *obj);
1099
1100 int
1101 AccessibleTable_unref (AccessibleTable *obj);
1102
1103 Accessible *
1104 AccessibleTable_getCaption (AccessibleTable *obj);
1105
1106 Accessible *
1107 AccessibleTable_getSummary (AccessibleTable *obj);
1108
1109 long
1110 AccessibleTable_getNRows (AccessibleTable *obj);
1111
1112 long
1113 AccessibleTable_getNColumns (AccessibleTable *obj);
1114
1115 Accessible *
1116 AccessibleTable_refAt (AccessibleTable *obj,
1117                                  long row,
1118                                  long column);
1119
1120 long
1121 AccessibleTable_getIndexAt (AccessibleTable *obj,
1122                             long row,
1123                             long column);
1124
1125 long
1126 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
1127                                long index);
1128
1129 long
1130 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
1131                                   long index);
1132
1133 char *
1134 AccessibleTable_getRowDescription (AccessibleTable *obj,
1135                                    long row);
1136
1137 char *
1138 AccessibleTable_getColumnDescription (AccessibleTable *obj,
1139                                       long column);
1140
1141 long
1142 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
1143                                 long row,
1144                                 long column);
1145
1146 long
1147 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
1148                                    long row,
1149                                    long column);
1150
1151 Accessible *
1152 AccessibleTable_getRowHeader (AccessibleTable *obj,
1153                               long row);
1154
1155 Accessible *
1156 AccessibleTable_getColumnHeader (AccessibleTable *obj,
1157                                  long column);
1158
1159 long
1160 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
1161
1162 long
1163 AccessibleTable_getSelectedRows (AccessibleTable *obj,
1164                                  long **selectedRows);
1165
1166 long
1167 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
1168
1169 long
1170 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
1171                                     long **selectedColumns);
1172
1173 boolean
1174 AccessibleTable_isRowSelected (AccessibleTable *obj,
1175                                long row);
1176
1177 boolean
1178 AccessibleTable_isColumnSelected (AccessibleTable *obj,
1179                                   long column);
1180
1181 boolean
1182 AccessibleTable_isSelected (AccessibleTable *obj,
1183                             long row,
1184                             long column);
1185
1186 /*
1187  *
1188  * AccessibleText function prototypes
1189  *
1190  */
1191
1192 int
1193 AccessibleText_ref (AccessibleText *obj);
1194
1195 int
1196 AccessibleText_unref (AccessibleText *obj);
1197
1198 long
1199 AccessibleText_getCharacterCount (AccessibleText *obj);
1200
1201 char *
1202 AccessibleText_getText (AccessibleText *obj,
1203                         long startOffset,
1204                         long endOffset);
1205
1206 long
1207 AccessibleText_getCaretOffset (AccessibleText *obj);
1208
1209 char *
1210 AccessibleText_getAttributes (AccessibleText *obj,
1211                                  long offset,
1212                                  long *startOffset,
1213                                  long *endOfset);
1214
1215
1216 boolean
1217 AccessibleText_setCaretOffset (AccessibleText *obj,
1218                                long newOffset);
1219
1220 char *
1221 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
1222                                     long offset,
1223                                     TEXT_BOUNDARY_TYPE type,
1224                                     long *startOffset, long *endOffset);
1225
1226 char *
1227 AccessibleText_getTextAtOffset (AccessibleText *obj,
1228                                     long offset,
1229                                     TEXT_BOUNDARY_TYPE type,
1230                                 long *startOffset, long *endOffset);
1231
1232 char *
1233 AccessibleText_getTextAfterOffset (AccessibleText *obj,
1234                                     long offset,
1235                                     TEXT_BOUNDARY_TYPE type,
1236                                    long *startOffset, long *endOffset);
1237 unsigned long
1238 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1239                                      long offset);
1240
1241 void
1242 AccessibleText_getCharacterExtents (AccessibleText *obj,
1243                                     long offset,
1244                                     long *x,
1245                                     long *y,
1246                                     long *width,
1247                                     long *height, AccessibleCoordType type);
1248
1249 long
1250 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1251                                  long x,
1252                                  long y, AccessibleCoordType type);
1253
1254 long
1255 AccessibleText_getNSelections (AccessibleText *obj);
1256
1257 void
1258 AccessibleText_getSelection (AccessibleText *obj,
1259                              long selectionNum, long *startOffset,
1260                              long *endOffset);
1261
1262
1263 boolean
1264 AccessibleText_addSelection (AccessibleText *obj,
1265                              long startOffset, long endOffset);
1266
1267 boolean
1268 AccessibleText_removeSelection (AccessibleText *obj,
1269                                 long selectionNum);
1270
1271 boolean
1272 AccessibleText_setSelection (AccessibleText *obj,
1273                              long selectionNum,
1274                              long startOffset,
1275                              long endOffset);
1276
1277 /*
1278  *
1279  * AccessibleValue Function Prototypes:
1280  *
1281  */
1282
1283 float
1284 AccessibleValue_getMinimumValue (AccessibleValue *value);
1285
1286 float
1287 AccessibleValue_getCurrentValue (AccessibleValue *value);
1288
1289 float
1290 AccessibleValue_getMaximumValue (AccessibleValue *value);
1291
1292 boolean
1293 AccessibleValue_setCurrentValue (AccessibleValue *value,
1294                                  float newValue);
1295
1296 void
1297 spi_freeString (char *s);
1298
1299 #endif