The
gtk:offscreen-window widget is strictly intended to be used for
obtaining snapshots of widgets that are not part of a normal widget
hierarchy.
Since the offscreen window 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 offscreen window and then retrieve the snapshot as a
cairo:surface-t instance or
gdk-pixbuf:pixbuf object.
The
gtk:offscreen-window widget derives from the
gtk:window
class only as an implementation detail. Applications should not use any API specific to the
gtk:window class to operate on this object. It should be treated as a
gtk:bin widget that has no parent widget.
When contained offscreen widgets are redrawn, the
gtk:offscreen-window widget will emit a
"damage-event" signal.