
@c %start of fragment

@deftp Class <gtk-socket>
Derives from @code{<gtk-container>}.

This class defines no properties, other than those defined by its superclasses.

@end deftp

@defop Signal <gtk-socket> plug-added 
This signal is emitted when a client is successfully added to the socket.

@end defop

@defop Signal <gtk-socket> plug-removed  @result{}@tie{}@code{<gboolean>}
This signal is emitted when a client is removed from the socket. The default
action is to destroy the @code{<gtk-socket>} widget, so if you want to reuse it
you must add a signal handler that returns @samp{@code{#t}}.

@end defop

@deffn Function gtk-socket-new  @result{}@tie{} (ret@tie{}@code{<gtk-widget>})
Create a new empty @code{<gtk-socket>}.

@table @var
@item ret
the new @code{<gtk-socket>}.

@end table

@end deffn

@deffn Function gtk-socket-add-id  (self@tie{}@code{<gtk-socket>}) (window_id@tie{}@code{unsigned-long})
@deffnx Method add-id
Adds an XEMBED client, such as a @code{<gtk-plug>}, to the @code{<gtk-socket>}.
The client may be in the same process or in a different process.

To embed a @code{<gtk-plug>} in a @code{<gtk-socket>}, you can either create the
@code{<gtk-plug>} with @samp{gtk_plug_new (0)}, call @code{gtk-plug-get-id} to
get the window ID of the plug, and then pass that to the
@code{gtk-socket-add-id}, or you can call @code{gtk-socket-get-id} to get the
window ID for the socket, and call @code{gtk-plug-new} passing in that ID.

The @code{<gtk-socket>} must have already be added into a toplevel window before
you can make this call.

@table @var
@item socket
a @code{<gtk-socket>}

@item window-id
the window ID of a client participating in the XEMBED protocol.

@end table

@end deffn

@deffn Function gtk-socket-get-id  (self@tie{}@code{<gtk-socket>}) @result{}@tie{} (ret@tie{}@code{unsigned-long})
@deffnx Method get-id
Gets the window ID of a @code{<gtk-socket>} widget, which can then be used to
create a client embedded inside the socket, for instance with
@code{gtk-plug-new}.

The @code{<gtk-socket>} must have already be added into a toplevel window before
you can make this call.

@table @var
@item socket
a @code{<gtk-socket>}.

@item ret
the window ID for the socket

@end table

@end deffn


@c %end of fragment
