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
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.Plug</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="gtk-class-reference.html" title="The gtk Class Reference"><link rel="previous" href="class-gtkpaned.html" title="gtk.Paned"><link rel="next" href="class-gtkprogressbar.html" title="gtk.ProgressBar"></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">gtk.Plug</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkpaned.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkprogressbar.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkplug"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.Plug</h2><p>gtk.Plug — A toplevel window for embedding into other
processes.</p></div><div class="refsect1" lang="en"><a name="id3482812"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Plug</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkwindow.html" title="gtk.Window">gtk.Window</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gtkplug.html#constructor-gtkplug" title="Constructor">gtk.Plug</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>socket_id</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkplug.html#method-gtkplug--construct" title="gtk.Plug.construct">construct</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>socket_id</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkplug.html#method-gtkplug--get-id" title="gtk.Plug.get_id">get_id</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>
<code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkplug.html#function-gtk--plug-new-for-display" title="gtk.plug_new_for_display">gtk.plug_new_for_display</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>socket_id</tt></b></span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3482931"></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>
+-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
+-- <a href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
+-- <a href="class-gtkwindow.html" title="gtk.Window">gtk.Window</a>
+-- <a href="class-gtkplug.html" title="gtk.Plug">gtk.Plug</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3482986"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkplug.html#signal-gtkplug--embedded" title='The "embedded" gtk.Plug Signal'>embedded</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>plug</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3483038"></a><h2>Description</h2><p>Together with <a href="class-gtksocket.html" title="gtk.Socket"><tt class="classname">gtk.Socket</tt></a>, <a href="class-gtkplug.html" title="gtk.Plug"><tt class="classname">gtk.Plug</tt></a> provides the
ability to embed widgets from one process into another process in a fashion
that is transparent to the user. One process creates a <a href="class-gtksocket.html" title="gtk.Socket"><tt class="classname">gtk.Socket</tt></a> widget
and, passes the ID of that widgets window to the other process, which then
creates a <a href="class-gtkplug.html" title="gtk.Plug"><tt class="classname">gtk.Plug</tt></a> with that
window ID. Any widgets contained in the <a href="class-gtkplug.html" title="gtk.Plug"><tt class="classname">gtk.Plug</tt></a> then will
appear inside the first applications window.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkplug"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Plug</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>socket_id</tt></b></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"><b class="parameter"><tt>socket_id</tt></b>:</span></td><td> the window ID of the socket, or
0.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtkwidget.html" title="gtk.Widget"><tt class="classname">gtk.Widget</tt></a></td></tr></tbody></table><p>Creates a new <a href="class-gtkplug.html" title="gtk.Plug"><tt class="classname">gtk.Plug</tt></a> widget inside
the <a href="class-gtksocket.html" title="gtk.Socket"><tt class="classname">gtk.Socket</tt></a>
identified by <i class="parameter"><tt>socket_id</tt></i>. If
<i class="parameter"><tt>socket_id</tt></i> is 0, the plug is left "unplugged" and can
later be plugged into a <a href="class-gtksocket.html" title="gtk.Socket"><tt class="classname">gtk.Socket</tt></a> by the
<a href="class-gtksocket.html#method-gtksocket--add-id" title="gtk.Socket.add_id"><tt class="methodname">gtk.Socket.add_id</tt>()</a>
method.</p></div><div class="refsect1" lang="en"><a name="id3483204"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkplug--construct"></a><h3>gtk.Plug.construct</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">construct</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>socket_id</tt></b></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"><b class="parameter"><tt>socket_id</tt></b>:</span></td><td>the window ID of the
socket</td></tr></tbody></table><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>This method is <span class="emphasis"><em>not</em></span> available in PyGTK 2.2
and above.</p></div><p>The <tt class="methodname">construct</tt>() method finishes the
initialization of plug for the <a href="class-gtksocket.html" title="gtk.Socket"><tt class="classname">gtk.Socket</tt></a>
identified by <i class="parameter"><tt>socket_id</tt></i>. This method will generally
only be used by subclasses of <a href="class-gtkplug.html" title="gtk.Plug"><tt class="classname">gtk.Plug</tt></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkplug--get-id"></a><h3>gtk.Plug.get_id</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_id</span>(<span class="methodparam"></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"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the window ID for the plug</td></tr></tbody></table><p>The <tt class="methodname">get_id</tt>() method returns the window
ID of the <a href="class-gtkplug.html" title="gtk.Plug"><tt class="classname">gtk.Plug</tt></a> widget, which
can be used to embed this window inside another window, for instance with
<a href="class-gtksocket.html#method-gtksocket--add-id" title="gtk.Socket.add_id"><tt class="methodname">gtk.Socket.add_id</tt>()</a>.</p></div></div><div class="refsect1" lang="en"><a name="id3483371"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--plug-new-for-display"></a><h3>gtk.plug_new_for_display</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">gtk.plug_new_for_display</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>display</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>socket_id</tt></b></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"><b class="parameter"><tt>display</tt></b>:</span></td><td>the <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
associated with
<i class="parameter"><tt>socket_id's</tt></i>.</td></tr><tr><td><span class="term"><b class="parameter"><tt>socket_id</tt></b>:</span></td><td> the window ID of the socket's
window.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a <a href="class-gtkplug.html" title="gtk.Plug"><tt class="classname">gtk.Plug</tt></a>
object</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.2 and above.</p></div><p>The <tt class="function">gtk.plug_new_for_display</tt>() function
creates a new plug widget inside the <a href="class-gtksocket.html" title="gtk.Socket"><tt class="classname">gtk.Socket</tt></a> specified
by <i class="parameter"><tt>socket_id</tt></i> on the <a href="class-gdkdisplay.html" title="gtk.gdk.Display"><tt class="classname">gtk.gdk.Display</tt></a>
specified by display.</p></div></div><div class="refsect1" lang="en"><a name="id3483523"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkplug--embedded"></a><h3>The "embedded" gtk.Plug Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>plug</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</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>plug</tt></i>:</span></td><td>the plug that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "embedded" signal is emitted when the plug window is
reparented to the socket window.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkpaned.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gtkprogressbar.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Paned</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.ProgressBar</td></tr></table></div></body></html>
|