/usr/share/gtk-doc/html/caja-python/class-caja-python-info-provider.html is in python-caja-common 1.20.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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Caja.InfoProvider</title><link rel="stylesheet" type="text/css" href="style.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="caja-python Reference Manual"><link rel="up" href="caja-python-provider-reference.html" title="Provider Interfaces"><link rel="prev" href="class-caja-python-column-provider.html" title="Caja.ColumnProvider"><link rel="next" href="class-caja-python-location-widget-provider.html" title="Caja.LocationWidgetProvider"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Caja.InfoProvider</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-caja-python-column-provider.html">Prev</a> </td><th width="60%" align="center">Provider Interfaces</th><td width="20%" align="right"> <a accesskey="n" href="class-caja-python-location-widget-provider.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="class-caja-python-info-provider"></a><div class="titlepage"></div><div class="refnamediv"><h2>Caja.InfoProvider</h2><p>Caja.InfoProvider — Caja.InfoProvider Reference</p></div><div class="refsect1"><a name="idm907"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">Caja.InfoProvider</span></span>:
<code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-file-info" title="Caja.InfoProvider.update_file_info">update_file_info</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-file-info-full" title="Caja.InfoProvider.update_file_info_full">update_file_info_full</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>provider</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>closure</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--cancel-update" title="Caja.InfoProvider.cancel_update">cancel_update</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>provider</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-complete-invoke" title="Caja.info_provider_update_complete_invoke">Caja.info_provider_update_complete_invoke</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>provider</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>closure</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=Caja.OperationResult.COMPLETE</span></span>)</code><br></pre></td></tr></table></div><div class="refsect1"><a name="description-info-provider"></a><h2>Description</h2><p>
If subclassed, Caja will call update_file_info(_full) to notify extensions of which
files are being viewed by the user. This gives extensions an opportunity to invoke actions on the files,
or to add emblems or attributes.
</p><div class="example"><a name="idm950"></a><p class="title"><b>Example 3. Caja.InfoProvider Example</b></p><div class="example-contents"><pre class="programlisting">
from gi.repository import Caja, GObject
class ColumnExtension(GObject.GObject, Caja.InfoProvider):
def __init__(self):
pass
def update_file_info_full(self, provider, handle, closure, file):
gobject.timeout_add_seconds(3, self.update_cb, provider, handle, closure)
return Caja.OperationResult.IN_PROGRESS
def update_cb(self, provider, handle, closure):
Caja.info_provider_update_complete_invoke(closure, provider, handle, Caja.OperationResult.FAILED)
</pre></div></div><br class="example-break"></div><div class="refsect1"><a name="idm953"></a><h2>Passive Methods</h2><div class="refsect2"><a name="method-caja-python-info-provider--update-file-info"></a><h3>Caja.InfoProvider.update_file_info</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">update_file_info</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>file</code></strong> :</span></p></td><td>a <a class="link" href="class-caja-python-file-info.html" title="Caja.FileInfo"><code class="classname">Caja.FileInfo</code></a> object</td></tr></tbody></table><p>
This method is called by Caja for each file or folder that exists under the
current directory listing. There is no return value.
</p></div><div class="refsect2"><a name="method-caja-python-info-provider--update-file-info-full"></a><h3>Caja.InfoProvider.update_file_info_full</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">update_file_info_full</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>provider</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>closure</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>file</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>provider</code></strong> :</span></p></td><td>the current <a class="link" href="class-caja-python-info-provider.html" title="Caja.InfoProvider"><code class="classname">Caja.InfoProvider</code></a> instance</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>handle</code></strong> :</span></p></td><td>a <code class="classname">gobject.gpointer</code> generated solely to track this call</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>closure</code></strong> :</span></p></td><td>a C Closure that must be passed to <a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-complete-invoke" title="Caja.info_provider_update_complete_invoke">Caja.info_provider_update_complete_invoke</a> if that method is called</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>file</code></strong> :</span></p></td><td>a <a class="link" href="class-caja-python-file-info.html" title="Caja.FileInfo"><code class="classname">Caja.FileInfo</code></a> object</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>None or a <a class="link" href="enum-caja-python-operation-result.html" title="Caja.OperationResult"><code class="classname">Caja.OperationResult</code></a> enum</td></tr></tbody></table><p>
This method is called by Caja for each file or folder that exists under the
current directory listing. Originally, <a class="link" href="class-caja-python-info-provider.html" title="Caja.InfoProvider"><code class="classname">Caja.InfoProvider</code></a>
only provided the update_file_info
method, which blocked Caja when the method required a lot of computation time. This method was
created to allow an extension to tell Caja that it will be spending time on an operation and that
Caja should not block itself during that time.
</p><p>
In order to notify Caja of your extension's intentions, you must return a
<a class="link" href="enum-caja-python-operation-result.html" title="Caja.OperationResult"><code class="classname">Caja.OperationResult</code></a> enum.
Then, when the operation has completed, call the Caja.info_provider_update_complete_invoke method, passing the provider,
handle and closure variables as parameters.
</p><p>
This method was created for backwards compatibility reasons. If your
extension used the <a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-file-info" title="Caja.InfoProvider.update_file_info"><code class="function">update_file_info</code></a> method and you want non-blocking
usage, you should switch to this method.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
This method was introduced in caja-python 0.7.0.
</div></div><div class="refsect2"><a name="method-caja-python-info-provider--cancel-update"></a><h3>Caja.InfoProvider.cancel_update</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">cancel_update</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>provider</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>provider</code></strong> :</span></p></td><td>the current <a class="link" href="class-caja-python-info-provider.html" title="Caja.InfoProvider"><code class="classname">Caja.InfoProvider</code></a> instance</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>handle</code></strong> :</span></p></td><td>a <code class="classname">gobject.gpointer</code> generated by a specific update_file_info_full call</td></tr></tbody></table><p>
This method is called by Caja when an update_file_info_full call is in progress
but is no longer required. This may happen because the user is moving directories or a file
has been deleted, etc. You may use the handle parameter here to match the
handle parameter passed in <a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-file-info-full" title="Caja.InfoProvider.update_file_info_full"><code class="function">update_file_info_full</code></a>.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
This method was introduced in caja-python 0.7.0.
</div></div></div><div class="refsect1"><a name="idm1055"></a><h2>Active Methods</h2><div class="refsect2"><a name="method-caja-python-info-provider--update-complete-invoke"></a><h3>Caja.info_provider_update_complete_invoke</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">info_provider_update_complete_invoke</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>provider</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>handle</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>closure</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>result</code></strong></span><span class="initializer">=Caja.OperationResult.COMPLETE</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>provider</code></strong> :</span></p></td><td>the current <a class="link" href="class-caja-python-info-provider.html" title="Caja.InfoProvider"><code class="classname">Caja.InfoProvider</code></a> instance</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>handle</code></strong> :</span></p></td><td>a <code class="classname">gobject.gpointer</code> generated by a specific update_file_info_full call</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>closure</code></strong> :</span></p></td><td>a C Closure that must be passed to <a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-complete-invoke" title="Caja.info_provider_update_complete_invoke">Caja.info_provider_update_complete_invoke</a> if that method is called</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>result</code></strong> :</span></p></td><td>an optional parameter. If left out, <code class="classname">Caja.OperationResult.COMPLETE</code> is assumed.
Otherwise, you may pass any any of the <a class="link" href="enum-caja-python-operation-result.html" title="Caja.OperationResult"><code class="classname">Caja.OperationResult</code></a> enums.</td></tr></tbody></table><p>
An extension must call this method for each update_file_info_full method that
returns the <code class="classname">Caja.OperationResult.IN_PROGRESS</code> enum.
The method must be called with the provider, handle, and closure parameters which were passed to the earlier <a class="link" href="class-caja-python-info-provider.html#method-caja-python-info-provider--update-file-info-full" title="Caja.InfoProvider.update_file_info_full"><code class="function">update_file_info_full</code></a> method.
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
This method was introduced in caja-python 0.7.0.
</div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-caja-python-column-provider.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="caja-python-provider-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-caja-python-location-widget-provider.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Caja.ColumnProvider </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Caja.LocationWidgetProvider</td></tr></table></div></body></html>
|