1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GtkOffscreenWindow</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
7
<link rel="home" href="index.html" title="GTK+ 2 Reference Manual">
8
<link rel="up" href="WindowWidgets.html" title="Windows">
9
<link rel="prev" href="GtkAssistant.html" title="GtkAssistant">
10
<link rel="next" href="DisplayWidgets.html" title="Display Widgets">
11
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
12
<link rel="stylesheet" href="style.css" type="text/css">
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="GtkAssistant.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="WindowWidgets.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">GTK+ 2 Reference Manual</th>
21
<td><a accesskey="n" href="DisplayWidgets.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GtkOffscreenWindow.synopsis" class="shortcut">Top</a>
26
<a href="#GtkOffscreenWindow.description" class="shortcut">Description</a>
28
<a href="#GtkOffscreenWindow.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#GtkOffscreenWindow.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
33
<div class="refentry">
34
<a name="GtkOffscreenWindow"></a><div class="titlepage"></div>
35
<div class="refnamediv"><table width="100%"><tr>
37
<h2><span class="refentrytitle"><a name="GtkOffscreenWindow.top_of_page"></a>GtkOffscreenWindow</span></h2>
38
<p>GtkOffscreenWindow — A toplevel container widget used to manage offscreen
39
rendering of child widgets.</p>
41
<td valign="top" align="right"></td>
43
<div class="refsynopsisdiv">
44
<a name="GtkOffscreenWindow.synopsis"></a><h2>Synopsis</h2>
45
<pre class="synopsis">
46
#include <gtk/gtk.h>
48
struct <a class="link" href="GtkOffscreenWindow.html#GtkOffscreenWindow-struct" title="struct GtkOffscreenWindow">GtkOffscreenWindow</a>;
49
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * <a class="link" href="GtkOffscreenWindow.html#gtk-offscreen-window-new" title="gtk_offscreen_window_new ()">gtk_offscreen_window_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
50
<a href="../gdk2/gdk2-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="returnvalue">GdkPixmap</span></a> * <a class="link" href="GtkOffscreenWindow.html#gtk-offscreen-window-get-pixmap" title="gtk_offscreen_window_get_pixmap ()">gtk_offscreen_window_get_pixmap</a> (<em class="parameter"><code><a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> *offscreen</code></em>);
51
<a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="GtkOffscreenWindow.html#gtk-offscreen-window-get-pixbuf" title="gtk_offscreen_window_get_pixbuf ()">gtk_offscreen_window_get_pixbuf</a> (<em class="parameter"><code><a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> *offscreen</code></em>);
54
<div class="refsect1">
55
<a name="GtkOffscreenWindow.object-hierarchy"></a><h2>Object Hierarchy</h2>
56
<pre class="synopsis">
58
+----GInitiallyUnowned
59
+----<a class="link" href="GtkObject.html" title="GtkObject">GtkObject</a>
60
+----<a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
61
+----<a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
62
+----<a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
63
+----<a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
64
+----GtkOffscreenWindow
67
<div class="refsect1">
68
<a name="GtkOffscreenWindow.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
70
GtkOffscreenWindow implements
71
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
73
<div class="refsect1">
74
<a name="GtkOffscreenWindow.description"></a><h2>Description</h2>
76
<a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> is strictly intended to be used for obtaining
77
snapshots of widgets that are not part of a normal widget hierarchy.
78
It differs from <a class="link" href="GtkWidget.html#gtk-widget-get-snapshot" title="gtk_widget_get_snapshot ()"><code class="function">gtk_widget_get_snapshot()</code></a> in that the widget you
79
want to get a snapshot of need not be displayed on the user's screen
80
as a part of a widget hierarchy. However, since <a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a>
81
is a toplevel widget you cannot obtain snapshots of a full window
82
with it since you cannot pack a toplevel widget in another toplevel.
85
The idea is to take a widget and manually set the state of it,
86
add it to a <a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> and then retrieve the snapshot
87
as a <a href="../gdk2/gdk2-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> or <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>.
90
<a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> derives from <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a> only as an implementation
91
detail. Applications should not use any API specific to <a class="link" href="GtkWindow.html" title="GtkWindow"><span class="type">GtkWindow</span></a>
92
to operate on this object. It should be treated as a <a class="link" href="GtkBin.html" title="GtkBin"><span class="type">GtkBin</span></a> that
96
When contained offscreen widgets are redrawn, <a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a>
97
will emit a <a class="link" href="GtkWidget.html#GtkWidget-damage-event" title='The "damage-event" signal'><span class="type">"damage-event"</span></a> signal.
100
<div class="refsect1">
101
<a name="GtkOffscreenWindow.details"></a><h2>Details</h2>
102
<div class="refsect2">
103
<a name="GtkOffscreenWindow-struct"></a><h3>struct GtkOffscreenWindow</h3>
104
<pre class="programlisting">struct GtkOffscreenWindow;</pre>
109
<div class="refsect2">
110
<a name="gtk-offscreen-window-new"></a><h3>gtk_offscreen_window_new ()</h3>
111
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> * gtk_offscreen_window_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
113
Creates a toplevel container widget that is used to retrieve
114
snapshots of widgets without showing them on the screen. For
115
widgets that are on the screen and part of a normal widget
116
hierarchy, <a class="link" href="GtkWidget.html#gtk-widget-get-snapshot" title="gtk_widget_get_snapshot ()"><code class="function">gtk_widget_get_snapshot()</code></a> can be used instead.
118
<div class="variablelist"><table border="0" class="variablelist">
120
<col align="left" valign="top">
124
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
125
<td>A pointer to a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>
129
<p class="since">Since 2.20</p>
132
<div class="refsect2">
133
<a name="gtk-offscreen-window-get-pixmap"></a><h3>gtk_offscreen_window_get_pixmap ()</h3>
134
<pre class="programlisting"><a href="../gdk2/gdk2-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="returnvalue">GdkPixmap</span></a> * gtk_offscreen_window_get_pixmap (<em class="parameter"><code><a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> *offscreen</code></em>);</pre>
136
Retrieves a snapshot of the contained widget in the form of
137
a <a href="../gdk2/gdk2-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a>. If you need to keep this around over window
138
resizes then you should add a reference to it.
140
<div class="variablelist"><table border="0" class="variablelist">
142
<col align="left" valign="top">
147
<td><p><span class="term"><em class="parameter"><code>offscreen</code></em> :</span></p></td>
148
<td>the <a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> contained widget.</td>
151
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
152
<td>A <a href="../gdk2/gdk2-Bitmaps-and-Pixmaps.html#GdkPixmap"><span class="type">GdkPixmap</span></a> pointer to the offscreen pixmap,
153
or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
158
<p class="since">Since 2.20</p>
161
<div class="refsect2">
162
<a name="gtk-offscreen-window-get-pixbuf"></a><h3>gtk_offscreen_window_get_pixbuf ()</h3>
163
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * gtk_offscreen_window_get_pixbuf (<em class="parameter"><code><a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> *offscreen</code></em>);</pre>
165
Retrieves a snapshot of the contained widget in the form of
166
a <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. This is a new pixbuf with a reference count of 1,
167
and the application should unreference it once it is no longer
170
<div class="variablelist"><table border="0" class="variablelist">
172
<col align="left" valign="top">
177
<td><p><span class="term"><em class="parameter"><code>offscreen</code></em> :</span></p></td>
178
<td>the <a class="link" href="GtkOffscreenWindow.html" title="GtkOffscreenWindow"><span class="type">GtkOffscreenWindow</span></a> contained widget.</td>
181
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
182
<td>A <a href="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-The-GdkPixbuf-Structure.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> pointer, or <a href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
187
<p class="since">Since 2.20</p>
193
Generated by GTK-Doc V1.18</div>
b'\\ No newline at end of file'