2001-11-13 Michael Meeks <michael@ximian.com>
[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 #include "spi-impl.h"
7
8 /*
9  * Definitions for SPI_ACCESSIBLE_STATE , SPI_ACCESSIBLE_ROLE, SpiAccessibleEvent,
10  *      and event listeners.
11  */
12
13 #include "spi-roletypes.h"
14 #include "spi-statetypes.h"
15 #include "spi-listener.h"
16
17 /*
18  *
19  * Enumerated type for text boundary types
20  *
21  */
22
23 typedef enum
24 {
25   SPI_TEXT_BOUNDARY_CHAR,
26   SPI_TEXT_BOUNDARY_CURSOR_POS,
27   SPI_TEXT_BOUNDARY_WORD_START,
28   SPI_TEXT_BOUNDARY_WORD_END,
29   SPI_TEXT_BOUNDARY_SENTENCE_START,
30   SPI_TEXT_BOUNDARY_SENTENCE_END,
31   SPI_TEXT_BOUNDARY_LINE_START,
32   SPI_TEXT_BOUNDARY_LINE_END,
33   SPI_TEXT_BOUNDARY_ATTRIBUTE_RANGE
34 } SPI_TEXT_BOUNDARY_TYPE;
35
36
37
38 /*
39  *
40  * Enumerated type for relation types
41  *
42  */
43
44 typedef enum
45 {
46   RELATION_LABEL_FOR,
47   RELATION_LABELED_BY,
48   RELATION_CONTROLLER_FOR,
49   RELATION_CONTROLLED_BY,
50   RELATION_MEMBER_OF
51 } RELATION_TYPE;
52
53
54 /* don't change the order of these ! */
55 typedef enum _AccessibleCoordType {
56   COORD_TYPE_SCREEN,
57   COORD_TYPE_WINDOW
58 } SpiAccessibleCoordType;
59
60 typedef enum _KeyEventType {
61   KEY_PRESSED,
62   KEY_RELEASED
63 } KeyEventType;
64
65 typedef enum _KeySynthType {
66   KEY_PRESS,
67   KEY_RELEASE, 
68   KEY_PRESSRELEASE,
69   KEY_SYM
70 } KeySynthType;
71
72 typedef enum _KeyListenerSyncType {
73   KEYSPI_LISTENER_SYNCHRONOUS = 1,
74   KEYSPI_LISTENER_CANCONSUME = 2,
75   KEYSPI_LISTENER_ALLWINDOWS = 4
76 } KeyListenerSyncType;
77
78 typedef unsigned long KeyEventMask;
79
80 typedef struct _KeyStroke
81 {
82         long keyID;
83         short keycode;
84         KeyEventType type;
85         unsigned short modifiers;
86 } KeyStroke;
87
88 typedef struct _KeySet
89 {
90         unsigned long *keysyms;
91         unsigned short *keycodes;
92         short len;
93 } KeySet;
94
95 #define 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 SpiAccessibleEvent *
152 SPI_nextEvent (boolean waitForEvent);
153
154 /**
155  * SPI_exit:
156  *
157  * Disconnects from the Accessibility SpiRegistry and releases resources.
158  * Not Yet Implemented.
159  *
160  **/
161 void
162 SPI_exit (void);
163
164 /*
165  * Event SpiListener 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 SpiAccessibleEventListener *
178 createEventListener (SpiAccessibleEventListenerCB 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 SpiAccessibleEventListener.
186  *
187  * Returns: #TRUE if successful, otherwise #FALSE.
188  *
189  **/
190 boolean
191 EventListener_addCallback (SpiAccessibleEventListener *listener,
192                            SpiAccessibleEventListenerCB callback);
193
194 /**
195  * EventListener_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 SpiAccessibleEventListener.
200  *
201  * Returns: #TRUE if successful, otherwise #FALSE.
202  *
203  **/
204 boolean
205 EventListener_removeCallback (SpiAccessibleEventListener *listener,
206                               SpiAccessibleEventListenerCB callback);
207
208 /**
209  * createKeyListener:
210  * @callback : an #KeystrokeListenerCB callback function, or NULL.
211  *
212  * Create a new #KeystrokeListener with a specified callback function.
213  *
214  * Returns: a pointer to a newly-created #KeystrokeListener.
215  *
216  **/
217 KeystrokeListener *
218 createKeystrokeListener (KeystrokeListenerCB 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 KeystrokeListener_addCallback (KeystrokeListener *listener,
232                                KeystrokeListenerCB callback);
233
234 /**
235  * KeystrokeListener_removeCallback:
236  * @listener: the #KeystrokeListener instance to modify.
237  * @callback: an #KeystrokeListenerCB function pointer.
238  *
239  * Remove an in-process callback function from an existing #KeystrokeListener.
240  *
241  * Returns: #TRUE if successful, otherwise #FALSE.
242  *
243  **/
244 boolean
245 KeystrokeListener_removeCallback (KeystrokeListener *listener,
246                                   KeystrokeListenerCB 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 SpiAccessibleEventListener.
271  *
272  * Returns: #TRUE if successful, otherwise #FALSE.
273  *
274  **/
275 boolean
276 registerGlobalEventListener (SpiAccessibleEventListener *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 SpiAccessible*
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 (SpiAccessible **list);
322
323 /**
324  * registerKeystrokeListener:
325  * @listener: a pointer to the #KeystrokeListener for which
326  *            keystroke events are requested.
327  *
328  * Not Yet Implemented.
329  *
330  **/
331 void
332 registerKeystrokeListener (KeystrokeListener *listener,
333                            KeySet *keys,
334                            KeyMaskType modmask,
335                            KeyEventMask eventmask,
336                            KeyListenerSyncType sync_type);
337
338 /**
339  * generateKeyEvent:
340  * @keycode: a #long indicating the keycode of the key event
341  *           being synthesized.
342  * @synth_type: a #KeySynthType indicating whether this should be a
343  *        KEY_PRESS, KEY_RELEASE, both (KEY_PRESSRELEASE), or
344  *        a press/release pair for a KEYSYM.
345  *
346  * Synthesize a keyboard event (as if a hardware keyboard event occurred in the
347  * current UI context).
348  *
349  **/
350 void
351 generateKeyEvent (long keyCode, KeySynthType synth_type);
352
353 /**
354  * generateMouseEvent:
355  * @x: a #long indicating the screen x coordinate of the mouse event.
356  * @y: a #long indicating the screen y coordinate of the mouse event.
357  * @name: a string indicating which mouse event to be synthesized
358  *        (e.g. "button1", "button2", "mousemove").
359  *
360  * Synthesize a mouse event at a specific screen coordinate.
361  * Not Yet Implemented.
362  *
363  **/
364 void
365 generateMouseEvent (long x, long y, char *name);
366
367 /*
368  *
369  * SpiAccessible function prototypes
370  *
371  */
372
373 /**
374  * SpiAccessible_ref:
375  * @obj: a pointer to the #Accessible object on which to operate.
376  *
377  * Increment the reference count for an #Accessible object.
378  *
379  * Returns: (no return code implemented yet).
380  *
381  **/
382 int
383 SpiAccessible_ref (SpiAccessible *obj);
384
385 /**
386  * SpiAccessible_unref:
387  * @obj: a pointer to the #Accessible object on which to operate.
388  *
389  * Decrement the reference count for an #Accessible object.
390  *
391  * Returns: (no return code implemented yet).
392  *
393  **/
394 int
395 SpiAccessible_unref (SpiAccessible *obj);
396
397 /**
398  * SpiAccessible_getName:
399  * @obj: a pointer to the #Accessible object on which to operate.
400  *
401  * Get the name of an #Accessible object.
402  *
403  * Returns: a UTF-8 string indicating the name of the #Accessible object.
404  *
405  **/
406 char *
407 SpiAccessible_getName (SpiAccessible *obj);
408
409 /**
410  * SpiAccessible_getDescription:
411  * @obj: a pointer to the #Accessible object on which to operate.
412  *
413  * Get the description of an #Accessible object.
414  *
415  * Returns: a UTF-8 string describing the #Accessible object.
416  *
417  **/
418 char *
419 SpiAccessible_getDescription (SpiAccessible *obj);
420
421 /**
422  * SpiAccessible_getParent:
423  * @obj: a pointer to the #Accessible object to query.
424  *
425  * Get an #Accessible object's parent container.
426  *
427  * Returns: a pointer to the #Accessible object which contains the given
428  *          #Accessible instance, or NULL if the @obj has no parent container.
429  *
430  **/
431 SpiAccessible *
432 SpiAccessible_getParent (SpiAccessible *obj);
433
434 /**
435  * SpiAccessible_getChildCount:
436  *
437  * @obj: a pointer to the #Accessible object on which to operate.
438  *
439  * Get the number of children contained by an #Accessible object.
440  *
441  * Returns: a #long indicating the number of #Accessible children
442  *          contained by an #Accessible object.
443  *
444  **/
445 long
446 SpiAccessible_getChildCount (SpiAccessible *obj);
447
448 /**
449  * SpiAccessible_getChildAtIndex:
450  *
451  * @obj: a pointer to the #Accessible object on which to operate.
452  * @childIndex: a #long indicating which child is specified.
453  *
454  * Get the #Accessible child of an #Accessible object at a given index.
455  *
456  * Returns: a pointer to the #Accessible child object at index
457  *          @childIndex.
458  *
459  **/
460 SpiAccessible *
461 SpiAccessible_getChildAtIndex (SpiAccessible *obj,
462                             long childIndex);
463
464 /**
465  * SpiAccessible_getIndexInParent:
466  *
467  * @obj: a pointer to the #Accessible object on which to operate.
468  *
469  * Get the index of an #Accessible object in its containing #Accessible.
470  *
471  * Returns: a #long indicating the index of the #Accessible object
472  *          in its parent (i.e. containing) #Accessible instance,
473  *          or -1 if @obj has no containing parent.
474  *
475  **/
476 long
477 SpiAccessible_getIndexInParent (SpiAccessible *obj);
478
479 /**
480  * SpiAccessible_getRelationSet:
481  *
482  * Not Yet Implemented.
483  *
484  **/
485 SpiAccessibleRelation **
486 SpiAccessible_getRelationSet (SpiAccessible *obj);
487
488 /**
489  * SpiAccessible_getRole:
490  * @obj: a pointer to the #Accessible object on which to operate.
491  *
492  * Get the UI role of an #Accessible object.
493  *
494  * Returns: a UTF-8 string indicating the UI role of the #Accessible object.
495  *
496  **/
497 char *
498 SpiAccessible_getRole (SpiAccessible *obj);
499
500 /**
501  * SpiAccessible_getStateSet:
502  *
503  * Not Yet Implemented.
504  *
505  **/
506 SpiAccessibleStateSet *
507 SpiAccessible_getStateSet (SpiAccessible *obj);
508
509 /* Interface query methods */
510
511 /**
512  * SpiAccessible_isAction:
513  * @obj: a pointer to the #Accessible instance to query.
514  *
515  * Query whether the specified #Accessible implements #AccessibleAction.
516  * Not Yet Implemented.
517  *
518  * Returns: #TRUE if @obj implements the #AccessibleAction interface,
519  *          #FALSE otherwise.
520  **/
521 boolean
522 SpiAccessible_isAction (SpiAccessible *obj);
523
524 /**
525  * SpiAccessible_isComponent:
526  * @obj: a pointer to the #Accessible instance to query.
527  *
528  * Query whether the specified #Accessible implements #AccessibleComponent.
529  *
530  * Returns: #TRUE if @obj implements the #AccessibleComponent interface,
531  *          #FALSE otherwise.
532  **/
533 boolean
534 SpiAccessible_isComponent (SpiAccessible *obj);
535
536 /**
537  * SpiAccessible_isEditableText:
538  * @obj: a pointer to the #Accessible instance to query.
539  *
540  * Query whether the specified #Accessible implements #AccessibleEditableText.
541  * Not Yet Implemented.
542  *
543  * Returns: #TRUE if @obj implements the #AccessibleEditableText interface,
544  *          #FALSE otherwise.
545  **/
546 boolean
547 SpiAccessible_isEditableText (SpiAccessible *obj);
548
549 /**
550  * SpiAccessible_isHypertext:
551  * @obj: a pointer to the #Accessible instance to query.
552  *
553  * Query whether the specified #Accessible implements #AccessibleHypertext.
554  * Not Yet Implemented.
555  *
556  * Returns: #TRUE if @obj implements the #AccessibleHypertext interface,
557  *          #FALSE otherwise.
558  **/
559 boolean
560 SpiAccessible_isHypertext (SpiAccessible *obj);
561
562 /**
563  * SpiAccessible_isImage:
564  * @obj: a pointer to the #Accessible instance to query.
565  *
566  * Query whether the specified #Accessible implements #AccessibleImage.
567  * Not Yet Implemented.
568  *
569  * Returns: #TRUE if @obj implements the #AccessibleImage interface,
570  *          #FALSE otherwise.
571 **/
572 boolean
573 SpiAccessible_isImage (SpiAccessible *obj);
574
575 /**
576   * SpiAccessible_isSelection:
577  * @obj: a pointer to the #Accessible instance to query.
578  *
579  * Query whether the specified #Accessible implements #AccessibleSelection.
580  * Not Yet Implemented.
581  *
582  * Returns: #TRUE if @obj implements the #AccessibleSelection interface,
583  *          #FALSE otherwise.
584 **/
585 boolean
586 SpiAccessible_isSelection (SpiAccessible *obj);
587
588 /**
589  * SpiAccessible_isTable:
590  * @obj: a pointer to the #Accessible instance to query.
591  *
592  * Query whether the specified #Accessible implements #AccessibleTable.
593  * Not Yet Implemented.
594  *
595  * Returns: #TRUE if @obj implements the #AccessibleTable interface,
596  *          #FALSE otherwise.
597 **/
598 boolean
599 SpiAccessible_isTable (SpiAccessible *obj);
600
601 /**
602  * SpiAccessible_isText:
603  * @obj: a pointer to the #Accessible instance to query.
604  *
605  * Query whether the specified #Accessible implements #AccessibleText.
606  * Not Yet Implemented.
607  *
608  * Returns: #TRUE if @obj implements the #AccessibleText interface,
609  *          #FALSE otherwise.
610 **/
611 boolean
612 SpiAccessible_isText (SpiAccessible *obj);
613
614 /**
615  * SpiAccessible_getAction:
616  *
617  * Not Yet Implemented.
618  *
619  **/
620 SpiAccessibleAction *
621 SpiAccessible_getAction (SpiAccessible *obj);
622
623 /**
624  * SpiAccessible_getComponent:
625  * @obj: a pointer to the #Accessible instance to query.
626  *
627  * Get the #AccessibleComponent interface for an #Accessible.
628  *
629  * Returns: a pointer to an #AccessibleComponent interface instance, or
630  *          NULL if @obj does not implement #AccessibleComponent.
631  **/
632 SpiAccessibleComponent *
633 SpiAccessible_getComponent (SpiAccessible *obj);
634
635 /**
636  * SpiAccessible_getEditableText:
637  *
638  * Not Yet Implemented.
639  *
640  **/
641 SpiAccessibleEditableText *
642 SpiAccessible_getEditableText (SpiAccessible *obj);
643
644 /**
645  * SpiAccessible_getHypertext:
646  *
647  * Not Yet Implemented.
648  *
649  **/
650 SpiAccessibleHypertext *
651 SpiAccessible_getHypertext (SpiAccessible *obj);
652
653 /**
654  * SpiAccessible_getImage:
655  *
656  * Not Yet Implemented.
657  *
658  **/
659 SpiAccessibleImage *
660 SpiAccessible_getImage (SpiAccessible *obj);
661
662 /**
663  * SpiAccessible_getSelection:
664  *
665  * Not Yet Implemented.
666  *
667  **/
668 SpiAccessibleSelection *
669 SpiAccessible_getSelection (SpiAccessible *obj);
670
671 /**
672  * SpiAccessible_getTable:
673  *
674  * Not Yet Implemented.
675  *
676  **/
677 SpiAccessibleTable *
678 SpiAccessible_getTable (SpiAccessible *obj);
679
680 /**
681  * SpiAccessible_getText:
682  *
683  * Not Yet Implemented.
684  *
685  **/
686 SpiAccessibleText *
687 SpiAccessible_getText (SpiAccessible *obj);
688
689 /**
690  * SpiAccessible_queryInterface:
691  * @obj: a pointer to the #Accessible instance to query.
692  * @interface_name: a UTF-8 character string specifiying the requested interface.
693  *
694  * Query an #Accessible object to for a named interface.
695  *
696  * Returns: an instance of the named interface object, if it is implemented
697  *          by @obj, or NULL otherwise.
698  *
699  **/
700 GenericInterface *
701 SpiAccessible_queryInterface (SpiAccessible *obj, char *interface_name);
702
703 /*
704  *
705  * SpiAccessibleAction function prototypes
706  *
707  */
708
709 int
710 SpiAccessibleAction_ref (
711                       SpiAccessibleAction *obj);
712
713 int
714 SpiAccessibleAction_unref (SpiAccessibleAction *obj);
715
716 long
717 SpiAccessibleAction_getNActions (SpiAccessibleAction *obj);
718
719 /**
720  * SpiAccessibleAction_getDescription:
721  * @obj: a pointer to the #AccessibleAction to query.
722  *
723  * Get the description of 'i-th' action invokable on an
724  *      object implementing #AccessibleAction.
725  *
726  * Not Yet Implemented.
727  *
728  * Returns: a UTF-8 string describing the 'i-th' invokable action.
729  *
730  **/
731 char *
732 SpiAccessibleAction_getDescription (SpiAccessibleAction *obj,
733                                  long index);
734
735 boolean
736 SpiAccessibleAction_doAction (SpiAccessibleAction *obj,
737                            long index);
738
739 char *
740 SpiAccessibleAction_getKeyBinding (SpiAccessibleAction *obj,
741                                 long index);
742
743 /*
744  *
745  * SpiAccessibleApplication function prototypes
746  *
747  */
748
749 /**
750  * SpiAccessibleApplication_unref:
751  * @obj: a pointer to the #AccessibleApplication on which to operate.
752  *
753  * Decrement the reference count for an #AccessibleApplication.
754  *
755  * Returns: (no return code implemented yet).
756  *
757  **/
758 int
759 SpiAccessibleApplication_ref (SpiAccessibleApplication *obj);
760
761 /**
762  * SpiAccessibleApplication_unref:
763  * @obj: a pointer to the #AccessibleApplication object on which to operate.
764  *
765  * Decrement the reference count for an #AccessibleApplication.
766  *
767  * Returns: (no return code implemented yet).
768  *
769  **/
770 int
771 SpiAccessibleApplication_unref (SpiAccessibleApplication *obj);
772
773 /**
774  * SpiAccessibleApplication_getToolkitName:
775  * @obj: a pointer to the #AccessibleApplication to query.
776  *
777  * Get the name of the UI toolkit used by an #AccessibleApplication.
778  *
779  * Returns: a UTF-8 string indicating which UI toolkit is
780  *          used by an application.
781  *
782  **/
783 char *
784 SpiAccessibleApplication_getToolkitName (SpiAccessibleApplication *obj);
785
786 /**
787  * SpiAccessibleApplication_getVersion:
788  * @obj: a pointer to the #AccessibleApplication being queried.
789  *
790  * Get the version of the at-spi bridge exported by an
791  *      #AccessibleApplication instance.
792  *
793  * Returns: a UTF-8 string indicating the application's
794  *          at-spi version.
795  *
796  **/
797 char *
798 SpiAccessibleApplication_getVersion (SpiAccessibleApplication *obj);
799
800 /**
801  * SpiAccessibleApplication_getID:
802  * @obj: a pointer to the #AccessibleApplication being queried.
803  *
804  * Get the unique ID assigned by the SpiRegistry to an
805  *      #AccessibleApplication instance.
806  * (Not Yet Implemented by the registry).
807  *
808  * Returns: a unique #long integer associated with the application
809  *          by the SpiRegistry, or 0 if the application is not registered.
810  **/
811 long
812 SpiAccessibleApplication_getID (SpiAccessibleApplication *obj);
813
814 /**
815  * SpiAccessibleApplication_pause:
816  *
817  * Attempt to pause the application (used when client event queue is
818  *  over-full).
819  * Not Yet Implemented.
820  *
821  * Returns: #TRUE if the application was paused successfully, #FALSE otherwise.
822  *
823  **/
824 boolean
825 SpiAccessibleApplication_pause (SpiAccessibleApplication *obj);
826
827 /**
828  * SpiAccessibleApplication_pause:
829  *
830  * Attempt to resume the application (used after #AccessibleApplication_pause).
831  * Not Yet Implemented.
832  *
833  * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise.
834  *
835  **/
836 boolean
837 SpiAccessibleApplication_resume (SpiAccessibleApplication *obj);
838
839 /*
840  *
841  * SpiAccessibleComponent function prototypes
842  *
843  */
844
845 int
846 SpiAccessibleComponent_ref (SpiAccessibleComponent *obj);
847
848 int
849 SpiAccessibleComponent_unref (SpiAccessibleComponent *obj);
850
851 boolean
852 SpiAccessibleComponent_contains (SpiAccessibleComponent *obj,
853                               long x,
854                               long y,
855                               SpiAccessibleCoordType ctype);
856
857 SpiAccessible *
858 SpiAccessibleComponent_getAccessibleAtPoint (SpiAccessibleComponent *obj,
859                                           long x,
860                                           long y,
861                                           SpiAccessibleCoordType ctype);
862
863 /**
864  * SpiAccessibleComponent_getExtents:
865  * @obj: a pointer to the #AccessibleComponent to query.
866  * @x: a pointer to a #long into which the minimum x coordinate will be returned.
867  * @y: a pointer to a #long into which the minimum y coordinate will be returned.
868  * @width: a pointer to a #long into which the x extents (width) will be returned.
869  * @height: a pointer to a #long into which the y extents (height) will be returned.
870  * @ctype: the desired coordinate system into which to return the results,
871  *         (e.g. COORD_TYPE_WINDOW, COORD_TYPE_SCREEN).
872  *
873  * Get the bounding box of the specified #AccessibleComponent.
874  *
875  **/
876 void
877 SpiAccessibleComponent_getExtents (SpiAccessibleComponent *obj,
878                                 long *x,
879                                 long *y,
880                                 long *width,
881                                 long *height,
882                                 SpiAccessibleCoordType ctype);
883
884 void
885 SpiAccessibleComponent_getPosition (SpiAccessibleComponent *obj,
886                                  long *x,
887                                  long *y,
888                                  SpiAccessibleCoordType ctype);
889
890 void
891 SpiAccessibleComponent_getSize (SpiAccessibleComponent *obj,
892                              long *width,
893                              long *height);
894
895 void
896 SpiAccessibleComponent_grabFocus (SpiAccessibleComponent *obj);
897
898 /*
899  *
900  * SpiAccessibleEditableText function prototypes
901  *
902  */
903
904 int
905 SpiAccessibleEditableText_ref (SpiAccessibleEditableText *obj);
906
907 int
908 SpiAccessibleEditableText_unref (SpiAccessibleEditableText *obj);
909
910 boolean
911 SpiAccessibleEditableText_setRunAttributes (SpiAccessibleEditableText *obj,
912                                          const char *attributes,
913                                          long startPos, long endPos);
914
915 void
916 SpiAccessibleEditableText_setTextContents (SpiAccessibleEditableText *obj,
917                                         const char *newContents);
918
919 void
920 SpiAccessibleEditableText_insertText (SpiAccessibleEditableText *obj,
921                                    long position,
922                                    char *text,
923                                    long length);
924
925 void
926 SpiAccessibleEditableText_copyText (SpiAccessibleText *obj,
927                                  long startPos,
928                                  long endPos);
929
930 void
931 SpiAccessibleEditableText_cutText (SpiAccessibleEditableText *obj,
932                                 long startPos,
933                                 long endPos);
934
935 void
936 SpiAccessibleEditableText_deleteText (SpiAccessibleEditableText *obj,
937                                    long startPos,
938                                    long endPos);
939
940 void
941 SpiAccessibleEditableText_pasteText (SpiAccessibleEditableText *obj,
942                                   long position);
943
944 /*
945  *
946  * SpiAccessibleHyperlink function prototypes
947  *
948  */
949
950 int
951 SpiAccessibleHyperlink_ref (SpiAccessibleHyperlink *obj);
952
953 int
954 SpiAccessibleHyperlink_unref (SpiAccessibleHyperlink *obj);
955
956 long
957 SpiAccessibleHyperlink_getNAnchors (SpiAccessibleHyperlink *obj);
958
959 char *
960 SpiAccessibleHyperlink_getURI (SpiAccessibleHyperlink *obj,
961                             long i);
962
963 SpiAccessible
964 SpiAccessibleHyperlink_getObject (SpiAccessibleHyperlink *obj,
965                                long i);
966
967 void
968 SpiAccessibleHyperlink_getIndexRange (SpiAccessibleHyperlink *obj,
969                                    long *startIndex,
970                                    long *endIndex);
971
972 boolean
973 SpiAccessibleHyperlink_isValid (SpiAccessibleHyperlink *obj);
974
975 /*
976  *
977  * SpiAccessibleHypertext function prototypes
978  *
979  */
980
981 int
982 SpiAccessibleHypertext_ref (SpiAccessibleHypertext *obj);
983
984 int
985 SpiAccessibleHypertext_unref (SpiAccessibleHypertext *obj);
986
987 long
988 SpiAccessibleHypertext_getNLinks (SpiAccessibleHypertext *obj);
989
990 SpiAccessibleHyperlink *
991 SpiAccessibleHyperText_getLink (SpiAccessibleHypertext *obj,
992                              long linkIndex);
993
994 long
995 SpiAccessibleHypertext_getLinkIndex (SpiAccessibleHypertext *obj,
996                                   long characterIndex);
997
998 /*
999  *
1000  * SpiAccessibleImage function prototypes
1001  *
1002  */
1003
1004 int
1005 SpiAccessibleImage_ref (SpiAccessibleImage *obj);
1006
1007 int
1008 SpiAccessibleImage_unref (SpiAccessibleImage *obj);
1009
1010 char *
1011 SpiAccessibleImage_getImageDescription (SpiAccessibleImage *obj);
1012
1013 void
1014 SpiAccessibleImage_getImageSize (SpiAccessibleImage *obj,
1015                               long *width,
1016                               long *height);
1017
1018 void
1019 SpiAccessibleImage_getImagePosition (SpiAccessibleImage *obj,
1020                                   long *x,
1021                                   long *y,
1022                                   SpiAccessibleCoordType ctype);
1023
1024 /*
1025  *
1026  * SpiAccessibleRelation function prototypes
1027  *
1028  */
1029
1030 int
1031 SpiAccessibleRelation_ref (SpiAccessibleRelation *obj);
1032
1033 int
1034 SpiAccessibleRelation_unref (SpiAccessibleRelation *obj);
1035
1036 RELATION_TYPE
1037 SpiAccessibleRelation_getRelationType (SpiAccessibleRelation *obj);
1038
1039 SpiAccessible *
1040 SpiAccessibleRelation_getTarget (SpiAccessibleRelation *obj);
1041
1042
1043
1044 /*
1045  *
1046  * SpiAccessibleSelection function prototypes
1047  *
1048  */
1049
1050 int
1051 SpiAccessibleSelection_ref (SpiAccessibleSelection *obj);
1052
1053 int
1054 SpiAccessibleSelection_unref (SpiAccessibleSelection *obj);
1055
1056 long
1057 SpiAccessibleSelection_getNSelectedChildren (SpiAccessibleSelection *obj);
1058
1059 SpiAccessible *
1060 SpiAccessibleSelection_getSelectedChild (SpiAccessibleSelection *obj,
1061                                       long selectedChildIndex);
1062
1063 boolean
1064 SpiAccessibleSelection_selectChild (SpiAccessibleSelection *obj,
1065                                  long childIndex);
1066
1067 boolean
1068 SpiAccessibleSelection_deselectSelectedChild (SpiAccessibleSelection *obj,
1069                                            long selectedChildIndex);
1070
1071 boolean
1072 SpiAccessibleSelection_isChildSelected (SpiAccessibleSelection *obj,
1073                                      long childIndex);
1074
1075 void
1076 SpiAccessibleSelection_selectAll (SpiAccessibleSelection *obj);
1077
1078 void
1079 SpiAccessibleSelection_clearSelection (SpiAccessibleSelection *obj);
1080
1081
1082 /*
1083  *
1084  * SpiAccessibleStateSet function prototypes
1085  *
1086  */
1087
1088 int
1089 SpiAccessibleStateSet_ref (SpiAccessibleStateSet *obj);
1090
1091 int
1092 SpiAccessibleStateSet_unref (SpiAccessibleStateSet *obj);
1093
1094 boolean
1095 SpiAccessibleStateSet_contains (SpiAccessibleStateSet *obj,
1096                              SPI_ACCESSIBLE_STATE state);
1097
1098 void
1099 SpiAccessibleStateSet_add (SpiAccessibleStateSet *obj,
1100                         SPI_ACCESSIBLE_STATE state);
1101
1102 void
1103 SpiAccessibleStateSet_remove (SpiAccessibleStateSet *obj,
1104                            SPI_ACCESSIBLE_STATE state);
1105
1106 boolean
1107 SpiAccessibleStateSet_equals (SpiAccessibleStateSet *obj,
1108                            SpiAccessibleStateSet *obj2);
1109
1110 void
1111 SpiAccessibleStateSet_compare (SpiAccessibleStateSet *obj,
1112                             SpiAccessibleStateSet *obj2,
1113                             SpiAccessibleStateSet **differenceSet);
1114
1115 boolean
1116 SpiAccessibleStateSet_isEmpty (SpiAccessibleStateSet *obj);
1117
1118
1119 /*
1120  *
1121  * SpiAccessibleTable function prototypes
1122  *
1123  */
1124
1125 int
1126 SpiAccessibleTable_ref (SpiAccessibleTable *obj);
1127
1128 int
1129 SpiAccessibleTable_unref (SpiAccessibleTable *obj);
1130
1131 SpiAccessible *
1132 SpiAccessibleTable_getCaption (SpiAccessibleTable *obj);
1133
1134 SpiAccessible *
1135 SpiAccessibleTable_getSummary (SpiAccessibleTable *obj);
1136
1137 long
1138 SpiAccessibleTable_getNRows (SpiAccessibleTable *obj);
1139
1140 long
1141 SpiAccessibleTable_getNColumns (SpiAccessibleTable *obj);
1142
1143 SpiAccessible *
1144 SpiAccessibleTable_refAt (SpiAccessibleTable *obj,
1145                                  long row,
1146                                  long column);
1147
1148 long
1149 SpiAccessibleTable_getIndexAt (SpiAccessibleTable *obj,
1150                             long row,
1151                             long column);
1152
1153 long
1154 SpiAccessibleTable_getRowAtIndex (SpiAccessibleTable *obj,
1155                                long index);
1156
1157 long
1158 SpiAccessibleTable_getColumnAtIndex (SpiAccessibleTable *obj,
1159                                   long index);
1160
1161 char *
1162 SpiAccessibleTable_getRowDescription (SpiAccessibleTable *obj,
1163                                    long row);
1164
1165 char *
1166 SpiAccessibleTable_getColumnDescription (SpiAccessibleTable *obj,
1167                                       long column);
1168
1169 long
1170 SpiAccessibleTable_getRowExtentAt (SpiAccessibleTable *obj,
1171                                 long row,
1172                                 long column);
1173
1174 long
1175 SpiAccessibleTable_getColumnExtentAt (SpiAccessibleTable *obj,
1176                                    long row,
1177                                    long column);
1178
1179 SpiAccessible *
1180 SpiAccessibleTable_getRowHeader (SpiAccessibleTable *obj,
1181                               long row);
1182
1183 SpiAccessible *
1184 SpiAccessibleTable_getColumnHeader (SpiAccessibleTable *obj,
1185                                  long column);
1186
1187 long
1188 SpiAccessibleTable_getNSelectedRows (SpiAccessibleTable *obj);
1189
1190 long
1191 SpiAccessibleTable_getSelectedRows (SpiAccessibleTable *obj,
1192                                  long **selectedRows);
1193
1194 long
1195 SpiAccessibleTable_getNSelectedColumns (SpiAccessibleTable *obj);
1196
1197 long
1198 SpiAccessibleTable_getSelectedColumns (SpiAccessibleTable *obj,
1199                                     long **selectedColumns);
1200
1201 boolean
1202 SpiAccessibleTable_isRowSelected (SpiAccessibleTable *obj,
1203                                long row);
1204
1205 boolean
1206 SpiAccessibleTable_isColumnSelected (SpiAccessibleTable *obj,
1207                                   long column);
1208
1209 boolean
1210 SpiAccessibleTable_isSelected (SpiAccessibleTable *obj,
1211                             long row,
1212                             long column);
1213
1214 /*
1215  *
1216  * SpiAccessibleText function prototypes
1217  *
1218  */
1219
1220 int
1221 SpiAccessibleText_ref (SpiAccessibleText *obj);
1222
1223 int
1224 SpiAccessibleText_unref (SpiAccessibleText *obj);
1225
1226 long
1227 SpiAccessibleText_getCharacterCount (SpiAccessibleText *obj);
1228
1229 char *
1230 SpiAccessibleText_getText (SpiAccessibleText *obj,
1231                         long startOffset,
1232                         long endOffset);
1233
1234 long
1235 SpiAccessibleText_getCaretOffset (SpiAccessibleText *obj);
1236
1237 char *
1238 SpiAccessibleText_getAttributes (SpiAccessibleText *obj,
1239                                  long offset,
1240                                  long *startOffset,
1241                                  long *endOfset);
1242
1243
1244 boolean
1245 SpiAccessibleText_setCaretOffset (SpiAccessibleText *obj,
1246                                long newOffset);
1247
1248 char *
1249 SpiAccessibleText_getTextBeforeOffset (SpiAccessibleText *obj,
1250                                     long offset,
1251                                     SPI_TEXT_BOUNDARY_TYPE type,
1252                                     long *startOffset, long *endOffset);
1253
1254 char *
1255 SpiAccessibleText_getTextAtOffset (SpiAccessibleText *obj,
1256                                     long offset,
1257                                     SPI_TEXT_BOUNDARY_TYPE type,
1258                                 long *startOffset, long *endOffset);
1259
1260 char *
1261 SpiAccessibleText_getTextAfterOffset (SpiAccessibleText *obj,
1262                                     long offset,
1263                                     SPI_TEXT_BOUNDARY_TYPE type,
1264                                    long *startOffset, long *endOffset);
1265 unsigned long
1266 SpiAccessibleText_getCharacterAtOffset (SpiAccessibleText *obj,
1267                                      long offset);
1268
1269 void
1270 SpiAccessibleText_getCharacterExtents (SpiAccessibleText *obj,
1271                                     long offset,
1272                                     long *x,
1273                                     long *y,
1274                                     long *width,
1275                                     long *height, SpiAccessibleCoordType type);
1276
1277 long
1278 SpiAccessibleText_getOffsetAtPoint (SpiAccessibleText *obj,
1279                                  long x,
1280                                  long y, SpiAccessibleCoordType type);
1281
1282 long
1283 SpiAccessibleText_getNSelections (SpiAccessibleText *obj);
1284
1285 void
1286 SpiAccessibleText_getSelection (SpiAccessibleText *obj,
1287                              long selectionNum, long *startOffset,
1288                              long *endOffset);
1289
1290
1291 boolean
1292 SpiAccessibleText_addSelection (SpiAccessibleText *obj,
1293                              long startOffset, long endOffset);
1294
1295 boolean
1296 SpiAccessibleText_removeSelection (SpiAccessibleText *obj,
1297                                 long selectionNum);
1298
1299 boolean
1300 SpiAccessibleText_setSelection (SpiAccessibleText *obj,
1301                              long selectionNum,
1302                              long startOffset,
1303                              long endOffset);
1304
1305 /*
1306  *
1307  * SpiAccessibleValue Function Prototypes:
1308  *
1309  */
1310
1311 float
1312 SpiAccessibleValue_getMinimumValue (SpiAccessibleValue *value);
1313
1314 float
1315 SpiAccessibleValue_getCurrentValue (SpiAccessibleValue *value);
1316
1317 float
1318 SpiAccessibleValue_getMaximumValue (SpiAccessibleValue *value);
1319
1320 boolean
1321 SpiAccessibleValue_setCurrentValue (SpiAccessibleValue *value,
1322                                  float newValue);
1323
1324 void
1325 spi_freeString (char *s);
1326
1327 #endif