summaryrefslogtreecommitdiffstats
path: root/devel-docs/libgimpbase/html/libgimpbase-gimpenv.html
blob: ab18f99976512282c1f3217205bf0fff8bdc84bb (plain)
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
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gimpenv: GIMP Base Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GIMP Base Library Reference Manual">
<link rel="up" href="pt01.html" title="Part I. GIMP Base Library">
<link rel="prev" href="libgimpbase-gimpdatafiles.html" title="gimpdatafiles">
<link rel="next" href="libgimpbase-gimpmemsize.html" title="gimpmemsize">
<meta name="generator" content="GTK-Doc V1.33.1 (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="#libgimpbase-gimpenv.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="libgimpbase-gimpdatafiles.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgimpbase-gimpmemsize.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgimpbase-gimpenv"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgimpbase-gimpenv.top_of_page"></a>gimpenv</span></h2>
<p>gimpenv — Functions to access the GIMP environment.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgimpbase-gimpenv.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">void</span>
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-env-init" title="gimp_env_init ()">gimp_env_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="libgimpbase-gimpenv.html#gimp-directory" title="gimp_directory ()">gimp_directory</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="libgimpbase-gimpenv.html#gimp-installation-directory" title="gimp_installation_directory ()">gimp_installation_directory</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="libgimpbase-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()">gimp_data_directory</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="libgimpbase-gimpenv.html#gimp-locale-directory" title="gimp_locale_directory ()">gimp_locale_directory</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="libgimpbase-gimpenv.html#gimp-plug-in-directory" title="gimp_plug_in_directory ()">gimp_plug_in_directory</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="libgimpbase-gimpenv.html#gimp-sysconf-directory" title="gimp_sysconf_directory ()">gimp_sysconf_directory</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="libgimpbase-gimpenv.html#gimp-cache-directory" title="gimp_cache_directory ()">gimp_cache_directory</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="libgimpbase-gimpenv.html#gimp-temp-directory" title="gimp_temp_directory ()">gimp_temp_directory</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-directory-file" title="gimp_directory_file ()">gimp_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-installation-directory-file" title="gimp_installation_directory_file ()">gimp_installation_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-data-directory-file" title="gimp_data_directory_file ()">gimp_data_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-locale-directory-file" title="gimp_locale_directory_file ()">gimp_locale_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-sysconf-directory-file" title="gimp_sysconf_directory_file ()">gimp_sysconf_directory_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GFile</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-plug-in-directory-file" title="gimp_plug_in_directory_file ()">gimp_plug_in_directory_file</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="libgimpbase-gimpenv.html#gimp-user-directory" title="gimp_user_directory ()">gimp_user_directory</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="libgimpbase-gimpenv.html#gimp-personal-rc-file" title="gimp_personal_rc_file ()">gimp_personal_rc_file</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="libgimpbase-gimpenv.html#gimp-gtkrc" title="gimp_gtkrc ()">gimp_gtkrc</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()">gimp_path_parse</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="libgimpbase-gimpenv.html#gimp-path-to-str" title="gimp_path_to_str ()">gimp_path_to_str</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="libgimpbase-gimpenv.html#gimp-path-free" title="gimp_path_free ()">gimp_path_free</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="libgimpbase-gimpenv.html#gimp-path-get-user-writable-dir" title="gimp_path_get_user_writable_dir ()">gimp_path_get_user_writable_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpenv.description"></a><h2>Description</h2>
<p>A set of functions to find the locations of GIMP's data directories
and configuration files.</p>
</div>
<div class="refsect1">
<a name="libgimpbase-gimpenv.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gimp-env-init"></a><h3>gimp_env_init ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_env_init (<em class="parameter"><code><span class="type">gboolean</span> plug_in</code></em>);</pre>
<p>You don't need to care about this function. It is being called for
you automatically (by means of the <code class="function">MAIN()</code> macro that every plug-in
runs). Calling it again will cause a fatal error.</p>
<div class="refsect3">
<a name="gimp-env-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>plug_in</p></td>
<td class="parameter_description"><p>must be <code class="literal">TRUE</code> if this function is called from a plug-in</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-directory"></a><h3>gimp_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the user-specific GIMP settings directory. If the
environment variable GIMP2_DIRECTORY exists, it is used. If it is
an absolute path, it is used as is.  If it is a relative path, it
is taken to be a subdirectory of the home directory. If it is a
relative path, and no home directory can be determined, it is taken
to be a subdirectory of <a class="link" href="libgimpbase-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()"><code class="function">gimp_data_directory()</code></a>.</p>
<p>The usual case is that no GIMP2_DIRECTORY environment variable
exists, and then we use the GIMPDIR subdirectory of the local
configuration directory:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem"><p>UNIX: $XDG_CONFIG_HOME (defaults to $HOME/.config/)</p></li>
<li class="listitem"><p>Windows: CSIDL_APPDATA</p></li>
<li class="listitem"><p>OSX (UNIX exception): the Application Support Directory.</p></li>
</ul></div>
<p>If neither the configuration nor home directory exist,
<code class="function">g_get_user_config_dir()</code> will return {tmp}/{user_name}/.config/ where
the temporary directory {tmp} and the {user_name} are determined
according to platform rules.</p>
<p>In any case, we always return some non-empty string, whether it
corresponds to an existing directory or not.</p>
<p>In config files such as gimprc, the string ${gimp_dir} expands to
this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8 (on Windows it is always
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-directory.returns"></a><h4>Returns</h4>
<p> The user-specific GIMP settings directory.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-installation-directory"></a><h3>gimp_installation_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_installation_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top installation directory of GIMP. On Unix the
compile-time defined installation prefix is used. On Windows, the
installation directory as deduced from the executable's full
filename is used. On OSX we ask [NSBundle mainBundle] for the
resource path to check if GIMP is part of a relocatable bundle.</p>
<p>In config files such as gimprc, the string ${gimp_installation_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-installation-directory.returns"></a><h4>Returns</h4>
<p> The toplevel installation directory of GIMP.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-8.html#api-index-2.8">2.8</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-data-directory"></a><h3>gimp_data_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_data_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP data. If the environment
variable GIMP2_DATADIR exists, that is used.  It should be an
absolute pathname.  Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as
deduced from the executable's full filename is used.</p>
<p>Note that the actual directories used for GIMP data files can be
overridden by the user in the preferences dialog.</p>
<p>In config files such as gimprc, the string ${gimp_data_dir} expands
to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-data-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP data.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-locale-directory"></a><h3>gimp_locale_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_locale_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP locale files. If the environment
variable GIMP2_LOCALEDIR exists, that is used.  It should be an
absolute pathname.  Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as deduced
from the executable's full filename is used.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
the C library, which isn't necessarily UTF-8. (On Windows, unlike
the other similar functions here, the return value from this
function is in the system codepage, never in UTF-8. It can thus be
passed directly to the <code class="function">bindtextdomain()</code> function from libintl which
does not handle UTF-8.)</p>
<div class="refsect3">
<a name="gimp-locale-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP locale files.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-plug-in-directory"></a><h3>gimp_plug_in_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_plug_in_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP plug-ins and modules. If
the environment variable GIMP2_PLUGINDIR exists, that is used.  It
should be an absolute pathname. Otherwise, on Unix the compile-time
defined directory is used. On Windows, the installation directory
as deduced from the executable's full filename is used.</p>
<p>Note that the actual directories used for GIMP plug-ins and modules
can be overridden by the user in the preferences dialog.</p>
<p>In config files such as gimprc, the string ${gimp_plug_in_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-plug-in-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP plug_ins and modules.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-sysconf-directory"></a><h3>gimp_sysconf_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_sysconf_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the top directory for GIMP config files. If the environment
variable GIMP2_SYSCONFDIR exists, that is used.  It should be an
absolute pathname.  Otherwise, on Unix the compile-time defined
directory is used. On Windows, the installation directory as deduced
from the executable's full filename is used.</p>
<p>In config files such as gimprc, the string ${gimp_sysconf_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.).</p>
<div class="refsect3">
<a name="gimp-sysconf-directory.returns"></a><h4>Returns</h4>
<p> The top directory for GIMP config files.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-cache-directory"></a><h3>gimp_cache_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_cache_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP cached files. If the
environment variable GIMP2_CACHEDIR exists, that is used.  It
should be an absolute pathname.  Otherwise, a subdirectory of the
directory returned by <code class="function">g_get_user_cache_dir()</code> is used.</p>
<p>Note that the actual directories used for GIMP caches files can
be overridden by the user in the preferences dialog.</p>
<p>In config files such as gimprc, the string ${gimp_cache_dir}
expands to this directory.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.).</p>
<div class="refsect3">
<a name="gimp-cache-directory.returns"></a><h4>Returns</h4>
<p> The default top directory for GIMP cached files.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10-10.html#api-index-2.10.10">2.10.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-temp-directory"></a><h3>gimp_temp_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_temp_directory (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the default top directory for GIMP temporary files. If the
environment variable GIMP2_TEMPDIR exists, that is used.  It
should be an absolute pathname.  Otherwise, a subdirectory of the
directory returned by <code class="function">g_get_tmp_dir()</code> is used.</p>
<p>In config files such as gimprc, the string ${gimp_temp_dir} expands
to this directory.</p>
<p>Note that the actual directories used for GIMP temporary files can
be overridden by the user in the preferences dialog.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.).</p>
<div class="refsect3">
<a name="gimp-temp-directory.returns"></a><h4>Returns</h4>
<p> The default top directory for GIMP temporary files.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10-10.html#api-index-2.10.10">2.10.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-directory-file"></a><h3>gimp_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                     <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the user's GIMP directory, or the data
directory itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-directory" title="gimp_directory ()"><code class="function">gimp_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-directory-file.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>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
user's GIMP directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>.</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-installation-directory-file"></a><h3>gimp_installation_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_installation_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                                  <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the installation directory, or the installation
directory itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-installation-directory" title="gimp_installation_directory ()"><code class="function">gimp_installation_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-installation-directory-file.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>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
top installation directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-installation-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-10-10.html#api-index-2.10.10">2.10.10</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-data-directory-file"></a><h3>gimp_data_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_data_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                          <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the data directory, or the data directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-data-directory" title="gimp_data_directory ()"><code class="function">gimp_data_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-data-directory-file.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>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
data directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-data-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>.</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-locale-directory-file"></a><h3>gimp_locale_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_locale_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                            <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the locale directory, or the locale directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-locale-directory" title="gimp_locale_directory ()"><code class="function">gimp_locale_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-locale-directory-file.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>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
locale directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-locale-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>.</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-sysconf-directory-file"></a><h3>gimp_sysconf_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_sysconf_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                             <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the sysconf directory, or the sysconf directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-sysconf-directory" title="gimp_sysconf_directory ()"><code class="function">gimp_sysconf_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-sysconf-directory-file.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>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
sysconf directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-sysconf-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>.</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-plug-in-directory-file"></a><h3>gimp_plug_in_directory_file ()</h3>
<pre class="programlisting"><span class="returnvalue">GFile</span> *
gimp_plug_in_directory_file (<em class="parameter"><code>const <span class="type">gchar</span> *first_element</code></em>,
                             <em class="parameter"><code>...</code></em>);</pre>
<p>Returns a <span class="type">GFile</span> in the plug-in directory, or the plug-in directory
itself if <em class="parameter"><code>first_element</code></em>
 is <code class="literal">NULL</code>.</p>
<p>See also: <a class="link" href="libgimpbase-gimpenv.html#gimp-plug-in-directory" title="gimp_plug_in_directory ()"><code class="function">gimp_plug_in_directory()</code></a>.</p>
<div class="refsect3">
<a name="gimp-plug-in-directory-file.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>first_element</p></td>
<td class="parameter_description"><p>the first element of a path to a file in the
plug-in directory, or <code class="literal">NULL</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>a <code class="literal">NULL</code> terminated list of the remaining elements of the path
to the file.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-plug-in-directory-file.returns"></a><h4>Returns</h4>
<p> a new <em class="parameter"><code>GFile</code></em>
for the path, Free with <code class="function">g_object_unref()</code>.</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-user-directory"></a><h3>gimp_user_directory ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_user_directory (<em class="parameter"><code><a class="link" href="libgimpbase-gimpbaseenums.html#GimpUserDirectory" title="enum GimpUserDirectory"><span class="type">GimpUserDirectory</span></a> type</code></em>);</pre>
<div class="warning"><p><code class="literal">gimp_user_directory</code> is deprecated and should not be used in newly-written code.</p></div>
<p>This procedure is deprecated! Use <code class="function">g_get_user_special_dir()</code> instead.</p>
<div class="refsect3">
<a name="gimp-user-directory.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>type</p></td>
<td class="parameter_description"><p>the type of user directory to retrieve</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-user-directory.returns"></a><h4>Returns</h4>
<p> The path to the specified user directory, or <code class="literal">NULL</code> if the
logical ID was not found.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-4.html#api-index-2.4">2.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gimp-personal-rc-file"></a><h3>gimp_personal_rc_file ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_personal_rc_file (<em class="parameter"><code>const <span class="type">gchar</span> *basename</code></em>);</pre>
<p>Returns the name of a file in the user-specific GIMP settings directory.</p>
<p>The returned string is newly allocated and should be freed with
<code class="function">g_free()</code> after use. The returned string is in the encoding used for
filenames by GLib, which isn't necessarily UTF-8. (On Windows it
always is UTF-8.)</p>
<div class="refsect3">
<a name="gimp-personal-rc-file.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>basename</p></td>
<td class="parameter_description"><p>The basename of a rc_file.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-personal-rc-file.returns"></a><h4>Returns</h4>
<p> The name of a file in the user-specific GIMP settings directory.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-gtkrc"></a><h3>gimp_gtkrc ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gimp_gtkrc (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the name of GIMP's application-specific gtkrc file.</p>
<p>The returned string is owned by GIMP and must not be modified or
freed. The returned string is in the encoding used for filenames by
GLib, which isn't necessarily UTF-8. (On Windows it always is
UTF-8.)</p>
<div class="refsect3">
<a name="gimp-gtkrc.returns"></a><h4>Returns</h4>
<p> The name of GIMP's application-specific gtkrc file.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-parse"></a><h3>gimp_path_parse ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gimp_path_parse (<em class="parameter"><code>const <span class="type">gchar</span> *path</code></em>,
                 <em class="parameter"><code><span class="type">gint</span> max_paths</code></em>,
                 <em class="parameter"><code><span class="type">gboolean</span> check</code></em>,
                 <em class="parameter"><code><span class="type">GList</span> **check_failed</code></em>);</pre>
<div class="refsect3">
<a name="gimp-path-parse.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>path</p></td>
<td class="parameter_description"><p>A list of directories separated by <span class="type">G_SEARCHPATH_SEPARATOR</span>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>max_paths</p></td>
<td class="parameter_description"><p>The maximum number of directories to return.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if you want the directories to be checked.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>check_failed</p></td>
<td class="parameter_description"><p>Returns a <span class="type">GList</span> of path elements for which the
check failed.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-parse.returns"></a><h4>Returns</h4>
<p> A <span class="type">GList</span> of all directories in <em class="parameter"><code>path</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-to-str"></a><h3>gimp_path_to_str ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_path_to_str (<em class="parameter"><code><span class="type">GList</span> *path</code></em>);</pre>
<div class="refsect3">
<a name="gimp-path-to-str.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>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-to-str.returns"></a><h4>Returns</h4>
<p> A searchpath string separated by <span class="type">G_SEARCHPATH_SEPARATOR</span>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-free"></a><h3>gimp_path_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gimp_path_free (<em class="parameter"><code><span class="type">GList</span> *path</code></em>);</pre>
<p>This function frees the memory allocated for the list and the strings
it contains.</p>
<div class="refsect3">
<a name="gimp-path-free.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>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gimp-path-get-user-writable-dir"></a><h3>gimp_path_get_user_writable_dir ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gimp_path_get_user_writable_dir (<em class="parameter"><code><span class="type">GList</span> *path</code></em>);</pre>
<p>Note that you have to <code class="function">g_free()</code> the returned string.</p>
<div class="refsect3">
<a name="gimp-path-get-user-writable-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>path</p></td>
<td class="parameter_description"><p>A list of directories as returned by <a class="link" href="libgimpbase-gimpenv.html#gimp-path-parse" title="gimp_path_parse ()"><code class="function">gimp_path_parse()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gimp-path-get-user-writable-dir.returns"></a><h4>Returns</h4>
<p> The first directory in <em class="parameter"><code>path</code></em>
where the user has write permission.</p>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>