Fix registerKeystrokeListener and deregisterKeystrokeListener: pass u for keyEventTyp...
[platform/core/uifw/at-spi2-atk.git] / xml / org.freedesktop.atspi.DeviceEventController.xml
1 <node name="/node" xmlns:tp="http://telepathy.freedesktop.org/wiki/DbusSpec#extensions-v0">
2
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>
11
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>
16
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>
21 </tp:license>
22 <interface name="org.freedesktop.atspi.DeviceEventController">
23   <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
24     <p>The interface via which clients request notification of device events, and
25       through which device events may be simulated.</p>
26   </tp:docstring>
27   <method name="registerKeystrokeListener">
28     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
29       <p>Register to intercept keyboard events, and either pass them on or
30         consume them.     </p>
31     </tp:docstring>
32     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
33     <tp:docstring>
34       a DeviceEventListener which will intercept key events.
35     </tp:docstring>
36     </arg>
37     <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
38     <tp:docstring>
39       a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
40     </tp:docstring>
41     </arg>
42     <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
43     <tp:docstring>
44       a ControllerEventMask filtering the intercepted key events.
45     </tp:docstring>
46     </arg>
47     <arg direction="in" name="type" type="u" tp:type="KeyEventTypeSeq">
48     <tp:docstring>
49       a KeyEventTypeSeq that may created by ORing event types together.
50     </tp:docstring>
51     </arg>
52     <arg direction="in" name="mode" type="(bbb)" tp:type="EventListenerMode">
53     <tp:docstring>
54       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.
55     </tp:docstring>
56     </arg>
57     <arg direction="out" type="b" tp:type="boolean">
58     <tp:docstring>
59       \c True if the DeviceEventListener was successfully registeredfor the requested KeySet, ControllerEventMask, event types, and EventListenerMode; otherwise returns \c False.
60     </tp:docstring>
61     </arg>
62   </method>
63   <method name="deregisterKeystrokeListener">
64     <tp:docstring>
65       De-register a previously registered keyboard eventlistener.
66     </tp:docstring>
67     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
68     <tp:docstring>
69       a DeviceEventListener which will intercept key events.
70     </tp:docstring>
71     </arg>
72     <arg direction="in" name="keys" type="a(iisi)" tp:type="KeySet">
73     <tp:docstring>
74       a KeySet indicating which keys to intercept, or KEYSET_ALL_KEYS.
75     </tp:docstring>
76     </arg>
77     <arg direction="in" name="mask" type="u" tp:type="ControllerEventMask">
78     <tp:docstring>
79       a ControllerEventMask filtering the intercepted key events.
80     </tp:docstring>
81     </arg>
82     <arg direction="in" name="type" type="au" tp:type="KeyEventTypeSeq">
83     <tp:docstring>
84       an EventType mask that may created by ORing event types together.
85     </tp:docstring>
86     </arg>
87   </method>
88   <method name="registerDeviceEventListener">
89     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
90       <p>Register to intercept events, and either pass them on or
91         consume them. To listen to keyboard events use registerKeystrokeListener
92         instead.</p>
93     </tp:docstring>
94     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
95     <tp:docstring>
96       a DeviceEventListener which will intercept events.
97     </tp:docstring>
98     </arg>
99     <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
100     <tp:docstring>
101       an EventTypeSeq indicating which event types to listen for.
102     </tp:docstring>
103     </arg>
104     <arg direction="out" type="b" tp:type="boolean">
105     <tp:docstring>
106       \c True if successful, \c False if not
107     </tp:docstring>
108     </arg>
109   </method>
110   <method name="deregisterDeviceEventListener">
111     <tp:docstring>
112       De-register a previously registered keyboard eventlistener.
113     </tp:docstring>
114     <arg direction="in" name="listener" type="o" tp:type="DeviceEventListener">
115     <tp:docstring>
116       a DeviceEventListener which will intercept events.
117     </tp:docstring>
118     </arg>
119     <arg direction="in" name="types" type="u" tp:type="EventTypeSeq">
120     <tp:docstring>
121       an EventTypeSeq indicating which event types to stoplistening for.
122     </tp:docstring>
123     </arg>
124   </method>
125   <method name="notifyListenersSync">
126     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
127       <p>Notify the Registry instance that a device event has taken place, and
128         allow pre-emptive listeners the opportunity to 'consume' the event
129         and thus prevent its further issuance/forwarding.  This is the 
130         method used by accessibility bridges to forward &quot;toolkit dependent&quot;
131         device events to the Registry from the application's process space.    </p>
132
133       <p>@note AT clients do not normally need to use this method, it is intended for use
134         by toolkit bridges and special-purpose applications.    </p>
135     </tp:docstring>
136     <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
137     <arg direction="out" type="b" tp:type="boolean">
138     <tp:docstring>
139       \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).
140     </tp:docstring>
141     </arg>
142   </method>
143   <method name="notifyListenersAsync">
144     <tp:docstring xmlns="http://www.w3.org/1999/xhtml">
145       <p>Notify the Registry instance that a device event has taken place in
146         an asynchronous manner.  This is the 
147         method used by accessibility bridges to forward &quot;toolkit dependent&quot;
148         device events to the Registry from the application's process space.
149         If the event in question is potentially pre-emptible.
150         ::notifyListenersSync should be used instead.    </p>
151
152       <p>@note AT clients do not normally need to use this method, it is intended for use
153         by toolkit bridges and special-purpose applications.</p>
154     </tp:docstring>
155     <arg direction="in" name="event" type="(uinnisb)" tp:type="DeviceEvent"/>
156   </method>
157   <method name="generateKeyboardEvent">
158     <tp:docstring>
159       Synthesize a keyboard event.
160     </tp:docstring>
161     <arg direction="in" name="keycode" type="i">
162     <tp:docstring>
163       a long integer indicating the keycode ofthe keypress to be synthesized.
164     </tp:docstring>
165     </arg>
166     <arg direction="in" name="keystring" type="s">
167     <tp:docstring>
168       an optional UTF-8 string indicating a complexkeyboard input event.
169     </tp:docstring>
170     </arg>
171     <arg direction="in" name="type" type="u" tp:type="KeySynthType">
172     <tp:docstring>
173       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.
174     </tp:docstring>
175     </arg>
176   </method>
177   <method name="generateMouseEvent">
178     <tp:docstring>
179       Synthesize a mouse event.
180     </tp:docstring>
181     <arg direction="in" name="x" type="i">
182     <tp:docstring>
183       a long integer indicating the screen x coord for the mouse event.
184     </tp:docstring>
185     </arg>
186     <arg direction="in" name="y" type="i">
187     <tp:docstring>
188       a long integer indicating the screen y coord for the mouse event.
189     </tp:docstring>
190     </arg>
191     <arg direction="in" name="eventName" type="s">
192     <tp:docstring>
193       a string indicating the type of mouse event, e.g. &quot;button1up&quot;
194     </tp:docstring>
195     </arg>
196   </method>
197 </interface>
198 </node>