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 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>PeasEngine</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Peas Reference Manual">
<link rel="up" href="ch01.html" title="Core Classes">
<link rel="prev" href="ch01.html" title="Core Classes">
<link rel="next" href="PeasPluginInfo.html" title="PeasPluginInfo">
<meta name="generator" content="GTK-Doc V1.18.1 (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="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.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">Peas Reference Manual</th>
<td><a accesskey="n" href="PeasPluginInfo.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#PeasEngine.synopsis" class="shortcut">Top</a>
|
<a href="#PeasEngine.description" class="shortcut">Description</a>
|
<a href="#PeasEngine.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#PeasEngine.properties" class="shortcut">Properties</a>
|
<a href="#PeasEngine.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry">
<a name="PeasEngine"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="PeasEngine.top_of_page"></a>PeasEngine</span></h2>
<p>PeasEngine — Engine at the heart of the Peas plugin system.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="PeasEngine.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">struct <a class="link" href="PeasEngine.html#PeasEngine-struct" title="struct PeasEngine">PeasEngine</a>;
struct <a class="link" href="PeasEngine.html#PeasEngineClass" title="struct PeasEngineClass">PeasEngineClass</a>;
<a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> * <a class="link" href="PeasEngine.html#peas-engine-new" title="peas_engine_new ()">peas_engine_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> * <a class="link" href="PeasEngine.html#peas-engine-get-default" title="peas_engine_get_default ()">peas_engine_get_default</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="PeasEngine.html#peas-engine-add-search-path" title="peas_engine_add_search_path ()">peas_engine_add_search_path</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *module_dir</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *data_dir</code></em>);
<span class="returnvalue">void</span> <a class="link" href="PeasEngine.html#peas-engine-enable-loader" title="peas_engine_enable_loader ()">peas_engine_enable_loader</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *loader_id</code></em>);
<span class="returnvalue">void</span> <a class="link" href="PeasEngine.html#peas-engine-rescan-plugins" title="peas_engine_rescan_plugins ()">peas_engine_rescan_plugins</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);
const <span class="returnvalue">GList</span> * <a class="link" href="PeasEngine.html#peas-engine-get-plugin-list" title="peas_engine_get_plugin_list ()">peas_engine_get_plugin_list</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);
<span class="returnvalue">gchar</span> ** <a class="link" href="PeasEngine.html#peas-engine-get-loaded-plugins" title="peas_engine_get_loaded_plugins ()">peas_engine_get_loaded_plugins</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);
<span class="returnvalue">void</span> <a class="link" href="PeasEngine.html#peas-engine-set-loaded-plugins" title="peas_engine_set_loaded_plugins ()">peas_engine_set_loaded_plugins</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> **plugin_names</code></em>);
<a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="returnvalue">PeasPluginInfo</span></a> * <a class="link" href="PeasEngine.html#peas-engine-get-plugin-info" title="peas_engine_get_plugin_info ()">peas_engine_get_plugin_info</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *plugin_name</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="PeasEngine.html#peas-engine-load-plugin" title="peas_engine_load_plugin ()">peas_engine_load_plugin</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="PeasEngine.html#peas-engine-unload-plugin" title="peas_engine_unload_plugin ()">peas_engine_unload_plugin</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>);
<span class="returnvalue">void</span> <a class="link" href="PeasEngine.html#peas-engine-garbage-collect" title="peas_engine_garbage_collect ()">peas_engine_garbage_collect</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);
<span class="returnvalue">gboolean</span> <a class="link" href="PeasEngine.html#peas-engine-provides-extension" title="peas_engine_provides_extension ()">peas_engine_provides_extension</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>);
<a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> * <a class="link" href="PeasEngine.html#peas-engine-create-extension" title="peas_engine_create_extension ()">peas_engine_create_extension</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *first_property</code></em>,
<em class="parameter"><code>...</code></em>);
<a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> * <a class="link" href="PeasEngine.html#peas-engine-create-extensionv" title="peas_engine_create_extensionv ()">peas_engine_create_extensionv</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>,
<em class="parameter"><code><span class="type">guint</span> n_parameters</code></em>,
<em class="parameter"><code><span class="type">GParameter</span> *parameters</code></em>);
<a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> * <a class="link" href="PeasEngine.html#peas-engine-create-extension-valist" title="peas_engine_create_extension_valist ()">peas_engine_create_extension_valist</a> (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *first_property</code></em>,
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="PeasEngine.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
GObject
+----PeasEngine
</pre>
</div>
<div class="refsect1">
<a name="PeasEngine.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="PeasEngine.html#PeasEngine--loaded-plugins" title='The "loaded-plugins" property'>loaded-plugins</a>" <span class="type">GStrv</span> : Read / Write
"<a class="link" href="PeasEngine.html#PeasEngine--plugin-list" title='The "plugin-list" property'>plugin-list</a>" <span class="type">gpointer</span> : Read
</pre>
</div>
<div class="refsect1">
<a name="PeasEngine.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="PeasEngine.html#PeasEngine-load-plugin" title='The "load-plugin" signal'>load-plugin</a>" : <code class="literal">Run Last</code>
"<a class="link" href="PeasEngine.html#PeasEngine-unload-plugin" title='The "unload-plugin" signal'>unload-plugin</a>" : <code class="literal">Run Last</code>
</pre>
</div>
<div class="refsect1">
<a name="PeasEngine.description"></a><h2>Description</h2>
<p>
The <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> is the object which manages the plugins.
</p>
<p>
Its role is twofold:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>it will fetch all the information about the available plugins
from all the registered plugin directories;</p></li>
<li class="listitem"><p>it will provide you an API to load, control and unload your
plugins and their extensions from within your application.</p></li>
</ul></div>
<p>
</p>
</div>
<div class="refsect1">
<a name="PeasEngine.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="PeasEngine-struct"></a><h3>struct PeasEngine</h3>
<pre class="programlisting">struct PeasEngine;</pre>
<p>
The <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> structure contains only private data and should only be
accessed using the provided API.
</p>
</div>
<hr>
<div class="refsect2">
<a name="PeasEngineClass"></a><h3>struct PeasEngineClass</h3>
<pre class="programlisting">struct PeasEngineClass {
GObjectClass parent_class;
void (*load_plugin) (PeasEngine *engine,
PeasPluginInfo *info);
void (*unload_plugin) (PeasEngine *engine,
PeasPluginInfo *info);
};
</pre>
<p>
Class structure for <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">GObjectClass</span> <em class="structfield"><code><a name="PeasEngineClass.parent-class"></a>parent_class</code></em>;</span></p></td>
<td>The parent class.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="PeasEngineClass.load-plugin"></a>load_plugin</code></em> ()</span></p></td>
<td>Signal class handler for the <a class="link" href="PeasEngine.html#PeasEngine-load-plugin" title='The "load-plugin" signal'><span class="type">"load-plugin"</span></a> signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="PeasEngineClass.unload-plugin"></a>unload_plugin</code></em> ()</span></p></td>
<td>Signal class handler for the <a class="link" href="PeasEngine.html#PeasEngine-unload-plugin" title='The "unload-plugin" signal'><span class="type">"unload-plugin"</span></a> signal.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-new"></a><h3>peas_engine_new ()</h3>
<pre class="programlisting"><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> * peas_engine_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Return a new instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.
If no default <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> has been instantiated yet,
the first call of this function will set the default
engine as the new instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-get-default"></a><h3>peas_engine_get_default ()</h3>
<pre class="programlisting"><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> * peas_engine_get_default (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Return the existing instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> or a subclass of it.
If no <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> subclass has been instantiated yet, the first call
of this function will return a new instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the existing instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-add-search-path"></a><h3>peas_engine_add_search_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> peas_engine_add_search_path (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *module_dir</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *data_dir</code></em>);</pre>
<p>
This function appends a search path to the list of paths where to
look for plugins.
</p>
<p>
A so-called "search path" actually consists of both a
module directory (where the shared libraries or language modules
lie) and a data directory (where the plugin data is).
</p>
<p>
The plugin will be able to use a correct data dir depending on
where it is installed, hence allowing to keep the plugin agnostic
when it comes to installation location: the same plugin can be
installed either in the system path or in the user's home directory,
without taking other special care than using
<a class="link" href="PeasPluginInfo.html#peas-plugin-info-get-data-dir" title="peas_plugin_info_get_data_dir ()"><code class="function">peas_plugin_info_get_data_dir()</code></a> when looking for its data files.
</p>
<p>
If <em class="parameter"><code>data_dir</code></em> is <code class="literal">NULL</code>, then it is set to the same value as
<em class="parameter"><code>module_dir</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>module_dir</code></em> :</span></p></td>
<td>the plugin module directory.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data_dir</code></em> :</span></p></td>
<td>the plugin data directory. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-enable-loader"></a><h3>peas_engine_enable_loader ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> peas_engine_enable_loader (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *loader_id</code></em>);</pre>
<p>
Enable a loader, enables a loader for plugins.
The C plugin loader is always enabled.
</p>
<p>
For instance, the following code will enable python plugin
from being loaded:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="PeasEngine.html#peas-engine-enable-loader">peas_engine_enable_loader</a></span> <span class="gtkdoc opt">(</span>engine<span class="gtkdoc opt">,</span> <span class="string">"python"</span><span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<p>
Note: plugin loaders are shared across <a href="PeasEngine.html"><span class="type">PeasEngines</span></a> so enabling
a loader on one <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> will enable it on all <a href="PeasEngine.html"><span class="type">PeasEngines</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>loader_id</code></em> :</span></p></td>
<td>The id of the loader to enable.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-rescan-plugins"></a><h3>peas_engine_rescan_plugins ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> peas_engine_rescan_plugins (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);</pre>
<p>
Rescan all the registered directories to find new or updated plugins.
</p>
<p>
Calling this function will make the newly installed plugin infos
be loaded by the engine, so the new plugins can be used without
restarting the application.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-get-plugin-list"></a><h3>peas_engine_get_plugin_list ()</h3>
<pre class="programlisting">const <span class="returnvalue">GList</span> * peas_engine_get_plugin_list (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);</pre>
<p>
Returns the list of <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> known to the engine.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a <span class="type">GList</span> of
<a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>. Note that the list belongs to the engine and should
not be freed. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> Peas.PluginInfo]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-get-loaded-plugins"></a><h3>peas_engine_get_loaded_plugins ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> ** peas_engine_get_loaded_plugins (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);</pre>
<p>
Returns the list of the names of all the loaded plugins, or an array
containing a single <code class="literal">NULL</code> element if there is no plugin currently loaded.
</p>
<p>
Please note that the returned array is a newly allocated one: you will need
to free it using <code class="function">g_strfreev()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly-allocated
<code class="literal">NULL</code>-terminated array of strings. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-set-loaded-plugins"></a><h3>peas_engine_set_loaded_plugins ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> peas_engine_set_loaded_plugins (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> **plugin_names</code></em>);</pre>
<p>
Sets the list of loaded plugins for <em class="parameter"><code>engine</code></em>. When this function is called,
the <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> will load all the plugins whose names are in <em class="parameter"><code>plugin_names</code></em>,
and ensures all other active plugins are unloaded.
</p>
<p>
If <em class="parameter"><code>plugin_names</code></em> is <code class="literal">NULL</code>, all plugins will be unloaded.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin_names</code></em> :</span></p></td>
<td>A <code class="literal">NULL</code>-terminated
array of plugin names, or <code class="literal">NULL</code>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> zero-terminated=1]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-get-plugin-info"></a><h3>peas_engine_get_plugin_info ()</h3>
<pre class="programlisting"><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="returnvalue">PeasPluginInfo</span></a> * peas_engine_get_plugin_info (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *plugin_name</code></em>);</pre>
<p>
Gets the <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> corresponding with <em class="parameter"><code>plugin_name</code></em>,
or <code class="literal">NULL</code> if <em class="parameter"><code>plugin_name</code></em> was not found.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin_name</code></em> :</span></p></td>
<td>A plugin name.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> corresponding with
a given plugin module name. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-load-plugin"></a><h3>peas_engine_load_plugin ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> peas_engine_load_plugin (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>);</pre>
<p>
Loads the plugin corresponding to <em class="parameter"><code>info</code></em> if it's not currently loaded.
Emits the "load-plugin" signal; loading the plugin
actually occurs in the default signal handler.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether the plugin has been successfully loaded.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-unload-plugin"></a><h3>peas_engine_unload_plugin ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> peas_engine_unload_plugin (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>);</pre>
<p>
Unloads the plugin corresponding to <em class="parameter"><code>info</code></em>.
Emits the "unload-plugin" signal; unloading the plugin
actually occurs in the default signal handler.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>whether the plugin has been successfully unloaded.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-garbage-collect"></a><h3>peas_engine_garbage_collect ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> peas_engine_garbage_collect (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>);</pre>
<p>
This function triggers garbage collection on all the loaders currently
owned by the <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>. This can be used to force the loaders to destroy
managed objects that still hold references to objects that are about to
disappear.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-provides-extension"></a><h3>peas_engine_provides_extension ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span> peas_engine_provides_extension (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>);</pre>
<p>
Returns if <em class="parameter"><code>info</code></em> provides an extension for <em class="parameter"><code>extension_type</code></em>.
If the <em class="parameter"><code>info</code></em> is not loaded than <code class="literal">FALSE</code> will always be returned.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extension_type</code></em> :</span></p></td>
<td>The extension <span class="type">GType</span>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>if <em class="parameter"><code>info</code></em> provides an extension for <em class="parameter"><code>extension_type</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-create-extension"></a><h3>peas_engine_create_extension ()</h3>
<pre class="programlisting"><a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> * peas_engine_create_extension (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *first_property</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>
If the plugin identified by <em class="parameter"><code>info</code></em> implements the <em class="parameter"><code>extension_type</code></em> interface,
then this function will return a new instance of this implementation,
wrapped in a new <a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="type">PeasExtension</span></a> instance. Otherwise, it will return <code class="literal">NULL</code>.
</p>
<p>
When creating the new instance of the <em class="parameter"><code>extension_type</code></em> subtype, the
provided construct properties will be passed to the extension construction
handler (exactly like if you had called <code class="function">g_object_new()</code> yourself).
</p>
<p>
The new extension instance produced by this function will always be
returned wrapped in a <a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="type">PeasExtension</span></a> proxy, following the current libpeas
principle of never giving you the actual object (also because it might as
well *not* be an actual object).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A loaded <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extension_type</code></em> :</span></p></td>
<td>The implemented extension <span class="type">GType</span>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property</code></em> :</span></p></td>
<td>the name of the first property.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>the value of the first property, followed optionally by more
name/value pairs, followed by <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new instance of <a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="type">PeasExtension</span></a> wrapping
the <em class="parameter"><code>extension_type</code></em> instance, or <code class="literal">NULL</code>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-create-extensionv"></a><h3>peas_engine_create_extensionv ()</h3>
<pre class="programlisting"><a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> * peas_engine_create_extensionv (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>,
<em class="parameter"><code><span class="type">guint</span> n_parameters</code></em>,
<em class="parameter"><code><span class="type">GParameter</span> *parameters</code></em>);</pre>
<p>
If the plugin identified by <em class="parameter"><code>info</code></em> implements the <em class="parameter"><code>extension_type</code></em> interface,
then this function will return a new instance of this implementation,
wrapped in a new <a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="type">PeasExtension</span></a> instance. Otherwise, it will return <code class="literal">NULL</code>.
</p>
<p>
See <a class="link" href="PeasEngine.html#peas-engine-create-extension" title="peas_engine_create_extension ()"><code class="function">peas_engine_create_extension()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A loaded <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extension_type</code></em> :</span></p></td>
<td>The implemented extension <span class="type">GType</span>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_parameters</code></em> :</span></p></td>
<td>the length of the <em class="parameter"><code>parameters</code></em> array.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parameters</code></em> :</span></p></td>
<td>an array of <span class="type">GParameter</span>. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=n_parameters]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new instance of <a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="type">PeasExtension</span></a> wrapping
the <em class="parameter"><code>extension_type</code></em> instance, or <code class="literal">NULL</code>.
Rename to: peas_engine_create_extension. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-create-extension-valist"></a><h3>peas_engine_create_extension_valist ()</h3>
<pre class="programlisting"><a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> * peas_engine_create_extension_valist (<em class="parameter"><code><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine</code></em>,
<em class="parameter"><code><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info</code></em>,
<em class="parameter"><code><span class="type">GType</span> extension_type</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *first_property</code></em>,
<em class="parameter"><code><span class="type">va_list</span> var_args</code></em>);</pre>
<p>
If the plugin identified by <em class="parameter"><code>info</code></em> implements the <em class="parameter"><code>extension_type</code></em> interface,
then this function will return a new instance of this implementation,
wrapped in a new <a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="type">PeasExtension</span></a> instance. Otherwise, it will return <code class="literal">NULL</code>.
</p>
<p>
See <a class="link" href="PeasEngine.html#peas-engine-create-extension" title="peas_engine_create_extension ()"><code class="function">peas_engine_create_extension()</code></a> for more information.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A loaded <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>extension_type</code></em> :</span></p></td>
<td>The implemented extension <span class="type">GType</span>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property</code></em> :</span></p></td>
<td>the name of the first property.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>var_args</code></em> :</span></p></td>
<td>the value of the first property, followed optionally by more
name/value pairs, followed by <code class="literal">NULL</code>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new instance of <a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="type">PeasExtension</span></a> wrapping
the <em class="parameter"><code>extension_type</code></em> instance, or <code class="literal">NULL</code>.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="PeasEngine.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="PeasEngine--loaded-plugins"></a><h3>The <code class="literal">"loaded-plugins"</code> property</h3>
<pre class="programlisting"> "loaded-plugins" <span class="type">GStrv</span> : Read / Write</pre>
<p>
The list of loaded plugins.
</p>
<p>
This will be modified when <a class="link" href="PeasEngine.html#peas-engine-load-plugin" title="peas_engine_load_plugin ()"><code class="function">peas_engine_load_plugin()</code></a> or
<a class="link" href="PeasEngine.html#peas-engine-unload-plugin" title="peas_engine_unload_plugin ()"><code class="function">peas_engine_unload_plugin()</code></a> is called.
</p>
<p>
This can be used with GSettings to save the loaded plugins by binding
to this property after instantiating the engine by doing:
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function">g_settings_bind</span> <span class="gtkdoc opt">(</span>gsettings_object<span class="gtkdoc opt">,</span>
LOADED_PLUGINS_KEY<span class="gtkdoc opt">,</span>
engine<span class="gtkdoc opt">,</span>
<span class="string">"loaded-plugins"</span><span class="gtkdoc opt">,</span>
G_SETTINGS_BIND_DEFAULT<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<p>
Note: notify will not be called when the engine is being destroyed.
</p>
</div>
<hr>
<div class="refsect2">
<a name="PeasEngine--plugin-list"></a><h3>The <code class="literal">"plugin-list"</code> property</h3>
<pre class="programlisting"> "plugin-list" <span class="type">gpointer</span> : Read</pre>
<p>
The list of found plugins.
</p>
<p>
This will be modified when <a class="link" href="PeasEngine.html#peas-engine-rescan-plugins" title="peas_engine_rescan_plugins ()"><code class="function">peas_engine_rescan_plugins()</code></a> is called.
</p>
<p>
Note that the list belongs to the engine and should not be modified
or freed.
</p>
</div>
</div>
<div class="refsect1">
<a name="PeasEngine.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="PeasEngine-load-plugin"></a><h3>The <code class="literal">"load-plugin"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine,
<a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info,
<span class="type">gpointer</span> user_data) : <code class="literal">Run Last</code></pre>
<p>
The load-plugin signal is emitted when a plugin is being loaded.
</p>
<p>
The plugin is being loaded in the default handler. Hence, if you want to
perform some action before the plugin is loaded, you should use
<code class="function">g_signal_connect()</code>, but if you want to perform some action *after* the
plugin is loaded (the most common case), you should use
<code class="function">g_signal_connect_after()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="PeasEngine-unload-plugin"></a><h3>The <code class="literal">"unload-plugin"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> *engine,
<a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> *info,
<span class="type">gpointer</span> user_data) : <code class="literal">Run Last</code></pre>
<p>
The unload-plugin signal is emitted when a plugin is being unloaded.
</p>
<p>
The plugin is being unloaded in the default handler. Hence, if you want
to perform some action before the plugin is unloaded (the most common
case), you should use <code class="function">g_signal_connect()</code>, but if you want to perform some
action after the plugin is unloaded (the most common case), you should
use <code class="function">g_signal_connect_after()</code>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>engine</code></em> :</span></p></td>
<td>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>info</code></em> :</span></p></td>
<td>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="PeasEngine.see-also"></a><h2>See Also</h2>
<a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18.1</div>
</body>
</html>
|