gtk.offscreen_window

Module for [OffscreenWindow] class

Types 3

GtkOffscreenWindow is strictly intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy. Since #GtkOffscreenWindow is a toplevel widget you cannot obtain snapshots of a full window with it since you cannot pack a toplevel widget in another toplevel.

The idea is to take a widget and manually set the state of it, add it to a GtkOffscreenWindow and then retrieve the snapshot as a #cairo_surface_t or #GdkPixbuf.

GtkOffscreenWindow derives from #GtkWindow only as an implementation detail. Applications should not use any API specific to #GtkWindow to operate on this object. It should be treated as a #GtkBin that has no parent widget.

When contained offscreen widgets are redrawn, GtkOffscreenWindow will emit a #GtkWidget::damage-event signal.

Methods
GType _gType() @property
OffscreenWindow self()Returns `this`, for use in `with` statements.
OffscreenWindowGidBuilder builder()Get builder for [gtk.offscreen_window.OffscreenWindow] Returns: New builder object
gdkpixbuf.pixbuf.Pixbuf getPixbuf()Retrieves a snapshot of the contained widget in the form of a #GdkPixbuf. This is a new pixbuf with a reference count of 1, and the application should unreference it once it is no longer needed. R...
cairo.surface.Surface getSurface()Retrieves a snapshot of the contained widget in the form of a #cairosurfacet. If you need to keep this around over window resizes then you should add a reference to it. Returns: A #cairosurfacet p...
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing them on the screen. Returns: A pointer to a #GtkWidget

Fluent builder for [gtk.offscreen_window.OffscreenWindow]