Skip to main content

PlugExt

Trait PlugExt 

Source
pub trait PlugExt:
    IsA<Plug>
    + Sealed
    + 'static {
    // Provided methods
    fn construct(&self, socket_id: Window) { ... }
    fn construct_for_display(&self, display: &Display, socket_id: Window) { ... }
    fn is_embedded(&self) -> bool { ... }
    fn id(&self) -> Window { ... }
    fn socket_window(&self) -> Option<Window> { ... }
    fn connect_embedded<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
    fn connect_embedded_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
    fn connect_socket_window_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Available on gdk_backend=x11 only.
Expand description

Trait containing all Plug methods.

§Implementors

Plug

Provided Methods§

Source

fn construct(&self, socket_id: Window)

Finish the initialization of self for a given Socket identified by socket_id. This function will generally only be used by classes deriving from Plug.

§socket_id

the XID of the socket’s window.

Source

fn construct_for_display(&self, display: &Display, socket_id: Window)

Finish the initialization of self for a given Socket identified by socket_id which is currently displayed on display. This function will generally only be used by classes deriving from Plug.

§display

the gdk::Display associated with socket_id’s Socket.

§socket_id

the XID of the socket’s window.

Source

fn is_embedded(&self) -> bool

Determines whether the plug is embedded in a socket.

§Returns

true if the plug is embedded in a socket

Source

fn id(&self) -> Window

Gets the window ID of a Plug widget, which can then be used to embed this window inside another window, for instance with GtkSocketExt::add_id().

§Returns

the window ID for the plug

Source

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

Retrieves the socket the plug is embedded in.

§Returns

the window of the socket, or None

Source

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

Gets emitted when the plug becomes embedded in a socket.

Source

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

Source

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<O: IsA<Plug>> PlugExt for O