diff options
| author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-03-08 22:35:53 +0000 |
|---|---|---|
| committer | Gian Mario Tagliaretti <gianmt@src.gnome.org> | 2009-03-08 22:35:53 +0000 |
| commit | 0c8e99a2fdc89f3ec72ad13439ed4b6228d6d788 (patch) | |
| tree | 094639c50ba0f45a4aff5ccae1e56e7ec1be7c3c /docs | |
| parent | 06828fcab9b80b89867ce269a45dbc62aec08c38 (diff) | |
| download | pygobject-0c8e99a2fdc89f3ec72ad13439ed4b6228d6d788.tar.gz pygobject-0c8e99a2fdc89f3ec72ad13439ed4b6228d6d788.tar.xz pygobject-0c8e99a2fdc89f3ec72ad13439ed4b6228d6d788.zip | |
Complete cancellable docs.
2009-03-08 Gian Mario Tagliaretti <gianmt@gnome.org>
* docs/reference/pygio-classes.xml:
* docs/reference/pygio-cancellable.xml: Complete cancellable docs.
svn path=/trunk/; revision=1024
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/reference/pygio-cancellable.xml | 131 | ||||
| -rw-r--r-- | docs/reference/pygio-classes.xml | 1 |
2 files changed, 132 insertions, 0 deletions
diff --git a/docs/reference/pygio-cancellable.xml b/docs/reference/pygio-cancellable.xml index d36421c..c35388d 100644 --- a/docs/reference/pygio-cancellable.xml +++ b/docs/reference/pygio-cancellable.xml @@ -50,6 +50,15 @@ </methodsynopsis> </classsynopsis> + +<programlisting> +<emphasis role="bold">Functions</emphasis> + +<methodsynopsis language="python"> + <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname> + <methodparam></methodparam> +</methodsynopsis></programlisting> + </refsect1> <refsect1> @@ -155,5 +164,127 @@ on Unix systems. The returned fd will turn readable when cancellable is cancelled. </para> </refsect2> + + <refsect2 id="method-giocancellable--is-cancelled"> + <title>gio.Cancellable.is_cancelled</title> + + <programlisting><methodsynopsis language="python"> + <methodname>is_cancelled</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara><literal>True</literal> if cancellable is cancelled, + <literal>False</literal> if called with <literal>None</literal> or if + item is not cancelled. </simpara></listitem> + </varlistentry> + </variablelist> + + <para> + The <methodname>get_fd</methodname>() method gets the file descriptor + for a cancellable job. This can be used to implement cancellable operations + on Unix systems. The returned fd will turn readable when cancellable is cancelled. + </para> + </refsect2> + + <refsect2 id="method-giocancellable--pop-current"> + <title>gio.Cancellable.pop_current</title> + + <programlisting><methodsynopsis language="python"> + <methodname>pop_current</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + + <variablelist> + </variablelist> + + <para> + The <methodname>pop_current</methodname>() method pops cancellable off + the cancellable stack (verifying that cancellable is on the top of the stack). + </para> + </refsect2> + + <refsect2 id="method-giocancellable--push-current"> + <title>gio.Cancellable.push_current</title> + + <programlisting><methodsynopsis language="python"> + <methodname>push_current</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + + <variablelist> + </variablelist> + + <para> + The <methodname>push_current</methodname>() method pushes cancellable onto + the cancellable stack. The current cancllable can then be recieved using + <methodname><link linkend="function-gio--cancellable-get-current">gio.cancellable_get_current</link></methodname>(). + </para> + </refsect2> + + <refsect2 id="method-giocancellable--reset"> + <title>gio.Cancellable.reset</title> + + <programlisting><methodsynopsis language="python"> + <methodname>reset</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + + <variablelist> + </variablelist> + + <para> + The <methodname>reset</methodname>() method resets cancellable to its uncancelled state. + </para> + </refsect2> + + <refsect2 id="method-giocancellable--set-error-if-cancelled"> + <title>gio.Cancellable.set_error_if_cancelled</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_error_if_cancelled</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara><literal>True</literal> if cancellable was cancelled, + <literal>False</literal> if it was not.</simpara></listitem> + </varlistentry> + </variablelist> + + <para> + The <methodname>set_error_if_cancelled</methodname>() method, if the cancellable + is cancelled, sets the error to notify that the operation was cancelled. + </para> + </refsect2> + </refsect1> + + <refsect1> + <title>Functions</title> + + <refsect2 id="function-gio--cancellable-get-current"> + <title>gio.cancellable_get_current</title> + + <programlisting><methodsynopsis language="python"> + <methodname>cancellable_get_current</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>A <link linkend="class-giocancellable"><classname>gio.Cancellable</classname></link> + from the top of the stack, or <literal>None</literal> if the stack is empty.</simpara></listitem> + </varlistentry> + </variablelist> + + <para> + The <methodname>cancellable_get_current</methodname>() function gets the top cancellable from the stack. + </para> + </refsect2> </refsect1> </refentry> diff --git a/docs/reference/pygio-classes.xml b/docs/reference/pygio-classes.xml index f4df171..954a1e8 100644 --- a/docs/reference/pygio-classes.xml +++ b/docs/reference/pygio-classes.xml @@ -8,5 +8,6 @@ <!-- GLIB CLASSES --> <xi:include href="pygio-applaunchcontext.xml"/> +<xi:include href="pygio-cancellable.xml"/> </chapter> |
