[][src]Trait gtk::GtkSocketExt

pub trait GtkSocketExt: 'static {
    fn add_id(&self, window: Window);
fn get_id(&self) -> Window;
fn get_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; }

Trait containing all Socket methods.

Implementors

Socket

Required methods

fn add_id(&self, window: Window)

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::get_id to get the window ID of the plug, and then pass that to the GtkSocketExt::add_id, or you can call GtkSocketExt::get_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.

fn get_id(&self) -> Window

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

fn get_plug_window(&self) -> Option<Window>

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

fn connect_plug_added<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId

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

fn connect_plug_removed<F: Fn(&Self) -> bool + 'static>(
    &self,
    f: F
) -> SignalHandlerId

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.

Loading content...

Implementors

impl<O: IsA<Socket>> GtkSocketExt for O[src]

Loading content...