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