Gtk.Plug
const Gtk = imports.gi.Gtk; let plug = new Gtk.Plug({ });
Together with Gtk.Socket, Gtk.Plug 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 Gtk.Socket widget and passes the ID of that widget's window to the other process, which then creates a Gtk.Plug with that window ID. Any widgets contained in the Gtk.Plug then will appear inside the first application's window.
The communication between a Gtk.Socket and a Gtk.Plug follows the <ulink url="http://www.freedesktop.org/Standards/xembed-spec">XEmbed</ulink> protocol. This protocol has also been implemented in other toolkits, e.g. <application>Qt</application>, allowing the same level of integration when embedding a <application>Qt</application> widget in GTK+ or vice versa.
<note> The Gtk.Plug and Gtk.Socket widgets are only available when GTK+ is compiled for the X11 platform and %GDK_WINDOWING_X11 is defined. They can only be used on a #GdkX11Display. To use Gtk.Plug and Gtk.Socket, you need to include the <filename>gtk/gtkx.h</filename> header. </note>
Hierarchy
-
GObject.Object
-
GObject.InitiallyUnowned
-
Gtk.Widget
-
Gtk.Container
-
Gtk.Bin
-
Gtk.Window
- Gtk.Plug
-
-
-
-
-