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 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gobject.GObject</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gobject-class-reference.html" title="The gobject Class Reference"><link rel="previous" href="gobject-class-reference.html" title="The gobject Class Reference"><link rel="next" href="class-gobjectgboxed.html" title="gobject.GBoxed"></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">gobject.GObject</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a></td><th width="60%" align="center">The gobject Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gobject"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">gobject.GObject</span></h2><p>gobject.GObject — the base class</p></div><div class="refsect1" lang="en"><a name="id3034143"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gobject.GObject</span></span>:
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--get-property" title="gobject.GObject.get_property">get_property</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>property_name</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--set-property" title="gobject.GObject.set_property">set_property</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>property_name</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>value</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--freeze-notify" title="gobject.GObject.freeze_notify">freeze_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--notify" title="gobject.GObject.notify">notify</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>property_name</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--thaw-notify" title="gobject.GObject.thaw_notify">thaw_notify</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--get-data" title="gobject.GObject.get_data">get_data</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>key</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--set-data" title="gobject.GObject.set_data">set_data</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>key</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>data</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect">connect</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--connect-after" title="gobject.GObject.connect_after">connect_after</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--connect-object" title="gobject.GObject.connect_object">connect_object</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--connect-object-after" title="gobject.GObject.connect_object_after">connect_object_after</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--disconnect" title="gobject.GObject.disconnect">disconnect</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--handler-disconnect" title="gobject.GObject.handler_disconnect">handler_disconnect</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--handler-is-connected" title="gobject.GObject.handler_is_connected">handler_is_connected</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--handler-block" title="gobject.GObject.handler_block">handler_block</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--handler-unblock" title="gobject.GObject.handler_unblock">handler_unblock</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--emit" title="gobject.GObject.emit">emit</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--stop-emission" title="gobject.GObject.stop_emission">stop_emission</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--stop-emission" title="gobject.GObject.stop_emission">emit_stop_by_name</a></span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gobject.html#method-gobject--chain" title="gobject.GObject.chain">chain</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id2978684"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id2978664"></a><h2>Description</h2><p>The GObject class is the base class providing the common
attributes and methods for the PyGTK classes. The GObject class is not a
user interface widget class.</p><p>The GObject class provides the signal management methods, the
object property access methods and the object data management
methods.</p></div><div class="refsect1" lang="en"><a name="id2978642"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"__doc__"</td><td valign="top">Read</td><td valign="top">The documentation for the object type. Uses
"__gdoc__" if no specific documentation set.</td></tr><tr valign="top"><td valign="top">"__gdoc__"</td><td valign="top">Read</td><td valign="top">The generated documentation for the underlying GObject
type.</td></tr><tr valign="top"><td valign="top">"__gtype__"</td><td valign="top">Read</td><td valign="top">The underlying GObject type.</td></tr><tr valign="top"><td valign="top">"__grefcount__"</td><td valign="top">Read</td><td valign="top">The reference count for the underlying GObject.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id2978529"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gobject--get-property"></a><h3>gobject.GObject.get_property</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_property</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>property_name</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>property_name</tt></i>:</span></td><td>a string containing the property name for the
GObject</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a Python object containing the value of the
property</td></tr></tbody></table><p>The <tt class="methodname">get_property</tt>() method returns the
value of the property specified by <i class="parameter"><tt>property_name</tt></i> or
None if there is no value associated with the property.</p><p>The <tt class="exceptionname">TypeError</tt> exception is raised
if the property name is not registered with the object class.</p></div><div class="refsect2" lang="en"><a name="method-gobject--set-property"></a><h3>gobject.GObject.set_property</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_property</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>property_name</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>value</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>property_name</tt></i>:</span></td><td>a string containing the property
name</td></tr><tr><td><span class="term"><i class="parameter"><tt>value</tt></i>:</span></td><td>a Python object containing the property value
to be set</td></tr></tbody></table><p>The <tt class="methodname">set_property</tt>() method sets the
property specified by <i class="parameter"><tt>property_name</tt></i> to the specified
<i class="parameter"><tt>value</tt></i>.</p><p>The <tt class="exceptionname">TypeError</tt> exception is raised
if the property name is not registered with the object class or if the value
specified could not be converted to the property type.</p></div><div class="refsect2" lang="en"><a name="method-gobject--freeze-notify"></a><h3>gobject.GObject.freeze_notify</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">freeze_notify</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">freeze_notify</tt>() method freezes the
object's property-changed notification queue so that "notify" signals are
blocked until the <tt class="methodname">thaw_notify</tt>() method is
called.</p></div><div class="refsect2" lang="en"><a name="method-gobject--notify"></a><h3>gobject.GObject.notify</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">notify</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>property_name</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>property_name</tt></i>:</span></td><td>a string containing a property
name</td></tr></tbody></table><p>The <tt class="methodname">notify</tt>() method causes the "notify"
signal for the property specified by <i class="parameter"><tt>property_name</tt></i> to
be emitted.</p></div><div class="refsect2" lang="en"><a name="method-gobject--thaw-notify"></a><h3>gobject.GObject.thaw_notify</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">thaw_notify</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">thaw_notify</tt>() method thaws the
object's property-changed notification queue so that "notify" signals are
emitted.</p></div><div class="refsect2" lang="en"><a name="method-gobject--get-data"></a><h3>gobject.GObject.get_data</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_data</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>key</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>key</tt></i>:</span></td><td>a string used as the key</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a Python object containing the associated
data</td></tr></tbody></table><p>The <tt class="methodname">get_data</tt>() method returns the
Python object associated with the specified <i class="parameter"><tt>key</tt></i> or
None if there is no data associated with the <i class="parameter"><tt>key</tt></i> or
if there is no key associated with the object.</p></div><div class="refsect2" lang="en"><a name="method-gobject--set-data"></a><h3>gobject.GObject.set_data</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_data</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>key</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>data</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>key</tt></i>:</span></td><td>a string used as a key</td></tr><tr><td><span class="term"><i class="parameter"><tt>data</tt></i>:</span></td><td>a Python object that is the value to be
associated with the key</td></tr></tbody></table><p>The <tt class="methodname">set_data</tt>() method associates the
specified Python object (<i class="parameter"><tt>data</tt></i>) with
<i class="parameter"><tt>key</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gobject--connect"></a><h3>gobject.GObject.connect</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>detailed_signal</tt></i>:</span></td><td>a string containing the signal
name</td></tr><tr><td><span class="term"><i class="parameter"><tt>handler</tt></i>:</span></td><td>a Python function or method
object.</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional optional
parameters</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an integer identifier</td></tr></tbody></table><p>The <tt class="methodname">connect</tt>() method adds a function or
method (<i class="parameter"><tt>handler</tt></i>)to the end of the list of signal
handlers for the named <i class="parameter"><tt>detailed_signal</tt></i> but before the
default class signal handler. An optional set of parameters may be specified
after the <i class="parameter"><tt>handler</tt></i> parameter. These will all be passed
to the signal handler when invoked.</p><p>For example if a function handler was connected to a signal
using:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
handler_id = object.connect("signal_name", handler, arg1, arg2, arg3)
</pre></td></tr></table><p>The handler should be defined as:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
def handler(object, arg1, arg2, arg3):
</pre></td></tr></table><p>A method handler connected to a signal using:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
handler_id = object.connect("signal_name", self.handler, arg1, arg2)
</pre></td></tr></table><p>requires an additional argument when defined:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
def handler(self, object, arg1, arg2)
</pre></td></tr></table><p>A <tt class="exceptionname">TypeError</tt> exception is raised
if <i class="parameter"><tt>detailed_signal</tt></i> identifies a signal name that is
not associated with the object.</p></div><div class="refsect2" lang="en"><a name="method-gobject--connect-after"></a><h3>gobject.GObject.connect_after</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_after</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>detailed_signal</tt></i>:</span></td><td>a string containing the signal
name</td></tr><tr><td><span class="term"><i class="parameter"><tt>handler</tt></i>:</span></td><td>a Python function or method
object</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional optional
parameters</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an integer handler
identifier</td></tr></tbody></table><p>The <tt class="methodname">connect_after</tt>() method is similar
to the <tt class="methodname">connect</tt>() method except that the
<i class="parameter"><tt>handler</tt></i> is added to the signal handler list after the
default class signal handler. Otherwise the details of
<i class="parameter"><tt>handler</tt></i> definition and invocation are the
same.</p></div><div class="refsect2" lang="en"><a name="method-gobject--connect-object"></a><h3>gobject.GObject.connect_object</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_object</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>gobject</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>detailed_signal</tt></i>:</span></td><td>a string containing the signal
name</td></tr><tr><td><span class="term"><i class="parameter"><tt>handler</tt></i>:</span></td><td>a Python function or method
object</td></tr><tr><td><span class="term"><i class="parameter"><tt>gobject</tt></i>:</span></td><td>a GObject</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an integer handler
identifier</td></tr></tbody></table><p>The <tt class="methodname">connect_object</tt>() method is the same
as the <tt class="methodname">connect</tt>() method except that the
<i class="parameter"><tt>handler</tt></i> is invoked with the specified
<i class="parameter"><tt>gobject</tt></i> in place of the object invoking the
<tt class="methodname">connect_object</tt>() method. For example, a call with a
function handler:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
handler_id = object("signal_name", handler, gobject)
</pre></td></tr></table><p>will cause the <i class="parameter"><tt>handler</tt></i> to be invoked
as:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
handler(gobject)
</pre></td></tr></table><p>Likewise a method handler will be invoked as:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
self.handler(gobject)
</pre></td></tr></table><p>This can be helpful in invoking PyGTK widget methods that
require no arguments except the widget itself (e.g.
<tt class="methodname">widget.destroy</tt>()) by using the class method as the
handler. For example, a Button "clicked" signal can be set up to invoke the
Window <tt class="methodname">destroy</tt>() method as:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
handler_id = button.connect_object("clicked", Window.destroy, window)
</pre></td></tr></table><p>When the button is clicked the handler is invoked as:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
Window.destroy(window)
</pre></td></tr></table><p>which is the same as:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
window.destroy()
</pre></td></tr></table><p>Additional arguments may be passed to the handler as with the
<tt class="methodname">connect</tt>() method handler invocations.</p></div><div class="refsect2" lang="en"><a name="method-gobject--connect-object-after"></a><h3>gobject.GObject.connect_object_after</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">connect_object_after</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>detailed_signal</tt></i>:</span></td><td>a string containing the signal
name</td></tr><tr><td><span class="term"><i class="parameter"><tt>handler</tt></i>:</span></td><td>a Python function or method
object</td></tr><tr><td><span class="term"><i class="parameter"><tt>gobject</tt></i>:</span></td><td>a GObject</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an integer handler
identifier</td></tr></tbody></table><p>The <tt class="methodname">connect_object_after</tt>() method is
similar to the <tt class="methodname">connect_object</tt>() method except that
the <i class="parameter"><tt>handler</tt></i> is added to the signal handler list after
the default class signal handler. Otherwise the details of
<i class="parameter"><tt>handler</tt></i> definition and invocation are the
same.</p></div><div class="refsect2" lang="en"><a name="method-gobject--disconnect"></a><h3>gobject.GObject.disconnect</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">disconnect</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>handler_id</tt></i>:</span></td><td>an integer handler
identifier</td></tr></tbody></table><p>The <tt class="methodname">disconnect</tt>() method removes the
signal handler with the specified <i class="parameter"><tt>handler_id</tt></i> from the
list of signal handlers for the object.</p></div><div class="refsect2" lang="en"><a name="method-gobject--handler-disconnect"></a><h3>gobject.GObject.handler_disconnect</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_disconnect</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>handler_id</tt></i>:</span></td><td>an integer handler
identifier</td></tr></tbody></table><p>The <tt class="methodname">handler_disconnect</tt>() method removes
the signal handler with the specified <i class="parameter"><tt>handler_id</tt></i> from
the list of signal handlers for the object.</p></div><div class="refsect2" lang="en"><a name="method-gobject--handler-is-connected"></a><h3>gobject.GObject.handler_is_connected</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_is_connected</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>handler_id</tt></i>:</span></td><td>an integer handler
identifier</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the signal handler
is connected to the object.</td></tr></tbody></table><p>The <tt class="methodname">handler_is_connected</tt>() method
returns <tt class="literal">TRUE</tt> if the signal handler with the specified
<i class="parameter"><tt>handler_id</tt></i> is connected to the object.</p></div><div class="refsect2" lang="en"><a name="method-gobject--handler-block"></a><h3>gobject.GObject.handler_block</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_block</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>handler_id</tt></i>:</span></td><td>an integer handler
identifier</td></tr></tbody></table><p>The <tt class="methodname">handler_block</tt>() method blocks the
signal handler with the specified <i class="parameter"><tt>handler_id</tt></i> from
being invoked until it is unblocked.</p></div><div class="refsect2" lang="en"><a name="method-gobject--handler-unblock"></a><h3>gobject.GObject.handler_unblock</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">handler_unblock</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>handler_id</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>handler_id</tt></i>:</span></td><td>an integer handler
identifier</td></tr></tbody></table><p>The <tt class="methodname">handler_unblock</tt>() method unblocks
the signal handler with the specified <i class="parameter"><tt>handler_id</tt></i>
thereby allowing it to be invoked when the associated signal is
emitted.</p></div><div class="refsect2" lang="en"><a name="method-gobject--emit"></a><h3>gobject.GObject.emit</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">emit</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>detailed_signal</tt></i>:</span></td><td>a string containing the signal
name</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional parameters</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a PyObject*</td></tr></tbody></table><p>The <tt class="methodname">emit</tt>() method causes the object to
emit the signal specified by <i class="parameter"><tt>detailed_signal</tt></i>. The
additional parameters must match the number and type of the required signal
handler parameters. In most cases no additional parameters are needed. for
example:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
button.emit("clicked")
</pre></td></tr></table><p>is all that is required to emit the "clicked" signal for a
button. The most common case requiring additional parameters occurs when
emitting an event signal; for example:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
button.emit("button_press_event", event)
</pre></td></tr></table></div><div class="refsect2" lang="en"><a name="method-gobject--stop-emission"></a><h3>gobject.GObject.stop_emission</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">stop_emission</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>detailed_signal</tt></i>:</span></td><td>a string containing the signal
name</td></tr></tbody></table><p>The <tt class="methodname">stop_emission</tt>() method stops the
current emission of the signal specified by
<i class="parameter"><tt>detailed_signal</tt></i>. Any signal handlers in the list
still to be run will not be invoked.</p></div><div class="refsect2" lang="en"><a name="method-gobject--emit-stop-by-name"></a><h3>gobject.GObject.emit_stop_by_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">emit_stop_by_name</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>detailed_signal</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>detailed_signal</tt></i>:</span></td><td>a string containing the signal
name</td></tr></tbody></table><p>The <tt class="methodname">emit_stop_by_name</tt>() method stops
the current emission of the signal specified by
<i class="parameter"><tt>detailed_signal</tt></i>. Any signal handlers in the list
still to be run will not be invoked.</p></div><div class="refsect2" lang="en"><a name="method-gobject--chain"></a><h3>gobject.GObject.chain</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">chain</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional parameters</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a Python object</td></tr></tbody></table><p>The chain() method does something.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="gobject-class-reference.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gobject-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gobjectgboxed.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">The gobject Class Reference</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gobject.GBoxed</td></tr></table></div></body></html>
|