pub trait GtkSocketExt: 'static {
    fn add_id(&self, window: Window);
    fn id(&self) -> Window;
    fn plug_window(&self) -> Option<Window>;
    fn connect_plug_added<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_plug_removed<F: Fn(&Self) -> bool + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Expand description

Trait containing all Socket methods.

Implementors

Socket

Required Methods

Adds an XEMBED client, such as a Plug, to the Socket. The client may be in the same process or in a different process.

To embed a Plug in a Socket, you can either create the Plug with gtk_plug_new (0), call PlugExt::id() to get the window ID of the plug, and then pass that to the add_id(), or you can call id() to get the window ID for the socket, and call Plug::new() passing in that ID.

The Socket must have already be added into a toplevel window before you can make this call.

window

the Window of a client participating in the XEMBED protocol.

Gets the window ID of a Socket widget, which can then be used to create a client embedded inside the socket, for instance with Plug::new().

The Socket must have already be added into a toplevel window before you can make this call.

Returns

the window ID for the socket

Retrieves the window of the plug. Use this to check if the plug has been created inside of the socket.

Returns

the window of the plug if available, or None

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. The default action is to destroy the Socket widget, so if you want to reuse it you must add a signal handler that returns true.

Returns

true to stop other handlers from being invoked.

Implementors