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