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