GTK+ Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# GtkPlug

## Name

GtkPlug -- Toplevel for embedding into other processes.

## Synopsis

    #include <gtk/gtk.h>

    struct      GtkPlug;
    void        gtk_plug_construct              (GtkPlug *plug,
                                                 guint32 socket_id);
    GtkWidget*  gtk_plug_new                    (guint32 socket_id);

## Object Hierarchy

      GtkObject
       +----GtkWidget
             +----GtkContainer
                   +----GtkBin
                         +----GtkWindow
                               +----GtkPlug

## Description

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 XID of that widgets window to the other process, which then creates a GtkPlug window with that XID. Any widgets contained in the GtkPlug then will appear inside the first applications window.

## Details

### struct GtkPlug

    struct GtkPlug;

### gtk_plug_construct ()

    void        gtk_plug_construct              (GtkPlug *plug,
                                                 guint32 socket_id);

Finish the creation of a GtkPlug widget. This function will generally only be used by classes deriving from GtkPlug.

`plug` : | a GtkPlug widget.
`socket_id` : | the XID of the socket's window.

### gtk_plug_new ()

    GtkWidget*  gtk_plug_new                    (guint32 socket_id);

Create a new plug widget inside the GtkSocket identified by `socket_id`.

`socket_id` : | the XID of the socket's window.
Returns : | the new GtkPlug widget.

## See Also

GtkSocket

  the widget that a GtkPlug plugs into.

<<< Previous Page | Home | Up | Next Page >>>
GtkPixmap | GtkPreview