Trait gtk::prelude::GtkSocketExt
source · [−]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
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
fn plug_window(&self) -> Option<Window>
fn plug_window(&self) -> Option<Window>
fn connect_plug_added<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
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
fn connect_plug_removed<F: Fn(&Self) -> bool + 'static>(
&self,
f: F
) -> SignalHandlerId
Implementors
impl<O: IsA<Socket>> GtkSocketExt for O
gdk_backend="x11"
only.