1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GimpThumb-utils: GIMP Thumbnail Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIMP Thumbnail Library Reference Manual">
<link rel="up" href="pt01.html" title="Part I. GIMP Thumbnail Library">
<link rel="prev" href="GimpThumbnail.html" title="GimpThumbnail">
<link rel="next" href="libgimpthumb-GimpThumb-enums.html" title="GimpThumb-enums">
<meta name="generator" content="GTK-Doc V1.32 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libgimpthumb-GimpThumb-utils.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="pt01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GimpThumbnail.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimpthumb-GimpThumb-enums.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgimpthumb-GimpThumb-utils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimpthumb-GimpThumb-utils.top_of_page"></a>GimpThumb-utils</span></h2>
<p>GimpThumb-utils — Utility functions provided and used by libgimpthumb</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgimpthumb-GimpThumb-utils.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-init" title="gimp_thumb_init ()">gimp_thumb_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-get-thumb-base-dir" title="gimp_thumb_get_thumb_base_dir ()">gimp_thumb_get_thumb_base_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-find-thumb" title="gimp_thumb_find_thumb ()">gimp_thumb_find_thumb</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbFileType" title="enum GimpThumbFileType"><span class="returnvalue">GimpThumbFileType</span></a>
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-file-test" title="gimp_thumb_file_test ()">gimp_thumb_file_test</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-name-from-uri" title="gimp_thumb_name_from_uri ()">gimp_thumb_name_from_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-ensure-thumb-dir" title="gimp_thumb_ensure_thumb_dir ()">gimp_thumb_ensure_thumb_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-get-thumb-dir" title="gimp_thumb_get_thumb_dir ()">gimp_thumb_get_thumb_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumbs-delete-for-uri" title="gimp_thumbs_delete_for_uri ()">gimp_thumbs_delete_for_uri</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-name-from-uri-local" title="gimp_thumb_name_from_uri_local ()">gimp_thumb_name_from_uri_local</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-ensure-thumb-dir-local" title="gimp_thumb_ensure_thumb_dir_local ()">gimp_thumb_ensure_thumb_dir_local</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-get-thumb-dir-local" title="gimp_thumb_get_thumb_dir_local ()">gimp_thumb_get_thumb_dir_local</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumbs-delete-for-uri-local" title="gimp_thumbs_delete_for_uri_local ()">gimp_thumbs_delete_for_uri_local</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimpthumb-GimpThumb-utils.description"></a><h2>Description</h2>
<p>Utility functions provided and used by libgimpthumb</p>
</div>
<div class="refsect1">
<a name="libgimpthumb-GimpThumb-utils.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-thumb-init"></a><h3>gimp_thumb_init ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_thumb_init (<em class="parameter"><code>const <span class="type">gchar</span> *creator</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *thumb_basedir</code></em>);</pre>
<p>This function initializes the thumbnail system. It must be called
before any other functions from libgimpthumb are used. You may call
it more than once if you want to change the <em class="parameter"><code>thumb_basedir</code></em>
but if
you do that, you should make sure that no thread is still using the
library. Apart from this function, libgimpthumb is multi-thread
safe.</p>
<p>The <em class="parameter"><code>creator</code></em>
string must be 7bit ASCII and should contain the name
of the software that creates the thumbnails. It is used to handle
thumbnail creation failures. See the spec for more details.</p>
<p>Usually you will pass <code class="literal">NULL</code> for <em class="parameter"><code>thumb_basedir</code></em>
. Thumbnails will
then be stored in the user's personal thumbnail directory as
defined in the spec. If you wish to use libgimpthumb to store
application-specific thumbnails, you can specify a different base
directory here.</p>
<div class="refsect3">
<a name="gimp-thumb-init.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>creator</p></td>
<td class="parameter_description"><p>an ASCII string that identifies the thumbnail creator</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>thumb_basedir</p></td>
<td class="parameter_description"><p>an absolute path or <code class="literal">NULL</code> to use the default</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-init.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the library was successfully initialized.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-get-thumb-base-dir"></a><h3>gimp_thumb_get_thumb_base_dir ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_thumb_get_thumb_base_dir (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the base directory of thumbnails cache.
It uses the Freedesktop Thumbnail Managing Standard on UNIX,
"~/Library/Caches/org.freedesktop.thumbnails" on OSX, and a cache
folder determined by glib on Windows (currently the common repository
for temporary Internet files).
The returned string belongs to GIMP and must not be changed nor freed.</p>
<div class="refsect3">
<a name="gimp-thumb-get-thumb-base-dir.returns"></a><h4>Returns</h4>
<p> the thumbnails cache directory.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10.html#api-index-2.10">2.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-find-thumb"></a><h3>gimp_thumb_find_thumb ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_thumb_find_thumb (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
<em class="parameter"><code><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a> *size</code></em>);</pre>
<p>This function attempts to locate a thumbnail for the given
<em class="parameter"><code>uri</code></em>
. First it tries the size that is stored at <em class="parameter"><code>size</code></em>
. If no
thumbnail of that size is found, it will look for a larger
thumbnail, then falling back to a smaller size.</p>
<p>If the user's thumbnail repository doesn't provide a thumbnail but
a local thumbnail repository exists for the folder the image is
located in, the same search is done among the local thumbnails (if
there are any).</p>
<p>If a thumbnail is found, it's size is written to the variable
pointer to by <em class="parameter"><code>size</code></em>
and the file location is returned.</p>
<div class="refsect3">
<a name="gimp-thumb-find-thumb.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>an escaped URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>pointer to a <a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-find-thumb.returns"></a><h4>Returns</h4>
<p> a newly allocated string in the encoding of the
filesystem or <code class="literal">NULL</code> if no thumbnail for <em class="parameter"><code>uri</code></em>
was found</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-file-test"></a><h3>gimp_thumb_file_test ()</h3>
<pre class="programlisting"><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbFileType" title="enum GimpThumbFileType"><span class="returnvalue">GimpThumbFileType</span></a>
gimp_thumb_file_test (<em class="parameter"><code>const <span class="type">gchar</span> *filename</code></em>,
<em class="parameter"><code><span class="type">gint64</span> *mtime</code></em>,
<em class="parameter"><code><span class="type">gint64</span> *size</code></em>,
<em class="parameter"><code><span class="type">gint</span> *err_no</code></em>);</pre>
<p>This is a convenience and portability wrapper around <code class="function">stat()</code>. It
checks if the given <em class="parameter"><code>filename</code></em>
exists and returns modification time
and file size in 64bit integer values.</p>
<div class="refsect3">
<a name="gimp-thumb-file-test.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>a filename in the encoding of the filesystem</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mtime</p></td>
<td class="parameter_description"><p>return location for modification time</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>return location for file size</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>err_no</p></td>
<td class="parameter_description"><p>return location for system "errno"</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-file-test.returns"></a><h4>Returns</h4>
<p> The type of the file, or <a class="link" href="libgimpthumb-GimpThumb-enums.html#GIMP-THUMB-FILE-TYPE-NONE:CAPS"><span class="type">GIMP_THUMB_FILE_TYPE_NONE</span></a> if
the file doesn't exist.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-name-from-uri"></a><h3>gimp_thumb_name_from_uri ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_thumb_name_from_uri (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
<em class="parameter"><code><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a> size</code></em>);</pre>
<p>Creates the name of the thumbnail file of the specified <em class="parameter"><code>size</code></em>
that
belongs to an image file located at the given <em class="parameter"><code>uri</code></em>
.</p>
<div class="refsect3">
<a name="gimp-thumb-name-from-uri.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>an escaped URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-name-from-uri.returns"></a><h4>Returns</h4>
<p> a newly allocated filename in the encoding of the
filesystem or <code class="literal">NULL</code> if <em class="parameter"><code>uri</code></em>
points to the user's
thumbnail repository.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-ensure-thumb-dir"></a><h3>gimp_thumb_ensure_thumb_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_thumb_ensure_thumb_dir (<em class="parameter"><code><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a> size</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>This function checks if the directory that is required to store
thumbnails for a particular <em class="parameter"><code>size</code></em>
exist and attempts to create it
if necessary.</p>
<p>You shouldn't have to call this function directly since
<a class="link" href="GimpThumbnail.html#gimp-thumbnail-save-thumb" title="gimp_thumbnail_save_thumb ()"><code class="function">gimp_thumbnail_save_thumb()</code></a> and <a class="link" href="GimpThumbnail.html#gimp-thumbnail-save-failure" title="gimp_thumbnail_save_failure ()"><code class="function">gimp_thumbnail_save_failure()</code></a> will
do this for you.</p>
<div class="refsect3">
<a name="gimp-thumb-ensure-thumb-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a GimpThumbSize</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for possible errors</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-ensure-thumb-dir.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> is the directory exists, <code class="literal">FALSE</code> if it could not
be created</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-get-thumb-dir"></a><h3>gimp_thumb_get_thumb_dir ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_thumb_get_thumb_dir (<em class="parameter"><code><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a> size</code></em>);</pre>
<p>Retrieve the name of the thumbnail folder for a specific size. The
returned pointer will become invalid if <a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-init" title="gimp_thumb_init ()"><code class="function">gimp_thumb_init()</code></a> is used
again. It must not be changed or freed.</p>
<div class="refsect3">
<a name="gimp-thumb-get-thumb-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a GimpThumbSize</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-get-thumb-dir.returns"></a><h4>Returns</h4>
<p> the thumbnail directory in the encoding of the filesystem</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumbs-delete-for-uri"></a><h3>gimp_thumbs_delete_for_uri ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_thumbs_delete_for_uri (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>);</pre>
<p>Deletes all thumbnails for the image file specified by <em class="parameter"><code>uri</code></em>
from the
user's thumbnail repository.</p>
<div class="refsect3">
<a name="gimp-thumbs-delete-for-uri.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>an escaped URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-name-from-uri-local"></a><h3>gimp_thumb_name_from_uri_local ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_thumb_name_from_uri_local (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>,
<em class="parameter"><code><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a> size</code></em>);</pre>
<p>Creates the name of a local thumbnail file of the specified <em class="parameter"><code>size</code></em>
that belongs to an image file located at the given <em class="parameter"><code>uri</code></em>
. Local
thumbnails have been introduced with version 0.7 of the spec.</p>
<div class="refsect3">
<a name="gimp-thumb-name-from-uri-local.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>an escaped URI</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a <a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-name-from-uri-local.returns"></a><h4>Returns</h4>
<p> a newly allocated filename in the encoding of the
filesystem or <code class="literal">NULL</code> if <em class="parameter"><code>uri</code></em>
is a remote file or
points to the user's thumbnail repository.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-ensure-thumb-dir-local"></a><h3>gimp_thumb_ensure_thumb_dir_local ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gimp_thumb_ensure_thumb_dir_local (<em class="parameter"><code>const <span class="type">gchar</span> *dirname</code></em>,
<em class="parameter"><code><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a> size</code></em>,
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
<p>This function checks if the directory that is required to store
local thumbnails for a particular <em class="parameter"><code>size</code></em>
exist and attempts to
create it if necessary.</p>
<p>You shouldn't have to call this function directly since
<a class="link" href="GimpThumbnail.html#gimp-thumbnail-save-thumb-local" title="gimp_thumbnail_save_thumb_local ()"><code class="function">gimp_thumbnail_save_thumb_local()</code></a> will do this for you.</p>
<div class="refsect3">
<a name="gimp-thumb-ensure-thumb-dir-local.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dirname</p></td>
<td class="parameter_description"><p>the basename of the dir, without the actual dirname itself</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a GimpThumbSize</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>return location for possible errors</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-ensure-thumb-dir-local.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> is the directory exists, <code class="literal">FALSE</code> if it could not
be created</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumb-get-thumb-dir-local"></a><h3>gimp_thumb_get_thumb_dir_local ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_thumb_get_thumb_dir_local (<em class="parameter"><code>const <span class="type">gchar</span> *dirname</code></em>,
<em class="parameter"><code><a class="link" href="libgimpthumb-GimpThumb-enums.html#GimpThumbSize" title="enum GimpThumbSize"><span class="type">GimpThumbSize</span></a> size</code></em>);</pre>
<p>Retrieve the name of the local thumbnail folder for a specific
size. Unlike <a class="link" href="libgimpthumb-GimpThumb-utils.html#gimp-thumb-get-thumb-dir" title="gimp_thumb_get_thumb_dir ()"><code class="function">gimp_thumb_get_thumb_dir()</code></a> the returned string is not
constant and should be free'd when it is not any longer needed.</p>
<div class="refsect3">
<a name="gimp-thumb-get-thumb-dir-local.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>dirname</p></td>
<td class="parameter_description"><p>the basename of the dir, without the actual dirname itself</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a GimpThumbSize</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-thumb-get-thumb-dir-local.returns"></a><h4>Returns</h4>
<p> the thumbnail directory in the encoding of the filesystem</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-thumbs-delete-for-uri-local"></a><h3>gimp_thumbs_delete_for_uri_local ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_thumbs_delete_for_uri_local (<em class="parameter"><code>const <span class="type">gchar</span> *uri</code></em>);</pre>
<p>Deletes all thumbnails for the image file specified by <em class="parameter"><code>uri</code></em>
from
the local thumbnail repository.</p>
<div class="refsect3">
<a name="gimp-thumbs-delete-for-uri-local.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>an escaped URI</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-2.html#api-index-2.2">2.2</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.32</div>
</body>
</html>
|