1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" href="index.html" title="GTK+ Reference Manual">
8
<link rel="up" href="PlugSocket.html" title="Cross-process Embedding">
9
<link rel="prev" href="PlugSocket.html" title="Cross-process Embedding">
10
<link rel="next" href="GtkSocket.html" title="GtkSocket">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gtk.html" title="Part I. GTK+ Overview">
14
<link rel="part" href="gtkbase.html" title="Part II. GTK+ Core Reference">
15
<link rel="part" href="gtkobjects.html" title="Part III. GTK+ Widgets and Objects">
16
<link rel="chapter" href="ch01.html" title="Object Hierarchy">
17
<link rel="chapter" href="ch02.html" title="Widget Gallery">
18
<link rel="chapter" href="WindowWidgets.html" title="Windows">
19
<link rel="chapter" href="DisplayWidgets.html" title="Display Widgets">
20
<link rel="chapter" href="ButtonWidgets.html" title="Buttons and Toggles">
21
<link rel="chapter" href="NumericEntry.html" title="Numeric/Text Data Entry">
22
<link rel="chapter" href="TextWidgetObjects.html" title="Multiline Text Editor">
23
<link rel="chapter" href="TreeWidgetObjects.html" title="Tree, List and Icon Grid Widgets">
24
<link rel="chapter" href="MenusAndCombos.html" title="Menus, Combo Box, Toolbar">
25
<link rel="chapter" href="Actions.html" title="Action-based menus and toolbars">
26
<link rel="chapter" href="SelectorWidgets.html" title="Selectors (File/Font/Color/Input Devices)">
27
<link rel="chapter" href="LayoutContainers.html" title="Layout Containers">
28
<link rel="chapter" href="Ornaments.html" title="Ornaments">
29
<link rel="chapter" href="ScrollingWidgets.html" title="Scrolling">
30
<link rel="chapter" href="Printing.html" title="Printing">
31
<link rel="chapter" href="MiscObjects.html" title="Miscellaneous">
32
<link rel="chapter" href="AbstractObjects.html" title="Abstract Base Classes">
33
<link rel="chapter" href="PlugSocket.html" title="Cross-process Embedding">
34
<link rel="chapter" href="SpecialObjects.html" title="Special-purpose features">
35
<link rel="chapter" href="RecentDocuments.html" title="Recently Used Documents">
36
<link rel="chapter" href="DeprecatedObjects.html" title="Deprecated">
37
<link rel="part" href="migrating.html" title="Part IV. Migrating from Previous Versions of GTK+">
38
<link rel="chapter" href="gtk-migrating-checklist.html" title="Migration Checklist">
39
<link rel="chapter" href="gtk-migrating-GtkFileChooser.html" title="Migrating from GtkFileSelection to GtkFileChooser">
40
<link rel="chapter" href="gtk-migrating-GtkAction.html" title="Migrating from old menu and toolbar systems to GtkAction">
41
<link rel="chapter" href="gtk-migrating-GtkComboBox.html" title="Migrating from GtkOptionMenu and GtkCombo to GtkComboBox and GtkComboBoxEntry">
42
<link rel="chapter" href="gtk-migrating-GtkIconView.html" title="Migrating from GnomeIconList to GtkIconView">
43
<link rel="chapter" href="gtk-migrating-GtkAboutDialog.html" title="Migrating from GnomeAbout to GtkAboutDialog">
44
<link rel="chapter" href="gtk-migrating-GtkColorButton.html" title="Migrating from GnomeColorPicker to GtkColorButton">
45
<link rel="chapter" href="gtk-migrating-GtkAssistant.html" title="Migrating from GnomeDruid to GtkAssistant">
46
<link rel="chapter" href="gtk-migrating-GtkRecentChooser.html" title="Migrating from EggRecent to GtkRecentChooser">
47
<link rel="chapter" href="gtk-migrating-GtkLinkButton.html" title="Migrating from GnomeHRef to GtkLinkButton">
48
<link rel="part" href="pt05.html" title="Part V. GTK+ Tools">
49
<link rel="glossary" href="glossary.html" title="Glossary">
50
<link rel="index" href="ix01.html" title="Index">
51
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
52
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
53
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
54
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
55
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
56
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
58
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
59
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
61
<td><a accesskey="p" href="PlugSocket.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
62
<td><a accesskey="u" href="PlugSocket.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
63
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
64
<th width="100%" align="center">GTK+ Reference Manual</th>
65
<td><a accesskey="n" href="GtkSocket.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
67
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3823179" class="shortcut">Top</a>
69
<a href="#id3823470" class="shortcut">Description</a>
71
<a href="#id3823350" class="shortcut">Object Hierarchy</a>
73
<a href="#id3823419" class="shortcut">Implemented Interfaces</a>
75
<a href="#id3823442" class="shortcut">Signals</a></nobr></td></tr>
77
<div class="refentry" lang="en">
78
<a name="GtkPlug"></a><div class="titlepage"></div>
79
<div class="refnamediv"><table width="100%"><tr>
82
<a name="id3823179"></a><span class="refentrytitle">GtkPlug</span>
84
<p>GtkPlug — Toplevel for embedding into other processes</p>
86
<td valign="top" align="right"></td>
88
<div class="refsynopsisdiv">
90
<pre class="synopsis">
92
#include <gtk/gtk.h>
95
<a href="GtkPlug.html#GtkPlug-struct">GtkPlug</a>;
96
void <a href="GtkPlug.html#gtk-plug-construct">gtk_plug_construct</a> (<a href="GtkPlug.html" title="GtkPlug">GtkPlug</a> *plug,
98
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
99
>GdkNativeWindow</a> socket_id);
100
void <a href="GtkPlug.html#gtk-plug-construct-for-display">gtk_plug_construct_for_display</a> (<a href="GtkPlug.html" title="GtkPlug">GtkPlug</a> *plug,
102
href="../gdk/GdkDisplay.html"
103
>GdkDisplay</a> *display,
105
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
106
>GdkNativeWindow</a> socket_id);
107
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkPlug.html#gtk-plug-new">gtk_plug_new</a> (<a
108
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
109
>GdkNativeWindow</a> socket_id);
110
<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* <a href="GtkPlug.html#gtk-plug-new-for-display">gtk_plug_new_for_display</a> (<a
111
href="../gdk/GdkDisplay.html"
112
>GdkDisplay</a> *display,
114
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
115
>GdkNativeWindow</a> socket_id);
117
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
118
>GdkNativeWindow</a> <a href="GtkPlug.html#gtk-plug-get-id">gtk_plug_get_id</a> (<a href="GtkPlug.html" title="GtkPlug">GtkPlug</a> *plug);
123
<div class="refsect1" lang="en">
124
<a name="id3823350"></a><h2>Object Hierarchy</h2>
125
<pre class="synopsis">
128
+----GInitiallyUnowned
129
+----<a href="GtkObject.html" title="GtkObject">GtkObject</a>
130
+----<a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
131
+----<a href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
132
+----<a href="GtkBin.html" title="GtkBin">GtkBin</a>
133
+----<a href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
137
<div class="refsect1" lang="en">
138
<a name="id3823419"></a><h2>Implemented Interfaces</h2>
141
AtkImplementorIface.</p>
143
<div class="refsect1" lang="en">
144
<a name="id3823442"></a><h2>Signals</h2>
145
<pre class="synopsis">
147
"<a href="GtkPlug.html#GtkPlug-embedded">embedded</a>" : Run Last
150
<div class="refsect1" lang="en">
151
<a name="id3823470"></a><h2>Description</h2>
153
Together with <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>, <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> provides the ability
154
to embed widgets from one process into another process
155
in a fashion that is transparent to the user. One
156
process creates a <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> widget and, passes the
157
ID of that widgets window to the other process,
158
which then creates a <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> with that window ID.
159
Any widgets contained in the <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> then will appear
160
inside the first applications window.
162
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
163
<h3 class="title">Note</h3>
165
The <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> and <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> widgets are currently not available
166
on all platforms supported by GTK+.
170
<div class="refsect1" lang="en">
171
<a name="id3823553"></a><h2>Details</h2>
172
<div class="refsect2" lang="en">
173
<a name="id3823563"></a><h3>
174
<a name="GtkPlug-struct"></a>GtkPlug</h3>
175
<a class="indexterm" name="id3823577"></a><pre class="programlisting">typedef struct _GtkPlug GtkPlug;</pre>
181
<div class="refsect2" lang="en">
182
<a name="id3823591"></a><h3>
183
<a name="gtk-plug-construct"></a>gtk_plug_construct ()</h3>
184
<a class="indexterm" name="id3823605"></a><pre class="programlisting">void gtk_plug_construct (<a href="GtkPlug.html" title="GtkPlug">GtkPlug</a> *plug,
186
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
187
>GdkNativeWindow</a> socket_id);</pre>
189
Finish the initialization of <em class="parameter"><code>plug</code></em> for a given <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> identified by
190
<em class="parameter"><code>socket_id</code></em>. This function will generally only be used by classes deriving from <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a>.</p>
193
<div class="variablelist"><table border="0">
194
<col align="left" valign="top">
197
<td><span class="term"><em class="parameter"><code>plug</code></em> :</span></td>
198
<td> a <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a>.
202
<td><span class="term"><em class="parameter"><code>socket_id</code></em> :</span></td>
203
<td> the XID of the socket's window.
210
<div class="refsect2" lang="en">
211
<a name="id3823714"></a><h3>
212
<a name="gtk-plug-construct-for-display"></a>gtk_plug_construct_for_display ()</h3>
213
<a class="indexterm" name="id3823730"></a><pre class="programlisting">void gtk_plug_construct_for_display (<a href="GtkPlug.html" title="GtkPlug">GtkPlug</a> *plug,
215
href="../gdk/GdkDisplay.html"
216
>GdkDisplay</a> *display,
218
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
219
>GdkNativeWindow</a> socket_id);</pre>
221
Finish the initialization of <em class="parameter"><code>plug</code></em> for a given <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> identified by
222
<em class="parameter"><code>socket_id</code></em> which is currently displayed on <em class="parameter"><code>display</code></em>.
223
This function will generally only be used by classes deriving from <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a>.</p>
227
<div class="variablelist"><table border="0">
228
<col align="left" valign="top">
231
<td><span class="term"><em class="parameter"><code>plug</code></em> :</span></td>
232
<td> a <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a>.
236
<td><span class="term"><em class="parameter"><code>display</code></em> :</span></td>
238
href="../gdk/GdkDisplay.html"
239
><span class="type">GdkDisplay</span></a> associated with <em class="parameter"><code>socket_id</code></em>'s
240
<a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>.
244
<td><span class="term"><em class="parameter"><code>socket_id</code></em> :</span></td>
245
<td> the XID of the socket's window.
250
<p class="since">Since 2.2
254
<div class="refsect2" lang="en">
255
<a name="id3823896"></a><h3>
256
<a name="gtk-plug-new"></a>gtk_plug_new ()</h3>
257
<a class="indexterm" name="id3823909"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_plug_new (<a
258
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
259
>GdkNativeWindow</a> socket_id);</pre>
261
Creates a new plug widget inside the <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> identified
262
by <em class="parameter"><code>socket_id</code></em>. If <em class="parameter"><code>socket_id</code></em> is 0, the plug is left "unplugged" and
263
can later be plugged into a <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> by <a href="GtkSocket.html#gtk-socket-add-id"><code class="function">gtk_socket_add_id()</code></a>.</p>
266
<div class="variablelist"><table border="0">
267
<col align="left" valign="top">
270
<td><span class="term"><em class="parameter"><code>socket_id</code></em> :</span></td>
271
<td> the window ID of the socket, or 0.
275
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
276
<td> the new <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> widget.
283
<div class="refsect2" lang="en">
284
<a name="id3824020"></a><h3>
285
<a name="gtk-plug-new-for-display"></a>gtk_plug_new_for_display ()</h3>
286
<a class="indexterm" name="id3824035"></a><pre class="programlisting"><a href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_plug_new_for_display (<a
287
href="../gdk/GdkDisplay.html"
288
>GdkDisplay</a> *display,
290
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
291
>GdkNativeWindow</a> socket_id);</pre>
293
Create a new plug widget inside the <a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> identified by socket_id.</p>
297
<div class="variablelist"><table border="0">
298
<col align="left" valign="top">
301
<td><span class="term"><em class="parameter"><code>display</code></em> :</span></td>
303
href="../gdk/GdkDisplay.html"
304
><span class="type">GdkDisplay</span></a> on which <em class="parameter"><code>socket_id</code></em> is displayed
308
<td><span class="term"><em class="parameter"><code>socket_id</code></em> :</span></td>
309
<td> the XID of the socket's window.
313
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
314
<td> the new <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> widget.
320
<p class="since">Since 2.2
324
<div class="refsect2" lang="en">
325
<a name="id3824156"></a><h3>
326
<a name="gtk-plug-get-id"></a>gtk_plug_get_id ()</h3>
327
<a class="indexterm" name="id3824169"></a><pre class="programlisting"><a
328
href="../gdk/gdk-Event-Structures.html#GdkNativeWindow"
329
>GdkNativeWindow</a> gtk_plug_get_id (<a href="GtkPlug.html" title="GtkPlug">GtkPlug</a> *plug);</pre>
331
Gets the window ID of a <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> widget, which can then
332
be used to embed this window inside another window, for
333
instance with <a href="GtkSocket.html#gtk-socket-add-id"><code class="function">gtk_socket_add_id()</code></a>.</p>
337
<div class="variablelist"><table border="0">
338
<col align="left" valign="top">
341
<td><span class="term"><em class="parameter"><code>plug</code></em> :</span></td>
342
<td> a <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a>.
346
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
347
<td> the window ID for the plug
354
<div class="refsect1" lang="en">
355
<a name="id3824258"></a><h2>Signal Details</h2>
356
<div class="refsect2" lang="en">
357
<a name="id3824269"></a><h3>
358
<a name="GtkPlug-embedded"></a>The "embedded" signal</h3>
359
<a class="indexterm" name="id3824279"></a><pre class="programlisting">void user_function (<a href="GtkPlug.html" title="GtkPlug">GtkPlug</a> *plug,
360
gpointer user_data) : Run Last</pre>
364
<div class="variablelist"><table border="0">
365
<col align="left" valign="top">
368
<td><span class="term"><em class="parameter"><code>plug</code></em> :</span></td>
369
<td>the object which received the signal.
374
<td><span class="term"><em class="parameter"><code>user_data</code></em> :</span></td>
375
<td>user data set when the signal handler was connected.</td>
381
<div class="refsect1" lang="en">
382
<a name="id3824349"></a><h2>See Also</h2>
385
<div class="variablelist"><table border="0">
386
<col align="left" valign="top">
388
<td><span class="term"><a href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a></span></td>
389
<td><p>the widget that a <a href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> plugs into.</p></td>