2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Sun Microsystems Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
25 #include <Application.idl>
26 #include <Desktop.idl>
28 module Accessibility {
30 typedef sequence<Desktop> DesktopSeq;
32 interface DeviceEventController;
34 interface Registry : EventListener {
37 * registerApplication:
38 * @application: a reference to the requesting @Application
41 * Register a new application with the accessibility broker.
44 void registerApplication (in Application application);
47 * deregisterApplication:
48 * @application: a reference to the @Application
52 * De-register an application previously registered with the broker.
55 void deregisterApplication (in Application application);
58 * registerGlobalEventListener:
59 * @listener: a reference to the requesting @EventListener.
60 * @eventName: a string which indicates the type of events about
61 * which the client desires notification.
64 * Register a client's interest in (all) application events of
68 void registerGlobalEventListener (in EventListener listener,
72 * deregisterGlobalEventListener:
73 * @listener: the requesting @EventListener
74 * @eventName: a string indicating the type of events
77 * Request that a previously registered client stop receiving
78 * global notifications for events of a certain type.
82 void deregisterGlobalEventListener (in EventListener listener);
84 * event types: "Window" "Desktop"
85 * "Window:Create" "Window:Destroy"
86 * "Window:Iconify" "Window:Restore"
87 * "Window:Fullscreen" "Window:Resize"
88 * "Desktop:Create" "Desktop:Destroy"
89 * "Desktop:Focus" "Desktop:Defocus"
93 * "GObject:notify:<propertyname>"
95 * ( not sure we should allow these last 2 forms,
96 * since they are toolkit-specific, but they're powerful )
102 * return values: a short integer indicating the current number of
105 * Get the current number of desktops.
108 short getDesktopCount ();
112 * @n: the index of the requested @Desktop.
113 * return values: a reference to the requested @Desktop.
115 * Get the nth accessible desktop.
118 Desktop getDesktop (in short n);
122 * return values: a sequence containing references to
125 * Get a list of accessible desktops.
128 DesktopSeq getDesktopList ();
131 * getDeviceEventController:
132 * return values: an object implementing DeviceEventController
135 DeviceEventController getDeviceEventController ();
153 typedef sequence<ModifierType> ModifierSeq;
158 ModifierSeq modifiers;
161 interface KeystrokeListener {
162 boolean keyEvent (in KeyStroke key);
165 interface DeviceEventController {
168 * registerKeystrokeListener:
169 * @listener: a @KeystrokeListener which will intercept key events.
172 * Register to intercept keyboard events, and either pass them on or
176 void registerKeystrokeListener (in KeystrokeListener listener);
180 * @keyEventID: a long integer indicating which keypress is synthesized.
183 * Synthesize a keypress event.
186 void generateKeyEvent (in long keyEventID);
189 * generateMouseEvent:
190 * @x: a long integer indicating the screen x coord for the mouse event.
191 * @y: a long integer indicating the screen y coord for the mouse event.
192 * @eventName: a string indicating the type of mouse event, e.g. "button1up"
195 * Synthesize a mouse event.
198 void generateMouseEvent (in long x, in long y, in string eventName);