Bugfix for ZLayer API, and added missing declarations for Value interface
[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 SPIBoolean
655 Accessible_isValue (Accessible *obj);
656
657 AccessibleAction *
658 Accessible_getAction (Accessible *obj);
659
660 /**
661  * Accessible_getComponent:
662  * @obj: a pointer to the #Accessible instance to query.
663  *
664  * Get the #AccessibleComponent interface for an #Accessible.
665  *
666  * Returns: a pointer to an #AccessibleComponent interface instance, or
667  *          NULL if @obj does not implement #AccessibleComponent.
668  **/
669 AccessibleComponent *
670 Accessible_getComponent (Accessible *obj);
671
672 /**
673  * Accessible_getEditableText:
674  *
675  * Not Yet Implemented.
676  *
677  **/
678 AccessibleEditableText *
679 Accessible_getEditableText (Accessible *obj);
680
681 /**
682  * Accessible_getHypertext:
683  *
684  * Not Yet Implemented.
685  *
686  **/
687 AccessibleHypertext *
688 Accessible_getHypertext (Accessible *obj);
689
690 /**
691  * Accessible_getImage:
692  *
693  * Not Yet Implemented.
694  *
695  **/
696 AccessibleImage *
697 Accessible_getImage (Accessible *obj);
698
699 /**
700  * Accessible_getSelection:
701  *
702  * Not Yet Implemented.
703  *
704  **/
705 AccessibleSelection *
706 Accessible_getSelection (Accessible *obj);
707
708 /**
709  * Accessible_getTable:
710  *
711  * Not Yet Implemented.
712  *
713  **/
714 AccessibleTable *
715 Accessible_getTable (Accessible *obj);
716
717 /**
718  * Accessible_getText:
719  *
720  * Not Yet Implemented.
721  *
722  **/
723 AccessibleText *
724 Accessible_getText (Accessible *obj);
725
726 AccessibleValue *
727 Accessible_getValue (Accessible *obj);
728
729 /**
730  * Accessible_queryInterface:
731  * @obj: a pointer to the #Accessible instance to query.
732  * @interface_name: a UTF-8 character string specifiying the requested interface.
733  *
734  * Query an #Accessible object to for a named interface.
735  *
736  * Returns: an instance of the named interface object, if it is implemented
737  *          by @obj, or NULL otherwise.
738  *
739  **/
740 GenericInterface *
741 Accessible_queryInterface (Accessible *obj, char *interface_name);
742
743 /*
744  *
745  * AccessibleAction function prototypes
746  *
747  */
748
749 int
750 AccessibleAction_ref (AccessibleAction *obj);
751
752 int
753 AccessibleAction_unref (AccessibleAction *obj);
754
755 long
756 AccessibleAction_getNActions (AccessibleAction *obj);
757
758 /**
759  * AccessibleAction_getName:
760  * @obj: a pointer to the #AccessibleAction implementor to query.
761  * @i: a long integer indicating which action to query.
762  *
763  * Get the name of the '@i-th' action invokable on an
764  *      object implementing #AccessibleAction.
765  *
766  * Returns: the 'event type' name of the action, as a UTF-8 string.
767  *
768  **/
769 char *
770 AccessibleAction_getName (AccessibleAction *obj, long int i);
771
772 /**
773  * AccessibleAction_getDescription:
774  * @obj: a pointer to the #AccessibleAction to query.
775  * @i: a long integer indicating which action to query.
776  *
777  * Get the description of '@i-th' action invokable on an
778  *      object implementing #AccessibleAction.
779  *
780  * Returns: a UTF-8 string describing the '@i-th' invokable action.
781  *
782  **/
783 char *
784 AccessibleAction_getDescription (AccessibleAction *obj,
785                                  long int i);
786
787 SPIBoolean
788 AccessibleAction_doAction (AccessibleAction *obj,
789                            long int i);
790
791 /**
792  * AccessibleAction_getKeybinding:
793  * @obj: a pointer to the #AccessibleAction implementor to query.
794  * @i: a long integer indicating which action to query.
795  *
796  * Get the keybindings for the @i-th action invokable on an
797  *      object implementing #AccessibleAction, if any are defined.
798  *
799  * Returns: a UTF-8 string which can be parsed to determine the @i-th
800  * invokable action's keybindings.
801  *
802  **/
803 char *
804 AccessibleAction_getKeyBinding (AccessibleAction *obj,
805                                 long int i);
806
807 /*
808  *
809  * AccessibleApplication function prototypes
810  *
811  */
812
813 /**
814  * AccessibleApplication_unref:
815  * @obj: a pointer to the #AccessibleApplication on which to operate.
816  *
817  * Decrement the reference count for an #AccessibleApplication.
818  *
819  * Returns: (no return code implemented yet).
820  *
821  **/
822 int
823 AccessibleApplication_ref (AccessibleApplication *obj);
824
825 /**
826  * AccessibleApplication_unref:
827  * @obj: a pointer to the #AccessibleApplication object on which to operate.
828  *
829  * Decrement the reference count for an #AccessibleApplication.
830  *
831  * Returns: (no return code implemented yet).
832  *
833  **/
834 int
835 AccessibleApplication_unref (AccessibleApplication *obj);
836
837 /**
838  * AccessibleApplication_getToolkitName:
839  * @obj: a pointer to the #AccessibleApplication to query.
840  *
841  * Get the name of the UI toolkit used by an #AccessibleApplication.
842  *
843  * Returns: a UTF-8 string indicating which UI toolkit is
844  *          used by an application.
845  *
846  **/
847 char *
848 AccessibleApplication_getToolkitName (AccessibleApplication *obj);
849
850 /**
851  * AccessibleApplication_getVersion:
852  * @obj: a pointer to the #AccessibleApplication being queried.
853  *
854  * Get the version of the at-spi bridge exported by an
855  *      #AccessibleApplication instance.
856  *
857  * Returns: a UTF-8 string indicating the application's
858  *          at-spi version.
859  *
860  **/
861 char *
862 AccessibleApplication_getVersion (AccessibleApplication *obj);
863
864 /**
865  * AccessibleApplication_getID:
866  * @obj: a pointer to the #AccessibleApplication being queried.
867  *
868  * Get the unique ID assigned by the Registry to an
869  *      #AccessibleApplication instance.
870  * (Not Yet Implemented by the registry).
871  *
872  * Returns: a unique #long integer associated with the application
873  *          by the Registry, or 0 if the application is not registered.
874  **/
875 long
876 AccessibleApplication_getID (AccessibleApplication *obj);
877
878 /**
879  * AccessibleApplication_pause:
880  * @obj: a pointer to the #Accessible object on which to operate.
881  *
882  * Attempt to pause the application (used when client event queue is
883  *  over-full).
884  * Not Yet Implemented.
885  *
886  * Returns: #TRUE if the application was paused successfully, #FALSE otherwise.
887  *
888  **/
889 SPIBoolean
890 AccessibleApplication_pause (AccessibleApplication *obj);
891
892 /**
893  * AccessibleApplication_resume:
894  * @obj: a pointer to the #Accessible object on which to operate.
895  *
896  * Attempt to resume the application (used after #AccessibleApplication_pause).
897  * Not Yet Implemented.
898  *
899  * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise.
900  *
901  **/
902 SPIBoolean
903 AccessibleApplication_resume (AccessibleApplication *obj);
904
905 /*
906  *
907  * AccessibleComponent function prototypes
908  *
909  */
910
911 int
912 AccessibleComponent_ref (AccessibleComponent *obj);
913
914 int
915 AccessibleComponent_unref (AccessibleComponent *obj);
916
917 SPIBoolean
918 AccessibleComponent_contains (AccessibleComponent *obj,
919                               long int x,
920                               long int y,
921                               AccessibleCoordType ctype);
922
923 Accessible *
924 AccessibleComponent_getAccessibleAtPoint (AccessibleComponent *obj,
925                                           long int x,
926                                           long int y,
927                                           AccessibleCoordType ctype);
928
929 /**
930  * AccessibleComponent_getExtents:
931  * @obj: a pointer to the #AccessibleComponent to query.
932  * @x: a pointer to a #long into which the minimum x coordinate will be returned.
933  * @y: a pointer to a #long into which the minimum y coordinate will be returned.
934  * @width: a pointer to a #long into which the x extents (width) will be returned.
935  * @height: a pointer to a #long into which the y extents (height) will be returned.
936  * @ctype: the desired coordinate system into which to return the results,
937  *         (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN).
938  *
939  * Get the bounding box of the specified #AccessibleComponent.
940  *
941  **/
942 void
943 AccessibleComponent_getExtents (AccessibleComponent *obj,
944                                 long int *x,
945                                 long int *y,
946                                 long int *width,
947                                 long int *height,
948                                 AccessibleCoordType ctype);
949
950 void
951 AccessibleComponent_getPosition (AccessibleComponent *obj,
952                                  long int *x,
953                                  long int *y,
954                                  AccessibleCoordType ctype);
955
956 void
957 AccessibleComponent_getSize (AccessibleComponent *obj,
958                              long int *width,
959                              long int *height);
960
961 /**
962  * AccessibleComponent_getLayer:
963  * @obj: a pointer to the #AccessibleComponent to query.
964  *
965  * Query which layer the component is painted into, to help determine its 
966  *      visibility in terms of stacking order.
967  *
968  * Returns: the #AccessibleComponentLayer into which this component is painted.
969  **/
970 AccessibleComponentLayer
971 AccessibleComponent_getLayer (AccessibleComponent *obj);
972
973 /**
974  * AccessibleComponent_getMDIZOrder:
975  * @obj: a pointer to the #AccessibleComponent to query.
976  *
977  * Query the z stacking order of a component which is in the MDI layer.
978  *
979  * Returns: a short integer indicating the stacking order of the component 
980  *       in the MDI layer, or -1 if the component is not in the MDI layer.
981  **/
982 short
983 AccessibleComponent_getMDIZOrder (AccessibleComponent *obj);
984
985 void
986 AccessibleComponent_grabFocus (AccessibleComponent *obj);
987
988 /*
989  *
990  * AccessibleEditableText function prototypes
991  *
992  */
993
994 int
995 AccessibleEditableText_ref (AccessibleEditableText *obj);
996
997 int
998 AccessibleEditableText_unref (AccessibleEditableText *obj);
999
1000 SPIBoolean
1001 AccessibleEditableText_setAttributes (AccessibleEditableText *obj,
1002                                       const char *attributes,
1003                                       long int startOffset,
1004                                       long int endOffset);
1005
1006 SPIBoolean
1007 AccessibleEditableText_setTextContents (AccessibleEditableText *obj,
1008                                         const char *newContents);
1009
1010 SPIBoolean
1011 AccessibleEditableText_insertText (AccessibleEditableText *obj,
1012                                    long int position,
1013                                    char *text,
1014                                    long int length);
1015
1016 SPIBoolean
1017 AccessibleEditableText_copyText (AccessibleText *obj,
1018                                  long int startPos,
1019                                  long int endPos);
1020
1021 SPIBoolean
1022 AccessibleEditableText_cutText (AccessibleEditableText *obj,
1023                                 long int startPos,
1024                                 long int endPos);
1025
1026 SPIBoolean
1027 AccessibleEditableText_deleteText (AccessibleEditableText *obj,
1028                                    long int startPos,
1029                                    long int endPos);
1030
1031 SPIBoolean
1032 AccessibleEditableText_pasteText (AccessibleEditableText *obj,
1033                                   long int position);
1034
1035 /*
1036  *
1037  * AccessibleHyperlink function prototypes
1038  *
1039  */
1040
1041 long
1042 AccessibleHyperlink_getNAnchors (AccessibleHyperlink *obj);
1043
1044 char *
1045 AccessibleHyperlink_getURI (AccessibleHyperlink *obj,
1046                             long int i);
1047
1048 Accessible *
1049 AccessibleHyperlink_getObject (AccessibleHyperlink *obj,
1050                                long int i);
1051
1052 void
1053 AccessibleHyperlink_getIndexRange (AccessibleHyperlink *obj,
1054                                    long int *startIndex,
1055                                    long int *endIndex);
1056
1057 SPIBoolean
1058 AccessibleHyperlink_isValid (AccessibleHyperlink *obj);
1059
1060 /*
1061  *
1062  * AccessibleHypertext function prototypes
1063  *
1064  */
1065
1066 int
1067 AccessibleHypertext_ref (AccessibleHypertext *obj);
1068
1069 int
1070 AccessibleHypertext_unref (AccessibleHypertext *obj);
1071
1072 long
1073 AccessibleHypertext_getNLinks (AccessibleHypertext *obj);
1074
1075 AccessibleHyperlink *
1076 AccessibleHypertext_getLink (AccessibleHypertext *obj,
1077                              long int linkIndex);
1078
1079 long
1080 AccessibleHypertext_getLinkIndex (AccessibleHypertext *obj,
1081                                   long int characterOffset);
1082
1083 /*
1084  *
1085  * AccessibleImage function prototypes
1086  *
1087  */
1088
1089 int
1090 AccessibleImage_ref (AccessibleImage *obj);
1091
1092 int
1093 AccessibleImage_unref (AccessibleImage *obj);
1094
1095 char *
1096 AccessibleImage_getImageDescription (AccessibleImage *obj);
1097
1098 void
1099 AccessibleImage_getImageSize (AccessibleImage *obj,
1100                               long int *width,
1101                               long int *height);
1102
1103 void
1104 AccessibleImage_getImagePosition (AccessibleImage *obj,
1105                                   long int *x,
1106                                   long int *y,
1107                                   AccessibleCoordType ctype);
1108
1109 void
1110 AccessibleImage_getImageExtents (AccessibleImage *obj,
1111                                  long int *x,
1112                                  long int *y,
1113                                  long int *width,
1114                                  long int *height,
1115                                  AccessibleCoordType ctype);
1116 /*
1117  *
1118  * AccessibleRelation function prototypes
1119  *
1120  */
1121
1122 int
1123 AccessibleRelation_ref (AccessibleRelation *obj);
1124
1125 int
1126 AccessibleRelation_unref (AccessibleRelation *obj);
1127
1128 AccessibleRelationType
1129 AccessibleRelation_getRelationType (AccessibleRelation *obj);
1130
1131 int
1132 AccessibleRelation_getNTargets (AccessibleRelation *obj);
1133
1134 Accessible *
1135 AccessibleRelation_getTarget (AccessibleRelation *obj, int i);
1136
1137
1138 /*
1139  *
1140  * AccessibleSelection function prototypes
1141  *
1142  */
1143
1144 int
1145 AccessibleSelection_ref (AccessibleSelection *obj);
1146
1147 int
1148 AccessibleSelection_unref (AccessibleSelection *obj);
1149
1150 long
1151 AccessibleSelection_getNSelectedChildren (AccessibleSelection *obj);
1152
1153 Accessible *
1154 AccessibleSelection_getSelectedChild (AccessibleSelection *obj,
1155                                       long int selectedChildIndex);
1156
1157 SPIBoolean
1158 AccessibleSelection_selectChild (AccessibleSelection *obj,
1159                                  long int childIndex);
1160
1161 SPIBoolean
1162 AccessibleSelection_deselectSelectedChild (AccessibleSelection *obj,
1163                                            long int selectedChildIndex);
1164
1165 SPIBoolean
1166 AccessibleSelection_isChildSelected (AccessibleSelection *obj,
1167                                      long int childIndex);
1168
1169 SPIBoolean
1170 AccessibleSelection_selectAll (AccessibleSelection *obj);
1171
1172 void
1173 AccessibleSelection_clearSelection (AccessibleSelection *obj);
1174
1175
1176 /*
1177  *
1178  * AccessibleStateSet function prototypes
1179  *
1180  */
1181
1182 int
1183 AccessibleStateSet_ref (AccessibleStateSet *obj);
1184
1185 int
1186 AccessibleStateSet_unref (AccessibleStateSet *obj);
1187
1188 SPIBoolean
1189 AccessibleStateSet_contains (AccessibleStateSet *obj,
1190                              AccessibleState state);
1191
1192 void
1193 AccessibleStateSet_add (AccessibleStateSet *obj,
1194                         AccessibleState state);
1195
1196 void
1197 AccessibleStateSet_remove (AccessibleStateSet *obj,
1198                            AccessibleState state);
1199
1200 SPIBoolean
1201 AccessibleStateSet_equals (AccessibleStateSet *obj,
1202                            AccessibleStateSet *obj2);
1203
1204 void
1205 AccessibleStateSet_compare (AccessibleStateSet *obj,
1206                             AccessibleStateSet *obj2,
1207                             AccessibleStateSet **differenceSet);
1208
1209 SPIBoolean
1210 AccessibleStateSet_isEmpty (AccessibleStateSet *obj);
1211
1212
1213 /*
1214  *
1215  * AccessibleTable function prototypes
1216  *
1217  */
1218
1219 int
1220 AccessibleTable_ref (AccessibleTable *obj);
1221
1222 int
1223 AccessibleTable_unref (AccessibleTable *obj);
1224
1225 Accessible *
1226 AccessibleTable_getCaption (AccessibleTable *obj);
1227
1228 Accessible *
1229 AccessibleTable_getSummary (AccessibleTable *obj);
1230
1231 long
1232 AccessibleTable_getNRows (AccessibleTable *obj);
1233
1234 long
1235 AccessibleTable_getNColumns (AccessibleTable *obj);
1236
1237 Accessible *
1238 AccessibleTable_getAccessibleAt (AccessibleTable *obj,
1239                                  long int row,
1240                                  long int column);
1241
1242 long
1243 AccessibleTable_getIndexAt (AccessibleTable *obj,
1244                             long int row,
1245                             long int column);
1246
1247 long
1248 AccessibleTable_getRowAtIndex (AccessibleTable *obj,
1249                                long int index);
1250
1251 long
1252 AccessibleTable_getColumnAtIndex (AccessibleTable *obj,
1253                                   long int index);
1254
1255 char *
1256 AccessibleTable_getRowDescription (AccessibleTable *obj,
1257                                    long int row);
1258
1259 char *
1260 AccessibleTable_getColumnDescription (AccessibleTable *obj,
1261                                       long int column);
1262
1263 long
1264 AccessibleTable_getRowExtentAt (AccessibleTable *obj,
1265                                 long int row,
1266                                 long int column);
1267
1268 long
1269 AccessibleTable_getColumnExtentAt (AccessibleTable *obj,
1270                                    long int row,
1271                                    long int column);
1272
1273 Accessible *
1274 AccessibleTable_getRowHeader (AccessibleTable *obj,
1275                               long int row);
1276
1277 Accessible *
1278 AccessibleTable_getColumnHeader (AccessibleTable *obj,
1279                                  long int column);
1280
1281 long
1282 AccessibleTable_getNSelectedRows (AccessibleTable *obj);
1283
1284 long
1285 AccessibleTable_getSelectedRows (AccessibleTable *obj,
1286                                  long int **selectedRows);
1287
1288 long
1289 AccessibleTable_getNSelectedColumns (AccessibleTable *obj);
1290
1291 long
1292 AccessibleTable_getSelectedColumns (AccessibleTable *obj,
1293                                     long int **selectedColumns);
1294
1295 SPIBoolean
1296 AccessibleTable_isRowSelected (AccessibleTable *obj,
1297                                long int row);
1298
1299 SPIBoolean
1300 AccessibleTable_isColumnSelected (AccessibleTable *obj,
1301                                   long int column);
1302
1303 SPIBoolean
1304 AccessibleTable_isSelected (AccessibleTable *obj,
1305                             long int row,
1306                             long int column);
1307
1308 /*
1309  *
1310  * AccessibleText function prototypes
1311  *
1312  */
1313
1314 int
1315 AccessibleText_ref (AccessibleText *obj);
1316
1317 int
1318 AccessibleText_unref (AccessibleText *obj);
1319
1320 long
1321 AccessibleText_getCharacterCount (AccessibleText *obj);
1322
1323 char *
1324 AccessibleText_getText (AccessibleText *obj,
1325                         long int startOffset,
1326                         long int endOffset);
1327
1328 long
1329 AccessibleText_getCaretOffset (AccessibleText *obj);
1330
1331 char *
1332 AccessibleText_getAttributes (AccessibleText *obj,
1333                                  long int offset,
1334                                  long int *startOffset,
1335                                  long int *endOffset);
1336
1337
1338 SPIBoolean
1339 AccessibleText_setCaretOffset (AccessibleText *obj,
1340                                long int newOffset);
1341
1342 char *
1343 AccessibleText_getTextBeforeOffset (AccessibleText *obj,
1344                                     long int offset,
1345                                     AccessibleTextBoundaryType type,
1346                                     long int *startOffset,
1347                                     long int *endOffset);
1348
1349 char *
1350 AccessibleText_getTextAtOffset (AccessibleText *obj,
1351                                 long int offset,
1352                                 AccessibleTextBoundaryType type,
1353                                 long int *startOffset,
1354                                 long int *endOffset);
1355
1356 char *
1357 AccessibleText_getTextAfterOffset (AccessibleText *obj,
1358                                    long int offset,
1359                                    AccessibleTextBoundaryType type,
1360                                    long int *startOffset,
1361                                    long int *endOffset);
1362
1363 unsigned long
1364 AccessibleText_getCharacterAtOffset (AccessibleText *obj,
1365                                      long int offset);
1366
1367 void
1368 AccessibleText_getCharacterExtents (AccessibleText *obj,
1369                                     long int offset,
1370                                     long int *x,
1371                                     long int *y,
1372                                     long int *width,
1373                                     long int *height,
1374                                     AccessibleCoordType type);
1375
1376 long
1377 AccessibleText_getOffsetAtPoint (AccessibleText *obj,
1378                                  long int x,
1379                                  long int y,
1380                                  AccessibleCoordType type);
1381
1382 long
1383 AccessibleText_getNSelections (AccessibleText *obj);
1384
1385 void
1386 AccessibleText_getSelection (AccessibleText *obj,
1387                              long int selectionNum,
1388                              long int *startOffset,
1389                              long int *endOffset);
1390
1391
1392 SPIBoolean
1393 AccessibleText_addSelection (AccessibleText *obj,
1394                              long int startOffset,
1395                              long int endOffset);
1396
1397 SPIBoolean
1398 AccessibleText_removeSelection (AccessibleText *obj,
1399                                 long int selectionNum);
1400
1401 SPIBoolean
1402 AccessibleText_setSelection (AccessibleText *obj,
1403                              long int selectionNum,
1404                              long int startOffset,
1405                              long int endOffset);
1406
1407 /*
1408  *
1409  * AccessibleValue Function Prototypes:
1410  *
1411  */
1412
1413 int
1414 AccessibleValue_ref (AccessibleValue *obj);
1415
1416 int
1417 AccessibleValue_unref (AccessibleValue *obj);
1418
1419 float
1420 AccessibleValue_getMinimumValue (AccessibleValue *obj);
1421
1422 float
1423 AccessibleValue_getCurrentValue (AccessibleValue *obj);
1424
1425 float
1426 AccessibleValue_getMaximumValue (AccessibleValue *obj);
1427
1428 SPIBoolean
1429 AccessibleValue_setCurrentValue (AccessibleValue *obj,
1430                                  float newValue);
1431
1432 G_END_DECLS
1433
1434 #endif