Changes to support generation of C bindings docs.
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_registry.c
1
2 /*
3  *
4  * Global functions serviced by the registry
5  *
6  */
7
8 /**
9  * registerGlobalEventListener:
10  * @listener: the #AccessibleEventListener to be registered against an event type.
11  * @callback: a character string indicating the type of events for which
12  *            notification is requested.  Format is
13  *            EventClass:major_type:minor_type:detail
14  *            where all subfields other than EventClass are optional.
15  *            EventClasses include "Focus", "Window", "Mouse",
16  *            and toolkit events (e.g. "Gtk", "AWT").
17  *            Examples: "focus:", "Gtk:GtkWidget:button_press_event".
18  *
19  * NOTE: this string may be UTF-8, but should not contain byte value 56 (ascii ':'),
20  *            except as a delimiter, since non-UTF-8 string delimiting
21  *            functions are used internally.  In general, listening to
22  *            toolkit-specific events is not recommended.
23  *
24  * Add an in-process callback function to an existing AccessibleEventListener.
25  *
26  * Returns: #TRUE if successful, otherwise #FALSE.
27  *
28  **/
29 boolean
30 registerGlobalEventListener (AccessibleEventListener *listener,
31                              char *eventType)
32 {
33   Accessibility_Registry_registerGlobalEventListener (
34                          registry,
35                          (Accessibility_EventListener)
36                             bonobo_object_corba_objref (bonobo_object (listener)),
37                          eventType,
38                          &ev);
39
40   if (ev._major != CORBA_NO_EXCEPTION)
41     {
42     return FALSE;
43     }
44   else
45     {
46       return TRUE;
47     }
48 }
49
50 /**
51  * getDesktopCount:
52  *
53  * Get the number of virtual desktops.
54  * NOTE: currently multiple virtual desktops are not implemented, this
55  *       function always returns '1'.
56  *
57  * Returns: an integer indicating the number of active virtual desktops.
58  *
59  **/
60 int
61 getDesktopCount ()
62 {
63   return Accessibility_Registry_getDesktopCount (registry, &ev);
64 }
65
66 /**
67  * getDesktop:
68  * @i: an integer indicating which of the accessible desktops is to be returned.
69  *
70  * Get the virtual desktop indicated by index @i.
71  * NOTE: currently multiple virtual desktops are not implemented, this
72  *       function always returns '1'.
73  *
74  * Returns: a pointer to the 'i-th' virtual desktop's #Accessible representation.
75  *
76  **/
77 Accessible*
78 getDesktop (int n)
79 {
80   return Obj_Add (Accessibility_Registry_getDesktop (registry, (CORBA_short) n, &ev));
81 }
82
83 /**
84  * getDesktopList:
85  * @list: a pointer to an array of #Accessible objects.
86  *
87  * Get the list of virtual desktops.  On return, @list will point
88  *     to a newly-created array of virtual desktop pointers.
89  *     It is the responsibility of the caller to free this array when
90  *     it is no longer needed.
91  *
92  * Not Yet Implemented.
93  *
94  * Returns: an integer indicating how many virtual desktops have been
95  *          placed in the list pointed to by parameter @list.
96  **/
97 int
98 getDesktopList (Accessible **list)
99 {
100   *list = NULL;
101   return 0;
102 }
103
104 /**
105  * registerKeystrokeListener:
106  * @listener: a pointer to the #KeystrokeListener for which
107  *            keystroke events are requested.
108  *
109  * Not Yet Implemented.
110  *
111  **/
112 void
113 registerKeystrokeListener (KeystrokeListener *listener)
114 {
115   ;
116 }
117
118 /**
119  * generateKeyEvent:
120  * @keycode: a #long indicating the keycode of the key event
121  *           being synthesized.
122  * @meta: a #long indicating the key modifiers to be sent
123  *        with the event, if any.
124  *
125  * Synthesize a keyboard event (as if a hardware keyboard event occurred in the
126  * current UI context).
127  * Not Yet Implemented.
128  *
129  **/
130 void
131 generateKeyEvent (long keyCode, long meta)
132 {
133   ;
134 }
135
136 /**
137  * generateMouseEvent:
138  * @x: a #long indicating the screen x coordinate of the mouse event.
139  * @y: a #long indicating the screen y coordinate of the mouse event.
140  * @name: a string indicating which mouse event to be synthesized
141  *        (e.g. "button1", "button2", "mousemove").
142  *
143  * Synthesize a mouse event at a specific screen coordinate.
144  * Not Yet Implemented.
145  *
146  **/
147 void
148 generateMouseEvent (long x, long y, char *name)
149 {
150   ;
151 }
152