gtk4::prelude

Trait NativeExt

source
pub trait NativeExt: IsA<Native> + 'static {
    // Provided methods
    fn renderer(&self) -> Option<Renderer> { ... }
    fn surface(&self) -> Option<Surface> { ... }
    fn surface_transform(&self) -> (f64, f64) { ... }
    fn realize(&self) { ... }
    fn unrealize(&self) { ... }
}
Expand description

Provided Methods§

source

fn renderer(&self) -> Option<Renderer>

Returns the renderer that is used for this Native.

§Returns

the renderer for @self

source

fn surface(&self) -> Option<Surface>

Returns the surface of this Native.

§Returns

the surface of @self

source

fn surface_transform(&self) -> (f64, f64)

Retrieves the surface transform of @self.

This is the translation from @self’s surface coordinates into @self’s widget coordinates.

§Returns
§x

return location for the x coordinate

§y

return location for the y coordinate

source

fn realize(&self)

Realizes a Native.

This should only be used by subclasses.

source

fn unrealize(&self)

Unrealizes a Native.

This should only be used by subclasses.

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§

source§

impl<O: IsA<Native>> NativeExt for O