/usr/share/gtk-doc/html/libbonobo/libbonobo-bonobo-application.html is in libbonobo2-dev 2.24.3-1.
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 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>bonobo-application</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="Libbonobo Reference Manual">
<link rel="up" href="general.html" title="General">
<link rel="prev" href="libbonobo-bonobo-exception.html" title="bonobo-exception">
<link rel="next" href="libbonobo-bonobo-app-client.html" title="bonobo-app-client">
<meta name="generator" content="GTK-Doc V1.14 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="libbonobo-bonobo-exception.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Libbonobo Reference Manual</th>
<td><a accesskey="n" href="libbonobo-bonobo-app-client.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libbonobo-bonobo-application.synopsis" class="shortcut">Top</a>
|
<a href="#libbonobo-bonobo-application.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="bonobo-application">
<a name="libbonobo-bonobo-application"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libbonobo-bonobo-application.top_of_page"></a>bonobo-application</span></h2>
<p>bonobo-application — a framework for unique application instance and automation</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libbonobo-bonobo-application.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><span class="returnvalue">void</span> (<a class="link" href="libbonobo-bonobo-application.html#BonoboAppHookFunc" title="BonoboAppHookFunc ()">*BonoboAppHookFunc</a>) (<em class="parameter"><code><span class="type">BonoboApplication</span> *app</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> data</code></em>);
<span class="returnvalue">BonoboApplication</span>* <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-new" title="bonobo_application_new ()">bonobo_application_new</a> (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-register-message" title="bonobo_application_register_message ()">bonobo_application_register_message</a> (<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *opt_closure</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> first_arg_type</code></em>,
<em class="parameter"><code>...</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-register-message-v" title="bonobo_application_register_message_v ()">bonobo_application_register_message_v</a>
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *opt_closure</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> const arg_types[]</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-register-message-va" title="bonobo_application_register_message_va ()">bonobo_application_register_message_va</a>
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *opt_closure</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> first_arg_type</code></em>,
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-new-instance" title="bonobo_application_new_instance ()">bonobo_application_new_instance</a> (<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> argc</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *argv[]</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-create-serverinfo" title="bonobo_application_create_serverinfo ()">bonobo_application_create_serverinfo</a>
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> const *envp[]</code></em>);
<span class="returnvalue">Bonobo_RegistrationResult</span> <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-register-unique" title="bonobo_application_register_unique ()">bonobo_application_register_unique</a>
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> const *serverinfo</code></em>,
<em class="parameter"><code><span class="type">BonoboAppClient</span> **client</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-add-hook" title="bonobo_application_add_hook ()">bonobo_application_add_hook</a> (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-application.html#BonoboAppHookFunc" title="BonoboAppHookFunc ()"><span class="type">BonoboAppHookFunc</span></a> func</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> data</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-remove-hook" title="bonobo_application_remove_hook ()">bonobo_application_remove_hook</a> (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-application.html#BonoboAppHookFunc" title="BonoboAppHookFunc ()"><span class="type">BonoboAppHookFunc</span></a> func</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> data</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libbonobo-bonobo-application.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="libbonobo-bonobo-application.details"></a><h2>Details</h2>
<div class="refsect2" title="BonoboAppHookFunc ()">
<a name="BonoboAppHookFunc"></a><h3>BonoboAppHookFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*BonoboAppHookFunc) (<em class="parameter"><code><span class="type">BonoboApplication</span> *app</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> data</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_new ()">
<a name="bonobo-application-new"></a><h3>bonobo_application_new ()</h3>
<pre class="programlisting"><span class="returnvalue">BonoboApplication</span>* bonobo_application_new (<em class="parameter"><code>const <span class="type">char</span> *name</code></em>);</pre>
<p>
Creates a new <span class="type">BonoboApplication</span> object.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>application name
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a new <span class="type">BonoboApplication</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_register_message ()">
<a name="bonobo-application-register-message"></a><h3>bonobo_application_register_message ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_application_register_message (<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *opt_closure</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> first_arg_type</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>
Registers a new message type that the application supports.
</p>
<p>
When <em class="parameter"><code>opt_closure</code></em> is provided (and is non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) it takes care of calling the
callback function with the same arguments as registered for the message. On
the other hand if <em class="parameter"><code>opt_closure</code></em> is <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the function arguments are provided in
a <a href="/usr/share/gtk-doc/html/gobject/gobject-Value-arrays.html#GValueArray"><span class="type">GValueArray</span></a>. This enables defining functions that accept variable number of
arguments, but is perhaps a little more tedious to implement.
</p>
<p>
</p>
<div class="example">
<a name="id342330"></a><p class="title"><b>Example 5. Function with a closure</b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static void</span>
<span class="function">message_open_url_cb</span> <span class="symbol">(</span>BonoboApplication <span class="symbol">*</span>app<span class="symbol">,</span> <span class="gtkdoc kwb">const char</span> <span class="symbol">*</span>url<span class="symbol">,</span> gboolean new_win<span class="symbol">)</span>
<span class="symbol">{</span>
<span class="symbol">...</span>
<span class="symbol">}</span>
<span class="symbol">...</span>
closure <span class="symbol">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#g-cclosure-new">g_cclosure_new</a></span> <span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>message_open_url_cb<span class="symbol">),</span> NULL<span class="symbol">,</span> NULL<span class="symbol">);</span>
<span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#g-closure-set-marshal">g_closure_set_marshal</a></span> <span class="symbol">(</span>closure<span class="symbol">,</span> my_marshal_VOID__STRING_BOOLEAN<span class="symbol">);</span>
<span class="function"><a href="libbonobo-bonobo-application.html#bonobo-application-register-message">bonobo_application_register_message</a></span> <span class="symbol">(</span>app<span class="symbol">,</span> <span class="string">"open-url"</span><span class="symbol">,</span> <span class="string">"Opens a new URL in the browser."</span>
<span class="string">" Parameters: url(string), open-in-new-window(boolean)"</span><span class="symbol">,</span>
closure<span class="symbol">,</span> G_TYPE_NONE<span class="symbol">,</span> G_TYPE_STRING<span class="symbol">,</span> G_TYPE_BOOLEAN<span class="symbol">,</span> G_TYPE_NONE<span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<p><br class="example-break">
</p>
<p>
</p>
<div class="example">
<a name="id342350"></a><p class="title"><b>Example 6. Function accepting variable number of arguments</b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc kwb">static</span> GValue <span class="symbol">*</span>
<span class="function">message_open_url_cb</span> <span class="symbol">(</span>BonoboApplication <span class="symbol">*</span>app<span class="symbol">,</span> <span class="gtkdoc kwb">const char</span> <span class="symbol">*</span>message<span class="symbol">,</span> GValueArray <span class="symbol">*</span>args<span class="symbol">)</span>
<span class="symbol">{</span>
<span class="gtkdoc kwb">const char</span> <span class="symbol">*</span>url<span class="symbol">;</span>
gboolean new_win <span class="symbol">=</span> TRUE<span class="symbol">;</span>
<span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span> <span class="symbol">(</span><span class="function">strcmp</span> <span class="symbol">(</span>message<span class="symbol">,</span> <span class="string">"open-url"</span><span class="symbol">) ==</span> <span class="number">0</span><span class="symbol">,</span> NULL<span class="symbol">);</span>
<span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span> <span class="symbol">(</span>args<span class="symbol">-></span>n_values <span class="symbol">></span> <span class="number">0</span><span class="symbol">,</span> NULL<span class="symbol">);</span>
<span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span> <span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#G-VALUE-HOLDS-STRING:CAPS">G_VALUE_HOLDS_STRING</a></span> <span class="symbol">(&</span>args<span class="symbol">-></span>values<span class="symbol">[</span><span class="number">0</span><span class="symbol">]),</span> NULL<span class="symbol">);</span>
url <span class="symbol">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-get-string">g_value_get_string</a></span> <span class="symbol">(&</span>args<span class="symbol">-></span>values<span class="symbol">[</span><span class="number">0</span><span class="symbol">]);</span>
<span class="keyword">if</span> <span class="symbol">(</span>args<span class="symbol">-></span>n_values <span class="symbol">></span> <span class="number">1</span><span class="symbol">)</span>
<span class="symbol">{</span>
<span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-Warnings-and-Assertions.html#g-return-val-if-fail">g_return_val_if_fail</a></span> <span class="symbol">(</span><span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#G-VALUE-HOLDS-BOOLEAN:CAPS">G_VALUE_HOLDS_BOOLEAN</a></span> <span class="symbol">(&</span>args<span class="symbol">-></span>values<span class="symbol">[</span><span class="number">1</span><span class="symbol">]),</span> NULL<span class="symbol">);</span>
new_win <span class="symbol">=</span> <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#g-value-get-boolean">g_value_get_boolean</a></span> <span class="symbol">(&</span>args<span class="symbol">-></span>values<span class="symbol">[</span><span class="number">1</span><span class="symbol">]);</span>
<span class="symbol">}</span>
<span class="symbol">...</span>
<span class="keyword">return</span> NULL<span class="symbol">;</span>
<span class="symbol">}</span>
<span class="symbol">...</span>
<span class="function"><a href="libbonobo-bonobo-application.html#bonobo-application-register-message">bonobo_application_register_message</a></span> <span class="symbol">(</span>app<span class="symbol">,</span> <span class="string">"open-url"</span><span class="symbol">,</span> <span class="string">"Opens a new URL in the browser."</span>
<span class="string">" Parameters: url(string) [, open-in-new-window(boolean)]"</span><span class="symbol">,</span>
NULL<span class="symbol">,</span> G_TYPE_NONE<span class="symbol">,</span> G_TYPE_STRING<span class="symbol">,</span> G_TYPE_BOOLEAN<span class="symbol">,</span> G_TYPE_NONE<span class="symbol">);</span>
<span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#g-signal-connect">g_signal_connect</a></span> <span class="symbol">(</span>app<span class="symbol">,</span> <span class="string">"message::open-url"</span><span class="symbol">,</span> <span class="function"><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#G-CALLBACK:CAPS">G_CALLBACK</a></span> <span class="symbol">(</span>message_open_url_cb<span class="symbol">),</span> NULL<span class="symbol">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<p><br class="example-break">
</p>
<p>
</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>You are not required to register any messages for your application.
However, only registered functions are included in the list returned by
<code class="function">bonobo_app_client_msg_list()</code>
</div>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app</code></em> :</span></p></td>
<td>a <span class="type">BonoboApplication</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>message string identifier
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>description</code></em> :</span></p></td>
<td>a string containing a human readable description of the message
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_closure</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> that will be called for this message, or
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; Function takes ownership of this closure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>return_type</code></em> :</span></p></td>
<td>Message return <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_arg_type</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of first argument of message, or <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-NONE:CAPS"><code class="literal">G_TYPE_NONE</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-NONE:CAPS"><code class="literal">G_TYPE_NONE</code></a> -terminated list of argument <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>'s
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_register_message_v ()">
<a name="bonobo-application-register-message-v"></a><h3>bonobo_application_register_message_v ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_application_register_message_v
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *opt_closure</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> const arg_types[]</code></em>);</pre>
<p>
See <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-register-message" title="bonobo_application_register_message ()"><code class="function">bonobo_application_register_message()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app</code></em> :</span></p></td>
<td>a <span class="type">BonoboApplication</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>message string identifier
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>description</code></em> :</span></p></td>
<td>a string containing a human readable description of the message
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_closure</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> that will be called for this message, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>;
Function takes ownership of this closure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>return_type</code></em> :</span></p></td>
<td>Message return <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>arg_types</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-NONE:CAPS"><code class="literal">G_TYPE_NONE</code></a> -terminated vector of argument <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>'s
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_register_message_va ()">
<a name="bonobo-application-register-message-va"></a><h3>bonobo_application_register_message_va ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_application_register_message_va
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *description</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> *opt_closure</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> return_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> first_arg_type</code></em>,
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>
See <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-register-message" title="bonobo_application_register_message ()"><code class="function">bonobo_application_register_message()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app</code></em> :</span></p></td>
<td>a <span class="type">BonoboApplication</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>message string identifier
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>description</code></em> :</span></p></td>
<td>a string containing a human readable description of the message
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>opt_closure</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GClosure"><span class="type">GClosure</span></a> that will be called for this message, or
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>; Function takes ownership of this closure.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>return_type</code></em> :</span></p></td>
<td>Message return <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_arg_type</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> of first argument of message, or <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-NONE:CAPS"><code class="literal">G_TYPE_NONE</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#G-TYPE-NONE:CAPS"><code class="literal">G_TYPE_NONE</code></a> -terminated valist of argument <a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a>'s
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_new_instance ()">
<a name="bonobo-application-new-instance"></a><h3>bonobo_application_new_instance ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> bonobo_application_new_instance (<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> argc</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *argv[]</code></em>);</pre>
<p>
Emit the "new-instance" signal of the <span class="type">BonoboApplication</span> with the
given arguments.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app</code></em> :</span></p></td>
<td>a <span class="type">BonoboApplication</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td>number of elements in <em class="parameter"><code>argv</code></em>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td>array of strings (command-line arguments)
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> signal return value
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_create_serverinfo ()">
<a name="bonobo-application-create-serverinfo"></a><h3>bonobo_application_create_serverinfo ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * bonobo_application_create_serverinfo
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> const *envp[]</code></em>);</pre>
<p>
This utility function provides a simple way to contruct a valid
serverinfo XML string.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app</code></em> :</span></p></td>
<td>a <span class="type">BonoboApplication</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>envp</code></em> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated string vector, containing the enviroment
variables we wish to include in the server description.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string; caller must <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> it.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_register_unique ()">
<a name="bonobo-application-register-unique"></a><h3>bonobo_application_register_unique ()</h3>
<pre class="programlisting"><span class="returnvalue">Bonobo_RegistrationResult</span> bonobo_application_register_unique
(<em class="parameter"><code><span class="type">BonoboApplication</span> *app</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> const *serverinfo</code></em>,
<em class="parameter"><code><span class="type">BonoboAppClient</span> **client</code></em>);</pre>
<p>
Try to register the running application, or check for an existing
application already registered and get a reference to it.
Applications already running but on different environments (as
defined by the bonobo:environenment server property) than this one
are ignored and do not interfere.
</p>
<p>
If the registration attempt indicates that another instance of this
application is already running, then the output variable
<em class="parameter"><code>client</code></em> will receive a newly created <span class="type">BonoboAppClient</span>
associated with the running application. Otherwise, *<em class="parameter"><code>client</code></em> is
set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app</code></em> :</span></p></td>
<td>a <span class="type">BonoboApplication</span> instance
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>serverinfo</code></em> :</span></p></td>
<td>the XML server
description. <code class="function">bonobo_application_create_server_description()</code> may be
used to easily create such description.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>output parameter that will contain a client object, in
case another instance has already running, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if we are the
first to register.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the registration result.
<code class="literal">Bonobo_ACTIVATION_REG_SUCCESS</code> means the application was registered,
since no other running instance was detected. If, however, a
running application is detected,
<code class="literal">Bonobo_ACTIVATION_REG_ALREADY_ACTIVE</code> is returned.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_add_hook ()">
<a name="bonobo-application-add-hook"></a><h3>bonobo_application_add_hook ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_application_add_hook (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-application.html#BonoboAppHookFunc" title="BonoboAppHookFunc ()"><span class="type">BonoboAppHookFunc</span></a> func</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> data</code></em>);</pre>
<p>
Add a hook function to be called whenever a new <span class="type">BonoboApplication</span>
instance is created.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>hook function
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="bonobo_application_remove_hook ()">
<a name="bonobo-application-remove-hook"></a><h3>bonobo_application_remove_hook ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> bonobo_application_remove_hook (<em class="parameter"><code><a class="link" href="libbonobo-bonobo-application.html#BonoboAppHookFunc" title="BonoboAppHookFunc ()"><span class="type">BonoboAppHookFunc</span></a> func</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> data</code></em>);</pre>
<p>
Removes a hook function previously set with <a class="link" href="libbonobo-bonobo-application.html#bonobo-application-add-hook" title="bonobo_application_add_hook ()"><code class="function">bonobo_application_add_hook()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
<td>hook function
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>user data
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>
|