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