Gtk.Offscreen_Window

Entities

Tagged Types

Access Types

Subprograms

Generic Instantiations

Description

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
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Offscreen_Window
Parameters
Interf
Return Value

Get_Pixbuf

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

Parameters
Self
Return Value

A Gdk.Pixbuf.Gdk_Pixbuf pointer, or null.

Get_Surface

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

Parameters
Self
Return Value

A cairo_surface_t pointer to the offscreen surface, or null.

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_New

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.

Parameters
Self

Gtk_Offscreen_Window

type Gtk_Offscreen_Window is access all Gtk_Offscreen_Window_Record'Class;

Gtk_Offscreen_Window_New

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

Return Value

Gtk_Offscreen_Window_Record

type Gtk_Offscreen_Window_Record is new Gtk_Window_Record with null record;

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Offscreen_Window_Record, Gtk_Offscreen_Window);

Initialize

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.

Parameters
Self