1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>TotemPlugin</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.74.0">
7
<link rel="home" href="index.html" title="Totem Reference Manual">
8
<link rel="up" href="core-api.html" title="Core API">
9
<link rel="prev" href="totem-Interface.html" title="Interface">
10
<link rel="next" href="widget-api.html" title="Widgets">
11
<meta name="generator" content="GTK-Doc V1.12 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="core-api.html" title="Core API">
14
<link rel="chapter" href="widget-api.html" title="Widgets">
15
<link rel="index" href="api-index-full.html" title="Index of all symbols">
16
<link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
18
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
19
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
21
<td><a accesskey="p" href="totem-Interface.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
22
<td><a accesskey="u" href="core-api.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
23
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
24
<th width="100%" align="center">Totem Reference Manual</th>
25
<td><a accesskey="n" href="widget-api.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
27
<tr><td colspan="5" class="shortcuts">
28
<a href="#TotemPlugin.synopsis" class="shortcut">Top</a>
30
<a href="#TotemPlugin.description" class="shortcut">Description</a>
32
<a href="#TotemPlugin.object-hierarchy" class="shortcut">Object Hierarchy</a>
34
<a href="#TotemPlugin.properties" class="shortcut">Properties</a>
37
<div class="refentry" lang="en">
38
<a name="TotemPlugin"></a><div class="titlepage"></div>
39
<div class="refnamediv"><table width="100%"><tr>
41
<h2><span class="refentrytitle"><a name="TotemPlugin.top_of_page"></a>TotemPlugin</span></h2>
42
<p>TotemPlugin — base plugin class and loading/unloading functions</p>
44
<td valign="top" align="right"></td>
46
<div class="refsect1" lang="en">
47
<a name="TotemPlugin.stability-level"></a><h2>Stability Level</h2>
48
Unstable, unless otherwise indicated
50
<div class="refsynopsisdiv">
51
<a name="TotemPlugin.synopsis"></a><h2>Synopsis</h2>
52
<pre class="synopsis">
54
#include <totem-plugin.h>
56
<a class="link" href="TotemPlugin.html#TotemPlugin-struct" title="TotemPlugin">TotemPlugin</a>;
57
<a class="link" href="TotemPlugin.html#TotemPluginClass" title="TotemPluginClass">TotemPluginClass</a>;
58
enum <a class="link" href="TotemPlugin.html#TotemPluginError" title="enum TotemPluginError">TotemPluginError</a>;
59
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="TotemPlugin.html#totem-plugin-activate" title="totem_plugin_activate ()">totem_plugin_activate</a> (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
60
<a class="link" href="TotemObject.html" title="TotemObject">TotemObject</a> *totem,
61
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError">GError</a> **error);
62
void <a class="link" href="TotemPlugin.html#totem-plugin-deactivate" title="totem_plugin_deactivate ()">totem_plugin_deactivate</a> (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
63
<a class="link" href="TotemObject.html" title="TotemObject">TotemObject</a> *totem);
64
<a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html">GtkWidget</a> * <a class="link" href="TotemPlugin.html#totem-plugin-create-configure-dialog" title="totem_plugin_create_configure_dialog ()">totem_plugin_create_configure_dialog</a>
65
(<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin);
66
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a> <a class="link" href="TotemPlugin.html#totem-plugin-is-configurable" title="totem_plugin_is_configurable ()">totem_plugin_is_configurable</a> (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin);
67
<a href="http://library.gnome.org/devel/gtk/unstable/GtkBuilder.html">GtkBuilder</a> * <a class="link" href="TotemPlugin.html#totem-plugin-load-interface" title="totem_plugin_load_interface ()">totem_plugin_load_interface</a> (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
69
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a> fatal,
70
<a href="http://library.gnome.org/devel/gtk/unstable/GtkWindow.html">GtkWindow</a> *parent,
71
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer">gpointer</a> user_data);
72
char * <a class="link" href="TotemPlugin.html#totem-plugin-find-file" title="totem_plugin_find_file ()">totem_plugin_find_file</a> (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
76
<div class="refsect1" lang="en">
77
<a name="TotemPlugin.object-hierarchy"></a><h2>Object Hierarchy</h2>
78
<pre class="synopsis">
79
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
83
<div class="refsect1" lang="en">
84
<a name="TotemPlugin.properties"></a><h2>Properties</h2>
85
<pre class="synopsis">
86
"<a class="link" href="TotemPlugin.html#TotemPlugin--name" title='The "name" property'>name</a>" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar">gchar</a>* : Read / Write
89
<div class="refsect1" lang="en">
90
<a name="TotemPlugin.description"></a><h2>Description</h2>
92
<a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a> is a general-purpose architecture for adding plugins to Totem, with
93
derived support for different programming languages.</p>
97
<div class="refsect1" lang="en">
98
<a name="TotemPlugin.details"></a><h2>Details</h2>
99
<div class="refsect2" lang="en">
100
<a name="TotemPlugin-struct"></a><h3>TotemPlugin</h3>
101
<pre class="programlisting">typedef struct _TotemPlugin TotemPlugin;</pre>
103
All the fields in the <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a> structure are private and should never be accessed directly.</p>
108
<div class="refsect2" lang="en">
109
<a name="TotemPluginClass"></a><h3>TotemPluginClass</h3>
110
<pre class="programlisting">typedef struct {
111
GObjectClass parent_class;
113
/* Virtual public methods */
115
TotemPluginActivationFunc activate;
116
TotemPluginDeactivationFunc deactivate;
117
TotemPluginWidgetFunc create_configure_dialog;
121
The class structure for the <a href="http://library.gnome.org/devel/totem-pl-parser/TotemPlParser.html#TotemPlParser"><span class="type">TotemPlParser</span></a> type.</p>
124
<div class="variablelist"><table border="0">
125
<col align="left" valign="top">
128
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass">GObjectClass</a> <em class="structfield"><code>parent_class</code></em>;</span></p></td>
129
<td> the parent class
133
<td><p><span class="term">TotemPluginActivationFunc <em class="structfield"><code>activate</code></em>;</span></p></td>
134
<td> function called when activating a plugin using <a class="link" href="TotemPlugin.html#totem-plugin-activate" title="totem_plugin_activate ()"><code class="function">totem_plugin_activate()</code></a>.
135
It must be set by inheriting classes, and should return <code class="literal">TRUE</code> if it successfully created/got handles to
136
the resources needed by the plugin. If it returns <code class="literal">FALSE</code>, loading the plugin is abandoned.
140
<td><p><span class="term">TotemPluginDeactivationFunc <em class="structfield"><code>deactivate</code></em>;</span></p></td>
141
<td> function called when deactivating a plugin using <a class="link" href="TotemPlugin.html#totem-plugin-deactivate" title="totem_plugin_deactivate ()"><code class="function">totem_plugin_deactivate()</code></a>;
142
It must be set by inheriting classes, and should free/unref any resources the plugin used.
146
<td><p><span class="term">TotemPluginWidgetFunc <em class="structfield"><code>create_configure_dialog</code></em>;</span></p></td>
147
<td> function called when configuring a plugin using <a class="link" href="TotemPlugin.html#totem-plugin-create-configure-dialog" title="totem_plugin_create_configure_dialog ()"><code class="function">totem_plugin_create_configure_dialog()</code></a>.
148
If non-<a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, it should create and return the plugin's configuration dialog. If <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, the plugin is not
156
<div class="refsect2" lang="en">
157
<a name="TotemPluginError"></a><h3>enum TotemPluginError</h3>
158
<pre class="programlisting">typedef enum {
159
TOTEM_PLUGIN_ERROR_ACTIVATION
163
Error codes returned by <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a> operations.</p>
166
<div class="variablelist"><table border="0">
167
<col align="left" valign="top">
169
<td><p><a name="TOTEM-PLUGIN-ERROR-ACTIVATION:CAPS"></a><span class="term"><code class="literal">TOTEM_PLUGIN_ERROR_ACTIVATION</code></span></p></td>
170
<td> there was an error activating the plugin
176
<div class="refsect2" lang="en">
177
<a name="totem-plugin-activate"></a><h3>totem_plugin_activate ()</h3>
178
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a> totem_plugin_activate (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
179
<a class="link" href="TotemObject.html" title="TotemObject">TotemObject</a> *totem,
180
<a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError">GError</a> **error);</pre>
182
Activates the passed <em class="parameter"><code>plugin</code></em> by calling its activate method.</p>
185
<div class="variablelist"><table border="0">
186
<col align="left" valign="top">
189
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
190
<td> a <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a>
194
<td><p><span class="term"><em class="parameter"><code>totem</code></em> :</span></p></td>
195
<td> a <a class="link" href="TotemObject.html" title="TotemObject"><span class="type">TotemObject</span></a>
199
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
200
<td> return location for a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
204
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
205
<td> <code class="literal">TRUE</code> on success
212
<div class="refsect2" lang="en">
213
<a name="totem-plugin-deactivate"></a><h3>totem_plugin_deactivate ()</h3>
214
<pre class="programlisting">void totem_plugin_deactivate (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
215
<a class="link" href="TotemObject.html" title="TotemObject">TotemObject</a> *totem);</pre>
217
Deactivates <em class="parameter"><code>plugin</code></em> by calling its deactivate method.</p>
220
<div class="variablelist"><table border="0">
221
<col align="left" valign="top">
224
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
225
<td> a <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a>
229
<td><p><span class="term"><em class="parameter"><code>totem</code></em> :</span></p></td>
230
<td> a <a class="link" href="TotemObject.html" title="TotemObject"><span class="type">TotemObject</span></a>
237
<div class="refsect2" lang="en">
238
<a name="totem-plugin-create-configure-dialog"></a><h3>totem_plugin_create_configure_dialog ()</h3>
239
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html">GtkWidget</a> * totem_plugin_create_configure_dialog
240
(<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin);</pre>
242
Returns the plugin's configuration dialog, as created by
243
the plugin's create_configure_dialog method.</p>
246
<div class="variablelist"><table border="0">
247
<col align="left" valign="top">
250
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
251
<td> a <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a>
255
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
256
<td> the configuration dialog, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
263
<div class="refsect2" lang="en">
264
<a name="totem-plugin-is-configurable"></a><h3>totem_plugin_is_configurable ()</h3>
265
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a> totem_plugin_is_configurable (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin);</pre>
267
Returns <code class="literal">TRUE</code> if the plugin is configurable and has a
268
configuration dialog. It calls the plugin's
269
is_configurable method.</p>
272
<div class="variablelist"><table border="0">
273
<col align="left" valign="top">
276
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
277
<td> a <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a>
281
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
282
<td> <code class="literal">TRUE</code> if the plugin is configurable
289
<div class="refsect2" lang="en">
290
<a name="totem-plugin-load-interface"></a><h3>totem_plugin_load_interface ()</h3>
291
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/GtkBuilder.html">GtkBuilder</a> * totem_plugin_load_interface (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
293
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean">gboolean</a> fatal,
294
<a href="http://library.gnome.org/devel/gtk/unstable/GtkWindow.html">GtkWindow</a> *parent,
295
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre>
297
Loads an interface file (GtkBuilder UI file) for a plugin, given its filename and
298
assuming it's installed in the plugin's data directory.
301
This should be used instead of attempting to load interfaces manually in plugins.</p>
304
<div class="variablelist"><table border="0">
305
<col align="left" valign="top">
308
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
309
<td> a <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a>
313
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
314
<td> interface filename
318
<td><p><span class="term"><em class="parameter"><code>fatal</code></em> :</span></p></td>
319
<td> <code class="literal">TRUE</code> if it's a fatal error if the interface can't be loaded
323
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
324
<td> the interface's parent <a href="http://library.gnome.org/devel/gtk/unstable/GtkWindow.html"><span class="type">GtkWindow</span></a>
328
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
329
<td> a pointer to be passed to each signal handler in the interface when they're called
333
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
334
<td> the <a href="http://library.gnome.org/devel/gtk/unstable/GtkBuilder.html"><span class="type">GtkBuilder</span></a> instance for the interface
341
<div class="refsect2" lang="en">
342
<a name="totem-plugin-find-file"></a><h3>totem_plugin_find_file ()</h3>
343
<pre class="programlisting">char * totem_plugin_find_file (<a class="link" href="TotemPlugin.html" title="TotemPlugin">TotemPlugin</a> *plugin,
344
const char *file);</pre>
346
Finds the specified <em class="parameter"><code>file</code></em> by looking in the plugin paths
347
listed by <code class="function">totem_get_plugin_paths()</code> and then in the system
348
Totem data directory.
351
This should be used by plugins to find plugin-specific
355
<div class="variablelist"><table border="0">
356
<col align="left" valign="top">
359
<td><p><span class="term"><em class="parameter"><code>plugin</code></em> :</span></p></td>
360
<td> a <a class="link" href="TotemPlugin.html" title="TotemPlugin"><span class="type">TotemPlugin</span></a>
364
<td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
365
<td> the file to find
369
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
370
<td> a newly-allocated absolute path for the file, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>
377
<div class="refsect1" lang="en">
378
<a name="TotemPlugin.property-details"></a><h2>Property Details</h2>
379
<div class="refsect2" lang="en">
380
<a name="TotemPlugin--name"></a><h3>The <code class="literal">"name"</code> property</h3>
381
<pre class="programlisting"> "name" <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar">gchar</a>* : Read / Write</pre>
383
The plugin's name. It should be a construction property, but due to the Python plugin hack, it
384
can't be: do not change the name after construction. Should be the same as used for naming plugin-
385
specific resources.</p>
388
<p>Default value: NULL</p>
394
Generated by GTK-Doc V1.12</div>