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
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>STPlugin</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="streamtuner Developers Manual"><link rel="up" href="api-reference.html" title="API Reference"><link rel="prev" href="streamtuner-st-pls-api.html" title="st-pls"><link rel="next" href="streamtuner-st-programs-api.html" title="st-programs"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
.synopsis, .classsynopsis {
background: #eeeeee;
border: solid 1px #aaaaaa;
padding: 0.5em;
}
.programlisting {
background: #feffde;
border: solid 1px #e9ed1c;
padding: 0.5em;
}
.variablelist {
padding: 4px;
margin-left: 3em;
}
.navigation {
background: #daffd1;
border: solid 1px #74ff54;
margin-top: 0.5em;
margin-bottom: 0.5em;
}
.navigation a {
color: #2fba0f;
}
.navigation a:visited {
color: #22850b;
}
.navigation .title {
font-size: 200%;
}
</style></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="streamtuner-st-pls-api.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="api-reference.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">streamtuner Developers Manual</th><td><a accesskey="n" href="streamtuner-st-programs-api.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="streamtuner-STPlugin"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">STPlugin</span></h2><p>STPlugin — an object for describing a plugin.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
struct <a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a>;
void <a href="streamtuner-STPlugin.html#st-plugin-set-name">st_plugin_set_name</a> (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
const char *name);
void <a href="streamtuner-STPlugin.html#st-plugin-set-label">st_plugin_set_label</a> (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
const char *label);
void <a href="streamtuner-STPlugin.html#st-plugin-set-icon-from-pixbuf">st_plugin_set_icon_from_pixbuf</a> (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
GdkPixbuf *pixbuf);
gboolean (<a href="streamtuner-STPlugin.html#STPluginGetInfoCallback">*STPluginGetInfoCallback</a>) (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
GError **err);
gboolean (<a href="streamtuner-STPlugin.html#STPluginInitCallback">*STPluginInitCallback</a>) (GError **err);
</pre></div><div class="refsect1" lang="en"><a name="id2625965"></a><h2>Description</h2><p>
</p></div><div class="refsect1" lang="en"><a name="id2625975"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2625980"></a><h3><a name="STPlugin"></a>struct STPlugin</h3><a class="indexterm" name="id2625989"></a><pre class="programlisting">struct STPlugin {
GObject object;
STPluginPrivate *priv;
gpointer reserved[16];
};
</pre><p>
</p></div><hr><div class="refsect2" lang="en"><a name="id2626003"></a><h3><a name="st-plugin-set-name"></a>st_plugin_set_name ()</h3><a class="indexterm" name="id2626011"></a><pre class="programlisting">void st_plugin_set_name (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
const char *name);</pre><p>
Sets the plugin internal name.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>plugin</tt></i>:</span></td><td> a plugin.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>name</tt></i>:</span></td><td> the plugin name.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2626553"></a><h3><a name="st-plugin-set-label"></a>st_plugin_set_label ()</h3><a class="indexterm" name="id2626562"></a><pre class="programlisting">void st_plugin_set_label (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
const char *label);</pre><p>
Sets the plugin label, which will be used in the plugins
preferences, and in various other places of the user interface.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>plugin</tt></i>:</span></td><td> a plugin.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>label</tt></i>:</span></td><td> the plugin label.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2626626"></a><h3><a name="st-plugin-set-icon-from-pixbuf"></a>st_plugin_set_icon_from_pixbuf ()</h3><a class="indexterm" name="id2626704"></a><pre class="programlisting">void st_plugin_set_icon_from_pixbuf (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
GdkPixbuf *pixbuf);</pre><p>
Sets the plugin icon from a <span class="type">GdkPixbuf</span>.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>plugin</tt></i>:</span></td><td> a plugin.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>pixbuf</tt></i>:</span></td><td> an icon.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2626774"></a><h3><a name="STPluginGetInfoCallback"></a>STPluginGetInfoCallback ()</h3><a class="indexterm" name="id2626782"></a><pre class="programlisting">gboolean (*STPluginGetInfoCallback) (<a href="streamtuner-STPlugin.html#STPlugin">STPlugin</a> *plugin,
GError **err);</pre><p>
Specifies the type of the plugin information function.
</p><p>
If a plugin contains a function named <tt class="function">plugin_get_info()</tt>, it will be
called before <tt class="function">plugin_init()</tt>. The function should set the plugin
information using <a href="streamtuner-STPlugin.html#st-plugin-set-name"><tt class="function">st_plugin_set_name()</tt></a>, <a href="streamtuner-STPlugin.html#st-plugin-set-label"><tt class="function">st_plugin_set_label()</tt></a>, etc.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>plugin</tt></i>:</span></td><td> a plugin.
</td></tr><tr><td><span class="term"><i class="parameter"><tt>err</tt></i>:</span></td><td> a location to store errors.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the function should return <tt class="literal">FALSE</tt> if streamtuner must
not initialize the plugin. In such case it should also set <i class="parameter"><tt>err</tt></i>.
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2626976"></a><h3><a name="STPluginInitCallback"></a>STPluginInitCallback ()</h3><a class="indexterm" name="id2626984"></a><pre class="programlisting">gboolean (*STPluginInitCallback) (GError **err);</pre><p>
Specifies the type of the plugin initialization function.
</p><p>
A plugin must contain a function named <tt class="function">plugin_init()</tt>, which will be
called when the plugin is loaded.</p><p>
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>err</tt></i>:</span></td><td> a location to store errors.
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> the function should return <tt class="literal">FALSE</tt> if the plugin could
not be initialized. In such case it should also set <i class="parameter"><tt>err</tt></i>.
</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id2627065"></a><h2>See Also</h2><p>
<a href="streamtuner-STHandler.html#STHandler"><span class="type">STHandler</span></a>, <a href="streamtuner-st-version-api.html" title="st-version">st-version</a>
</p></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="streamtuner-st-pls-api.html"><b><<st-pls</b></a></td><td align="right"><a accesskey="n" href="streamtuner-st-programs-api.html"><b>st-programs>></b></a></td></tr></table></body></html>
|