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