gtk.OffscreenWindowa toplevel container widget used to manage offscreen rendering of child widgets (new in PyGTK 2.22)Synopsisgtk.OffscreenWindowgtk.Windowgtk.OffscreenWindowget_pixmapget_pixbufAncestry+-- GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Bin
+-- gtk.Window
+-- gtk.OffscreenWindow
Implemented Interfacesgtk.OffscreenWindow
implements
gtk.Buildableatk.ImplementorIFacegtk.OffscreenWindow Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Propertiesgtk.Window Propertiesgtk.OffscreenWindow Style Propertiesgtk.Widget Style Propertiesgtk.OffscreenWindow Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal Prototypesgtk.Window Signal PrototypesDescriptionThis widget is available in PyGTK 2.22 and above.gtk.OffscreenWindow is strictly
intended to be used for obtaining snapshots of widgets that are not part of a normal widget hierarchy.
It differs from gtk.Widget.get_snapshot()
in that the widget you want to get a snapshot of need not be displayed on the user's screen as a part
of a widget hierarchy. However, since gtk.OffscreenWindow
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
gtk.OffscreenWindow and then retrieve
the snapshot as a gtk.gdk.Pixmap or
gtk.gdk.Pixbuf.gtk.OffscreenWindow derives
from gtk.Window only as an implementation
detail. Applications should not use any API specific to gtk.Window
to operate on this object. It should be treated as a gtk.Bin
that has no parent widget.When contained offscreen widgets are redrawn,
gtk.OffscreenWindow will emit a
"damage-event" signal.Constructorgtk.OffscreenWindowReturns :A pointer to a gtk.WidgetThis constructor is available in PyGTK 2.22 and above.Creates a toplevel container widget that is used to retrieve
snapshots of widgets without showing them on the screen. For
widgets that are on the screen and part of a normal widget
hierarchy, gtk.Widget.get_snapshot can be used instead.Methodsgtk.OffscreenWindow.get_pixmapget_pixmapReturns :A gtk.gdk.Pixmap, or None.This method is available in PyGTK 2.22 and above.Retrieves a snapshot of the contained widget in the form of a
gtk.gdk.Pixmap.gtk.OffscreenWindow.get_pixbufget_pixbufReturns :A gtk.gdk.Pixbuf, or None.This method is available in PyGTK 2.22 and above.Retrieves a snapshot of the contained widget in the form of a
gtk.gdk.Pixbuf.