Merge branch 'master' of ssh://git.codethink.co.uk/git/atspi-dbus
[platform/core/uifw/at-spi2-atk.git] / xml / org.freedesktop.atspi.Event.xml
1 <node name="/node" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2
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>
9   </tp:docstring>
10   <tp:member type="b" tp:name="synchronous">
11   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
12     <p>&lt; 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>
21   </tp:docstring>
22   </tp:member>
23   <tp:member type="b" tp:name="preemptive">
24   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
25     <p>&lt; If \c True, specifies that 
26       Listener is allowed to pre-empt the delivery of the event,
27       effectively &quot;consuming&quot; 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>
32   </tp:docstring>
33   </tp:member>
34   <tp:member type="b" tp:name="global">
35   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
36     <p>&lt; 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 &quot;system keygrab&quot; (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       &quot;system global key shortcuts&quot; i.e. command keys for use by the
45       assistive technology. </p>
46   </tp:docstring>
47   </tp:member>
48 </tp:struct>
49 <tp:struct name="DeviceEvent">
50   <tp:docstring>
51     A structure which encapsulates information about a device event. 
52   </tp:docstring>
53   <tp:member type="u" tp:name="type">
54   <tp:docstring>
55     &lt; Identifies the type of the containing DeviceEvent. 
56   </tp:docstring>
57   </tp:member>
58   <tp:member type="i" tp:name="id">
59   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
60     <p>&lt; an identifier which identifies this event in the event stream. 
61       On X Window systems this corresponds to the XEvent serial number.</p>
62   </tp:docstring>
63   </tp:member>
64   <tp:member type="n" tp:name="hw_code">
65   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
66     <p>&lt; 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
71       or button number.
72       @note
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>
77   </tp:docstring>
78   </tp:member>
79   <tp:member type="n" tp:name="modifiers">
80   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
81     <p>&lt; an unsigned short int consisting of zero or more of the following
82       values OR'ed together:
83       \li \c 1&lt;&lt;::MODIFIER_SHIFT   (=1, corresponds to Xlib's ShiftMask)
84       \li \c 1&lt;&lt;::MODIFIER_SHIFTLOCK    (=2, corresponds to Xlib's LockMask)
85       \li \c 1&lt;&lt;::MODIFIER_CONTROL (=4, corresponds to Xlib's ControlMask)
86       \li \c 1&lt;&lt;::MODIFIER_ALT    (=8, corresponds to Xlib's Mod1Mask)
87       \li \c 1&lt;&lt;::MODIFIER_META    (=16, corresponds to Xlib's Mod2Mask)
88       \li \c 1&lt;&lt;::MODIFIER_META2    (=32, corresponds to Xlib's Mod3Mask)
89       \li \c 1&lt;&lt;::MODIFIER_META3    (=64, corresponds to Xlib's Mod4Mask)</p>
90   </tp:docstring>
91   </tp:member>
92   <tp:member type="i" tp:name="timestamp">
93   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
94     <p>&lt; 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
98       50 days.</p>
99   </tp:docstring>
100   </tp:member>
101   <tp:member type="s" tp:name="event_string">
102   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
103     <p>&lt; 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>
108   </tp:docstring>
109   </tp:member>
110   <tp:member type="b" tp:name="is_text">
111   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
112     <p>&lt; \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>
116   </tp:docstring>
117   </tp:member>
118 </tp:struct>
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>
124
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
127       undefined.  </p>
128
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 &quot;as-is&quot; 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 
137       shift/modifier keys.
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 &quot;keysym&quot; 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 &quot;keysymdef.h&quot; as provided by Xlib, with the leading &quot;XK_&quot; stripped off.</p>
146   </tp:docstring>
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"/>
151 </tp:struct>
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>
157   </tp:docstring>
158   <method name="notifyEvent">
159     <tp:docstring>
160       Notify an interested DeviceEventListener that a DeviceEvent has occurred.
161     </tp:docstring>
162     <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
163     <arg direction="out" type="b" tp:type="boolean">
164     <tp:docstring>
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.
166     </tp:docstring>
167     </arg>
168   </method>
169 </interface>
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>
174   </tp:docstring>
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
178         consume them.     </p>
179     </tp:docstring>
180     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
181     <tp:docstring>
182       a DeviceEventListener which will intercept key events.
183     </tp:docstring>
184     </arg>
185     <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
186     <tp:docstring>
187       a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
188     </tp:docstring>
189     </arg>
190     <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
191     <tp:docstring>
192       a ControllerEventMask filtering the intercepted key events.
193     </tp:docstring>
194     </arg>
195     <arg direction="in" name="type" type="au" tp:type="KeyEventTypeSeq">
196     <tp:docstring>
197       a KeyEventTypeSeq that may created by ORing event types together.
198     </tp:docstring>
199     </arg>
200     <arg direction="in" name="mode" type="(bbb)" tp:type="EventListenerMode">
201     <tp:docstring>
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.
203     </tp:docstring>
204     </arg>
205     <arg direction="out" type="b" tp:type="boolean">
206     <tp:docstring>
207       \c True if the DeviceEventListener was successfully registeredfor the requested KeySet, ControllerEventMask, event types, and EventListenerMode; otherwise returns \c False.
208     </tp:docstring>
209     </arg>
210   </method>
211   <method name="deregisterKeystrokeListener">
212     <tp:docstring>
213       De-register a previously registered keyboard eventlistener.
214     </tp:docstring>
215     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
216     <tp:docstring>
217       a DeviceEventListener which will intercept key events.
218     </tp:docstring>
219     </arg>
220     <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
221     <tp:docstring>
222       a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
223     </tp:docstring>
224     </arg>
225     <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
226     <tp:docstring>
227       a ControllerEventMask filtering the intercepted key events.
228     </tp:docstring>
229     </arg>
230     <arg direction="in" name="type" type="au" tp:type="KeyEventTypeSeq">
231     <tp:docstring>
232       an EventType mask that may created by ORing event types together.
233     </tp:docstring>
234     </arg>
235   </method>
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
240         instead.</p>
241     </tp:docstring>
242     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
243     <tp:docstring>
244       a DeviceEventListener which will intercept events.
245     </tp:docstring>
246     </arg>
247     <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
248     <tp:docstring>
249       an EventTypeSeq indicating which event types to listen for.
250     </tp:docstring>
251     </arg>
252     <arg direction="out" type="b" tp:type="boolean">
253     <tp:docstring>
254       \c True if successful, \c False if not
255     </tp:docstring>
256     </arg>
257   </method>
258   <method name="deregisterDeviceEventListener">
259     <tp:docstring>
260       De-register a previously registered keyboard eventlistener.
261     </tp:docstring>
262     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
263     <tp:docstring>
264       a DeviceEventListener which will intercept events.
265     </tp:docstring>
266     </arg>
267     <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
268     <tp:docstring>
269       an EventTypeSeq indicating which event types to stoplistening for.
270     </tp:docstring>
271     </arg>
272   </method>
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 &quot;toolkit dependent&quot;
279         device events to the Registry from the application's process space.    </p>
280
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>
283     </tp:docstring>
284     <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
285     <arg direction="out" type="b" tp:type="boolean">
286     <tp:docstring>
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).
288     </tp:docstring>
289     </arg>
290   </method>
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 &quot;toolkit dependent&quot;
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>
299
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>
302     </tp:docstring>
303     <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
304   </method>
305   <method name="generateKeyboardEvent">
306     <tp:docstring>
307       Synthesize a keyboard event.
308     </tp:docstring>
309     <arg direction="in" name="keycode" type="i">
310     <tp:docstring>
311       a long integer indicating the keycode ofthe keypress to be synthesized.
312     </tp:docstring>
313     </arg>
314     <arg direction="in" name="keystring" type="s">
315     <tp:docstring>
316       an optional UTF-8 string indicating a complexkeyboard input event.
317     </tp:docstring>
318     </arg>
319     <arg direction="in" name="type" type="u" tp:type="KeySynthType">
320     <tp:docstring>
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.
322     </tp:docstring>
323     </arg>
324   </method>
325   <method name="generateMouseEvent">
326     <tp:docstring>
327       Synthesize a mouse event.
328     </tp:docstring>
329     <arg direction="in" name="x" type="i">
330     <tp:docstring>
331       a long integer indicating the screen x coord for the mouse event.
332     </tp:docstring>
333     </arg>
334     <arg direction="in" name="y" type="i">
335     <tp:docstring>
336       a long integer indicating the screen y coord for the mouse event.
337     </tp:docstring>
338     </arg>
339     <arg direction="in" name="eventName" type="s">
340     <tp:docstring>
341       a string indicating the type of mouse event, e.g. &quot;button1up&quot;
342     </tp:docstring>
343     </arg>
344   </method>
345 </interface>
346 </node>