Imported version 2.7.91
[platform/core/uifw/at-spi2-core.git] / doc / libatspi / html / AtspiDeviceListener.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>atspi-devicelistener</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7 <link rel="home" href="index.html" title="libatspi Reference Manual">
8 <link rel="up" href="ch01.html" title="API reference">
9 <link rel="prev" href="AtspiAccessible.html" title="AtspiAccessible">
10 <link rel="next" href="AtspiHyperlink.html" title="atspi-hyperlink">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="AtspiAccessible.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">libatspi Reference Manual</th>
21 <td><a accesskey="n" href="AtspiHyperlink.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#AtspiDeviceListener.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#AtspiDeviceListener.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#AtspiDeviceListener.object-hierarchy" class="shortcut">Object Hierarchy</a>
29 </td></tr>
30 </table>
31 <div class="refentry">
32 <a name="AtspiDeviceListener"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="AtspiDeviceListener.top_of_page"></a>atspi-devicelistener</span></h2>
36 <p>atspi-devicelistener — An interface for creating and manipulating
37 device listeners.</p>
38 </td>
39 <td valign="top" align="right"></td>
40 </tr></table></div>
41 <div class="refsynopsisdiv">
42 <a name="AtspiDeviceListener.synopsis"></a><h2>Synopsis</h2>
43 <pre class="synopsis"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()">*AtspiDeviceListenerCB</a>)            (<em class="parameter"><code>const <a class="link" href="libatspi-atspi-types.html#AtspiDeviceEvent" title="struct AtspiDeviceEvent"><span class="type">AtspiDeviceEvent</span></a> *stroke</code></em>,
44                                                          <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
45 <a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerSimpleCB" title="AtspiDeviceListenerSimpleCB ()">*AtspiDeviceListenerSimpleCB</a>)      (<em class="parameter"><code>const <a class="link" href="libatspi-atspi-types.html#AtspiDeviceEvent" title="struct AtspiDeviceEvent"><span class="type">AtspiDeviceEvent</span></a> *stroke</code></em>);
46 struct              <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListener-struct" title="struct AtspiDeviceListener">AtspiDeviceListener</a>;
47 struct              <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerClass" title="struct AtspiDeviceListenerClass">AtspiDeviceListenerClass</a>;
48 <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="returnvalue">AtspiDeviceListener</span></a> * <a class="link" href="AtspiDeviceListener.html#atspi-device-listener-new" title="atspi_device_listener_new ()">atspi_device_listener_new</a>         (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback</code></em>,
49                                                          <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
50                                                          <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback_destroyed</code></em>);
51 <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="returnvalue">AtspiDeviceListener</span></a> * <a class="link" href="AtspiDeviceListener.html#atspi-device-listener-new-simple" title="atspi_device_listener_new_simple ()">atspi_device_listener_new_simple</a>  (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerSimpleCB" title="AtspiDeviceListenerSimpleCB ()"><span class="type">AtspiDeviceListenerSimpleCB</span></a> callback</code></em>,
52                                                          <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback_destroyed</code></em>);
53 <span class="returnvalue">void</span>                <a class="link" href="AtspiDeviceListener.html#atspi-device-listener-add-callback" title="atspi_device_listener_add_callback ()">atspi_device_listener_add_callback</a>  (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> *listener</code></em>,
54                                                          <em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback</code></em>,
55                                                          <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback_destroyed</code></em>,
56                                                          <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);
57 <span class="returnvalue">void</span>                <a class="link" href="AtspiDeviceListener.html#atspi-device-listener-remove-callback" title="atspi_device_listener_remove_callback ()">atspi_device_listener_remove_callback</a>
58                                                         (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> *listener</code></em>,
59                                                          <em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback</code></em>);
60 </pre>
61 </div>
62 <div class="refsect1">
63 <a name="AtspiDeviceListener.object-hierarchy"></a><h2>Object Hierarchy</h2>
64 <pre class="synopsis">
65   <a href="../gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
66    +----AtspiDeviceListener
67 </pre>
68 </div>
69 <div class="refsect1">
70 <a name="AtspiDeviceListener.description"></a><h2>Description</h2>
71 <p>
72 An interface for creating and manipulating
73 device listeners with callback functions.
74 </p>
75 </div>
76 <div class="refsect1">
77 <a name="AtspiDeviceListener.details"></a><h2>Details</h2>
78 <div class="refsect2">
79 <a name="AtspiDeviceListenerCB"></a><h3>AtspiDeviceListenerCB ()</h3>
80 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*AtspiDeviceListenerCB)            (<em class="parameter"><code>const <a class="link" href="libatspi-atspi-types.html#AtspiDeviceEvent" title="struct AtspiDeviceEvent"><span class="type">AtspiDeviceEvent</span></a> *stroke</code></em>,
81                                                          <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
82 <p>
83 A callback function prototype via which clients receive device event notifications.
84 </p>
85 <div class="variablelist"><table border="0" class="variablelist">
86 <colgroup>
87 <col align="left" valign="top">
88 <col>
89 </colgroup>
90 <tbody>
91 <tr>
92 <td><p><span class="term"><em class="parameter"><code>stroke</code></em> :</span></p></td>
93 <td>The <a class="link" href="libatspi-atspi-types.html#AtspiDeviceEvent" title="struct AtspiDeviceEvent"><span class="type">AtspiDeviceEvent</span></a> for which notification is
94 being received. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
95 </td>
96 </tr>
97 <tr>
98 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
99 <td>Data which is passed to the client each time this callback is notified.</td>
100 </tr>
101 <tr>
102 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
103 <td>
104 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if the client wishes to consume/preempt the event, preventing it from being
105 relayed to the currently focussed application, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> if the event delivery should proceed as normal.</td>
106 </tr>
107 </tbody>
108 </table></div>
109 </div>
110 <hr>
111 <div class="refsect2">
112 <a name="AtspiDeviceListenerSimpleCB"></a><h3>AtspiDeviceListenerSimpleCB ()</h3>
113 <pre class="programlisting"><a href="../glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*AtspiDeviceListenerSimpleCB)      (<em class="parameter"><code>const <a class="link" href="libatspi-atspi-types.html#AtspiDeviceEvent" title="struct AtspiDeviceEvent"><span class="type">AtspiDeviceEvent</span></a> *stroke</code></em>);</pre>
114 <p>
115 Similar to <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a>, but with no user data.
116 </p>
117 <div class="variablelist"><table border="0" class="variablelist">
118 <colgroup>
119 <col align="left" valign="top">
120 <col>
121 </colgroup>
122 <tbody>
123 <tr>
124 <td><p><span class="term"><em class="parameter"><code>stroke</code></em> :</span></p></td>
125 <td>The <a class="link" href="libatspi-atspi-types.html#AtspiDeviceEvent" title="struct AtspiDeviceEvent"><span class="type">AtspiDeviceEvent</span></a> for which notification is
126 being received. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
127 </td>
128 </tr>
129 <tr>
130 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
131 <td>
132 <a href="../glib/glib-Standard-Macros.html#TRUE:CAPS"><span class="type">TRUE</span></a> if the client wishes to consume/preempt the event, preventing it from being
133 relayed to the currently focussed application, <a href="../glib/glib-Standard-Macros.html#FALSE:CAPS"><span class="type">FALSE</span></a> if the event delivery should proceed as normal.</td>
134 </tr>
135 </tbody>
136 </table></div>
137 </div>
138 <hr>
139 <div class="refsect2">
140 <a name="AtspiDeviceListener-struct"></a><h3>struct AtspiDeviceListener</h3>
141 <pre class="programlisting">struct AtspiDeviceListener;</pre>
142 <p>
143 </p>
144 </div>
145 <hr>
146 <div class="refsect2">
147 <a name="AtspiDeviceListenerClass"></a><h3>struct AtspiDeviceListenerClass</h3>
148 <pre class="programlisting">struct AtspiDeviceListenerClass {
149   GObjectClass parent_class;
150   gboolean (*device_event) (AtspiDeviceListener *, const AtspiDeviceEvent *);
151 };
152 </pre>
153 <p>
154 </p>
155 </div>
156 <hr>
157 <div class="refsect2">
158 <a name="atspi-device-listener-new"></a><h3>atspi_device_listener_new ()</h3>
159 <pre class="programlisting"><a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="returnvalue">AtspiDeviceListener</span></a> * atspi_device_listener_new         (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback</code></em>,
160                                                          <em class="parameter"><code><span class="type">void</span> *user_data</code></em>,
161                                                          <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback_destroyed</code></em>);</pre>
162 <p>
163 Creates a new <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> with a specified callback function.
164 </p>
165 <div class="variablelist"><table border="0" class="variablelist">
166 <colgroup>
167 <col align="left" valign="top">
168 <col>
169 </colgroup>
170 <tbody>
171 <tr>
172 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
173 <td>an <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback function,
174 or NULL. <span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span>
175 </td>
176 </tr>
177 <tr>
178 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
179 <td>a pointer to data which will be passed to the
180 callback when invoked. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
181 </td>
182 </tr>
183 <tr>
184 <td><p><span class="term"><em class="parameter"><code>callback_destroyed</code></em> :</span></p></td>
185 <td>A <a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> called when the listener is freed
186 and data associated with the callback should be freed. It can be NULL.</td>
187 </tr>
188 <tr>
189 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
190 <td>a pointer to a newly-created <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
191 </td>
192 </tr>
193 </tbody>
194 </table></div>
195 </div>
196 <hr>
197 <div class="refsect2">
198 <a name="atspi-device-listener-new-simple"></a><h3>atspi_device_listener_new_simple ()</h3>
199 <pre class="programlisting"><a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="returnvalue">AtspiDeviceListener</span></a> * atspi_device_listener_new_simple  (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerSimpleCB" title="AtspiDeviceListenerSimpleCB ()"><span class="type">AtspiDeviceListenerSimpleCB</span></a> callback</code></em>,
200                                                          <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback_destroyed</code></em>);</pre>
201 <p>
202 Creates a new <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> with a specified callback function.
203 This method is similar to <a class="link" href="AtspiDeviceListener.html#atspi-device-listener-new" title="atspi_device_listener_new ()"><span class="type">atspi_device_listener_new</span></a>, but callback
204 takes no user data.
205 </p>
206 <div class="variablelist"><table border="0" class="variablelist">
207 <colgroup>
208 <col align="left" valign="top">
209 <col>
210 </colgroup>
211 <tbody>
212 <tr>
213 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
214 <td>an <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback function,
215 or NULL. <span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span>
216 </td>
217 </tr>
218 <tr>
219 <td><p><span class="term"><em class="parameter"><code>callback_destroyed</code></em> :</span></p></td>
220 <td>A <a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> called when the listener is freed
221 and data associated with the callback should be freed.  It an be NULL.</td>
222 </tr>
223 <tr>
224 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
225 <td>a pointer to a newly-created <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a>.</td>
226 </tr>
227 </tbody>
228 </table></div>
229 </div>
230 <hr>
231 <div class="refsect2">
232 <a name="atspi-device-listener-add-callback"></a><h3>atspi_device_listener_add_callback ()</h3>
233 <pre class="programlisting"><span class="returnvalue">void</span>                atspi_device_listener_add_callback  (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> *listener</code></em>,
234                                                          <em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback</code></em>,
235                                                          <em class="parameter"><code><a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> callback_destroyed</code></em>,
236                                                          <em class="parameter"><code><span class="type">void</span> *user_data</code></em>);</pre>
237 <p>
238 Adds an in-process callback function to an existing <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a>.
239 </p>
240 <div class="variablelist"><table border="0" class="variablelist">
241 <colgroup>
242 <col align="left" valign="top">
243 <col>
244 </colgroup>
245 <tbody>
246 <tr>
247 <td><p><span class="term"><em class="parameter"><code>listener</code></em> :</span></p></td>
248 <td>the <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> instance to modify.</td>
249 </tr>
250 <tr>
251 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
252 <td>an <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> function pointer. <span class="annotation">[<acronym title="The callback is valid until the GDestroyNotify argument is called."><span class="acronym">scope notified</span></acronym>]</span>
253 </td>
254 </tr>
255 <tr>
256 <td><p><span class="term"><em class="parameter"><code>callback_destroyed</code></em> :</span></p></td>
257 <td>A <a href="../glib/glib-Datasets.html#GDestroyNotify"><span class="type">GDestroyNotify</span></a> called when the listener is freed
258 and data associated with the callback should be freed. It can be NULL.</td>
259 </tr>
260 <tr>
261 <td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
262 <td>a pointer to data which will be passed to the
263 callback when invoked. <span class="annotation">[<acronym title="This parameter is a 'user_data', for callbacks; many bindings can pass NULL here."><span class="acronym">closure</span></acronym>]</span>
264 </td>
265 </tr>
266 </tbody>
267 </table></div>
268 </div>
269 <hr>
270 <div class="refsect2">
271 <a name="atspi-device-listener-remove-callback"></a><h3>atspi_device_listener_remove_callback ()</h3>
272 <pre class="programlisting"><span class="returnvalue">void</span>                atspi_device_listener_remove_callback
273                                                         (<em class="parameter"><code><a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> *listener</code></em>,
274                                                          <em class="parameter"><code><a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> callback</code></em>);</pre>
275 <p>
276 Removes an in-process callback function from an existing 
277 <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a>.
278 </p>
279 <div class="variablelist"><table border="0" class="variablelist">
280 <colgroup>
281 <col align="left" valign="top">
282 <col>
283 </colgroup>
284 <tbody>
285 <tr>
286 <td><p><span class="term"><em class="parameter"><code>listener</code></em> :</span></p></td>
287 <td>the <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> instance to modify.</td>
288 </tr>
289 <tr>
290 <td><p><span class="term"><em class="parameter"><code>callback</code></em> :</span></p></td>
291 <td>an <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a> function pointer. <span class="annotation">[<acronym title="The callback is valid only during the call to the method."><span class="acronym">scope call</span></acronym>]</span>
292 </td>
293 </tr>
294 </tbody>
295 </table></div>
296 </div>
297 </div>
298 </div>
299 <div class="footer">
300 <hr>
301           Generated by GTK-Doc V1.18.1</div>
302 </body>
303 </html>