Skip to main content

OffscreenWindowExt

Trait OffscreenWindowExt 

Source
pub trait OffscreenWindowExt: IsA<OffscreenWindow> + 'static {
    // Provided methods
    fn pixbuf(&self) -> Option<Pixbuf> { ... }
    fn surface(&self) -> Option<Surface> { ... }
}
Expand description

Trait containing all OffscreenWindow methods.

§Implementors

OffscreenWindow

Provided Methods§

Source

fn pixbuf(&self) -> Option<Pixbuf>

Retrieves a snapshot of the contained widget in the form of a gdk_pixbuf::Pixbuf. This is a new pixbuf with a reference count of 1, and the application should unreference it once it is no longer needed.

§Returns

A gdk_pixbuf::Pixbuf pointer, or None.

Source

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

Retrieves a snapshot of the contained widget in the form of a cairo::Surface. If you need to keep this around over window resizes then you should add a reference to it.

§Returns

A cairo::Surface pointer to the offscreen surface, or None.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§