A container for showing a toplevel window from another process.

Object Hierarchy

`-- GtkObject
       `-- GtkWidget
              `-- GtkContainer
                     `-- GtkSocket


Together with GtkPlug, GtkSocket 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 that widget's window ID 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 applications window.

The socket's window ID is obtained by using get_id() . Before using this function, the socket must have been realized and added to its parent.

When the embedded window has been destroyed, then it will destroy the socket as well. You should always, therefore, be prepared for your sockets to be destroyed at any time when the main event loop is running.

The communication between a GtkSocket and a GtkPlug follows the XEmbed protocol. This protocol has also been implemented in other toolkits.

A socket can also be used to swallow arbitrary pre-existing top-level windows using steal() , though the integration when this is done will not be as close as between a GtkPlug and a GtkSocket.

The GtkPlug and GtkSocket widgets are currently not available on all platforms.


-- Create a GtkSocket


  Adds a client such as a GtkPlug.
  Retrieve the window ID for the socket.
  DEPRECATED. Reparents a pre-existing toplevel window into a GtkSocket


  This signal is emitted when a client is successfully added to the socket.
  This signal is emitted when a client is removed from the socket.