Next: , Previous: GtkIMContext, Up: Top


140 GtkPlug

Toplevel for embedding into other processes

140.1 Overview

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 widgets 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 applications window.

The <gtk-plug> and <gtk-socket> widgets are currently not available on all platforms supported by GTK+.

140.2 Usage

— Class: <gtk-plug>

Derives from <gtk-window>.

This class defines the following slots:

embedded
Whether or not the plug is embedded
— Signal on <gtk-plug>: embedded
— Function: gtk-plug-construct (self <gtk-plug>) (socket_id unsigned-long)
— Method: construct

Finish the initialization of plug for a given <gtk-socket> identified by socket-id. This function will generally only be used by classes deriving from <gtk-plug>.

plug
a <gtk-plug>.
socket-id
the XID of the socket's window.
— Function: gtk-plug-construct-for-display (self <gtk-plug>) (display <gdk-display>) (socket_id unsigned-long)
— Method: construct-for-display

Finish the initialization of plug for a given <gtk-socket> identified by socket-id which is currently displayed on display. This function will generally only be used by classes deriving from <gtk-plug>.

plug
a <gtk-plug>.
display
the <gdk-display> associated with socket-id's <gtk-socket>.
socket-id
the XID of the socket's window.

Since 2.2

— Function: gtk-plug-new (socket_id unsigned-long) ⇒  (ret <gtk-widget>)

Creates a new plug widget inside the <gtk-socket> identified by socket-id. If socket-id is 0, the plug is left "unplugged" and can later be plugged into a <gtk-socket> by gtk-socket-add-id.

socket-id
the window ID of the socket, or 0.
ret
the new <gtk-plug> widget.
— Function: gtk-plug-new-for-display (display <gdk-display>) (socket_id unsigned-long) ⇒  (ret <gtk-widget>)

Create a new plug widget inside the <gtk-socket> identified by socket_id.

display
the <gdk-display> on which socket-id is displayed
socket-id
the XID of the socket's window.
ret
the new <gtk-plug> widget.

Since 2.2

— Function: gtk-plug-get-id (self <gtk-plug>) ⇒  (ret unsigned-long)
— Method: get-id

Gets the window ID of a <gtk-plug> widget, which can then be used to embed this window inside another window, for instance with gtk-socket-add-id.

plug
a <gtk-plug>.
ret
the window ID for the plug