2009-06-11 Mark Doffman <mark.doffman@codethink.co.uk>
[platform/core/uifw/at-spi2-atk.git] / xml / org.freedesktop.atspi.DeviceEvent.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <node xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0" name="/node">
3 <tp:enum name="KeyEventType" type="u">
4   <tp:docstring>
5     Deprecated, DO NOT USE! 
6   </tp:docstring>
7   <tp:enumvalue suffix="KEY_PRESSED"/>
8   <tp:enumvalue suffix="KEY_RELEASED" value="1"/>
9 </tp:enum>
10 <tp:enum name="EventType" type="u">
11   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
12     <p>Used to specify the event types of interest to an EventListener, or
13       to identify the type of an event for which notification has been sent. 
14       @see EventTypeSeq, DeviceEvent::type</p>
15   </tp:docstring>
16   <tp:enumvalue suffix="KEY_PRESSED_EVENT">
17   <tp:docstring>
18     &lt; key on a keyboard device was pressed. 
19   </tp:docstring>
20   </tp:enumvalue>
21   <tp:enumvalue suffix="KEY_RELEASED_EVENT" value="1">
22   <tp:docstring>
23     &lt; key on a keyboard device was released. 
24   </tp:docstring>
25   </tp:enumvalue>
26   <tp:enumvalue suffix="BUTTON_PRESSED_EVENT" value="2">
27   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
28     <p>&lt; button on a non-keyboard human interface device 
29       (HID) was pressed </p>
30   </tp:docstring>
31   </tp:enumvalue>
32   <tp:enumvalue suffix="BUTTON_RELEASED_EVENT" value="3">
33   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
34     <p>&lt; button on a non-keyboard human interface device 
35       (HID) was pressed </p>
36   </tp:docstring>
37   </tp:enumvalue>
38 </tp:enum>
39 <tp:enum name="KeySynthType" type="u">
40   <tp:docstring>
41     Used when synthesizing keyboard input via DeviceEventController:generateKeyboardEvent.
42   </tp:docstring>
43   <tp:enumvalue suffix="KEY_PRESS">
44   <tp:docstring>
45     emulate the pressing of a hardware keyboard key. 
46   </tp:docstring>
47   </tp:enumvalue>
48   <tp:enumvalue suffix="KEY_RELEASE" value="1">
49   <tp:docstring>
50     emulate the release of a hardware keyboard key. 
51   </tp:docstring>
52   </tp:enumvalue>
53   <tp:enumvalue suffix="KEY_PRESSRELEASE" value="2">
54   <tp:docstring>
55     a hardware keyboard key is pressed and immediately released. 
56   </tp:docstring>
57   </tp:enumvalue>
58   <tp:enumvalue suffix="KEY_SYM" value="3">
59   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
60     <p>a symbolic key event is generated, without specifying a hardware key. 
61       @note if the keysym is not present in the current keyboard map,
62       the DeviceEventController instance has a limited ability to generate
63       such keysyms on-the-fly.  Reliability of generateKeyboardEvent calls
64       using out-of-keymap keysyms will vary from system to system, and on the
65       number of different out-of-keymap being generated in quick succession.
66       In practice this is rarely significant, since the keysyms of interest to
67       AT clients and keyboard emulators are usually part of the current keymap, i.e.
68       present on the system keyboard for the current locale (even if a physical
69       hardware keyboard is not connected.</p>
70   </tp:docstring>
71   </tp:enumvalue>
72   <tp:enumvalue suffix="KEY_STRING" value="4">
73   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
74     <p>a string is converted to its equivalent keyboard events and emitted. 
75       If the string consists of complex character or composed characters
76       which are not in the current keymap, string emission is subject to the
77       out-of-keymap limitations described for KeySynthType::KEY_SYM.
78       In practice this limitation primarily effects Chinese and Japanese locales.</p>
79   </tp:docstring>
80   </tp:enumvalue>
81 </tp:enum>
82 <tp:enum name="ModifierType" type="u">
83   <tp:enumvalue suffix="MODIFIER_SHIFT">
84   <tp:docstring>
85     The left or right 'Shift' key 
86   </tp:docstring>
87   </tp:enumvalue>
88   <tp:enumvalue suffix="MODIFIER_SHIFTLOCK" value="1">
89   <tp:docstring>
90     The ShiftLock or CapsLock key 
91   </tp:docstring>
92   </tp:enumvalue>
93   <tp:enumvalue suffix="MODIFIER_CONTROL" value="2">
94   <tp:docstring>
95     'Control'/'Ctrl' 
96   </tp:docstring>
97   </tp:enumvalue>
98   <tp:enumvalue suffix="MODIFIER_ALT" value="3">
99   <tp:docstring>
100     The Alt key (as opposed to AltGr) 
101   </tp:docstring>
102   </tp:enumvalue>
103   <tp:enumvalue suffix="MODIFIER_META" value="4">
104   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
105     <p>depending on the platform this may map to 'Window', 'Function', 'Meta',
106       'Menu', or 'NumLock'.  
107       Such 'Meta keys' will map to one of META, META2, META3.
108       On X Windows platforms these META values map to 
109       the modifier masks Mod1Mask, Mod2Mask, Mod3Mask, e.g. an event having
110       ModifierType::MODIFIER_META2 means that the 'Mod2Mask' bit is
111       set in the corresponding XEvent.</p>
112   </tp:docstring>
113   </tp:enumvalue>
114   <tp:enumvalue suffix="MODIFIER_META2" value="5"/>
115   <tp:enumvalue suffix="MODIFIER_META3" value="6"/>
116   <tp:enumvalue suffix="MODIFIER_NUMLOCK" value="7">
117   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
118     <p>A symbolic meta key name that is mapped by AT-SPI to the 
119       appropriate META value, for the convenience of the client.</p>
120   </tp:docstring>
121   </tp:enumvalue>
122 </tp:enum>
123 <tp:struct name="EventListenerMode">
124   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
125     <p>A structure that encapsulates the characteristics of the event notifications
126       that should be sent to an EventListener in response to a call to
127       DeviceEventController::registerKeystrokeListener or 
128       DeviceEventController::registerDeviceEventListener. </p>
129   </tp:docstring>
130   <tp:member type="b" tp:name="synchronous">
131   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
132     <p>&lt; If \c True, specifies that
133       DeviceEventController should block while waiting 
134       for client to process the requested event notifications; 
135       ordinarily should be used only when client needs to perform
136       operations synchronously with event delivery. Note that because
137       of the architecture of device event systems in general,
138       use of this flag may not block delivery of the event to 
139       the currently focussed application unless it is used in 
140       conjunction with the preemptive flag. </p>
141   </tp:docstring>
142   </tp:member>
143   <tp:member type="b" tp:name="preemptive">
144   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
145     <p>&lt; If \c True, specifies that 
146       Listener is allowed to pre-empt the delivery of the event,
147       effectively "consuming" it such that it is not delivered 
148       to the currently focussed desktop application. 
149       Key events consumed via this API will not be 
150       available for use by other applications or services, so this
151       option should be used sparingly. </p>
152   </tp:docstring>
153   </tp:member>
154   <tp:member type="b" tp:name="global">
155   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
156     <p>&lt; If \c True, specifies that
157       Event notifications should be sent regardless of whether the
158       currently focussed application participates in the AT-SPI 
159       infrastructure.  On systems with the XEvIE X extension, this flag
160       also allows access to events which are already subject to 
161       interception via a "system keygrab" (as described in the X Window System
162       documentation for XGrabKey).  The 'global' and 'preemptive' flags
163       should only be used together for the purposes of registering
164       "system global key shortcuts" i.e. command keys for use by the
165       assistive technology. </p>
166   </tp:docstring>
167   </tp:member>
168 </tp:struct>
169 <tp:struct name="DeviceEvent">
170   <tp:docstring>
171     A structure which encapsulates information about a device event. 
172   </tp:docstring>
173   <tp:member type="u" tp:name="type">
174   <tp:docstring>
175     &lt; Identifies the type of the containing DeviceEvent. 
176   </tp:docstring>
177   </tp:member>
178   <tp:member type="i" tp:name="id">
179   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
180     <p>&lt; an identifier which identifies this event in the event stream. 
181       On X Window systems this corresponds to the XEvent serial number.</p>
182   </tp:docstring>
183   </tp:member>
184   <tp:member type="n" tp:name="hw_code">
185   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
186     <p>&lt; a numeric code which is hardware and system-dependent, identifying the
187       specific hardware button or key on the device for which the event has
188       occurred. On X Window systems, for global key notifications and for most
189       non-global key notifications as well, this code corresponds to the
190       XKeycode.  For switch and button events it indicates the switch
191       or button number.
192       @note
193       For technical reasons, this code may differ from the XKeycode
194       when generated by Java applications for consumption by non-global
195       key listeners.  This is subject to change in future versions of the
196       DeviceEventController implementation.</p>
197   </tp:docstring>
198   </tp:member>
199   <tp:member type="n" tp:name="modifiers">
200   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
201     <p>&lt; an unsigned short int consisting of zero or more of the following
202       values OR'ed together:
203       \li \c 1&lt;&lt;::MODIFIER_SHIFT   (=1, corresponds to Xlib's ShiftMask)
204       \li \c 1&lt;&lt;::MODIFIER_SHIFTLOCK    (=2, corresponds to Xlib's LockMask)
205       \li \c 1&lt;&lt;::MODIFIER_CONTROL (=4, corresponds to Xlib's ControlMask)
206       \li \c 1&lt;&lt;::MODIFIER_ALT    (=8, corresponds to Xlib's Mod1Mask)
207       \li \c 1&lt;&lt;::MODIFIER_META    (=16, corresponds to Xlib's Mod2Mask)
208       \li \c 1&lt;&lt;::MODIFIER_META2    (=32, corresponds to Xlib's Mod3Mask)
209       \li \c 1&lt;&lt;::MODIFIER_META3    (=64, corresponds to Xlib's Mod4Mask)</p>
210   </tp:docstring>
211   </tp:member>
212   <tp:member type="i" tp:name="timestamp">
213   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
214     <p>&lt; an unsigned integer representing the time that the 
215       event occurred.  On X Window systems this event is 
216       a time in milliseconds from some arbitrary starting
217       point; it therefore has a cycle time of approximately
218       50 days.</p>
219   </tp:docstring>
220   </tp:member>
221   <tp:member type="s" tp:name="event_string">
222   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
223     <p>&lt; A string representation of the event.  If is_text is
224       \c True, then this string represents the character or typographic
225       sequence that would be received by a focussed text input field.
226       event_string is in general suitable for exposure to the
227       end-user for purposes of keyboard echo.</p>
228   </tp:docstring>
229   </tp:member>
230   <tp:member type="b" tp:name="is_text">
231   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
232     <p>&lt; \c True if the event results in the insertion of characters 
233       into an input text buffer, or would do so if delivered to a focussed
234       text input field. ¨Typographical¨ key events have this field set to
235       \c True, whereas ¨control¨ key events generally do not.</p>
236   </tp:docstring>
237   </tp:member>
238 </tp:struct>
239 <tp:struct name="KeyDefinition">
240   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
241     <p>A structure which defines the identity of a key for which notifications
242       are to be requested.  The data in the members of a ::KeyDefinition are used to
243       determine which keyboard events 'match' the notification request filed by a client.  </p>
244
245     <p>@note Ordinarily a KeyDefinition specifies one and only one of the criteria below; 
246       the result of using a KeyDefinition with multiple members defined as nonzero is
247       undefined.  </p>
248
249     <p>@param keycode if nonzero, the numeric, system-dependent value corresponding to a 
250       physical key on the keyboard.  Keycode values have no semantic meaning to the end-user,
251       and may depend on the user's hardware and operating environment.  They therefore are
252       rarely useful "as-is" to AT clients, unless the client has used operating system
253       services to identify the hardward keycode associated with a particular key symbol.
254       Notifications for key events requested by keycode are less dependent on modifier state
255       than \c keysym based notifications, but some hardware (notably many laptops) may generate
256       more than one keycode for the same physical key, depending on the state of physical 
257       shift/modifier keys.
258       @param keysym if nonzero, the numeric value corresponding to the X Keysym of the key for which 
259       notification is requested.  Note that the presence of active modifiers will affect
260       whether notification for key events requested via "keysym" specification takes place, 
261       since the keysym depends on the modifier state for most keys.
262       @param keystring if non-NULL, the string value of the inserted characters if the corresponding
263       key event has ::KeyEvent:is_text set to \c True, or the string representing the
264       'name' of the key.  On X11 systems, the string 'name' of non-printing keysyms corresponds
265       to the values in "keysymdef.h" as provided by Xlib, with the leading "XK_" stripped off.</p>
266   </tp:docstring>
267   <tp:member type="i" tp:name="keycode"/>
268   <tp:member type="i" tp:name="keysym"/>
269   <tp:member type="s" tp:name="keystring"/>
270   <tp:member type="i" tp:name="unused"/>
271 </tp:struct>
272 </node>