/usr/share/gtk-doc/html/libpeas/PeasEngine.html is in libpeas-doc 1.22.0-2.
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 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 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 | <!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: Peas Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.79.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.25 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#PeasEngine.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#PeasEngine.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#PeasEngine.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#PeasEngine.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="PeasPluginInfo.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></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 class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="PeasEngine.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-new" title="peas_engine_new ()">peas_engine_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-new-with-nonglobal-loaders" title="peas_engine_new_with_nonglobal_loaders ()">peas_engine_new_with_nonglobal_loaders</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-get-default" title="peas_engine_get_default ()">peas_engine_get_default</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-add-search-path" title="peas_engine_add_search_path ()">peas_engine_add_search_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-prepend-search-path" title="peas_engine_prepend_search_path ()">peas_engine_prepend_search_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-enable-loader" title="peas_engine_enable_loader ()">peas_engine_enable_loader</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-rescan-plugins" title="peas_engine_rescan_plugins ()">peas_engine_rescan_plugins</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-get-plugin-list" title="peas_engine_get_plugin_list ()">peas_engine_get_plugin_list</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> **
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-get-loaded-plugins" title="peas_engine_get_loaded_plugins ()">peas_engine_get_loaded_plugins</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-set-loaded-plugins" title="peas_engine_set_loaded_plugins ()">peas_engine_set_loaded_plugins</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="returnvalue">PeasPluginInfo</span></a> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-get-plugin-info" title="peas_engine_get_plugin_info ()">peas_engine_get_plugin_info</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-load-plugin" title="peas_engine_load_plugin ()">peas_engine_load_plugin</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-unload-plugin" title="peas_engine_unload_plugin ()">peas_engine_unload_plugin</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-garbage-collect" title="peas_engine_garbage_collect ()">peas_engine_garbage_collect</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-provides-extension" title="peas_engine_provides_extension ()">peas_engine_provides_extension</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-create-extension" title="peas_engine_create_extension ()">peas_engine_create_extension</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-create-extensionv" title="peas_engine_create_extensionv ()">peas_engine_create_extensionv</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libpeas-PeasExtension.html#PeasExtension" title="PeasExtension"><span class="returnvalue">PeasExtension</span></a> *
</td>
<td class="function_name">
<a class="link" href="PeasEngine.html#peas-engine-create-extension-valist" title="peas_engine_create_extension_valist ()">peas_engine_create_extension_valist</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PeasEngine.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type"><span class="type">GStrv</span></td>
<td class="property_name"><a class="link" href="PeasEngine.html#PeasEngine--loaded-plugins" title="The “loaded-plugins” property">loaded-plugins</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="PeasEngine.html#PeasEngine--nonglobal-loaders" title="The “nonglobal-loaders” property">nonglobal-loaders</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><span class="type">gpointer</span></td>
<td class="property_name"><a class="link" href="PeasEngine.html#PeasEngine--plugin-list" title="The “plugin-list” property">plugin-list</a></td>
<td class="property_flags">Read</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PeasEngine.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signals_return">
<col width="300px" class="signals_name">
<col width="200px" class="signals_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="PeasEngine.html#PeasEngine-load-plugin" title="The “load-plugin” signal">load-plugin</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="PeasEngine.html#PeasEngine-unload-plugin" title="The “unload-plugin” signal">unload-plugin</a></td>
<td class="signal_flags">Run Last</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PeasEngine.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="PeasEngine.html#PeasEngine-struct" title="struct PeasEngine">PeasEngine</a></td>
</tr>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="PeasEngine.html#PeasEngineClass" title="struct PeasEngineClass">PeasEngineClass</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="PeasEngine.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> PeasEngine
</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" style="list-style-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>Since libpeas 1.22, <em class="parameter"><code>extension_type</code></em>
can be an Abstract <span class="type">GType</span>
and not just an Interface <span class="type">GType</span>.</p>
</div>
<div class="refsect1">
<a name="PeasEngine.functions_details"></a><h2>Functions</h2>
<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="refsect3">
<a name="peas-engine-new.returns"></a><h4>Returns</h4>
<p> a new instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-new-with-nonglobal-loaders"></a><h3>peas_engine_new_with_nonglobal_loaders ()</h3>
<pre class="programlisting"><a class="link" href="PeasEngine.html" title="PeasEngine"><span class="returnvalue">PeasEngine</span></a> *
peas_engine_new_with_nonglobal_loaders
(<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> which will use non-global
plugin loaders instead of the default global ones. This allows
multiple threads to each have a <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> and be used without
internal locking.</p>
<p>Note: due to CPython's GIL the python and python3
plugin loaders are always global.</p>
<div class="refsect3">
<a name="peas-engine-new-with-nonglobal-loaders.returns"></a><h4>Returns</h4>
<p> a new instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a> that uses non-global loaders.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-1-14.html#api-index-1.14">1.14</a></p>
</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>
<p>Note: this function should never be used when multiple threads are
using libpeas API as it is not thread-safe.</p>
<div class="refsect3">
<a name="peas-engine-get-default.returns"></a><h4>Returns</h4>
<p> the existing instance of <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</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="refsect3">
<a name="peas-engine-add-search-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>module_dir</p></td>
<td class="parameter_description"><p>the plugin module directory.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data_dir</p></td>
<td class="parameter_description"><p> the plugin data directory. </p></td>
<td class="parameter_annotations"><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>
</div>
<hr>
<div class="refsect2">
<a name="peas-engine-prepend-search-path"></a><h3>peas_engine_prepend_search_path ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
peas_engine_prepend_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 prepends a search path to the list of paths where to
look for plugins.</p>
<p>See Also: <a class="link" href="PeasEngine.html#peas-engine-add-search-path" title="peas_engine_add_search_path ()"><code class="function">peas_engine_add_search_path()</code></a></p>
<div class="refsect3">
<a name="peas-engine-prepend-search-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>module_dir</p></td>
<td class="parameter_description"><p>the plugin module directory.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>data_dir</p></td>
<td class="parameter_description"><p> the plugin data directory. </p></td>
<td class="parameter_annotations"><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>
<p class="since">Since: <a class="link" href="api-index-1-6.html#api-index-1.6">1.6</a></p>
</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_name</code></em>);</pre>
<p>Enable a loader, enables a loader for plugins.
The C plugin loader is always enabled. The other plugin
loaders are: lua5.1, python and python3.</p>
<p>For instance, the following code will enable Python 2 plugins
to be 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 used to be shared across <a href="PeasEngine.html#PeasEngine-struct"><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> would enable it on all <a href="PeasEngine.html#PeasEngine-struct"><span class="type">PeasEngines</span></a>.
This behavior has been kept to avoid breaking applications,
however a warning has been added to help applications transition.</p>
<div class="refsect3">
<a name="peas-engine-enable-loader.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>loader_name</p></td>
<td class="parameter_description"><p>The name of the loader to enable.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</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="refsect3">
<a name="peas-engine-rescan-plugins.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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="refsect3">
<a name="peas-engine-get-plugin-list.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-get-plugin-list.returns"></a><h4>Returns</h4>
<p> 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. </p>
<p><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></p>
</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="refsect3">
<a name="peas-engine-get-loaded-plugins.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-get-loaded-plugins.returns"></a><h4>Returns</h4>
<p> A newly-allocated
<code class="literal">NULL</code>-terminated array of strings. </p>
<p><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></p>
</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="refsect3">
<a name="peas-engine-set-loaded-plugins.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>plugin_names</p></td>
<td class="parameter_description"><p> A <code class="literal">NULL</code>-terminated
array of plugin names, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><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>
</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="refsect3">
<a name="peas-engine-get-plugin-info.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>plugin_name</p></td>
<td class="parameter_description"><p>A plugin name.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-get-plugin-info.returns"></a><h4>Returns</h4>
<p> the <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a> corresponding with
a given plugin module name. </p>
<p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</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="refsect3">
<a name="peas-engine-load-plugin.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-load-plugin.returns"></a><h4>Returns</h4>
<p> whether the plugin has been successfully loaded.</p>
</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="refsect3">
<a name="peas-engine-unload-plugin.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-unload-plugin.returns"></a><h4>Returns</h4>
<p> whether the plugin has been successfully unloaded.</p>
</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="refsect3">
<a name="peas-engine-garbage-collect.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</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>
<p>Since libpeas 1.22, <em class="parameter"><code>extension_type</code></em>
can be an Abstract <span class="type">GType</span>
and not just an Interface <span class="type">GType</span>.</p>
<div class="refsect3">
<a name="peas-engine-provides-extension.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>extension_type</p></td>
<td class="parameter_description"><p>The extension <span class="type">GType</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-provides-extension.returns"></a><h4>Returns</h4>
<p> if <em class="parameter"><code>info</code></em>
provides an extension for <em class="parameter"><code>extension_type</code></em>
.</p>
</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>
,
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>
<p>Since libpeas 1.22, <em class="parameter"><code>extension_type</code></em>
can be an Abstract <span class="type">GType</span>
and not just an Interface <span class="type">GType</span>.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="peas-engine-create-extension.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A loaded <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>extension_type</p></td>
<td class="parameter_description"><p>The implemented extension <span class="type">GType</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_property</p></td>
<td class="parameter_description"><p>the name of the first property.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>the value of the first property, followed optionally by more
name/value pairs, followed by <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-create-extension.returns"></a><h4>Returns</h4>
<p> 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>.</p>
</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>
,
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>Since libpeas 1.22, <em class="parameter"><code>extension_type</code></em>
can be an Abstract <span class="type">GType</span>
and not just an Interface <span class="type">GType</span>.</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>
<p><span class="annotation">[<acronym title="Rename the original symbol's name to SYMBOL."><span class="acronym">rename-to</span></acronym> peas_engine_create_extension]</span></p>
<div class="refsect3">
<a name="peas-engine-create-extensionv.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A loaded <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>extension_type</p></td>
<td class="parameter_description"><p>The implemented extension <span class="type">GType</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n_parameters</p></td>
<td class="parameter_description"><p>the length of the <em class="parameter"><code>parameters</code></em>
array.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>parameters</p></td>
<td class="parameter_description"><p> an array of <span class="type">GParameter</span>. </p></td>
<td class="parameter_annotations"><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>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-create-extensionv.returns"></a><h4>Returns</h4>
<p> 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>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</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>
,
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>Since libpeas 1.22, <em class="parameter"><code>extension_type</code></em>
can be an Abstract <span class="type">GType</span>
and not just an Interface <span class="type">GType</span>.</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>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="peas-engine-create-extension-valist.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A loaded <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>extension_type</p></td>
<td class="parameter_description"><p>The implemented extension <span class="type">GType</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_property</p></td>
<td class="parameter_description"><p>the name of the first property.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>var_args</p></td>
<td class="parameter_description"><p>the value of the first property, followed optionally by more
name/value pairs, followed by <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="peas-engine-create-extension-valist.returns"></a><h4>Returns</h4>
<p> 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>.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="PeasEngine.other_details"></a><h2>Types and Values</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="refsect3">
<a name="PeasEngineClass.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="struct_members_name">
<col class="struct_members_description">
<col width="200px" class="struct_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="PeasEngineClass.load-plugin"></a>load_plugin</code></em> ()</p></td>
<td class="struct_member_description"><p>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.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
<tr>
<td class="struct_member_name"><p><em class="structfield"><code><a name="PeasEngineClass.unload-plugin"></a>unload_plugin</code></em> ()</p></td>
<td class="struct_member_description"><p>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.</p></td>
<td class="struct_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</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></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>
<p>Flags: Read / Write</p>
</div>
<hr>
<div class="refsect2">
<a name="PeasEngine--nonglobal-loaders"></a><h3>The <code class="literal">“nonglobal-loaders”</code> property</h3>
<pre class="programlisting"> “nonglobal-loaders” <span class="type">gboolean</span></pre>
<p>If non-global plugin loaders should be used.</p>
<p>See <a class="link" href="PeasEngine.html#peas-engine-new-with-nonglobal-loaders" title="peas_engine_new_with_nonglobal_loaders ()"><code class="function">peas_engine_new_with_nonglobal_loaders()</code></a> for more information.</p>
<p>Flags: Read / Write / Construct Only</p>
<p>Default value: FALSE</p>
<p class="since">Since: <a class="link" href="api-index-1-14.html#api-index-1.14">1.14</a></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></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: the list belongs to the engine and should not be modified or freed.</p>
<p>Flags: Read</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)</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="refsect3">
<a name="PeasEngine-load-plugin.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
</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)</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="refsect3">
<a name="PeasEngine-unload-plugin.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>engine</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasEngine.html" title="PeasEngine"><span class="type">PeasEngine</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>info</p></td>
<td class="parameter_description"><p>A <a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
</div>
</div>
<div class="refsect1">
<a name="PeasEngine.see-also"></a><h2>See Also</h2>
<p><a class="link" href="PeasPluginInfo.html" title="PeasPluginInfo"><span class="type">PeasPluginInfo</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.25</div>
</body>
</html>
|