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