This file is indexed.

/usr/share/gtk-doc/html/libanjuta/AnjutaPlugin.html is in libanjuta-dev 2:3.4.0-1.

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

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AnjutaPlugin</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.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="libanjuta-AnjutaPluginDescription.html" title="AnjutaPluginDescription">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="AnjutaStatus.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="libanjuta-api.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Anjuta Developers Reference Manual</th>
<td><a accesskey="n" href="libanjuta-AnjutaPluginDescription.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#AnjutaPlugin.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#AnjutaPlugin.description" class="shortcut">Description</a>
                   | 
                  <a href="#AnjutaPlugin.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#AnjutaPlugin.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#AnjutaPlugin.signals" class="shortcut">Signals</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 valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="AnjutaPlugin.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="AnjutaPlugin.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libanjuta/anjuta-plugin.h&gt;

#define             <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-ADD-INTERFACE:CAPS" title="ANJUTA_PLUGIN_ADD_INTERFACE()">ANJUTA_PLUGIN_ADD_INTERFACE</a>         (prefix,
                                                         interface_type)
#define             <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-BEGIN:CAPS" title="ANJUTA_PLUGIN_BEGIN()">ANJUTA_PLUGIN_BEGIN</a>                 (class_name,
                                                         prefix)
#define             <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-BOILERPLATE:CAPS" title="ANJUTA_PLUGIN_BOILERPLATE()">ANJUTA_PLUGIN_BOILERPLATE</a>           (class_name,
                                                         prefix)
#define             <a class="link" href="AnjutaPlugin.html#ANJUTA-PLUGIN-END:CAPS" title="ANJUTA_PLUGIN_END">ANJUTA_PLUGIN_END</a>
typedef             <a class="link" href="AnjutaPlugin.html#AnjutaGluePlugin" title="AnjutaGluePlugin">AnjutaGluePlugin</a>;
struct              <a class="link" href="AnjutaPlugin.html#AnjutaPlugin-struct" title="struct AnjutaPlugin">AnjutaPlugin</a>;
struct              <a class="link" href="AnjutaPlugin.html#AnjutaPluginClass" title="struct AnjutaPluginClass">AnjutaPluginClass</a>;
<span class="returnvalue">void</span>                (<a class="link" href="AnjutaPlugin.html#AnjutaPluginValueAdded" title="AnjutaPluginValueAdded ()">*AnjutaPluginValueAdded</a>)           (<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="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                (<a class="link" href="AnjutaPlugin.html#AnjutaPluginValueRemoved" title="AnjutaPluginValueRemoved ()">*AnjutaPluginValueRemoved</a>)         (<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="AnjutaPlugin.html#anjuta-plugin-activate" title="anjuta_plugin_activate ()">anjuta_plugin_activate</a>              (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>               <a class="link" href="AnjutaPlugin.html#anjuta-plugin-add-watch" title="anjuta_plugin_add_watch ()">anjuta_plugin_add_watch</a>             (<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="http://library.gnome.org/devel/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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="AnjutaPlugin.html#anjuta-plugin-deactivate" title="anjuta_plugin_deactivate ()">anjuta_plugin_deactivate</a>            (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);
<span class="returnvalue">AnjutaShell</span> *       <a class="link" href="AnjutaPlugin.html#anjuta-plugin-get-shell" title="anjuta_plugin_get_shell ()">anjuta_plugin_get_shell</a>             (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="AnjutaPlugin.html#anjuta-plugin-is-active" title="anjuta_plugin_is_active ()">anjuta_plugin_is_active</a>             (<em class="parameter"><code><a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> *plugin</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="AnjutaPlugin.html#anjuta-plugin-remove-watch" title="anjuta_plugin_remove_watch ()">anjuta_plugin_remove_watch</a>          (<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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> send_remove</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----AnjutaPlugin
</pre>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="AnjutaPlugin.html#AnjutaPlugin--shell" title='The "shell" property'>shell</a>"                    <span class="type">AnjutaShell</span>*          : Read / Write / Construct
</pre>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="AnjutaPlugin.html#AnjutaPlugin-activated" title='The "activated" signal'>activated</a>"                                      : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
  "<a class="link" href="AnjutaPlugin.html#AnjutaPlugin-deactivated" title='The "deactivated" signal'>deactivated</a>"                                    : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a>
</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="libanjuta-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>
</p>
<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
<span class="type">IAnjutaEditor</span>, <span class="type">IAnjutaStream</span> and <span class="type">IAnjutaFile</span> 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, <span class="type">IAnjutaEditor</span> 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 <span class="type">IAnjutaEditor</span> 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="libanjuta-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 NULL 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)-&gt;shell,
                                     IAnjutaDocumentManager, &amp;err);
if (err)
{
	g_warning ("Error encountered: %s", err-&gt;message);
	g_error_free (err);
	return;
}

editor = ianjuta_document_manager_get_current_editor (docman, &amp;err);
if (err)
{
	g_warning ("Error encountered: %s", err-&gt;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, &amp;err);
}
			</pre>
<p>
		</p>
</li>
</ol></div>
<p>
</p>
<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 <span class="type">AnjutaShell</span> 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.details"></a><h2>Details</h2>
<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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>prefix of member function names.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>interface_type</code></em> :</span></p></td>
<td>Interface type. e.g. IANJUTA_TYPE_EDITOR</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_name</code></em> :</span></p></td>
<td>Name of the class. e.g. EditorPlugin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>prefix of member function names. e.g. editor_plugin</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>class_name</code></em> :</span></p></td>
<td>Name of the class. e.g EditorPlugin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>prefix</code></em> :</span></p></td>
<td>prefix of member function names. e.g. editor_plugin</td>
</tr>
</tbody>
</table></div>
</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>
<hr>
<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="AnjutaPlugin-struct"></a><h3>struct AnjutaPlugin</h3>
<pre class="programlisting">struct AnjutaPlugin;</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="AnjutaPluginClass"></a><h3>struct AnjutaPluginClass</h3>
<pre class="programlisting">struct AnjutaPluginClass {
	GObjectClass parent_class;

	/* Signals  */
	void (*activated) (AnjutaPlugin *plugin);
	void (*deactivated) (AnjutaPlugin *plugin);

	/* Virtual functions */
	gboolean (*activate) (AnjutaPlugin *plugin);
	gboolean (*deactivate) (AnjutaPlugin *plugin);
};
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="AnjutaPluginValueAdded"></a><h3>AnjutaPluginValueAdded ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*AnjutaPluginValueAdded)           (<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="http://library.gnome.org/devel/gobject/unstable/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>The <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> based plugin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>name of value being added.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>value of value being added.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>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>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="AnjutaPluginValueRemoved"></a><h3>AnjutaPluginValueRemoved ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*AnjutaPluginValueRemoved)         (<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="http://library.gnome.org/devel/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>The <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> based plugin</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>name of value being added.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>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>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-activate"></a><h3>anjuta_plugin_activate ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if sucessfully activated, FALSE otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-add-watch"></a><h3>anjuta_plugin_add_watch ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/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="http://library.gnome.org/devel/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="http://library.gnome.org/devel/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Name of the value to watch.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>added</code></em> :</span></p></td>
<td>Callback to call when the value is added. <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><p><span class="term"><em class="parameter"><code>removed</code></em> :</span></p></td>
<td>Callback to call when the value is removed. <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><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>User data to pass to callbacks.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Watch ID.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-deactivate"></a><h3>anjuta_plugin_deactivate ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if sucessfully activated, FALSE otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-get-shell"></a><h3>anjuta_plugin_get_shell ()</h3>
<pre class="programlisting"><span class="returnvalue">AnjutaShell</span> *       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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The <span class="type">AnjutaShell</span> object associated with this plugin</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="anjuta-plugin-is-active"></a><h3>anjuta_plugin_is_active ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/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 TRUE if the plugin has been activated.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>TRUE if activated, FALSE otherwise.</td>
</tr>
</tbody>
</table></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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> id</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
<td>a <a class="link" href="AnjutaPlugin.html" title="AnjutaPlugin"><span class="type">AnjutaPlugin</span></a> derived class object.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>Watch id to remove.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>send_remove</code></em> :</span></p></td>
<td>If true, calls value_removed callback.</td>
</tr>
</tbody>
</table></div>
</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"                    <span class="type">AnjutaShell</span>*          : Read / Write / Construct</pre>
<p>
The <span class="type">AnjutaShell</span> object associated with this plugin
</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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)         : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>anjutaplugin</code></em> :</span></p></td>
<td>the object which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="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="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>      user_data)         : <a href="http://library.gnome.org/devel/gobject/unstable/gobject-Signals.html#G-SIGNAL-RUN-FIRST:CAPS"><code class="literal">Run First</code></a></pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>anjutaplugin</code></em> :</span></p></td>
<td>the object which received the signal.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="AnjutaPlugin.see-also"></a><h2>See Also</h2>
<span class="type">AnjutaPluginManager</span>, <span class="type">AnjutaProfileManager</span>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>