This file is indexed.

/usr/share/gtk-doc/html/libbonobo/libbonobo-bonobo-event-source.html is in libbonobo2-dev 2.32.1-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Libbonobo Reference Manual: bonobo-event-source</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Libbonobo Reference Manual">
<link rel="up" href="property-bags.html" title="Property Bags, Events, Listeners">
<link rel="prev" href="properties.html" title="Properties">
<link rel="next" href="libbonobo-bonobo-listener.html" title="bonobo-listener">
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span> 
                  <a href="#libbonobo-bonobo-event-source.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span> 
                  <a href="#libbonobo-bonobo-event-source.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="property-bags.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="properties.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libbonobo-bonobo-listener.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libbonobo-bonobo-event-source"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libbonobo-bonobo-event-source.top_of_page"></a>bonobo-event-source</span></h2>
<p>bonobo-event-source — An Event Source where clients can connect to listen to events.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libbonobo-bonobo-event-source.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="returnvalue">BonoboEventSource</span></a> *
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-new" title="bonobo_event_source_new ()">bonobo_event_source_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-notify-listeners" title="bonobo_event_source_notify_listeners ()">bonobo_event_source_notify_listeners</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-notify-listeners-full" title="bonobo_event_source_notify_listeners_full ()">bonobo_event_source_notify_listeners_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-client-remove-listener" title="bonobo_event_source_client_remove_listener ()">bonobo_event_source_client_remove_listener</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-client-add-listener" title="bonobo_event_source_client_add_listener ()">bonobo_event_source_client_add_listener</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-has-listener" title="bonobo_event_source_has_listener ()">bonobo_event_source_has_listener</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-client-add-listener-closure" title="bonobo_event_source_client_add_listener_closure ()">bonobo_event_source_client_add_listener_closure</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">Bonobo_Listener</span>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-client-add-listener-full" title="bonobo_event_source_client_add_listener_full ()">bonobo_event_source_client_add_listener_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-ignore-listeners" title="bonobo_event_source_ignore_listeners ()">bonobo_event_source_ignore_listeners</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<a name="BonoboEventSource"></a><div class="refsect1">
<a name="libbonobo-bonobo-event-source.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
    <span class="lineart">╰──</span> <a class="link" href="libbonobo-bonobo-object.html#BonoboObject">BonoboObject</a>
        <span class="lineart">╰──</span> BonoboEventSource
</pre>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-event-source.description"></a><h2>Description</h2>
<p>
An event source object is responsible for channeling the emission
of signals on an object to the appropriate attached listeners.
The API is extremely simple and allows implementations to notify
their listeners of a new event occuring.
</p>
<p>
To notify a listener, you need to construct a textual string,
this is done by the <code class="function">bonobo_event</code> functions
( see <a class="link" href="libbonobo-bonobo-listener.html#BonoboListener"><span class="type">BonoboListener</span></a> ) ':' delimiting the fields. It is reccommended
that the IDL module path of the interface be used as the first
part of the string. This is because many interfaces can be aggregated
together and need to share the same event namespace without conflicts.
So for example the bonobo property bag notification code
uses the IDL path "Bonobo/Property" the "change" kind and sets the
sub-type to the property name:
  </p>
<div class="example">
<a name="id-1.4.3.6.3.3"></a><p class="title"><b>Example 9. An example event source notification</b></p>
<div class="example-contents"><pre class="programlisting">
static void
notify_listeners (BonoboPropertyBag *pb,
		  BonoboProperty    *prop,
		  const BonoboArg   *new_value,
		  CORBA_Environment *opt_ev)
{
	if (prop-&gt;flags &amp; BONOBO_PROPERTY_NO_LISTENING)
		return;
	bonobo_event_source_notify_listeners_full (pb-&gt;es,
						   "Bonobo/Property",
						   "change", prop-&gt;name,
						   new_value, opt_ev);
}
    </pre></div>
</div>
<p><br class="example-break">
  Of course, you need to notify the listener with a valid
BonoboArg containing the event data, this could easily contain
a structure. eg.
  </p>
<div class="example">
<a name="id-1.4.3.6.3.4"></a><p class="title"><b>Example 10. Passing a structure in an event</b></p>
<div class="example-contents">
<pre class="programlisting">
module GNOME {
	module Foo {
		struct BaaEvent {
			double a;
			string b;
			long   c;
		};
	};
};
     </pre>
<pre class="programlisting">
static void
fire_event (BonoboEventSource *on_source,
            double             a_double,
	    char              *a_string,
	    long               a_float,
	    CORBA_Environment *opt_ev)
{
	CORBA_any any;
	GNOME_Foo_BaaEvent e;
	e.a = a_double;
	e.b = a_string;
	e.c = a_float;
	any-&gt;_type = TC_GNOME_Foo_BaaEvent;
	any-&gt;_data = &amp;e;
	bonobo_event_source_notify_listeners_full (
	   on_source, "GNOME/Foo", "event", NULL,
	   &amp;any, opt_ev);
}
     </pre>
</div>
</div>
<p><br class="example-break">
  NB. it is reccommended that you make it clear that the event
structure is intended for use with the <a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="type">BonoboEventSource</span></a> /
<a class="link" href="libbonobo-bonobo-listener.html#BonoboListener"><span class="type">BonoboListener</span></a> by naming it XYZEvent, ie. with the 'Event'
suffix.
</p>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-event-source.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="bonobo-event-source-new"></a><h3>bonobo_event_source_new ()</h3>
<pre class="programlisting"><a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="returnvalue">BonoboEventSource</span></a> *
bonobo_event_source_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new BonoboEventSource object.  Typically this
object will be exposed to clients through CORBA and they
will register and unregister functions to be notified
of events that this EventSource generates.</p>
<p>To notify clients of an event, use the <a class="link" href="libbonobo-bonobo-event-source.html#bonobo-event-source-notify-listeners" title="bonobo_event_source_notify_listeners ()"><code class="function">bonobo_event_source_notify_listeners()</code></a>
function.</p>
<div class="refsect3">
<a name="id-1.4.3.7.2.6"></a><h4>Returns</h4>
<p> A new <a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="type">BonoboEventSource</span></a> server object.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-notify-listeners"></a><h3>bonobo_event_source_notify_listeners ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
bonobo_event_source_notify_listeners (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="type">BonoboEventSource</span></a> *event_source</code></em>,
                                      <em class="parameter"><code>const <span class="type">char</span> *event_name</code></em>,
                                      <em class="parameter"><code>const <span class="type">CORBA_any</span> *opt_value</code></em>,
                                      <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>This will notify all clients that have registered with this EventSource
(through the addListener or addListenerWithMask methods) of the availability
of the event named <em class="parameter"><code>event_name</code></em>
.  The <em class="parameter"><code>value</code></em>
 CORBA::any value is passed to
all listeners.</p>
<p><em class="parameter"><code>event_name</code></em>
 can not contain comma separators, as commas are used to
separate the various event names.</p>
<div class="refsect3">
<a name="id-1.4.3.7.3.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>event_source</p></td>
<td class="parameter_description"><p>the Event Source that will emit the event.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>event_name</p></td>
<td class="parameter_description"><p>Name of the event being emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>opt_value</p></td>
<td class="parameter_description"><p>A CORBA_any value that contains the data that is passed
to interested clients, or NULL for an empty value</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>opt_ev</p></td>
<td class="parameter_description"><p>A CORBA_Environment where a failure code can be returned, can be NULL.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-notify-listeners-full"></a><h3>bonobo_event_source_notify_listeners_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
bonobo_event_source_notify_listeners_full
                               (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="type">BonoboEventSource</span></a> *event_source</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *path</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *type</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *subtype</code></em>,
                                <em class="parameter"><code>const <span class="type">CORBA_any</span> *opt_value</code></em>,
                                <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-client-remove-listener"></a><h3>bonobo_event_source_client_remove_listener ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
bonobo_event_source_client_remove_listener
                               (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                <em class="parameter"><code><span class="type">Bonobo_Listener</span> listener</code></em>,
                                <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-client-add-listener"></a><h3>bonobo_event_source_client_add_listener ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
bonobo_event_source_client_add_listener
                               (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                <em class="parameter"><code><a class="link" href="libbonobo-bonobo-listener.html#BonoboListenerCallbackFn" title="BonoboListenerCallbackFn ()"><span class="type">BonoboListenerCallbackFn</span></a> event_callback</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *opt_mask</code></em>,
                                <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>,
                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-has-listener"></a><h3>bonobo_event_source_has_listener ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
bonobo_event_source_has_listener (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="type">BonoboEventSource</span></a> *event_source</code></em>,
                                  <em class="parameter"><code>const <span class="type">char</span> *event_name</code></em>);</pre>
<p>This method determines if there are any listeners for
the event to be broadcast. This can be used to detect
whether it is worth constructing a potentialy expensive
state update, before sending it to no-one.</p>
<div class="refsect3">
<a name="id-1.4.3.7.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>event_source</p></td>
<td class="parameter_description"><p>the Event Source that will emit the event.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>event_name</p></td>
<td class="parameter_description"><p>Name of the event being emitted</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.4.3.7.7.6"></a><h4>Returns</h4>
<p> TRUE if it's worth sending, else FALSE</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-client-add-listener-closure"></a><h3>bonobo_event_source_client_add_listener_closure ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
bonobo_event_source_client_add_listener_closure
                               (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *callback</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *opt_mask</code></em>,
                                <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-client-add-listener-full"></a><h3>bonobo_event_source_client_add_listener_full ()</h3>
<pre class="programlisting"><span class="returnvalue">Bonobo_Listener</span>
bonobo_event_source_client_add_listener_full
                               (<em class="parameter"><code><span class="type">Bonobo_Unknown</span> object</code></em>,
                                <em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *callback</code></em>,
                                <em class="parameter"><code>const <span class="type">char</span> *opt_mask</code></em>,
                                <em class="parameter"><code><span class="type">CORBA_Environment</span> *opt_ev</code></em>);</pre>
<p>
</p>
<div class="refsect3">
<a name="id-1.4.3.7.9.5"></a><h4>Returns</h4>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-event-source-ignore-listeners"></a><h3>bonobo_event_source_ignore_listeners ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
bonobo_event_source_ignore_listeners (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-event-source.html#BonoboEventSource"><span class="type">BonoboEventSource</span></a> *event_source</code></em>);</pre>
<p>Instructs the event source to de-register any listeners
that are added from the global running context.</p>
</div>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-event-source.other_details"></a><h2>Types and Values</h2>
</div>
<div class="refsect1">
<a name="libbonobo-bonobo-event-source.see-also"></a><h2>See Also</h2>
<p>
  <a class="link" href="libbonobo-bonobo-listener.html#BonoboListener"><span class="type">BonoboListener</span></a> <a class="link" href="libbonobo-bonobo-arg.html#BonoboArg" title="BonoboArg"><span class="type">BonoboArg</span></a>
</p>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.20</div>
</body>
</html>