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