package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Offscreen_Window_Record, Gtk_Offscreen_Window);
type Gtk_Offscreen_Window_Record is new Gtk_Window_Record with null record;
type Gtk_Offscreen_Window is access all Gtk_Offscreen_Window_Record'Class;
procedure Gtk_New
( | Self | : out Gtk_Offscreen_Window); |
procedure Initialize
( | Self | : not null access Gtk_Offscreen_Window_Record'Class); |
function Gtk_Offscreen_Window_New return Gtk_Offscreen_Window;
function Get_Type return Glib.GType;
function Get_Pixbuf
( | Self | : not null access Gtk_Offscreen_Window_Record) return Gdk.Pixbuf.Gdk_Pixbuf; |
function Get_Surface
( | Self | : not null access Gtk_Offscreen_Window_Record) return Cairo.Cairo_Surface; |
function "+"
( | Widget | : access Gtk_Offscreen_Window_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Offscreen_Window renames Implements_Gtk_Buildable.To_Object; |
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.