/usr/share/gtk-doc/html/libbonoboui/libbonoboui-bonobo-socket.html is in libbonoboui2-dev 2.24.5-0ubuntu1.
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 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 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>BonoboSocket</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="LibBonoboUI API Reference Manual">
<link rel="up" href="bonobo-support-utilities.html" title="Supporting Classes">
<link rel="prev" href="libbonoboui-bonobo-plug.html" title="BonoboPlug">
<link rel="next" href="libbonoboui-bonobo-wrapper.html" title="bonobo-wrapper">
<meta name="generator" content="GTK-Doc V1.15.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libbonoboui-bonobo-plug.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="bonobo-support-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">LibBonoboUI API Reference Manual</th>
<td><a accesskey="n" href="libbonoboui-bonobo-wrapper.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libbonoboui-bonobo-socket.synopsis" class="shortcut">Top</a>
|
<a href="#libbonoboui-bonobo-socket.description" class="shortcut">Description</a>
|
<a href="#libbonoboui-bonobo-socket.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#libbonoboui-bonobo-socket.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
</td></tr>
</table>
<div class="refentry">
<a name="libbonoboui-bonobo-socket"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libbonoboui-bonobo-socket.top_of_page"></a>BonoboSocket</span></h2>
<p>BonoboSocket — Container for widgets from other processes.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libbonoboui-bonobo-socket.synopsis"></a><h2>Synopsis</h2>
<a name="BonoboSocket"></a><pre class="synopsis"> <a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocket-struct" title="BonoboSocket">BonoboSocket</a>;
<a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocketClass" title="BonoboSocketClass">BonoboSocketClass</a>;
<span class="returnvalue">GtkWidget</span>* <a class="link" href="libbonoboui-bonobo-socket.html#bonobo-socket-new" title="bonobo_socket_new ()">bonobo_socket_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libbonoboui-bonobo-socket.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkSocket
+----BonoboSocket
</pre>
</div>
<div class="refsect1">
<a name="libbonoboui-bonobo-socket.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
BonoboSocket implements
AtkImplementorIface and GtkBuildable.</p>
</div>
<div class="refsect1">
<a name="libbonoboui-bonobo-socket.description"></a><h2>Description</h2>
<p>
This is an internal support routine of the X code in Bonobo.
</p>
<p>
Together with <a class="link" href="libbonoboui-bonobo-plug.html#BonoboPlug"><span class="type">BonoboPlug</span></a>, <a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocket"><span class="type">BonoboSocket</span></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="libbonoboui-bonobo-socket.html#BonoboSocket"><span class="type">BonoboSocket</span></a> widget and, passes the
XID of that widget's window to the other process,
which then creates a <a class="link" href="libbonoboui-bonobo-plug.html#BonoboPlug"><span class="type">BonoboPlug</span></a> window with that XID.
Any widgets contained in the <a class="link" href="libbonoboui-bonobo-plug.html#BonoboPlug"><span class="type">BonoboPlug</span></a> then will appear
inside the first applications window.
</p>
<p>
The XID of the socket's window is obtained by using
the <code class="function">GTK_WINDOW_XWINDOW()</code> macro from the header
file <gdk/gdkx.h>. Before using this macro,
the socket must have been realized, and for hence,
have been added to its parent.
</p>
<div class="example">
<a name="id2857858"></a><p class="title"><b>Example 9. Obtaining the XID of a socket </b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string"><gdk/gdkx.h></span>
<span class="usertype">GtkWidget</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">socket </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="libbonoboui-bonobo-socket.html#bonobo-socket-new">bonobo_socket_new</a></span><span class="symbol">();</span>
<span class="function">gtk_widget_show</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">socket</span><span class="symbol">);</span>
<span class="function">gtk_container_add</span><span class="normal"> </span><span class="symbol">(</span><span class="function">GTK_CONTAINER</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">parent</span><span class="symbol">),</span><span class="normal"> socket</span><span class="symbol">);</span>
<span class="comment">/* The following call is only necessary if one of</span>
<span class="comment"> * the ancestors of the socket is not yet visible.</span>
<span class="comment"> */</span>
<span class="function">gtk_widget_realize</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">socket</span><span class="symbol">);</span>
<span class="function"><a href="http://library.gnome.org/devel/glib/unstable/glib-Warnings-and-Assertions.html#g-print">g_print</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"The XID of the sockets window is %<GTKDOCLINK HREF="</span><span class="normal">x</span><span class="string">">x</GTKDOCLINK></span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span>
<span class="normal"> </span><span class="function">GDK_WINDOW_XWINDOW</span><span class="normal"> </span><span class="symbol">(</span><span class="normal">socket</span><span class="symbol">-></span><span class="normal">window</span><span class="symbol">));</span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<p><br class="example-break">
</p>
<p>
Note that if you pass the XID of the socket to another
process that will create a plug in the socket, you
must make sure that the socket widget is not destroyed
until that plug is created. Violating this rule will
cause unpredictable consequences, the most likely
consequence being that the plug will appear as a
separate toplevel window. You can check if the plug
has been created by examining the
<em class="structfield"><code>plug_window</code></em> field of the
<a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocket"><span class="type">BonoboSocket</span></a> structure. If this field is non-NULL,
then the plug has been succesfully created inside
of the socket.
</p>
<p>
When GTK+ 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.
</p>
<p>
A socket can also be used to swallow arbitrary
pre-existing top-level windows using <code class="function">gtk_socket_steal()</code>,
though the integration when this is done will not be as close
as between a <a class="link" href="libbonoboui-bonobo-plug.html#BonoboPlug"><span class="type">BonoboPlug</span></a> and a <a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocket"><span class="type">BonoboSocket</span></a>.
</p>
</div>
<div class="refsect1">
<a name="libbonoboui-bonobo-socket.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="BonoboSocket-struct"></a><h3>BonoboSocket</h3>
<pre class="programlisting">typedef struct _BonoboSocket BonoboSocket;</pre>
<p>
The <span class="type">GtkEditable</span> structure contains the following field.
(This field should be considered read-only. It should
never be set by an application.)
</p>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody><tr>
<td>
<span class="type">GdkWindow</span> *plug_window;</td>
<td>the window embedded inside this <span class="type">GtkSocket</span>.</td>
</tr></tbody>
</table></div>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="BonoboSocketClass"></a><h3>BonoboSocketClass</h3>
<pre class="programlisting">typedef struct {
GtkSocketClass parent_class;
gpointer dummy[4];
} BonoboSocketClass;
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2">
<a name="bonobo-socket-new"></a><h3>bonobo_socket_new ()</h3>
<pre class="programlisting"><span class="returnvalue">GtkWidget</span>* bonobo_socket_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Create a new empty <a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocket"><span class="type">BonoboSocket</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new <a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocket"><span class="type">BonoboSocket</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="libbonoboui-bonobo-socket.see-also"></a><h2>See Also</h2>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><a class="link" href="libbonoboui-bonobo-plug.html#BonoboPlug"><span class="type">BonoboPlug</span></a></span></p></td>
<td><p>the widget that plugs into a <a class="link" href="libbonoboui-bonobo-socket.html#BonoboSocket"><span class="type">BonoboSocket</span></a>.</p></td>
</tr></tbody>
</table></div>
<p>
</p>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.15.1</div>
</body>
</html>
|