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