4
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
5
<title>gimpundo</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
7
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
8
<link rel="up" href="libgimp-image.html" title="Manupulating Images and all their Properties">
8
<link rel="up" href="libgimp-image.html" title="Manupulating Images and their Properties">
9
9
<link rel="prev" href="libgimp-gimptools.html" title="gimptools">
10
<link rel="next" href="libgimp-data.html" title="Data Objects">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
10
<link rel="next" href="libgimp-gimpvectors.html" title="gimpvectors">
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gimpdefinitions.html" title="Part I. GIMP Constants">
14
<link rel="part" href="libgimp.html" title="Part II. GIMP Library">
13
<link rel="part" href="libgimp.html" title="Part I. GIMP Library">
15
14
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
16
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties">
15
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and their Properties">
17
16
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
18
17
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
19
<link rel="part" href="libgimpui.html" title="Part III. GIMP User Interface Library">
18
<link rel="part" href="libgimpui.html" title="Part II. GIMP User Interface Library">
20
19
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
20
<link rel="index" href="libgimp-index.html" title="Index">
21
<link rel="index" href="libgimp-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
22
<link rel="index" href="libgimp-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
23
<link rel="index" href="libgimp-index-deprecated.html" title="Index of deprecated symbols">
22
25
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
23
26
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
26
29
<td><a accesskey="u" href="libgimp-image.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
27
30
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
28
31
<th width="100%" align="center">GIMP Library Reference Manual</th>
29
<td><a accesskey="n" href="libgimp-data.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
32
<td><a accesskey="n" href="libgimp-gimpvectors.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2541022" class="shortcut">Top</a>
34
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2579668" class="shortcut">Top</a>
33
<a href="#id2625540" class="shortcut">Description</a></nobr></td></tr>
36
<a href="#id2676502" class="shortcut">Description</a></nobr></td></tr>
35
38
<div class="refentry" lang="en">
36
39
<a name="libgimp-gimpundo"></a><div class="titlepage"></div>
37
40
<div class="refnamediv"><table width="100%"><tr>
40
<a name="id2541022"></a><span class="refentrytitle">gimpundo</span>
43
<a name="id2579668"></a><span class="refentrytitle">gimpundo</span>
42
45
<p>gimpundo — Control of undo/redo.</p>
52
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-group-start">gimp_image_undo_group_start</a> (gint32 image_ID);
53
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-group-end">gimp_image_undo_group_end</a> (gint32 image_ID);
54
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-is-enabled">gimp_image_undo_is_enabled</a> (gint32 image_ID);
55
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-disable">gimp_image_undo_disable</a> (gint32 image_ID);
56
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-enable">gimp_image_undo_enable</a> (gint32 image_ID);
57
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-freeze">gimp_image_undo_freeze</a> (gint32 image_ID);
58
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-thaw">gimp_image_undo_thaw</a> (gint32 image_ID);
55
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-group-start">gimp_image_undo_group_start</a> (gint32 image_ID);
56
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-group-end">gimp_image_undo_group_end</a> (gint32 image_ID);
57
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-is-enabled">gimp_image_undo_is_enabled</a> (gint32 image_ID);
58
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-disable">gimp_image_undo_disable</a> (gint32 image_ID);
59
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-enable">gimp_image_undo_enable</a> (gint32 image_ID);
60
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-freeze">gimp_image_undo_freeze</a> (gint32 image_ID);
61
gboolean <a href="libgimp-gimpundo.html#gimp-image-undo-thaw">gimp_image_undo_thaw</a> (gint32 image_ID);
61
64
<div class="refsect1" lang="en">
62
<a name="id2625540"></a><h2>Description</h2>
65
<a name="id2676502"></a><h2>Description</h2>
64
67
Control of undo/redo.
68
71
<div class="refsect1" lang="en">
69
<a name="id2625555"></a><h2>Details</h2>
72
<a name="id2676518"></a><h2>Details</h2>
70
73
<div class="refsect2" lang="en">
71
<a name="id2625566"></a><h3>
74
<a name="id2676528"></a><h3>
72
75
<a name="gimp-image-undo-group-start"></a>gimp_image_undo_group_start ()</h3>
73
<a class="indexterm" name="id2625577"></a><pre class="programlisting">gboolean gimp_image_undo_group_start (gint32 image_ID);</pre>
76
<a class="indexterm" name="id2676540"></a><pre class="programlisting">gboolean gimp_image_undo_group_start (gint32 image_ID);</pre>
75
78
Starts a group undo.
78
81
This function is used to start a group undo--necessary for logically
79
82
combining two or more undo operations into a single operation. This
80
call must be used in conjunction with a 'gimp-image-undo-group-end'
83
call must be used in conjunction with a <a href="libgimp-gimpundo.html#gimp-image-undo-group-end"><code class="function">gimp_image_undo_group_end()</code></a>
86
89
<col align="left" valign="top">
90
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
92
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
91
93
<td> The ID of the image in which to open an undo group.
96
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
97
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
97
98
<td> TRUE on success.
104
105
<div class="refsect2" lang="en">
105
<a name="id2628884"></a><h3>
106
<a name="id2676615"></a><h3>
106
107
<a name="gimp-image-undo-group-end"></a>gimp_image_undo_group_end ()</h3>
107
<a class="indexterm" name="id2628895"></a><pre class="programlisting">gboolean gimp_image_undo_group_end (gint32 image_ID);</pre>
108
<a class="indexterm" name="id2676626"></a><pre class="programlisting">gboolean gimp_image_undo_group_end (gint32 image_ID);</pre>
109
110
Finish a group undo.
112
113
This function must be called once for each
113
'gimp-image-undo-group-start' call that is made.</p>
114
<a href="libgimp-gimpundo.html#gimp-image-undo-group-start"><code class="function">gimp_image_undo_group_start()</code></a> call that is made.</p>
118
119
<col align="left" valign="top">
122
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
122
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
123
123
<td> The ID of the image in which to close an undo group.
128
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
127
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
129
128
<td> TRUE on success.
136
135
<div class="refsect2" lang="en">
137
<a name="id2628959"></a><h3>
136
<a name="id2676699"></a><h3>
138
137
<a name="gimp-image-undo-is-enabled"></a>gimp_image_undo_is_enabled ()</h3>
139
<a class="indexterm" name="id2628971"></a><pre class="programlisting">gboolean gimp_image_undo_is_enabled (gint32 image_ID);</pre>
138
<a class="indexterm" name="id2676710"></a><pre class="programlisting">gboolean gimp_image_undo_is_enabled (gint32 image_ID);</pre>
141
140
Check if the image's undo stack is enabled.
144
143
This procedure checks if the image's undo stack is currently enabled
145
144
or disabled. This is useful when several plugins or scripts call
146
145
each other and want to check if their caller has already used
147
'gimp_image_undo_disable' or 'gimp_image_undo_freeze'.</p>
146
<a href="libgimp-gimpundo.html#gimp-image-undo-disable"><code class="function">gimp_image_undo_disable()</code></a> or <a href="libgimp-gimpundo.html#gimp-image-undo-freeze"><code class="function">gimp_image_undo_freeze()</code></a>.</p>
152
151
<col align="left" valign="top">
156
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
154
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
162
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
163
<td> True if undo is enabled for this image.
159
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
160
<td> TRUE if undo is enabled for this image.
170
167
<div class="refsect2" lang="en">
171
<a name="id2629038"></a><h3>
168
<a name="id2667767"></a><h3>
172
169
<a name="gimp-image-undo-disable"></a>gimp_image_undo_disable ()</h3>
173
<a class="indexterm" name="id2629049"></a><pre class="programlisting">gboolean gimp_image_undo_disable (gint32 image_ID);</pre>
170
<a class="indexterm" name="id2667778"></a><pre class="programlisting">gboolean gimp_image_undo_disable (gint32 image_ID);</pre>
175
172
Disable the image's undo stack.
178
175
This procedure disables the image's undo stack, allowing subsequent
179
176
operations to ignore their undo steps. This is generally called in
180
conjunction with 'gimp_image_undo_enable' to temporarily disable an
177
conjunction with <a href="libgimp-gimpundo.html#gimp-image-undo-enable"><code class="function">gimp_image_undo_enable()</code></a> to temporarily disable an
181
178
image undo stack. This is advantageous because saving undo steps can
182
179
be time and memory intensive.</p>
187
184
<col align="left" valign="top">
191
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
187
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
197
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
198
<td> True if the image undo has been disabled.
192
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
193
<td> TRUE if the image undo has been disabled.
205
200
<div class="refsect2" lang="en">
206
<a name="id2623144"></a><h3>
201
<a name="id2667854"></a><h3>
207
202
<a name="gimp-image-undo-enable"></a>gimp_image_undo_enable ()</h3>
208
<a class="indexterm" name="id2623155"></a><pre class="programlisting">gboolean gimp_image_undo_enable (gint32 image_ID);</pre>
203
<a class="indexterm" name="id2667865"></a><pre class="programlisting">gboolean gimp_image_undo_enable (gint32 image_ID);</pre>
210
205
Enable the image's undo stack.
213
208
This procedure enables the image's undo stack, allowing subsequent
214
209
operations to store their undo steps. This is generally called in
215
conjunction with 'gimp_image_undo_disable' to temporarily disable an
210
conjunction with <a href="libgimp-gimpundo.html#gimp-image-undo-disable"><code class="function">gimp_image_undo_disable()</code></a> to temporarily disable an
216
211
image undo stack.</p>
221
216
<col align="left" valign="top">
225
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
219
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
231
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
232
<td> True if the image undo has been enabled.
224
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
225
<td> TRUE if the image undo has been enabled.
239
232
<div class="refsect2" lang="en">
240
<a name="id2623223"></a><h3>
233
<a name="id2667939"></a><h3>
241
234
<a name="gimp-image-undo-freeze"></a>gimp_image_undo_freeze ()</h3>
242
<a class="indexterm" name="id2623234"></a><pre class="programlisting">gboolean gimp_image_undo_freeze (gint32 image_ID);</pre>
235
<a class="indexterm" name="id2667950"></a><pre class="programlisting">gboolean gimp_image_undo_freeze (gint32 image_ID);</pre>
244
237
Freeze the image's undo stack.
247
240
This procedure freezes the image's undo stack, allowing subsequent
248
241
operations to ignore their undo steps. This is generally called in
249
conjunction with 'gimp_image_undo_thaw' to temporarily disable an
242
conjunction with <a href="libgimp-gimpundo.html#gimp-image-undo-thaw"><code class="function">gimp_image_undo_thaw()</code></a> to temporarily disable an
250
243
image undo stack. This is advantageous because saving undo steps can
251
be time and memory intensive. 'gimp_image_undo_{freeze,thaw}' and
252
'gimp_image_undo_{disable,enable}' differ in that the former does
253
not free up all undo steps when undo is thawed, so is more suited to
254
interactive in-situ previews. It is important in this case that the
255
image is back to the same state it was frozen in before thawing,
256
else 'undo' behaviour is undefined.</p>
244
be time and memory intensive. <a href="libgimp-gimpundo.html#gimp-image-undo-freeze"><code class="function">gimp_image_undo_freeze()</code></a> /
245
<a href="libgimp-gimpundo.html#gimp-image-undo-thaw"><code class="function">gimp_image_undo_thaw()</code></a> and <a href="libgimp-gimpundo.html#gimp-image-undo-disable"><code class="function">gimp_image_undo_disable()</code></a> /
246
<a href="libgimp-gimpundo.html#gimp-image-undo-enable"><code class="function">gimp_image_undo_enable()</code></a> differ in that the former does not free up
247
all undo steps when undo is thawed, so is more suited to interactive
248
in-situ previews. It is important in this case that the image is
249
back to the same state it was frozen in before thawing, else 'undo'
250
behaviour is undefined.</p>
261
255
<col align="left" valign="top">
265
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
258
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
271
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
272
<td> True if the image undo has been frozen.
263
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
264
<td> TRUE if the image undo has been frozen.
279
271
<div class="refsect2" lang="en">
280
<a name="id2559486"></a><h3>
272
<a name="id2668066"></a><h3>
281
273
<a name="gimp-image-undo-thaw"></a>gimp_image_undo_thaw ()</h3>
282
<a class="indexterm" name="id2629080"></a><pre class="programlisting">gboolean gimp_image_undo_thaw (gint32 image_ID);</pre>
274
<a class="indexterm" name="id2668077"></a><pre class="programlisting">gboolean gimp_image_undo_thaw (gint32 image_ID);</pre>
284
276
Thaw the image's undo stack.
287
279
This procedure thaws the image's undo stack, allowing subsequent
288
280
operations to store their undo steps. This is generally called in
289
conjunction with 'gimp_image_undo_freeze' to temporarily freeze an
290
image undo stack. 'gimp_image_undo_thaw' does NOT free the undo
291
stack as 'gimp_image_undo_enable' does, so is suited for situations
281
conjunction with <a href="libgimp-gimpundo.html#gimp-image-undo-freeze"><code class="function">gimp_image_undo_freeze()</code></a> to temporarily freeze an
282
image undo stack. <a href="libgimp-gimpundo.html#gimp-image-undo-thaw"><code class="function">gimp_image_undo_thaw()</code></a> does NOT free the undo
283
stack as <a href="libgimp-gimpundo.html#gimp-image-undo-enable"><code class="function">gimp_image_undo_enable()</code></a> does, so is suited for situations
292
284
where one wishes to leave the undo stack in the same state in which
293
285
one found it despite non-destructively playing with the image in the
294
286
meantime. An example would be in-situ plugin previews. Balancing
301
293
<col align="left" valign="top">
305
<span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
296
<td><span class="term"><em class="parameter"><code>image_ID</code></em> :</span></td>
311
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
312
<td> True if the image undo has been thawed.
301
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
302
<td> TRUE if the image undo has been thawed.