1 <node name="/node" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
3 <tp:struct name="EventListenerMode">
4 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
5 <p>A structure that encapsulates the characteristics of the event notifications
6 that should be sent to an EventListener in response to a call to
7 DeviceEventController::registerKeystrokeListener or
8 DeviceEventController::registerDeviceEventListener. </p>
10 <tp:member type="b" tp:name="synchronous">
11 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
12 <p>< If \c True, specifies that
13 DeviceEventController should block while waiting
14 for client to process the requested event notifications;
15 ordinarily should be used only when client needs to perform
16 operations synchronously with event delivery. Note that because
17 of the architecture of device event systems in general,
18 use of this flag may not block delivery of the event to
19 the currently focussed application unless it is used in
20 conjunction with the preemptive flag. </p>
23 <tp:member type="b" tp:name="preemptive">
24 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
25 <p>< If \c True, specifies that
26 Listener is allowed to pre-empt the delivery of the event,
27 effectively "consuming" it such that it is not delivered
28 to the currently focussed desktop application.
29 Key events consumed via this API will not be
30 available for use by other applications or services, so this
31 option should be used sparingly. </p>
34 <tp:member type="b" tp:name="global">
35 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
36 <p>< If \c True, specifies that
37 Event notifications should be sent regardless of whether the
38 currently focussed application participates in the AT-SPI
39 infrastructure. On systems with the XEvIE X extension, this flag
40 also allows access to events which are already subject to
41 interception via a "system keygrab" (as described in the X Window System
42 documentation for XGrabKey). The 'global' and 'preemptive' flags
43 should only be used together for the purposes of registering
44 "system global key shortcuts" i.e. command keys for use by the
45 assistive technology. </p>
49 <tp:struct name="DeviceEvent">
51 A structure which encapsulates information about a device event.
53 <tp:member type="u" tp:name="type">
55 < Identifies the type of the containing DeviceEvent.
58 <tp:member type="i" tp:name="id">
59 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
60 <p>< an identifier which identifies this event in the event stream.
61 On X Window systems this corresponds to the XEvent serial number.</p>
64 <tp:member type="n" tp:name="hw_code">
65 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
66 <p>< a numeric code which is hardware and system-dependent, identifying the
67 specific hardware button or key on the device for which the event has
68 occurred. On X Window systems, for global key notifications and for most
69 non-global key notifications as well, this code corresponds to the
70 XKeycode. For switch and button events it indicates the switch
73 For technical reasons, this code may differ from the XKeycode
74 when generated by Java applications for consumption by non-global
75 key listeners. This is subject to change in future versions of the
76 DeviceEventController implementation.</p>
79 <tp:member type="n" tp:name="modifiers">
80 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
81 <p>< an unsigned short int consisting of zero or more of the following
82 values OR'ed together:
83 \li \c 1<<::MODIFIER_SHIFT (=1, corresponds to Xlib's ShiftMask)
84 \li \c 1<<::MODIFIER_SHIFTLOCK (=2, corresponds to Xlib's LockMask)
85 \li \c 1<<::MODIFIER_CONTROL (=4, corresponds to Xlib's ControlMask)
86 \li \c 1<<::MODIFIER_ALT (=8, corresponds to Xlib's Mod1Mask)
87 \li \c 1<<::MODIFIER_META (=16, corresponds to Xlib's Mod2Mask)
88 \li \c 1<<::MODIFIER_META2 (=32, corresponds to Xlib's Mod3Mask)
89 \li \c 1<<::MODIFIER_META3 (=64, corresponds to Xlib's Mod4Mask)</p>
92 <tp:member type="i" tp:name="timestamp">
93 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
94 <p>< an unsigned integer representing the time that the
95 event occurred. On X Window systems this event is
96 a time in milliseconds from some arbitrary starting
97 point; it therefore has a cycle time of approximately
101 <tp:member type="s" tp:name="event_string">
102 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
103 <p>< A string representation of the event. If is_text is
104 \c True, then this string represents the character or typographic
105 sequence that would be received by a focussed text input field.
106 event_string is in general suitable for exposure to the
107 end-user for purposes of keyboard echo.</p>
110 <tp:member type="b" tp:name="is_text">
111 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
112 <p>< \c True if the event results in the insertion of characters
113 into an input text buffer, or would do so if delivered to a focussed
114 text input field. ¨Typographical¨ key events have this field set to
115 \c True, whereas ¨control¨ key events generally do not.</p>
119 <tp:struct name="KeyDefinition">
120 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
121 <p>A structure which defines the identity of a key for which notifications
122 are to be requested. The data in the members of a ::KeyDefinition are used to
123 determine which keyboard events 'match' the notification request filed by a client. </p>
125 <p>@note Ordinarily a KeyDefinition specifies one and only one of the criteria below;
126 the result of using a KeyDefinition with multiple members defined as nonzero is
129 <p>@param keycode if nonzero, the numeric, system-dependent value corresponding to a
130 physical key on the keyboard. Keycode values have no semantic meaning to the end-user,
131 and may depend on the user's hardware and operating environment. They therefore are
132 rarely useful "as-is" to AT clients, unless the client has used operating system
133 services to identify the hardward keycode associated with a particular key symbol.
134 Notifications for key events requested by keycode are less dependent on modifier state
135 than \c keysym based notifications, but some hardware (notably many laptops) may generate
136 more than one keycode for the same physical key, depending on the state of physical
138 @param keysym if nonzero, the numeric value corresponding to the X Keysym of the key for which
139 notification is requested. Note that the presence of active modifiers will affect
140 whether notification for key events requested via "keysym" specification takes place,
141 since the keysym depends on the modifier state for most keys.
142 @param keystring if non-NULL, the string value of the inserted characters if the corresponding
143 key event has ::KeyEvent:is_text set to \c True, or the string representing the
144 'name' of the key. On X11 systems, the string 'name' of non-printing keysyms corresponds
145 to the values in "keysymdef.h" as provided by Xlib, with the leading "XK_" stripped off.</p>
147 <tp:member type="i" tp:name="keycode"/>
148 <tp:member type="i" tp:name="keysym"/>
149 <tp:member type="s" tp:name="keystring"/>
150 <tp:member type="i" tp:name="unused"/>
152 <interface name="org.freedesktop.atspi.DeviceEventListener">
153 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
154 <p>This interface should be implemented by AT-SPI clients who wish to
155 make use of the DeviceEventController to receive device event notifications.
156 DeviceEvents include keyboard events and mouse button/motion events.</p>
158 <method name="notifyEvent">
160 Notify an interested DeviceEventListener that a DeviceEvent has occurred.
162 <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
163 <arg direction="out" type="b" tp:type="boolean">
165 \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.
170 <interface name="org.freedesktop.atspi.DeviceEventController">
171 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
172 <p>The interface via which clients request notification of device events, and
173 through which device events may be simulated.</p>
175 <method name="registerKeystrokeListener">
176 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
177 <p>Register to intercept keyboard events, and either pass them on or
180 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
182 a DeviceEventListener which will intercept key events.
185 <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
187 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
190 <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
192 a ControllerEventMask filtering the intercepted key events.
195 <arg direction="in" name="type" type="au" tp:type="KeyEventTypeSeq">
197 a KeyEventTypeSeq that may created by ORing event types together.
200 <arg direction="in" name="mode" type="(bbb)" tp:type="EventListenerMode">
202 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.
205 <arg direction="out" type="b" tp:type="boolean">
207 \c True if the DeviceEventListener was successfully registeredfor the requested KeySet, ControllerEventMask, event types, and EventListenerMode; otherwise returns \c False.
211 <method name="deregisterKeystrokeListener">
213 De-register a previously registered keyboard eventlistener.
215 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
217 a DeviceEventListener which will intercept key events.
220 <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
222 a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
225 <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
227 a ControllerEventMask filtering the intercepted key events.
230 <arg direction="in" name="type" type="au" tp:type="KeyEventTypeSeq">
232 an EventType mask that may created by ORing event types together.
236 <method name="registerDeviceEventListener">
237 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
238 <p>Register to intercept events, and either pass them on or
239 consume them. To listen to keyboard events use registerKeystrokeListener
242 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
244 a DeviceEventListener which will intercept events.
247 <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
249 an EventTypeSeq indicating which event types to listen for.
252 <arg direction="out" type="b" tp:type="boolean">
254 \c True if successful, \c False if not
258 <method name="deregisterDeviceEventListener">
260 De-register a previously registered keyboard eventlistener.
262 <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
264 a DeviceEventListener which will intercept events.
267 <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
269 an EventTypeSeq indicating which event types to stoplistening for.
273 <method name="notifyListenersSync">
274 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
275 <p>Notify the Registry instance that a device event has taken place, and
276 allow pre-emptive listeners the opportunity to 'consume' the event
277 and thus prevent its further issuance/forwarding. This is the
278 method used by accessibility bridges to forward "toolkit dependent"
279 device events to the Registry from the application's process space. </p>
281 <p>@note AT clients do not normally need to use this method, it is intended for use
282 by toolkit bridges and special-purpose applications. </p>
284 <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
285 <arg direction="out" type="b" tp:type="boolean">
287 \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).
291 <method name="notifyListenersAsync">
292 <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
293 <p>Notify the Registry instance that a device event has taken place in
294 an asynchronous manner. This is the
295 method used by accessibility bridges to forward "toolkit dependent"
296 device events to the Registry from the application's process space.
297 If the event in question is potentially pre-emptible.
298 ::notifyListenersSync should be used instead. </p>
300 <p>@note AT clients do not normally need to use this method, it is intended for use
301 by toolkit bridges and special-purpose applications.</p>
303 <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
305 <method name="generateKeyboardEvent">
307 Synthesize a keyboard event.
309 <arg direction="in" name="keycode" type="i">
311 a long integer indicating the keycode ofthe keypress to be synthesized.
314 <arg direction="in" name="keystring" type="s">
316 an optional UTF-8 string indicating a complexkeyboard input event.
319 <arg direction="in" name="type" type="u" tp:type="KeySynthType">
321 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.
325 <method name="generateMouseEvent">
327 Synthesize a mouse event.
329 <arg direction="in" name="x" type="i">
331 a long integer indicating the screen x coord for the mouse event.
334 <arg direction="in" name="y" type="i">
336 a long integer indicating the screen y coord for the mouse event.
339 <arg direction="in" name="eventName" type="s">
341 a string indicating the type of mouse event, e.g. "button1up"