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 #ifndef _ACCESSIBILITY_REGISTRY_IDL_
29 #define _ACCESSIBILITY_REGISTRY_IDL_
31 module Accessibility {
33 typedef sequence<Desktop> DesktopSeq;
35 interface DeviceEventController;
37 interface Registry : EventListener {
40 * registerApplication:
41 * @application: a reference to the requesting @Application
44 * Register a new application with the accessibility broker.
47 oneway void registerApplication (in Application application);
50 * deregisterApplication:
51 * @application: a reference to the @Application
55 * De-register an application previously registered with the broker.
58 void deregisterApplication (in Application application);
61 * registerGlobalEventListener:
62 * @listener: a reference to the requesting @EventListener.
63 * @eventName: a string which indicates the type of events about
64 * which the client desires notification.
67 * Register a client's interest in (all) application events of
71 void registerGlobalEventListener (in EventListener listener,
75 * deregisterGlobalEventListener:
76 * @listener: the requesting @EventListener
77 * @eventName: a string indicating the type of events
80 * Request that a previously registered client stop receiving
81 * global notifications for events of a certain type.
85 void deregisterGlobalEventListenerAll (in EventListener listener);
87 * deregisterGlobalEventListener:
88 * @listener: the requesting @EventListener
89 * @eventName: a string indicating the type of events
92 * Request that a previously registered client stop receiving
93 * global notifications for events of a certain type.
97 void deregisterGlobalEventListener (in EventListener listener,
98 in string event_name);
100 * event types: "Window" "Desktop"
101 * "Window:Create" "Window:Destroy"
102 * "Window:Iconify" "Window:Restore"
103 * "Window:Fullscreen" "Window:Resize"
104 * "Desktop:Create" "Desktop:Destroy"
105 * "Desktop:Focus" "Desktop:Defocus"
109 * "GObject:notify:<propertyname>"
111 * ( not sure we should allow these last 2 forms,
112 * since they are toolkit-specific, but they're powerful )
118 * return values: a short integer indicating the current number of
121 * Get the current number of desktops.
124 short getDesktopCount ();
128 * @n: the index of the requested @Desktop.
129 * return values: a reference to the requested @Desktop.
131 * Get the nth accessible desktop.
134 Desktop getDesktop (in short n);
138 * return values: a sequence containing references to
141 * Get a list of accessible desktops.
144 DesktopSeq getDesktopList ();
147 * getDeviceEventController:
148 * return values: an object implementing DeviceEventController
151 DeviceEventController getDeviceEventController ();
169 typedef sequence<ModifierType> ModifierSeq;
174 ModifierSeq modifiers;
177 interface KeystrokeListener {
178 boolean keyEvent (in KeyStroke key);
181 interface DeviceEventController {
184 * registerKeystrokeListener:
185 * @listener: a @KeystrokeListener which will intercept key events.
188 * Register to intercept keyboard events, and either pass them on or
192 void registerKeystrokeListener (in KeystrokeListener listener);
196 * @keyEventID: a long integer indicating which keypress is synthesized.
199 * Synthesize a keypress event.
202 void generateKeyEvent (in long keyEventID);
205 * generateMouseEvent:
206 * @x: a long integer indicating the screen x coord for the mouse event.
207 * @y: a long integer indicating the screen y coord for the mouse event.
208 * @eventName: a string indicating the type of mouse event, e.g. "button1up"
211 * Synthesize a mouse event.
214 void generateMouseEvent (in long x, in long y, in string eventName);