/usr/share/gtk-doc/html/pygtk/class-gtksocket.html is in python-gtk2-doc 2.24.0-4.
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 55 56 57 58 59 60 61 62 63 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Socket</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><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="prev" href="class-gtksizegroup.html" title="gtk.SizeGroup"><link rel="next" href="class-gtkspinbutton.html" title="gtk.SpinButton"></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.Socket</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtksizegroup.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkspinbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Socket"><a name="class-gtksocket"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Socket</h2><p>gtk.Socket — a container for widgets from other processes.</p></div><div class="refsect1" title="Synopsis"><a name="id3900266"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Socket</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtksocket.html#constructor-gtksocket" title="Constructor">gtk.Socket</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksocket.html#method-gtksocket--add-id" title="gtk.Socket.add_id">add_id</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window_id</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksocket.html#method-gtksocket--get-id" title="gtk.Socket.get_id">get_id</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtksocket.html#method-gtksocket--get-plug-window" title="gtk.Socket.get_plug_window">get_plug_window</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3900382"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
+-- <a class="link" href="class-gtksocket.html" title="gtk.Socket">gtk.Socket</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3900427"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>
implements
<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
</p></div><div class="refsect1" title="gtk.Socket Properties"><a name="properties-gtksocket"></a><h2>gtk.Socket Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p></div><div class="refsect1" title="gtk.Socket Style Properties"><a name="style-properties-gtksocket"></a><h2>gtk.Socket Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p></div><div class="refsect1" title="gtk.Socket Signal Prototypes"><a name="signal-prototypes-gtksocket"></a><h2>gtk.Socket Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtksocket.html#signal-gtksocket--plug-added" title='The "plug-added" gtk.Socket Signal'>plug-added</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>socket</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr><tr><td><p><span class="term">"<a class="link" href="class-gtksocket.html#signal-gtksocket--plug-removed" title='The "plug-removed" gtk.Socket Signal'>plug-removed</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>socket</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3900676"></a><h2>Description</h2><p>Together with a <a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a>, a <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></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 class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a> widget
and, passes the that widget's window ID to the other process, which then
creates a <a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a> with that
window ID. Any widgets contained in the <a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a> then will
appear inside the first applications window. The socket's window ID is
obtained by using the <a class="link" href="class-gtksocket.html#method-gtksocket--get-id" title="gtk.Socket.get_id"><code class="methodname">get_id</code>()</a>
method. Before using this function, the socket must have been realized, and
added to its parent.</p><p>When PyGTK is notified that the embedded window has been
destroyed, then it will destroy the socket as well. You should always,
therefore, be prepared for your sockets to be destroyed at any time when the
main event loop is running. The communication between a <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a> and a
<a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a> follows
the XEmbed protocol.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtksocket"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Socket</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the new <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>.</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>.</p></div><div class="refsect1" title="Methods"><a name="id3900831"></a><h2>Methods</h2><div class="refsect2" title="gtk.Socket.add_id"><a name="method-gtksocket--add-id"></a><h3>gtk.Socket.add_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">add_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>window_id</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>window_id</code></strong> :</span></p></td><td>the window ID of a client participating in the
XEMBED protocol.</td></tr></tbody></table><p>The <code class="methodname">add_id</code>() method adds an XEMBED
client specified by <em class="parameter"><code>window_id</code></em>, such as a <a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a>, to the <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>. The
client may be in the same process or in a different process.</p><p>
To embed a <a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a> in a <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>, you can
either:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>create the <a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a> by calling
<a class="link" href="class-gtkplug.html#constructor-gtkplug" title="Constructor">gtk.Plug</a>(), then call <a class="link" href="class-gtkplug.html#method-gtkplug--get-id" title="gtk.Plug.get_id"><code class="methodname">gtk.Plug.get_id</code>()</a>
to get the window ID of the plug, and finally pass that to the <a class="link" href="class-gtksocket.html#method-gtksocket--add-id" title="gtk.Socket.add_id"><code class="function">gtk.Socket.add_id()</code></a>;
or,</p></li><li class="listitem"><p>call the <a class="link" href="class-gtksocket.html#method-gtksocket--get-id" title="gtk.Socket.get_id"><code class="function">gtk.Socket.get_id()</code></a>
method to get the window ID for the socket, then create the <a class="link" href="class-gtkplug.html" title="gtk.Plug"><code class="classname">gtk.Plug</code></a> by calling
<a class="link" href="class-gtkplug.html#constructor-gtkplug" title="Constructor">gtk.Plug</a>() passing in that ID.
The <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>
must have already be added into a toplevel window before you can make this
call.</p></li></ul></div></div><div class="refsect2" title="gtk.Socket.get_id"><a name="method-gtksocket--get-id"></a><h3>gtk.Socket.get_id</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_id</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the window ID for the
socket</td></tr></tbody></table><p>The <code class="methodname">get_id</code>() method gets the window ID
of a <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a> widget,
which can then be used to create a client embedded inside the socket, for
instance with <a class="link" href="class-gtkplug.html#constructor-gtkplug" title="Constructor">gtk.Plug</a>(). The
<a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>
must have already be added into a toplevel window before you can make this
call.</p></div><div class="refsect2" title="gtk.Socket.get_plug_window"><a name="method-gtksocket--get-plug-window"></a><h3>gtk.Socket.get_plug_window</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_plug_window</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the window of the plug if available, or
<code class="literal">None</code>.</td></tr></tbody></table><p>
The <code class="methodname">get_plug_window</code>() method retrieves the
window of the plug. Use this to check if the plug has been created
inside of the socket.
</p></div></div><div class="refsect1" title="Signals"><a name="id3901181"></a><h2>Signals</h2><div class="refsect2" title='The "plug-added" gtk.Socket Signal'><a name="signal-gtksocket--plug-added"></a><h3>The "plug-added" gtk.Socket Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>socket</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></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"><em class="parameter"><code>socket</code></em> :</span></p></td><td>the socket that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "plug-added" signal is emitted when a plug is added to the
socket.</p></div><div class="refsect2" title='The "plug-removed" gtk.Socket Signal'><a name="signal-gtksocket--plug-removed"></a><h3>The "plug-removed" gtk.Socket Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>socket</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></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"><em class="parameter"><code>socket</code></em> :</span></p></td><td>the socket that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td><code class="literal">True</code> if the <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a>
should not be destroyed.</td></tr></tbody></table><p>The "plug-removed" signal is emitted when a plug is removed from
the socket. The default action is to destroy the <a class="link" href="class-gtksocket.html" title="gtk.Socket"><code class="classname">gtk.Socket</code></a> widget,
so if you want to reuse it you must add a signal handler that returns
<code class="literal">True</code>.</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-gtksizegroup.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-gtkspinbutton.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.SizeGroup </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.SpinButton</td></tr></table></div></body></html>
|