/usr/share/gtk-doc/html/libanjuta/AnjutaPlugin.html is in libanjuta-dev 2:3.22.0-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Anjuta Developers Reference Manual: AnjutaPlugin</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Anjuta Developers Reference Manual">
<link rel="up" href="libanjuta-api.html" title="libanjuta API">
<link rel="prev" href="AnjutaStatus.html" title="AnjutaStatus">
<link rel="next" href="AnjutaPluginDescription.html" title="AnjutaPluginDescription">
<meta name="generator" content="GTK-Doc V1.21 (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="#AnjutaPlugin.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#AnjutaPlugin.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span>
<a href="#AnjutaPlugin.properties" class="shortcut">Properties</a></span><span id="nav_signals"> <span class="dim">|</span>
<a href="#AnjutaPlugin.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="libanjuta-api.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="AnjutaStatus.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="AnjutaPluginDescription.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="AnjutaPlugin"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="AnjutaPlugin.top_of_page"></a>AnjutaPlugin</span></h2>
<p>AnjutaPlugin — Anjuta plugin base class from which all plugins are
derived.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="AnjutaPlugin.stability-level"></a><h2>Stability Level</h2>
<a href="http://foldoc.org/Unstable"><span class="acronym">Unstable</span></a>, unless otherwise indicated
</div>
<div class="refsect1">
<a name="AnjutaPlugin.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="AnjutaPlugin.html#AnjutaPluginValueAdded" title="AnjutaPluginValueAdded ()">*AnjutaPluginValueAdded</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="AnjutaPlugin.html#AnjutaPluginValueRemoved" title="AnjutaPluginValueRemoved ()">*AnjutaPluginValueRemoved</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#anjuta-plugin-activate" title="anjuta_plugin_activate ()">anjuta_plugin_activate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#anjuta-plugin-deactivate" title="anjuta_plugin_deactivate ()">anjuta_plugin_deactivate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#anjuta-plugin-is-active" title="anjuta_plugin_is_active ()">anjuta_plugin_is_active</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()">anjuta_plugin_add_watch</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="AnjutaPlugin.html#anjuta-plugin-remove-watch" title="anjuta_plugin_remove_watch ()">anjuta_plugin_remove_watch</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="AnjutaShell.html" title="AnjutaShell"><span class="returnvalue">AnjutaShell</span></a> *
</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#anjuta-plugin-get-shell" title="anjuta_plugin_get_shell ()">anjuta_plugin_get_shell</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-BEGIN:CAPS" title="ANJUTA_PLUGIN_BEGIN()">ANJUTA_PLUGIN_BEGIN</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-ADD-INTERFACE:CAPS" title="ANJUTA_PLUGIN_ADD_INTERFACE()">ANJUTA_PLUGIN_ADD_INTERFACE</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-BOILERPLATE:CAPS" title="ANJUTA_PLUGIN_BOILERPLATE()">ANJUTA_PLUGIN_BOILERPLATE</a><span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.properties"></a><h2>Properties</h2>
<div class="informaltable"><table 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">
<a class="link" href="AnjutaShell.html" title="AnjutaShell"><span class="type">AnjutaShell</span></a> *</td>
<td class="property_name"><a class="link" href="AnjutaPlugin.html#AnjutaPlugin--shell" title="The “shell” property">shell</a></td>
<td class="property_flags">Read / Write / Construct</td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.signals"></a><h2>Signals</h2>
<div class="informaltable"><table 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="AnjutaPlugin.html#AnjutaPlugin-activated" title="The “activated” signal">activated</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="AnjutaPlugin.html#AnjutaPlugin-deactivated" title="The “deactivated” signal">deactivated</a></td>
<td class="signal_flags"><a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="typedef_keyword">typedef</td>
<td class="function_name"><a class="link" href="AnjutaPlugin.html#AnjutaGluePlugin" title="AnjutaGluePlugin">AnjutaGluePlugin</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-END:CAPS" title="ANJUTA_PLUGIN_END">ANJUTA_PLUGIN_END</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
<span class="lineart">╰──</span> AnjutaPlugin
</pre>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <libanjuta/anjuta-plugin.h>
</pre>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.description"></a><h2>Description</h2>
<p>Anjuta plugins are components which are loaded in Anjuta IDE shell
either on startup or on demand to perform various subtasks. Plugins are
specialized in doing only a very specific task and can let other plugins
interract with it using interfaces.</p>
<p>A plugin class is derived from <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> class and will be used by
shell to instanciate any number of plugin objects.</p>
<p>When a plugin class is derived from <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a>, the virtual mehtods
<span class="emphasis"><em>activate</em></span> and <span class="emphasis"><em>deactivate</em></span> must
be implemented. The <span class="emphasis"><em>activate</em></span> method is used to
activate the plugin. Note that plugin activation is different from plugin
instance initialization. Instance initialization is use to do internal
initialization, while <span class="emphasis"><em>activate</em></span> method is used to
setup the plugin in shell, UI and preferences. Other plugins can also
be queried in <span class="emphasis"><em>activate</em></span> method.</p>
<p>Following things should be done in <span class="emphasis"><em>activate</em></span> method.</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem"><p>
Register UI Actions: Use <a class="link" href="AnjutaUI.html#anjuta-ui-add-action-group-entries" title="anjuta_ui_add_action_group_entries ()"><code class="function">anjuta_ui_add_action_group_entries()</code></a> or
<a class="link" href="AnjutaUI.html#anjuta-ui-add-toggle-action-group-entries" title="anjuta_ui_add_toggle_action_group_entries ()"><code class="function">anjuta_ui_add_toggle_action_group_entries()</code></a> to add your action
groups.
</p></li>
<li class="listitem"><p>
Merge UI definition file: Use <a class="link" href="AnjutaUI.html#anjuta-ui-merge" title="anjuta_ui_merge ()"><code class="function">anjuta_ui_merge()</code></a> to merge a UI
file. See <a class="link" href="AnjutaUI.html" title="AnjutaUI"><span class="type">AnjutaUI</span></a> for more detail.
</p></li>
<li class="listitem"><p>
Add widgets to Anjuta Shell: If the plugin has one or more
widgets as its User Interface, they can be added with
<a class="link" href="AnjutaShell.html#anjuta-shell-add-widget" title="anjuta_shell_add_widget ()"><code class="function">anjuta_shell_add_widget()</code></a>.
</p></li>
<li class="listitem"><p>
Setup value watches with <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a>.
</p></li>
</ol></div>
<p><span class="emphasis"><em>deactivate</em></span> method undos all the above. That is, it
removes widgets from the shell, unmerges UI and removes the action groups.</p>
<p>Plugins interact with each other using interfaces. A plugin can expose an
interface which will let other plugins find it. Any number of interfaces can
be exposed by a plugin. These exposed interfaces are called
<span class="emphasis"><em>Primary</em></span> interfaces of the plugin. The condition for
the interfaces to be primary is that they should be independent (i.e.
an external entity requesting to use a primary interface should not require
other primary interfaces). For example, an editor plugin can implement
<a class="link" href="IAnjutaEditor.html" title="IAnjutaEditor"><span class="type">IAnjutaEditor</span></a>, <a class="link" href="IAnjutaStream.html" title="IAnjutaStream"><span class="type">IAnjutaStream</span></a> and <a class="link" href="IAnjutaFile.html" title="IAnjutaFile"><span class="type">IAnjutaFile</span></a> interfaces and expose them
as primary interfaces, because they are independent.
<span class="emphasis"><em>Primary</em></span> interfaces exposed by a plugin are exported in
its plugin meta-data file, so that plugin manager could register them.</p>
<p>Any other interfaces implemented by the plugin are called
<span class="emphasis"><em>Secondary</em></span> interfaces and they generally depend on
one or more primary interfaces.
For example, <a class="link" href="IAnjutaEditor.html" title="IAnjutaEditor"><span class="type">IAnjutaEditor</span></a> is the primary interface of anjuta-editor plugin,
but it also implements secondary interfaces <span class="type">IAnjutaEditorGutter</span> and
<span class="type">IAnjutaEditorBuffer</span>. Notice that secondary interfaces <span class="type">IAnjutaEditorGutter</span>
and <span class="type">IAnjutaEditorBuffer</span> depend on <a class="link" href="IAnjutaEditor.html" title="IAnjutaEditor"><span class="type">IAnjutaEditor</span></a> interface.</p>
<p>The purpose of distinguishing between primary and
secondary interfaces is only at plugin level. At code level, they behave
just the same and there is no difference.
So, a natural sequence for a plugin to communicate with another plugin is:</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
<p>
Query the shell for a plugin implemeting the primary interface
using <a class="link" href="AnjutaShell.html#anjuta-shell-get-interface" title="anjuta_shell_get_interface()"><code class="function">anjuta_shell_get_interface()</code></a>. It will return an
implemetation of the interface (or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if not found).
Do not save this object for longer use, because the implementor
plugin can change anytime and a different plugin implementing
the same primary interface may be activated.
</p>
<pre class="programlisting">
GError *err = NULL;
IAnjutaDocumentManager *docman;
IAnjutaEditor *editor;
docman = anjuta_shell_get_interface (ANJUTA_PLUGIN(plugin)->shell,
IAnjutaDocumentManager, &err);
if (err)
{
g_warning ("Error encountered: %s", err->message);
g_error_free (err);
return;
}
editor = ianjuta_document_manager_get_current_editor (docman, &err);
if (err)
{
g_warning ("Error encountered: %s", err->message);
g_error_free (err);
return;
}
ianjuta_editor_goto_line (editor, 200);
...
</pre>
<p>
</p>
</li>
<li class="listitem">
<p>
A primary interface of a plugin can be directly used, but
to use a secondary interface, make sure to check if the plugin
object implements it. For example, to check if editor plugin
implements IAnjutaEditorGutter interface, do something like:
</p>
<pre class="programlisting">
if (IANJUTA_IS_EDITOR_GUTTER(editor))
{
ianjuta_editor_gutter_set_marker(IANJUTA_EDITOR_GUTTER (editor),
ANJUTA_EDITOR_MARKER_1,
line_number, &err);
}
</pre>
<p>
</p>
</li>
</ol></div>
<p>Plugins can also communicate with outside using Shell's <span class="emphasis"><em>Values
System</em></span>. Values are objects exported by plugins to make them
available to other plugins. Read <a class="link" href="AnjutaShell.html" title="AnjutaShell"><span class="type">AnjutaShell</span></a> documentation for more
detail on <span class="emphasis"><em>Values System</em></span>. A plugin can set up watches
with <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a> to get notifications for values exported
by other plugins.</p>
<p>Values are very unreliable way of passing objects between plugins, but are
nevertheless very useful (and quicker to code). It must be used with care.
As a rule of thumb, a plugin should only watch values of other trusted
plugins. For example, a group of plugins forming a subsystem can comfortably
use values to pass objects and notifications. Use <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a>
and <a class="link" href="AnjutaPlugin.html#anjuta-plugin-remove-watch" title="anjuta_plugin_remove_watch ()"><code class="function">anjuta_plugin_remove_watch()</code></a> to add or remove value watches.</p>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="AnjutaPluginValueAdded"></a><h3>AnjutaPluginValueAdded ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*AnjutaPluginValueAdded<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>The callback to pass to <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a>. When a <em class="parameter"><code>name</code></em>
value
is added to shell by another plugin, this callback will be called.</p>
<div class="refsect3">
<a name="id-1.6.7.11.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>The <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> based plugin</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>name of value being added.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>value of value being added.</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 during <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="AnjutaPluginValueRemoved"></a><h3>AnjutaPluginValueRemoved ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
<span class="c_punctuation">(</span>*AnjutaPluginValueRemoved<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *name</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>The callback to pass to <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a>. When the <em class="parameter"><code>name</code></em>
value
is removed from the shell (by the plugin exporting this value), this
callback will be called.</p>
<div class="refsect3">
<a name="id-1.6.7.11.3.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>The <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> based plugin</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>name of value being added.</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 during <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-activate"></a><h3>anjuta_plugin_activate ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
anjuta_plugin_activate (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);</pre>
<p>Activates the plugin by calling <code class="function">activate()</code> virtual method. All plugins
should derive their classes from this virtual class and implement this
method.
If the plugin implements IAnjutaPreferences, it is prompted to install
it's preferences.</p>
<div class="refsect3">
<a name="id-1.6.7.11.4.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.6.7.11.4.6"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if sucessfully activated, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-deactivate"></a><h3>anjuta_plugin_deactivate ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
anjuta_plugin_deactivate (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);</pre>
<p>Deactivates the plugin by calling <code class="function">deactivate()</code> virtual method. All plugins
should derive their classes from this virtual class and implement this
method.</p>
<div class="refsect3">
<a name="id-1.6.7.11.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.6.7.11.5.6"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if sucessfully activated, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-is-active"></a><h3>anjuta_plugin_is_active ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
anjuta_plugin_is_active (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);</pre>
<p>Returns <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the plugin has been activated.</p>
<div class="refsect3">
<a name="id-1.6.7.11.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.6.7.11.6.6"></a><h4>Returns</h4>
<p> <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if activated, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-add-watch"></a><h3>anjuta_plugin_add_watch ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
anjuta_plugin_add_watch (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
<em class="parameter"><code><a class="link" href="AnjutaPlugin.html#AnjutaPluginValueAdded" title="AnjutaPluginValueAdded ()"><span class="type">AnjutaPluginValueAdded</span></a> added</code></em>,
<em class="parameter"><code><a class="link" href="AnjutaPlugin.html#AnjutaPluginValueRemoved" title="AnjutaPluginValueRemoved ()"><span class="type">AnjutaPluginValueRemoved</span></a> removed</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p>Adds a watch for <em class="parameter"><code>name</code></em>
value. When the value is added in shell, the <em class="parameter"><code>added</code></em>
callback will be called and when it is removed, the <em class="parameter"><code>removed</code></em>
callback will
be called. The returned ID is used to remove the watch later.</p>
<div class="refsect3">
<a name="id-1.6.7.11.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>name</p></td>
<td class="parameter_description"><p>Name of the value to watch.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>added</p></td>
<td class="parameter_description"><p> Callback to call when the value is added. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/closure"><span class="acronym">closure</span></a> user_data][<a href="http://foldoc.org/scope%20call"><span class="acronym">scope call</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>removed</p></td>
<td class="parameter_description"><p> Callback to call when the value is removed. </p></td>
<td class="parameter_annotations"><span class="annotation">[<a href="http://foldoc.org/closure"><span class="acronym">closure</span></a> user_data][<a href="http://foldoc.org/scope%20call"><span class="acronym">scope call</span></a>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>User data to pass to callbacks.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.6.7.11.7.6"></a><h4>Returns</h4>
<p> Watch ID.</p>
<p></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-remove-watch"></a><h3>anjuta_plugin_remove_watch ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
anjuta_plugin_remove_watch (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> send_remove</code></em>);</pre>
<p>Removes the watch represented by <em class="parameter"><code>id</code></em>
(which was returned by
<a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()"><code class="function">anjuta_plugin_add_watch()</code></a>).</p>
<div class="refsect3">
<a name="id-1.6.7.11.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>id</p></td>
<td class="parameter_description"><p>Watch id to remove.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>send_remove</p></td>
<td class="parameter_description"><p>If true, calls value_removed callback.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-get-shell"></a><h3>anjuta_plugin_get_shell ()</h3>
<pre class="programlisting"><a class="link" href="AnjutaShell.html" title="AnjutaShell"><span class="returnvalue">AnjutaShell</span></a> *
anjuta_plugin_get_shell (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);</pre>
<div class="refsect3">
<a name="id-1.6.7.11.9.4"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>plugin</p></td>
<td class="parameter_description"><p>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.6.7.11.9.5"></a><h4>Returns</h4>
<p> The <a class="link" href="AnjutaShell.html" title="AnjutaShell"><span class="type">AnjutaShell</span></a> object associated with this plugin. </p>
<p><span class="annotation">[<a href="http://foldoc.org/transfer%20none"><span class="acronym">transfer none</span></a>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ANJUTA-PLUGIN-BEGIN:CAPS"></a><h3>ANJUTA_PLUGIN_BEGIN()</h3>
<pre class="programlisting">#define ANJUTA_PLUGIN_BEGIN(class_name, prefix)</pre>
<p>This is a convienient macro defined to make it easy to write plugin
classes . This macro begins the class type definition. member function
<em class="parameter"><code>prefix</code></em>
_class_init and <em class="parameter"><code>prefix</code></em>
_instance_init should be statically defined
before using this macro.</p>
<p>The class type definition is finished with <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-END:CAPS" title="ANJUTA_PLUGIN_END"><code class="function">ANJUTA_PLUGIN_END()</code></a> macro. In
between which any number of interface definitions could be added with
<a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-ADD-INTERFACE:CAPS" title="ANJUTA_PLUGIN_ADD_INTERFACE()"><code class="function">ANJUTA_PLUGIN_ADD_INTERFACE()</code></a> macro.</p>
<div class="refsect3">
<a name="id-1.6.7.11.10.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>class_name</p></td>
<td class="parameter_description"><p>Name of the class. e.g. EditorPlugin</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>prefix of member function names. e.g. editor_plugin</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ANJUTA-PLUGIN-ADD-INTERFACE:CAPS"></a><h3>ANJUTA_PLUGIN_ADD_INTERFACE()</h3>
<pre class="programlisting">#define ANJUTA_PLUGIN_ADD_INTERFACE(prefix,interface_type)</pre>
<p>This is a convienient macro defined to make it easy to add interfaces
to a plugin type. <em class="parameter"><code>prefix</code></em>
_iface_init should be statically defined
before using this macro. This macro should be called between
<a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-BEGIN:CAPS" title="ANJUTA_PLUGIN_BEGIN()"><code class="function">ANJUTA_PLUGIN_BEGIN()</code></a> and <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-END:CAPS" title="ANJUTA_PLUGIN_END"><code class="function">ANJUTA_PLUGIN_END()</code></a> macros.</p>
<div class="refsect3">
<a name="id-1.6.7.11.11.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>prefix of member function names.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>interface_type</p></td>
<td class="parameter_description"><p>Interface type. e.g. IANJUTA_TYPE_EDITOR</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="ANJUTA-PLUGIN-BOILERPLATE:CAPS"></a><h3>ANJUTA_PLUGIN_BOILERPLATE()</h3>
<pre class="programlisting">#define ANJUTA_PLUGIN_BOILERPLATE(class_name, prefix)</pre>
<p>This macro is similar to using <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-BEGIN:CAPS" title="ANJUTA_PLUGIN_BEGIN()"><code class="function">ANJUTA_PLUGIN_BEGIN()</code></a> and then immediately
using <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-END:CAPS" title="ANJUTA_PLUGIN_END"><code class="function">ANJUTA_PLUGIN_END()</code></a>. It is basically a plugin type definition macro
that does not have any interface implementation.</p>
<div class="refsect3">
<a name="id-1.6.7.11.12.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>class_name</p></td>
<td class="parameter_description"><p>Name of the class. e.g EditorPlugin</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>prefix of member function names. e.g. editor_plugin</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="AnjutaGluePlugin"></a><h3>AnjutaGluePlugin</h3>
<pre class="programlisting">typedef GTypeModule AnjutaGluePlugin;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="ANJUTA-PLUGIN-END:CAPS"></a><h3>ANJUTA_PLUGIN_END</h3>
<pre class="programlisting">#define ANJUTA_PLUGIN_END</pre>
<p>Ends the plugin class type definition started with <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-BEGIN:CAPS" title="ANJUTA_PLUGIN_BEGIN()"><code class="function">ANJUTA_PLUGIN_BEGIN()</code></a></p>
</div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="AnjutaPlugin--shell"></a><h3>The <code class="literal">“shell”</code> property</h3>
<pre class="programlisting"> “shell” <a class="link" href="AnjutaShell.html" title="AnjutaShell"><span class="type">AnjutaShell</span></a> *</pre>
<p>Anjuta shell that will contain the plugin.</p>
<p>Flags: Read / Write / Construct</p>
</div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="AnjutaPlugin-activated"></a><h3>The <code class="literal">“activated”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *anjutaplugin,
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p>
</div>
<hr>
<div class="refsect2">
<a name="AnjutaPlugin-deactivated"></a><h3>The <code class="literal">“deactivated”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *anjutaplugin,
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data)</pre>
<p>Flags: <a href="https://developer.gnome.org/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS">Run First</a></p>
</div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.see-also"></a><h2>See Also</h2>
<p><a class="link" href="AnjutaPluginManager.html" title="AnjutaPluginManager"><span class="type">AnjutaPluginManager</span></a>, <a class="link" href="AnjutaProfileManager.html" title="AnjutaProfileManager"><span class="type">AnjutaProfileManager</span></a></p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.21</div>
</body>
</html>
|