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