GtkOffscreenWindow is strictly intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy. Since Gtk.Offscreen_Window.Gtk_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 GtkOffscreenWindow and then retrieve the snapshot as a cairo_surface_t or Gdk.Pixbuf.Gdk_Pixbuf.
GtkOffscreenWindow derives from Gtk.Window.Gtk_Window only as an implementation detail. Applications should not use any API specific to Gtk.Window.Gtk_Window to operate on this object. It should be treated as a Gtk.Bin.Gtk_Bin that has no parent widget.
When contained offscreen widgets are redrawn, GtkOffscreenWindow will emit a Gtk.Widget.Gtk_Widget::damage-event signal.
function "+"
(Widget : access Gtk_Offscreen_Window_Record'Class)
return Gtk.Buildable.Gtk_Buildable
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Offscreen_Window
function Get_Pixbuf
(Self : not null access Gtk_Offscreen_Window_Record)
return Gdk.Pixbuf.Gdk_Pixbuf
Retrieves a snapshot of the contained widget in the form of a Gdk.Pixbuf.Gdk_Pixbuf. This is a new pixbuf with a reference count of 1, and the application should unreference it once it is no longer needed. Since: gtk+ 2.20
A Gdk.Pixbuf.Gdk_Pixbuf pointer, or null.
function Get_Surface
(Self : not null access Gtk_Offscreen_Window_Record)
return Cairo.Cairo_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: gtk+ 2.20
A cairo_surface_t pointer to the offscreen surface, or null.
function Get_Type return Glib.GType
procedure Gtk_New (Self : out Gtk_Offscreen_Window)
Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing them on the screen. Since: gtk+ 2.20 Initialize does nothing if the object was already created with another call to Initialize* or G_New.
type Gtk_Offscreen_Window is access all Gtk_Offscreen_Window_Record'Class;
function Gtk_Offscreen_Window_New return Gtk_Offscreen_Window
Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing them on the screen. Since: gtk+ 2.20
type Gtk_Offscreen_Window_Record is new Gtk_Window_Record with null record;
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Offscreen_Window_Record, Gtk_Offscreen_Window);
procedure Initialize
(Self : not null access Gtk_Offscreen_Window_Record'Class)
Creates a toplevel container widget that is used to retrieve snapshots of widgets without showing them on the screen. Since: gtk+ 2.20 Initialize does nothing if the object was already created with another call to Initialize* or G_New.