gdk4::prelude

Trait ToplevelExtManual

Source
pub trait ToplevelExtManual: Sealed + IsA<Toplevel> {
    // Provided method
    fn connect_compute_size<F: Fn(&Toplevel, &mut ToplevelSize) + 'static>(
        &self,
        f: F,
    ) -> SignalHandlerId { ... }
}
Expand description

Trait containing manually implemented methods of Toplevel.

Provided Methods§

Source

fn connect_compute_size<F: Fn(&Toplevel, &mut ToplevelSize) + 'static>( &self, f: F, ) -> SignalHandlerId

Emitted when the size for the surface needs to be computed, when it is present.

This signal will normally be emitted during or after a call to ToplevelExt::present(), depending on the configuration received by the windowing system. It may also be emitted at any other point in time, in response to the windowing system spontaneously changing the configuration of the toplevel surface.

It is the responsibility of the toplevel user to handle this signal and compute the desired size of the toplevel, given the information passed via the ToplevelSize object. Failing to do so will result in an arbitrary size being used as a result.

§size

a ToplevelSize

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§