1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
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">
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">
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>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#AtspiDeviceListener.synopsis" class="shortcut">Top</a>
26 <a href="#AtspiDeviceListener.description" class="shortcut">Description</a>
28 <a href="#AtspiDeviceListener.object-hierarchy" class="shortcut">Object Hierarchy</a>
31 <div class="refentry">
32 <a name="AtspiDeviceListener"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
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
39 <td valign="top" align="right"></td>
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>);
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
69 <div class="refsect1">
70 <a name="AtspiDeviceListener.description"></a><h2>Description</h2>
72 An interface for creating and manipulating
73 device listeners with callback functions.
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>
83 A callback function prototype via which clients receive device event notifications.
85 <div class="variablelist"><table border="0" class="variablelist">
87 <col align="left" valign="top">
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>
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>
102 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></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>
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>
115 Similar to <a class="link" href="AtspiDeviceListener.html#AtspiDeviceListenerCB" title="AtspiDeviceListenerCB ()"><span class="type">AtspiDeviceListenerCB</span></a>, but with no user data.
117 <div class="variablelist"><table border="0" class="variablelist">
119 <col align="left" valign="top">
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>
130 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></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>
139 <div class="refsect2">
140 <a name="AtspiDeviceListener-struct"></a><h3>struct AtspiDeviceListener</h3>
141 <pre class="programlisting">struct AtspiDeviceListener;</pre>
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 *);
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>
163 Creates a new <a class="link" href="AtspiDeviceListener.html" title="atspi-devicelistener"><span class="type">AtspiDeviceListener</span></a> with a specified callback function.
165 <div class="variablelist"><table border="0" class="variablelist">
167 <col align="left" valign="top">
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>
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>
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>
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>
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>
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
206 <div class="variablelist"><table border="0" class="variablelist">
208 <col align="left" valign="top">
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>
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>
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>
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>
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>.
240 <div class="variablelist"><table border="0" class="variablelist">
242 <col align="left" valign="top">
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>
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>
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>
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>
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>
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>.
279 <div class="variablelist"><table border="0" class="variablelist">
281 <col align="left" valign="top">
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>
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>
301 Generated by GTK-Doc V1.18.1</div>