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