1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
/*
* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
* Copyright 2001 Sun Microsystems Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <Bonobo_Unknown.idl>
#include <Accessibility_Event.idl>
#include <Accessibility_Application.idl>
#include <Accessibility_Desktop.idl>
#ifndef _ACCESSIBILITY_REGISTRY_IDL_
#define _ACCESSIBILITY_REGISTRY_IDL_
module Accessibility {
typedef sequence<Desktop> DesktopSeq;
interface DeviceEventController;
interface Registry : EventListener {
/**
* registerApplication:
* @application: a reference to the requesting @Application
*
* Register a new application with the accessibility broker.
*
**/
oneway void registerApplication (in Application application);
/**
* deregisterApplication:
* @application: a reference to the @Application
* to be deregistered.
*
* De-register an application previously registered with the broker.
*
**/
void deregisterApplication (in Application application);
/**
* registerGlobalEventListener:
* @listener: a reference to the requesting @EventListener.
* @eventName: a string which indicates the type of events about
* which the client desires notification.
*
* Register a client's interest in (all) application events of
* a certain type.
*
**/
void registerGlobalEventListener (in EventListener listener,
in string eventName);
/**
* deregisterGlobalEventListener:
* @listener: the requesting @EventListener
* @eventName: a string indicating the type of events
*
* Request that a previously registered client stop receiving
* global notifications for events of a certain type.
*
**/
void deregisterGlobalEventListenerAll (in EventListener listener);
/**
* deregisterGlobalEventListener:
* @listener: the requesting @EventListener
* @eventName: a string indicating the type of events
*
* Request that a previously registered client stop receiving
* global notifications for events of a certain type.
*
**/
void deregisterGlobalEventListener (in EventListener listener,
in string event_name);
/**
* event types: "Window" "Desktop"
* "Window:Create" "Window:Destroy"
* "Window:Iconify" "Window:Restore"
* "Window:Fullscreen" "Window:Resize"
* "Desktop:Create" "Desktop:Destroy"
* "Desktop:Focus" "Desktop:Defocus"
* "Desktop:Reorder"
* "Focus"
* "GtkWidget:show"
* "GObject:notify:<propertyname>"
*
* ( not sure we should allow these last 2 forms,
* since they are toolkit-specific, but they're powerful )
*
**/
/**
* getDesktopCount:
*
* Get the current number of desktops.
* Returns: a short integer indicating the current number of
* @Desktops.
**/
short getDesktopCount ();
/**
* getDesktop:
* @n: the index of the requested @Desktop.
*
* Get the nth accessible desktop.
*
* Returns: a reference to the requested @Desktop.
**/
Desktop getDesktop (in short n);
/**
* getDesktopList:
*
* Get a list of accessible desktops.
*
* Returns: a sequence containing references to
* the @Desktops.
**/
DesktopSeq getDesktopList ();
/**
* getDeviceEventController:
*
* Returns: an object implementing DeviceEventController
**/
DeviceEventController getDeviceEventController ();
};
enum KeyEventType {
KEY_PRESSED,
KEY_RELEASED
};
enum EventType {
KEY_PRESSED_EVENT,
KEY_RELEASED_EVENT
};
enum KeySynthType {
KEY_PRESS,
KEY_RELEASE,
KEY_PRESSRELEASE,
KEY_SYM
};
enum ModifierType {
MODIFIER_SHIFT,
MODIFIER_ALT,
MODIFIER_CONTROL,
MODIFIER_META,
MODIFIER_META2,
MODIFIER_META3,
MODIFIER_SHIFTLOCK,
MODIFIER_NUMLOCK
};
typedef unsigned long ControllerEventMask;
struct DeviceEvent {
EventType type;
long id;
short hw_code;
unsigned short modifiers;
unsigned long timestamp;
string event_string;
};
typedef sequence< long > KeySet;
typedef sequence< KeyEventType > KeyEventTypeSeq;
interface DeviceEventListener : Bonobo::Unknown {
boolean notifyEvent (in DeviceEvent event);
};
interface DeviceEventController : Bonobo::Unknown {
/**
* registerKeystrokeListener:
* @listener: a @DeviceEventListener which will intercept key events.
* @keys: a @KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
* @mask: a @ControllerEventMask filtering the intercepted key events.
* @type: an @EventType mask that may created by ORing event types together.
* @is_synchronous: a @boolean indicating whether the listener should
* receive the events synchronously, potentially consuming them,
* or just be notified asynchronously of those events that have
* been generated.
* Returns: void
*
* Register to intercept keyboard events, and either pass them on or
* consume them.
*
**/
void registerKeystrokeListener (in DeviceEventListener listener,
in KeySet keys,
in ControllerEventMask mask,
in KeyEventTypeSeq type,
in boolean is_synchronous);
/**
* deregisterKeystrokeListener:
* @listener: a @DeviceEventListener which will intercept key events.
* @keys: a @KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
* @mask: a @ControllerEventMask filtering the intercepted key events.
* @type: an @EventType mask that may created by ORing event types together.
* @is_synchronous: a @boolean indicating whether the listener should
* receive the events synchronously, potentially consuming them,
* or just be notified asynchronously of those events that have
* been generated.
* Returns: void
*
* De-register a previously registered keyboard eventlistener.
*
**/
void deregisterKeystrokeListener (in DeviceEventListener listener,
in KeySet keys,
in ControllerEventMask mask,
in KeyEventTypeSeq type,
in boolean is_synchronous);
boolean notifyListenersSync (in DeviceEvent event);
oneway void notifyListenersAsync (in DeviceEvent event);
/**
* generateKeyEvent:
* @keycode: a long integer indicating the keycode of
* the keypress to be synthesized.
*
* Note that this long may be truncated before being
* processed, as keycode length may be platform-dependent
* and keycode ranges are generally much smaller than
* CORBA_long.
*
* Returns: void
*
* Synthesize a keypress event.
*
**/
void generateKeyEvent (in long keycode, in KeySynthType type);
/**
* generateMouseEvent:
* @x: a long integer indicating the screen x coord for the mouse event.
* @y: a long integer indicating the screen y coord for the mouse event.
* @eventName: a string indicating the type of mouse event, e.g. "button1up"
* Returns: void
*
* Synthesize a mouse event.
*
**/
void generateMouseEvent (in long x, in long y, in string eventName);
};
};
#endif
|