1 <node name="/node" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
3 <tp:title>AT-SPI - Assistive Technology Service Provider Interface </tp:title>
4 <tp:copyright>Copyright 2008 Novell, Inc.</tp:copyright>
5 <tp:copyright>Copyright 2001 Sun Microsystems Inc.</tp:copyright>
6 <tp:license xmlns="http://www.w3.org/1999/xhtml">
7 <p>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.</p>
12 <p>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.</p>
17 <p>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.</p>
22 <interface name="org.freedesktop.atspi.Registry">
23 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
24 <p>The Registry is a service through which applications providing
25 accessibility services (servers) can rendezvous with consumers of those
26 services (Assistive Technologies). The Registry is the first "port of call" for
27 accessible applications and for assistive technologies wishing to query and
28 interact with those applications. </p>
30 <p>The Registry service provides four basic functions to Assistive Technology (AT) clients:
31 \li it provides a list of the applications who have registered with the AT-SPI
32 framework, thereby announcing their participation in the AT-SPI framework;
33 \li it allows AT clients to register for notification of changes in application
34 state (at-spi Events);
35 \li it dispatches/relays said events from participating applications to
36 the registered listeners;
37 \li it gives access to system device events via the associated DeviceEventController
40 <p>From the point of view of accessible applications (i.e. AT-SPI service producers),
41 the Registry is primarily a registration and event delivery service. Applications
42 normally only call the registerApplication and deregisterApplication Registry methods,
43 and its inherited EventListener::notifyEvent method. </p>
45 <p>@note Although all application events are dispatched via the Registry, other AT client
46 calls are serviced directly by the applications, rather than being relayed via the
47 Registry. The AT client obtains references to these application objects
48 via the enumeration of Desktop instances whose children are Application instances
49 (Registry::getDesktopList) and via examination of the 'source' member of the Event
52 <p>The Registry normally lives in its own process space; communication via Registry and
53 both application services and AT clients takes place via IPC. A process space diagram
54 illustrating the relationship between applications, Registry, and AT is shown below.
55 @image html "http://developer.gnome.org/projects/gap/tech-docs/SPIBlockDiagram.png" </p>
57 <p>@see Desktop, Application, Event, EventListener</p>
59 <method name="registerApplication">
61 Register a new application with the accessibility broker.
63 <arg direction="in" name="app" type="o" tp:type="Application">
65 a reference to the requesting Application
69 <method name="deregisterApplication">
70 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
71 <p>De-register an application previously registered with the broker.
72 deregisterApplication:</p>
74 <arg direction="in" name="app" type="o" tp:type="Application">
76 a reference to the Application to be deregistered.
80 <method name="registerGlobalEventListener">
81 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
82 <p>Register a client's interest in (all) application events of
85 <arg direction="in" name="listener" type="o" tp:type="EventListener">
87 a reference to the requesting ::EventListener.
90 <arg direction="in" name="eventName" type="s">
92 a string which indicates the type of events about which the client desires notification.
96 <method name="deregisterGlobalEventListenerAll">
98 deregisterGlobalEventListenerAll:
100 <arg direction="in" name="listener" type="o" tp:type="EventListener">
102 the requesting EventListenerRequest that a previously registered client stop receivingglobal notifications for all events for which it was registered.
106 <method name="deregisterGlobalEventListener">
108 deregisterGlobalEventListener:
110 <arg direction="in" name="listener" type="o" tp:type="EventListener">
112 the requesting EventListener
115 <arg direction="in" name="eventName" type="s">
117 a string indicating the type of eventsRequest that a previously registered client stop receivingglobal notifications for events of a certain type.
121 <method name="getDesktopCount">
122 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
123 <p>event types: "Window" "Desktop"
124 "Window:Create" "Window:Destroy"
125 "Window:Iconify" "Window:Restore"
126 "Window:Fullscreen" "Window:Resize"
127 "Desktop:Create" "Desktop:Destroy"
128 "Desktop:Focus" "Desktop:Defocus"
129 "Desktop:Reorder"
131 "GtkWidget:show"
132 "GObject:notify:<propertyname>" </p>
134 <p>( not sure we should allow these last 2 forms,
135 since they are toolkit-specific, but they're powerful ) </p>
137 <p>getDesktopCount: </p>
139 <p>Get the current number of desktops.</p>
141 <arg direction="out" type="n" tp:type="short">
143 a short integer indicating the current number of Desktops.
147 <method name="getDesktop">
148 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
150 @n: the index of the requested Desktop. </p>
152 <p>Get the nth accessible desktop. </p>
154 <arg direction="in" name="n" type="n" tp:type="short"/>
155 <arg direction="out" type="o" tp:type="Desktop">
157 a reference to the requested Desktop.
161 <method name="getDesktopList">
162 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
163 <p>Get a list of accessible desktops. </p>
165 <arg direction="out" type="as" tp:type="DesktopSeq">
167 a sequence containing references tothe Desktops.
171 <method name="getDeviceEventController">
172 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
173 <p>Obtain an object which can be used to request device event notifications. </p>
175 <arg direction="out" type="o" tp:type="DeviceEventController">
177 an object implementing DeviceEventController
182 <tp:enum name="KeyEventType" type="u">
184 Deprecated, DO NOT USE!
186 <tp:enumvalue suffix="KEY_PRESSED"/>
187 <tp:enumvalue suffix="KEY_RELEASED" value="1"/>
189 <tp:enum name="EventType" type="u">
190 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
191 <p>Used to specify the event types of interest to an EventListener, or
192 to identify the type of an event for which notification has been sent.
193 @see EventTypeSeq, DeviceEvent::type</p>
195 <tp:enumvalue suffix="KEY_PRESSED_EVENT">
197 < key on a keyboard device was pressed.
200 <tp:enumvalue suffix="KEY_RELEASED_EVENT" value="1">
202 < key on a keyboard device was released.
205 <tp:enumvalue suffix="BUTTON_PRESSED_EVENT" value="2">
206 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
207 <p>< button on a non-keyboard human interface device
208 (HID) was pressed </p>
211 <tp:enumvalue suffix="BUTTON_RELEASED_EVENT" value="3">
212 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
213 <p>< button on a non-keyboard human interface device
214 (HID) was pressed </p>
218 <tp:enum name="KeySynthType" type="u">
220 Used when synthesizing keyboard input via DeviceEventController:generateKeyboardEvent.
222 <tp:enumvalue suffix="KEY_PRESS">
224 emulate the pressing of a hardware keyboard key.
227 <tp:enumvalue suffix="KEY_RELEASE" value="1">
229 emulate the release of a hardware keyboard key.
232 <tp:enumvalue suffix="KEY_PRESSRELEASE" value="2">
234 a hardware keyboard key is pressed and immediately released.
237 <tp:enumvalue suffix="KEY_SYM" value="3">
238 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
239 <p>a symbolic key event is generated, without specifying a hardware key.
240 @note if the keysym is not present in the current keyboard map,
241 the DeviceEventController instance has a limited ability to generate
242 such keysyms on-the-fly. Reliability of generateKeyboardEvent calls
243 using out-of-keymap keysyms will vary from system to system, and on the
244 number of different out-of-keymap being generated in quick succession.
245 In practice this is rarely significant, since the keysyms of interest to
246 AT clients and keyboard emulators are usually part of the current keymap, i.e.
247 present on the system keyboard for the current locale (even if a physical
248 hardware keyboard is not connected.</p>
251 <tp:enumvalue suffix="KEY_STRING" value="4">
252 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
253 <p>a string is converted to its equivalent keyboard events and emitted.
254 If the string consists of complex character or composed characters
255 which are not in the current keymap, string emission is subject to the
256 out-of-keymap limitations described for KeySynthType::KEY_SYM.
257 In practice this limitation primarily effects Chinese and Japanese locales.</p>
261 <tp:enum name="ModifierType" type="u">
262 <tp:enumvalue suffix="MODIFIER_SHIFT">
264 The left or right 'Shift' key
267 <tp:enumvalue suffix="MODIFIER_SHIFTLOCK" value="1">
269 The ShiftLock or CapsLock key
272 <tp:enumvalue suffix="MODIFIER_CONTROL" value="2">
277 <tp:enumvalue suffix="MODIFIER_ALT" value="3">
279 The Alt key (as opposed to AltGr)
282 <tp:enumvalue suffix="MODIFIER_META" value="4">
283 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
284 <p>depending on the platform this may map to 'Window', 'Function', 'Meta',
285 'Menu', or 'NumLock'.
286 Such 'Meta keys' will map to one of META, META2, META3.
287 On X Windows platforms these META values map to
288 the modifier masks Mod1Mask, Mod2Mask, Mod3Mask, e.g. an event having
289 ModifierType::MODIFIER_META2 means that the 'Mod2Mask' bit is
290 set in the corresponding XEvent.</p>
293 <tp:enumvalue suffix="MODIFIER_META2" value="5"/>
294 <tp:enumvalue suffix="MODIFIER_META3" value="6"/>
295 <tp:enumvalue suffix="MODIFIER_NUMLOCK" value="7">
296 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
297 <p>A symbolic meta key name that is mapped by AT-SPI to the
298 appropriate META value, for the convenience of the client.</p>
302 <tp:struct name="EventListenerMode">
303 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
304 <p>A structure that encapsulates the characteristics of the event notifications
305 that should be sent to an EventListener in response to a call to
306 DeviceEventController::registerKeystrokeListener or
307 DeviceEventController::registerDeviceEventListener. </p>
309 <tp:member type="b" tp:name="synchronous">
310 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
311 <p>< If \c True, specifies that
312 DeviceEventController should block while waiting
313 for client to process the requested event notifications;
314 ordinarily should be used only when client needs to perform
315 operations synchronously with event delivery. Note that because
316 of the architecture of device event systems in general,
317 use of this flag may not block delivery of the event to
318 the currently focussed application unless it is used in
319 conjunction with the preemptive flag. </p>
322 <tp:member type="b" tp:name="preemptive">
323 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
324 <p>< If \c True, specifies that
325 Listener is allowed to pre-empt the delivery of the event,
326 effectively "consuming" it such that it is not delivered
327 to the currently focussed desktop application.
328 Key events consumed via this API will not be
329 available for use by other applications or services, so this
330 option should be used sparingly. </p>
333 <tp:member type="b" tp:name="global">
334 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
335 <p>< If \c True, specifies that
336 Event notifications should be sent regardless of whether the
337 currently focussed application participates in the AT-SPI
338 infrastructure. On systems with the XEvIE X extension, this flag
339 also allows access to events which are already subject to
340 interception via a "system keygrab" (as described in the X Window System
341 documentation for XGrabKey). The 'global' and 'preemptive' flags
342 should only be used together for the purposes of registering
343 "system global key shortcuts" i.e. command keys for use by the
344 assistive technology. </p>
348 <tp:struct name="DeviceEvent">
350 A structure which encapsulates information about a device event.
352 <tp:member type="u" tp:name="type">
354 < Identifies the type of the containing DeviceEvent.
357 <tp:member type="i" tp:name="id">
358 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
359 <p>< an identifier which identifies this event in the event stream.
360 On X Window systems this corresponds to the XEvent serial number.</p>
363 <tp:member type="n" tp:name="hw_code">
364 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
365 <p>< a numeric code which is hardware and system-dependent, identifying the
366 specific hardware button or key on the device for which the event has
367 occurred. On X Window systems, for global key notifications and for most
368 non-global key notifications as well, this code corresponds to the
369 XKeycode. For switch and button events it indicates the switch
372 For technical reasons, this code may differ from the XKeycode
373 when generated by Java applications for consumption by non-global
374 key listeners. This is subject to change in future versions of the
375 DeviceEventController implementation.</p>
378 <tp:member type="n" tp:name="modifiers">
379 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
380 <p>< an unsigned short int consisting of zero or more of the following
381 values OR'ed together:
382 \li \c 1<<::MODIFIER_SHIFT (=1, corresponds to Xlib's ShiftMask)
383 \li \c 1<<::MODIFIER_SHIFTLOCK (=2, corresponds to Xlib's LockMask)
384 \li \c 1<<::MODIFIER_CONTROL (=4, corresponds to Xlib's ControlMask)
385 \li \c 1<<::MODIFIER_ALT (=8, corresponds to Xlib's Mod1Mask)
386 \li \c 1<<::MODIFIER_META (=16, corresponds to Xlib's Mod2Mask)
387 \li \c 1<<::MODIFIER_META2 (=32, corresponds to Xlib's Mod3Mask)
388 \li \c 1<<::MODIFIER_META3 (=64, corresponds to Xlib's Mod4Mask)</p>
391 <tp:member type="i" tp:name="timestamp">
392 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
393 <p>< an unsigned integer representing the time that the
394 event occurred. On X Window systems this event is
395 a time in milliseconds from some arbitrary starting
396 point; it therefore has a cycle time of approximately
400 <tp:member type="s" tp:name="event_string">
401 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
402 <p>< A string representation of the event. If is_text is
403 \c True, then this string represents the character or typographic
404 sequence that would be received by a focussed text input field.
405 event_string is in general suitable for exposure to the
406 end-user for purposes of keyboard echo.</p>
409 <tp:member type="b" tp:name="is_text">
410 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
411 <p>< \c True if the event results in the insertion of characters
412 into an input text buffer, or would do so if delivered to a focussed
413 text input field. ¨Typographical¨ key events have this field set to
414 \c True, whereas ¨control¨ key events generally do not.</p>
418 <tp:struct name="KeyDefinition">
419 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
420 <p>A structure which defines the identity of a key for which notifications
421 are to be requested. The data in the members of a ::KeyDefinition are used to
422 determine which keyboard events 'match' the notification request filed by a client. </p>
424 <p>@note Ordinarily a KeyDefinition specifies one and only one of the criteria below;
425 the result of using a KeyDefinition with multiple members defined as nonzero is
428 <p>@param keycode if nonzero, the numeric, system-dependent value corresponding to a
429 physical key on the keyboard. Keycode values have no semantic meaning to the end-user,
430 and may depend on the user's hardware and operating environment. They therefore are
431 rarely useful "as-is" to AT clients, unless the client has used operating system
432 services to identify the hardward keycode associated with a particular key symbol.
433 Notifications for key events requested by keycode are less dependent on modifier state
434 than \c keysym based notifications, but some hardware (notably many laptops) may generate
435 more than one keycode for the same physical key, depending on the state of physical
437 @param keysym if nonzero, the numeric value corresponding to the X Keysym of the key for which
438 notification is requested. Note that the presence of active modifiers will affect
439 whether notification for key events requested via "keysym" specification takes place,
440 since the keysym depends on the modifier state for most keys.
441 @param keystring if non-NULL, the string value of the inserted characters if the corresponding
442 key event has ::KeyEvent:is_text set to \c True, or the string representing the
443 'name' of the key. On X11 systems, the string 'name' of non-printing keysyms corresponds
444 to the values in "keysymdef.h" as provided by Xlib, with the leading "XK_" stripped off.</p>
446 <tp:member type="i" tp:name="keycode"/>
447 <tp:member type="i" tp:name="keysym"/>
448 <tp:member type="s" tp:name="keystring"/>
449 <tp:member type="i" tp:name="unused"/>
451 <interface name="org.freedesktop.atspi.DeviceEventListener">
452 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
453 <p>This interface should be implemented by AT-SPI clients who wish to
454 make use of the DeviceEventController to receive device event notifications.
455 DeviceEvents include keyboard events and mouse button/motion events.</p>
457 <method name="notifyEvent">
459 Notify an interested DeviceEventListener that a DeviceEvent has occurred.
461 <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
462 <arg direction="out" type="b" tp:type="boolean">
464 \c True if the recipient/consumer wishes to consume the event, i.e.prevent it from being delivered to the desktop, \c False if the event should continue to be delivered as normal.
469 <interface name="org.freedesktop.atspi.DeviceEventController">
470 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
471 <p>The interface via which clients request notification of device events, and
472 through which device events may be simulated.</p>
474 <method name="registerKeystrokeListener">
475 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
476 <p>Register to intercept keyboard events, and either pass them on or
479 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
481 a DeviceEventListener which will intercept key events.
484 <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
486 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
489 <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
491 a ControllerEventMask filtering the intercepted key events.
494 <arg direction="in" name="type" type="au" tp:type="KeyEventTypeSeq">
496 a KeyEventTypeSeq that may created by ORing event types together.
499 <arg direction="in" name="mode" type="(bbb)" tp:type="EventListenerMode">
501 an EventListenerMode indicating whether the listener should receive the events synchronously, potentially consuming them,or just be notified asynchronously of those events that havebeen generated.@note Some platforms have limited support for global, preemptive EventListenerMode.Such a registration may fail if another client already has priority for preemptiveaccess to one or more of the members of the KeySet. AT consumers have the optionof re-trying the request without the global flag, or without the preemptive flag,or of re-trying with a different KeySet. The best support for pre-emptiveglobal keyboard listeners is provided on platforms whose Xserver implementationprovides the XEvIE extension.
504 <arg direction="out" type="b" tp:type="boolean">
506 \c True if the DeviceEventListener was successfully registeredfor the requested KeySet, ControllerEventMask, event types, and EventListenerMode; otherwise returns \c False.
510 <method name="deregisterKeystrokeListener">
512 De-register a previously registered keyboard eventlistener.
514 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
516 a DeviceEventListener which will intercept key events.
519 <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
521 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
524 <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
526 a ControllerEventMask filtering the intercepted key events.
529 <arg direction="in" name="type" type="au" tp:type="KeyEventTypeSeq">
531 an EventType mask that may created by ORing event types together.
535 <method name="registerDeviceEventListener">
536 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
537 <p>Register to intercept events, and either pass them on or
538 consume them. To listen to keyboard events use registerKeystrokeListener
541 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
543 a DeviceEventListener which will intercept events.
546 <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
548 an EventTypeSeq indicating which event types to listen for.
551 <arg direction="out" type="b" tp:type="boolean">
553 \c True if successful, \c False if not
557 <method name="deregisterDeviceEventListener">
559 De-register a previously registered keyboard eventlistener.
561 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
563 a DeviceEventListener which will intercept events.
566 <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
568 an EventTypeSeq indicating which event types to stoplistening for.
572 <method name="notifyListenersSync">
573 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
574 <p>Notify the Registry instance that a device event has taken place, and
575 allow pre-emptive listeners the opportunity to 'consume' the event
576 and thus prevent its further issuance/forwarding. This is the
577 method used by accessibility bridges to forward "toolkit dependent"
578 device events to the Registry from the application's process space. </p>
580 <p>@note AT clients do not normally need to use this method, it is intended for use
581 by toolkit bridges and special-purpose applications. </p>
583 <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
584 <arg direction="out" type="b" tp:type="boolean">
586 \c True if the event was consumed by a (pre-emptive) listener,\c False if not (in which case the device event will be forwardedas normal to any application which would normally receive it, e.g.the currently active application in the case of mouse or keyboard events).
590 <method name="notifyListenersAsync">
591 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
592 <p>Notify the Registry instance that a device event has taken place in
593 an asynchronous manner. This is the
594 method used by accessibility bridges to forward "toolkit dependent"
595 device events to the Registry from the application's process space.
596 If the event in question is potentially pre-emptible.
597 ::notifyListenersSync should be used instead. </p>
599 <p>@note AT clients do not normally need to use this method, it is intended for use
600 by toolkit bridges and special-purpose applications.</p>
602 <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
604 <method name="generateKeyboardEvent">
606 Synthesize a keyboard event.
608 <arg direction="in" name="keycode" type="i">
610 a long integer indicating the keycode ofthe keypress to be synthesized.
613 <arg direction="in" name="keystring" type="s">
615 an optional UTF-8 string indicating a complexkeyboard input event.
618 <arg direction="in" name="type" type="u" tp:type="KeySynthType">
620 a KeySynthType indicating the type of event(s) to be synthesized: a key press, release, press-release pair,or a complex input string (for instance from aninternationalized or complex text input method, ora composed character).@note keycode may be truncated before beingprocessed, as keycode length may be platform-dependentand keycode ranges are generally much smaller thanCORBA_long. One or the other of keycode or keystring are generally NULL, (but not both), depending on the value of \c type.
624 <method name="generateMouseEvent">
626 Synthesize a mouse event.
628 <arg direction="in" name="x" type="i">
630 a long integer indicating the screen x coord for the mouse event.
633 <arg direction="in" name="y" type="i">
635 a long integer indicating the screen y coord for the mouse event.
638 <arg direction="in" name="eventName" type="s">
640 a string indicating the type of mouse event, e.g. "button1up"