/usr/share/gtk-doc/html/thunarx/thunarx-writing-extensions-advanced-topics.html is in thunar-data 1.6.3-1ubuntu5.
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 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Advanced topics</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Thunar Extensions Reference Manual">
<link rel="up" href="thunarx-writing-extensions.html" title="Part II. Writing Extensions">
<link rel="prev" href="thunarx-writing-extensions-getting-started.html" title="Getting Started">
<link rel="next" href="thunarx-fundamentals.html" title="Part III. Fundamentals">
<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="thunarx-writing-extensions-getting-started.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="thunarx-writing-extensions.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">Thunar Extensions Reference Manual</th>
<td><a accesskey="n" href="thunarx-fundamentals.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr></table>
<div class="sect1">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="thunarx-writing-extensions-advanced-topics"></a>Advanced topics</h2></div></div></div>
<p>
This section provides a short introduction to some of the advanced topics in the
Thunar Extension Framework.
</p>
<div class="sect2">
<div class="titlepage"><div><div><h3 class="title">
<a name="thunarx-writing-extensions-memory-resident-extensions"></a>Memory-Resident Extensions</h3></div></div></div>
<p>
Some extensions may not play well with Thunar's on-demand loading and unloading
of extensions. For example, an extension that uses a desktop library, which in
turn registers additional static GTypes will not work after being loaded and
unloaded for the first time. For these kind of extensions, Thunar provides the
option to make extensions <span class="emphasis"><em>memory resident</em></span>, which means the
extension will be loaded once and afterwards will never be unloaded again until
Thunar exits.
</p>
<p>
Such extensions must set the <code class="literal">resident</code> property of the provider plugin in its
<code class="function">thunar_extension_initialize()</code> function to <code class="literal">TRUE</code>, using the <a class="link" href="ThunarxProviderPlugin.html#thunarx-provider-plugin-set-resident" title="thunarx_provider_plugin_set_resident ()"><code class="function">thunarx_provider_plugin_set_resident()</code></a>
method.
</p>
<div class="example">
<a name="idp34341536"></a><p class="title"><b>Example 2. Making an extension memory resident</b></p>
<div class="example-contents"><pre class="programlisting">
G_MODULE_EXPORT void
thunar_extension_initialize (ThunarxProviderPlugin *plugin)
{
/* setup the types for the extension */
...
/* ensure that the extension will never be unloaded */
thunarx_provider_plugin_set_resident (plugin, TRUE);
}</pre></div>
</div>
<br class="example-break">
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|