gtk.plug

Module for [Plug] class

Types 3

Together with #GtkSocket, #GtkPlug 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 #GtkSocket widget and passes the ID of that widget’s window to the other process, which then creates a #GtkPlug with that window ID. Any widgets contained in the #GtkPlug then will appear inside the first application’s window.

The communication between a #GtkSocket and a #GtkPlug follows the

XEmbed Protocol.

This protocol has also been implemented in other toolkits, e.g. Qt, allowing the same level of integration when embedding a Qt widget in GTK+ or vice versa.

The #GtkPlug and #GtkSocket 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 #GtkPlug and #GtkSocket, you need to include the gtk/gtkx.h header.

Methods
GType _gType() @property
Plug self()Returns `this`, for use in `with` statements.
PlugGidBuilder builder()Get builder for [gtk.plug.Plug] Returns: New builder object
bool embedded() @propertyGet `embedded` property. Returns: true if the plug is embedded in a socket.
gdk.window.Window socketWindow() @propertyGet `socketWindow` property. Returns: The window of the socket the plug is embedded in.
gtk.plug.Plug newForDisplay(gdk.display.Display display, xlib.types.Window socketId)Create a new plug widget inside the #GtkSocket identified by socket_id.
void construct(xlib.types.Window socketId)Finish the initialization of plug for a given #GtkSocket identified by socket_id. This function will generally only be used by classes deriving from #GtkPlug.
void constructForDisplay(gdk.display.Display display, xlib.types.Window socketId)Finish the initialization of plug for a given #GtkSocket identified by socket_id which is currently displayed on display. This function will generally only be used by classes deriving from #GtkPlug.
bool getEmbedded()Determines whether the plug is embedded in a socket. Returns: true if the plug is embedded in a socket
xlib.types.Window getId()Gets the window ID of a #GtkPlug widget, which can then be used to embed this window inside another window, for instance with [gtk.socket.Socket.addId]. Returns: the window ID for the plug
gdk.window.Window getSocketWindow()Retrieves the socket the plug is embedded in. Returns: the window of the socket, or null
gulong connectEmbedded(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.plug.Plug))) && Parameters!T.length < 2)Connect to `Embedded` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(xlib.types.Window socketId)Creates a new plug widget inside the #GtkSocket identified by socketid. If socketid is 0, the plug is left “unplugged” and can later be plugged into a #GtkSocket by [gtk.socket.Socket.addId].

Fluent builder for [gtk.plug.Plug]

Methods