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