Together with W(Plug), GTK.Socket 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 XID of that widget's window to the other process,
which then creates a W(Plug) window with that XID. Any widgets
contained in the W(Plug) then will appear inside the first
applications window.
Note that if you pass the XID of the socket to another process
that will create a plug in the socket, you must make sure that the
socket widget is not destroyed until that plug is
created. Violating this rule will cause unpredictable
consequences, the most likely consequence being that the plug will
appear as a separate toplevel window.
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 W(Plug) and a
GTK.Socket.