summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-10-24 08:50:37 +0200
committerMartin Pitt <martinpitt@gnome.org>2012-10-24 09:28:20 +0200
commit1b27432abf6004553e9476d5ffeb2bf603534419 (patch)
tree41011f5e7edf5cc0e49c755ef995d413d0072d49 /docs
parent2357f4a0237feabcf6886f2a448aa3f42f6781b9 (diff)
downloadpygobject-1b27432abf6004553e9476d5ffeb2bf603534419.tar.gz
Remove static idle_add/timeout_add bindings
Use the GLib functions through GI instead. Add overrides to ensure that default arguments continue to work as before, and that callbacks are called without an userdata argument if it wasn't specified.
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/pyglib-functions.xml165
1 files changed, 0 insertions, 165 deletions
diff --git a/docs/reference/pyglib-functions.xml b/docs/reference/pyglib-functions.xml
index 03540824..e3a63acf 100644
--- a/docs/reference/pyglib-functions.xml
+++ b/docs/reference/pyglib-functions.xml
@@ -14,23 +14,6 @@
<programlisting>
<methodsynopsis language="python">
<methodname><link
-linkend="function-glib--idle-add">glib.idle_add</link></methodname>
- <methodparam><parameter>callback</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis><methodsynopsis language="python">
- <methodname><link
-linkend="function-glib--timeout-add">glib.timeout_add</link></methodname>
- <methodparam><parameter>interval</parameter></methodparam>
- <methodparam><parameter>callback</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis><methodsynopsis language="python">
- <methodname><link
-linkend="function-glib--timeout-add-seconds">glib.timeout_add_seconds</link></methodname>
- <methodparam><parameter>interval</parameter></methodparam>
- <methodparam><parameter>callback</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis><methodsynopsis language="python">
- <methodname><link
linkend="function-glib--io-add-watch">glib.io_add_watch</link></methodname>
<methodparam><parameter>fd</parameter></methodparam>
<methodparam><parameter>condition</parameter></methodparam>
@@ -79,154 +62,6 @@ module but are not directly associated with a specific class.</para>
<refsect1>
<title>Functions</title>
- <refsect2 id="function-glib--idle-add">
- <title>glib.idle_add</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>glib.idle_add</methodname>
- <methodparam><parameter>callback</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>a function to call when
-<literal>PyGTK</literal> is idle</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>optionals arguments to be passed to
-<parameter>callback</parameter></simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>an integer ID</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>The <function>glib.idle_add</function>() function adds a
-function (specified by <parameter>callback</parameter>) to be called
-whenever there are no higher priority events pending to the default main
-loop. The function is given the default idle priority,
-<literal>glib.PRIORITY_DEFAULT_IDLE</literal>. Additional arguments to
-pass to <parameter>callback</parameter> can be specified after
-<parameter>callback</parameter>. The idle priority can be specified as a
-keyword-value pair with the keyword "priority". If
-<parameter>callback</parameter> returns <literal>False</literal> it is
-automatically removed from the list of event sources and will not be called
-again.</para>
-
- </refsect2>
-
- <refsect2 id="function-glib--timeout-add">
- <title>glib.timeout_add</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>glib.timeout_add</methodname>
- <methodparam><parameter>interval</parameter></methodparam>
- <methodparam><parameter>callback</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>interval</parameter>&nbsp;:</term>
- <listitem><simpara>the time between calls to the function, in
-milliseconds </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>the function to call</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>zero or more arguments that will be passed to
-<parameter>callback</parameter></simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>an integer ID of the event
-source</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>The <function>glib.timeout_add</function>() function sets a
-function (specified by <parameter>callback</parameter>) to be called at
-regular intervals (specified by <parameter>interval</parameter>, with the
-default priority, <literal>glib.PRIORITY_DEFAULT</literal>. Additional
-arguments to pass to <parameter>callback</parameter> can be specified after
-<parameter>callback</parameter>. The idle priority may be specified as a
-keyword-value pair with the keyword "priority".</para>
-
- <para>The function is called repeatedly until it returns
-<literal>False</literal>, at which point the timeout is automatically
-destroyed and the function will not be called again. The first call to the
-function will be at the end of the first interval. Note that timeout
-functions may be delayed, due to the processing of other event sources. Thus
-they should not be relied on for precise timing. After each call to the
-timeout function, the time of the next timeout is recalculated based on the
-current time and the given interval (it does not try to 'catch up' time lost
-in delays).</para>
-
- </refsect2>
-
- <refsect2 id="function-glib--timeout-add-seconds">
- <title>glib.timeout_add_seconds</title>
-
- <programlisting><methodsynopsis language="python">
- <methodname>glib.timeout_add_seconds</methodname>
- <methodparam><parameter>interval</parameter></methodparam>
- <methodparam><parameter>callback</parameter></methodparam>
- <methodparam><parameter>...</parameter></methodparam>
- </methodsynopsis></programlisting>
- <variablelist>
- <varlistentry>
- <term><parameter>interval</parameter>&nbsp;:</term>
- <listitem><simpara>the time between calls to the function, in
-seconds </simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>callback</parameter>&nbsp;:</term>
- <listitem><simpara>the function to call</simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><parameter>...</parameter>&nbsp;:</term>
- <listitem><simpara>zero or more arguments that will be passed to
-<parameter>callback</parameter></simpara></listitem>
- </varlistentry>
- <varlistentry>
- <term><emphasis>Returns</emphasis>&nbsp;:</term>
- <listitem><simpara>an integer ID of the event
-source</simpara></listitem>
- </varlistentry>
- </variablelist>
-
- <para>The <function>glib.timeout_add_seconds</function>() is similar to
- <function>glib.timeout_add</function>() except
- that <parameter>interval</parameter> must be specified in seconds, not
- milliseconds, and the function should cause less CPU wakeups, which is important
- for laptops' batteries.</para>
-
- <para>Unlike <function>glib.timeout_add</function>(), this function operates at
- whole second granularity. The initial starting point of the timer is determined
- by the implementation and the implementation is expected to group multiple timers
- together so that they fire all at the same time. To allow this grouping, the
- interval to the first timer is rounded and can deviate up to one second from the
- specified interval. Subsequent timer iterations will generally run at the
- specified interval.</para>
-
- <para>Note that timeout functions may be delayed, due to the processing of other
- event sources. Thus they should not be relied on for precise timing. After each
- call to the timeout function, the time of the next timeout is recalculated based
- on the current time and the given interval.</para>
-
- <para>The grouping of timers to fire at the same time results in a more power and
- CPU efficient behavior so if your timer is in multiples of seconds and you don't
- require the first timer exactly one second from now, the use of
- <function>glib.timeout_add_seconds</function>() is preferred
- over <function>glib.timeout_add</function>().</para>
-
- </refsect2>
-
<refsect2 id="function-glib--io-add-watch">
<title>glib.io_add_watch</title>