⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtksocket.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<hr><div class="refsect2" lang="en"><a name="id4399780"></a><h3><a name="gtk-socket-new"></a>gtk_socket_new ()</h3><a class="indexterm" name="id4399793"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_socket_new                      (void);</pre><p>Create a new empty <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>.</p><p></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>&#160;:</span></p></td><td>  the new <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4399848"></a><h3><a name="gtk-socket-steal"></a>gtk_socket_steal ()</h3><a class="indexterm" name="id4399863"></a><pre class="programlisting">void                gtk_socket_steal                    (<a class="link" href="GtkSocket.html" title="GtkSocket">GtkSocket</a> *socket_,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Event-Structures.html#GdkNativeWindow">GdkNativeWindow</a> wid);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_socket_steal</code> is deprecated and should not be used in newly-written code.</p></div><p>Reparents a pre-existing toplevel window into a <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>. This ismeant to embed clients that do not know about embedding into a<a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>, however doing so is inherently unreliable, and usingthis function is not recommended.</p><p>The <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> must have already be added into a toplevel window before you can make this call.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>socket_</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>wid</code></em>&#160;:</span></p></td><td> the window ID of an existing toplevel window.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4399987"></a><h3><a name="gtk-socket-add-id"></a>gtk_socket_add_id ()</h3><a class="indexterm" name="id4400001"></a><pre class="programlisting">void                gtk_socket_add_id                   (<a class="link" href="GtkSocket.html" title="GtkSocket">GtkSocket</a> *socket_,                                                         <ahref="/usr/share/gtk-doc/html/gdk/gdk-Event-Structures.html#GdkNativeWindow">GdkNativeWindow</a> window_id);</pre><p>Adds an XEMBED client, such as a <a class="link" href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a>, to the <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>.  Theclient may be in the same process or in a different process. </p><p>To embed a <a class="link" href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> in a <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>, you can either create the<a class="link" href="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a> with <code class="literal">gtk_plug_new (0)</code>, call <a class="link" href="GtkPlug.html#gtk-plug-get-id"><code class="function">gtk_plug_get_id()</code></a> to get the window ID of the plug, and then pass that to the<a class="link" href="GtkSocket.html#gtk-socket-add-id"><code class="function">gtk_socket_add_id()</code></a>, or you can call <a class="link" href="GtkSocket.html#gtk-socket-get-id"><code class="function">gtk_socket_get_id()</code></a> to get thewindow ID for the socket, and call <a class="link" href="GtkPlug.html#gtk-plug-new"><code class="function">gtk_plug_new()</code></a> passing in thatID.</p><p>The <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> must have already be added into a toplevel window before you can make this call.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>socket_</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>window_id</code></em>&#160;:</span></p></td><td> the window ID of a client participating in the XEMBED protocol.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4400190"></a><h3><a name="gtk-socket-get-id"></a>gtk_socket_get_id ()</h3><a class="indexterm" name="id4400203"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/gdk/gdk-Event-Structures.html#GdkNativeWindow">GdkNativeWindow</a>     gtk_socket_get_id                   (<a class="link" href="GtkSocket.html" title="GtkSocket">GtkSocket</a> *socket_);</pre><p>Gets the window ID of a <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> widget, which can thenbe used to create a client embedded inside the socket, forinstance with <a class="link" href="GtkPlug.html#gtk-plug-new"><code class="function">gtk_plug_new()</code></a>. </p><p>The <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> must have already be added into a toplevel window before you can make this call.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>socket_</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the window ID for the socket</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4400305"></a><h2>Signal Details</h2><div class="refsect2" lang="en"><a name="id4400316"></a><h3><a name="GtkSocket-plug-added"></a>The <code class="literal">"plug-added"</code> signal</h3><a class="indexterm" name="id4400332"></a><pre class="programlisting">void                user_function                      (<a class="link" href="GtkSocket.html" title="GtkSocket">GtkSocket</a> *socket_,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>   user_data)      : Run Last</pre><p>This signal is emitted when a client is successfullyadded to the socket.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>socket_</code></em>&#160;:</span></p></td><td> the object which received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4400405"></a><h3><a name="GtkSocket-plug-removed"></a>The <code class="literal">"plug-removed"</code> signal</h3><a class="indexterm" name="id4400421"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a>            user_function                      (<a class="link" href="GtkSocket.html" title="GtkSocket">GtkSocket</a> *socket_,                                                        <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a>   user_data)      : Run Last</pre><p>This signal is emitted when a client is removed from the socket. The default action is to destroy the <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a> widget, so if you want to reuse it you must add a signal handler that returns <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>socket_</code></em>&#160;:</span></p></td><td> the object which received the signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td>user data set when the signal handler was connected.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to stop other handlers from being invoked.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id4400537"></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="GtkPlug.html" title="GtkPlug"><span class="type">GtkPlug</span></a></span></p></td><td><p>the widget that plugs into a <a class="link" href="GtkSocket.html" title="GtkSocket"><span class="type">GtkSocket</span></a>.</p></td></tr><tr><td><p><span class="term"><a class="ulink" href="http://www.freedesktop.org/standards/xembed-spec" target="_top">XEmbed</a></span></p></td><td><p>the XEmbed Protocol Specification.</p></td></tr></tbody></table></div><p></p></div><div class="refsect1" lang="en"><a name="id4400590"></a><div class="refsect2" lang="en"><a name="id4400591"></a></div><hr><div class="refsect2" lang="en"><a name="id4400592"></a></div></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -