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