Class

GtkOffscreenWindow

[]

Description [src]

class Gtk.OffscreenWindow : Gtk.Window
  implements Atk.ImplementorIface, Gtk.Buildable {
  /* No available fields */
}

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.

[]

Hierarchy

hierarchy this GtkOffscreenWindow implements_0 AtkImplementorIface this--implements_0 implements_1 GtkBuildable this--implements_1 ancestor_0 GtkWindow ancestor_0--this ancestor_1 GtkBin ancestor_1--ancestor_0 ancestor_2 GtkContainer ancestor_2--ancestor_1 ancestor_3 GtkWidget ancestor_3--ancestor_2 ancestor_4 GInitiallyUnowned ancestor_4--ancestor_3 ancestor_5 GObject ancestor_5--ancestor_4
[]

Constructors

gtk_offscreen_window_new

Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing them on the screen.

since: 2.20

[]

Instance methods

gtk_offscreen_window_get_pixbuf

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.

since: 2.20

gtk_offscreen_window_get_surface

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

since: 2.20

Methods inherited from GtkWindow (109)
Methods inherited from GtkBin (1)
Methods inherited from GtkContainer (33)
Methods inherited from GtkWidget (263)
Methods inherited from GObject (43)
Methods inherited from GtkBuildable (10)
[]

Properties

Properties inherited from GtkWindow (33)
Properties inherited from GtkContainer (3)
Properties inherited from GtkWidget (39)
[]

Signals

Signals inherited from GtkWindow (5)
Signals inherited from GtkContainer (4)
Signals inherited from GtkWidget (69)
Signals inherited from GObject (1)

Class structure