File: libgnome-gnome-program.html

package info (click to toggle)
libgnome 2.30.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 9,932 kB
  • ctags: 1,015
  • sloc: sh: 10,282; ansic: 6,652; makefile: 279
file content (1380 lines) | stat: -rw-r--r-- 77,204 bytes parent folder | download
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
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gnome-program</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GNOME Library Reference Manual">
<link rel="up" href="ch01.html" title="Initializing Applications and Starting Programs">
<link rel="prev" href="ch01.html" title="Initializing Applications and Starting Programs">
<link rel="next" href="libgnome-gnome-init.html" title="gnome-init">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="part" href="libgnome.html" title="Part I. GNOME Library (libgnome)">
<link rel="chapter" href="ch01.html" title="Initializing Applications and Starting Programs">
<link rel="chapter" href="ch02.html" title="Configuration">
<link rel="chapter" href="ch03.html" title="Displaying Help and External Info">
<link rel="chapter" href="ch04.html" title="Miscellaneous">
<link rel="chapter" href="ch05.html" title="Lower Level Interactions">
<link rel="chapter" href="ch06.html" title="Deprecated Modules">
<link rel="index" href="ix01.html" title="Index">
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
</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="2">
<tr valign="middle">
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME Library Reference Manual</th>
<td><a accesskey="n" href="libgnome-gnome-init.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgnome-gnome-program.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libgnome-gnome-program.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="gnome-program">
<a name="libgnome-gnome-program"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgnome-gnome-program.top_of_page"></a>gnome-program</span></h2>
<p>gnome-program — Initialize and retrieve information about a GNOME application.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libgnome-gnome-program.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libgnome/libgnome.h&gt;

enum                <a class="link" href="libgnome-gnome-program.html#GnomeFileDomain" title="enum GnomeFileDomain">GnomeFileDomain</a>;
                    <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram">GnomeProgram</a>;
                    <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo">GnomeModuleInfo</a>;
                    <a class="link" href="libgnome-gnome-program.html#GnomeModuleRequirement" title="GnomeModuleRequirement">GnomeModuleRequirement</a>;
<span class="returnvalue">void</span>                (<a class="link" href="libgnome-gnome-program.html#GnomeModuleInitHook" title="GnomeModuleInitHook ()">*GnomeModuleInitHook</a>)              (const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *mod_info);
<span class="returnvalue">void</span>                (<a class="link" href="libgnome-gnome-program.html#GnomeModuleClassInitHook" title="GnomeModuleClassInitHook ()">*GnomeModuleClassInitHook</a>)         (<span class="returnvalue">GnomeProgramClass</span> *klass,
                                                         const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *mod_info);
<span class="returnvalue">void</span>                (<a class="link" href="libgnome-gnome-program.html#GnomeModuleHook" title="GnomeModuleHook ()">*GnomeModuleHook</a>)                  (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program,
                                                         <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *mod_info);
<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *      <a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()">gnome_program_init</a>                  (const <span class="returnvalue">char</span> *app_id,
                                                         const <span class="returnvalue">char</span> *app_version,
                                                         const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info,
                                                         <span class="returnvalue">int</span> argc,
                                                         <span class="returnvalue">char</span> **argv,
                                                         const <span class="returnvalue">char</span> *first_property_name,
                                                         ...);
<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *      <a class="link" href="libgnome-gnome-program.html#gnome-program-initv" title="gnome_program_initv ()">gnome_program_initv</a>                 (<span class="returnvalue">GType</span> type,
                                                         const <span class="returnvalue">char</span> *app_id,
                                                         const <span class="returnvalue">char</span> *app_version,
                                                         const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info,
                                                         <span class="returnvalue">int</span> argc,
                                                         <span class="returnvalue">char</span> **argv,
                                                         const <span class="returnvalue">char</span> *first_property_name,
                                                         <span class="returnvalue">va_list</span> args);

<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *      <a class="link" href="libgnome-gnome-program.html#gnome-program-get" title="gnome_program_get ()">gnome_program_get</a>                   (void);
const <span class="returnvalue">char</span> *        <a class="link" href="libgnome-gnome-program.html#gnome-program-get-human-readable-name" title="gnome_program_get_human_readable_name ()">gnome_program_get_human_readable_name</a>
                                                        (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);
const <span class="returnvalue">char</span> *        <a class="link" href="libgnome-gnome-program.html#gnome-program-get-app-id" title="gnome_program_get_app_id ()">gnome_program_get_app_id</a>            (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);
const <span class="returnvalue">char</span> *        <a class="link" href="libgnome-gnome-program.html#gnome-program-get-app-version" title="gnome_program_get_app_version ()">gnome_program_get_app_version</a>       (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);
<span class="returnvalue">gchar</span> *             <a class="link" href="libgnome-gnome-program.html#gnome-program-locate-file" title="gnome_program_locate_file ()">gnome_program_locate_file</a>           (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program,
                                                         <a class="link" href="libgnome-gnome-program.html#GnomeFileDomain" title="enum GnomeFileDomain"><span class="returnvalue">GnomeFileDomain</span></a> domain,
                                                         const <span class="returnvalue">gchar</span> *file_name,
                                                         <span class="returnvalue">gboolean</span> only_if_exists,
                                                         <span class="returnvalue">GSList</span> **ret_locations);

<span class="returnvalue">void</span>                <a class="link" href="libgnome-gnome-program.html#gnome-program-module-register" title="gnome_program_module_register ()">gnome_program_module_register</a>       (const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info);
<span class="returnvalue">gboolean</span>            <a class="link" href="libgnome-gnome-program.html#gnome-program-module-registered" title="gnome_program_module_registered ()">gnome_program_module_registered</a>     (const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info);
const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> * <a class="link" href="libgnome-gnome-program.html#gnome-program-module-load" title="gnome_program_module_load ()">gnome_program_module_load</a>       (const <span class="returnvalue">char</span> *mod_name);
<span class="returnvalue">guint</span>               <a class="link" href="libgnome-gnome-program.html#gnome-program-install-property" title="gnome_program_install_property ()">gnome_program_install_property</a>      (<span class="returnvalue">GnomeProgramClass</span> *pclass,
                                                         <span class="returnvalue">GObjectGetPropertyFunc</span> get_fn,
                                                         <span class="returnvalue">GObjectSetPropertyFunc</span> set_fn,
                                                         <span class="returnvalue">GParamSpec</span> *pspec);
<span class="returnvalue">poptContext</span>         <a class="link" href="libgnome-gnome-program.html#gnome-program-preinit" title="gnome_program_preinit ()">gnome_program_preinit</a>               (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program,
                                                         const <span class="returnvalue">char</span> *app_id,
                                                         const <span class="returnvalue">char</span> *app_version,
                                                         <span class="returnvalue">int</span> argc,
                                                         <span class="returnvalue">char</span> **argv);
<span class="returnvalue">void</span>                <a class="link" href="libgnome-gnome-program.html#gnome-program-parse-args" title="gnome_program_parse_args ()">gnome_program_parse_args</a>            (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);
<span class="returnvalue">void</span>                <a class="link" href="libgnome-gnome-program.html#gnome-program-postinit" title="gnome_program_postinit ()">gnome_program_postinit</a>              (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);

#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-POPT-TABLE:CAPS" title="GNOME_PARAM_POPT_TABLE">GNOME_PARAM_POPT_TABLE</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-POPT-FLAGS:CAPS" title="GNOME_PARAM_POPT_FLAGS">GNOME_PARAM_POPT_FLAGS</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-POPT-CONTEXT:CAPS" title="GNOME_PARAM_POPT_CONTEXT">GNOME_PARAM_POPT_CONTEXT</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GOPTION-CONTEXT:CAPS" title="GNOME_PARAM_GOPTION_CONTEXT">GNOME_PARAM_GOPTION_CONTEXT</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-CREATE-DIRECTORIES:CAPS" title="GNOME_PARAM_CREATE_DIRECTORIES">GNOME_PARAM_CREATE_DIRECTORIES</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-ENABLE-SOUND:CAPS" title="GNOME_PARAM_ENABLE_SOUND">GNOME_PARAM_ENABLE_SOUND</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-ESPEAKER:CAPS" title="GNOME_PARAM_ESPEAKER">GNOME_PARAM_ESPEAKER</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-ID:CAPS" title="GNOME_PARAM_APP_ID">GNOME_PARAM_APP_ID</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-VERSION:CAPS" title="GNOME_PARAM_APP_VERSION">GNOME_PARAM_APP_VERSION</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GNOME-PREFIX:CAPS" title="GNOME_PARAM_GNOME_PREFIX">GNOME_PARAM_GNOME_PREFIX</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GNOME-SYSCONFDIR:CAPS" title="GNOME_PARAM_GNOME_SYSCONFDIR">GNOME_PARAM_GNOME_SYSCONFDIR</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GNOME-DATADIR:CAPS" title="GNOME_PARAM_GNOME_DATADIR">GNOME_PARAM_GNOME_DATADIR</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GNOME-LIBDIR:CAPS" title="GNOME_PARAM_GNOME_LIBDIR">GNOME_PARAM_GNOME_LIBDIR</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-PREFIX:CAPS" title="GNOME_PARAM_APP_PREFIX">GNOME_PARAM_APP_PREFIX</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-SYSCONFDIR:CAPS" title="GNOME_PARAM_APP_SYSCONFDIR">GNOME_PARAM_APP_SYSCONFDIR</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-DATADIR:CAPS" title="GNOME_PARAM_APP_DATADIR">GNOME_PARAM_APP_DATADIR</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-LIBDIR:CAPS" title="GNOME_PARAM_APP_LIBDIR">GNOME_PARAM_APP_LIBDIR</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-HUMAN-READABLE-NAME:CAPS" title="GNOME_PARAM_HUMAN_READABLE_NAME">GNOME_PARAM_HUMAN_READABLE_NAME</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GNOME-PATH:CAPS" title="GNOME_PARAM_GNOME_PATH">GNOME_PARAM_GNOME_PATH</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-NONE:CAPS" title="GNOME_PARAM_NONE">GNOME_PARAM_NONE</a>
#define             <a class="link" href="libgnome-gnome-program.html#GNOME-PROGRAM-STANDARD-PROPERTIES:CAPS" title="GNOME_PROGRAM_STANDARD_PROPERTIES">GNOME_PROGRAM_STANDARD_PROPERTIES</a>
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libgnome-gnome-program.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1" title="Details">
<a name="libgnome-gnome-program.details"></a><h2>Details</h2>
<div class="refsect2" title="enum GnomeFileDomain">
<a name="GnomeFileDomain"></a><h3>enum GnomeFileDomain</h3>
<pre class="programlisting">typedef enum {
    GNOME_FILE_DOMAIN_UNKNOWN = 0,

    /* Gnome installed files */
    GNOME_FILE_DOMAIN_LIBDIR,
    GNOME_FILE_DOMAIN_DATADIR,
    GNOME_FILE_DOMAIN_SOUND,
    GNOME_FILE_DOMAIN_PIXMAP,
    GNOME_FILE_DOMAIN_CONFIG,
    GNOME_FILE_DOMAIN_HELP,

    /* Application files */
    GNOME_FILE_DOMAIN_APP_LIBDIR,
    GNOME_FILE_DOMAIN_APP_DATADIR,
    GNOME_FILE_DOMAIN_APP_SOUND,
    GNOME_FILE_DOMAIN_APP_PIXMAP,
    GNOME_FILE_DOMAIN_APP_CONFIG,
    GNOME_FILE_DOMAIN_APP_HELP
} GnomeFileDomain;
</pre>
<p>
Many of the files that a GNOME application needs to access will be installed in
standard locations. For example, GNOME help files will be in one location,
while help files specific to the current application might be in another
location.
</p>
<p>
The different types of files are given in this enum. User applications make use
of the <em class="structfield"><code>GNOME_FILE_DOMAIN_APP_*</code></em> types, which specify
locations relative to <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-DATADIR:CAPS" title="GNOME_PARAM_APP_DATADIR"><span class="type">GNOME_PARAM_APP_DATADIR</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-UNKNOWN:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_UNKNOWN</code></span></p></td>
<td>An unknown file domain (should never be used).
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-LIBDIR:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_LIBDIR</code></span></p></td>
<td>Libraries in the main GNOME installation.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-DATADIR:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_DATADIR</code></span></p></td>
<td>Data files in the main GNOME installation.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-SOUND:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_SOUND</code></span></p></td>
<td>Sound files in the main GNOME installation.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-PIXMAP:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_PIXMAP</code></span></p></td>
<td>Pixmap files in the main GNOME installation.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-CONFIG:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_CONFIG</code></span></p></td>
<td>Config files in the main GNOME installation.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-HELP:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_HELP</code></span></p></td>
<td>Help files in the main GNOME installation.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-APP-LIBDIR:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_APP_LIBDIR</code></span></p></td>
<td>Application specific libraries.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-APP-DATADIR:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_APP_DATADIR</code></span></p></td>
<td>Application specific data files.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-APP-SOUND:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_APP_SOUND</code></span></p></td>
<td>Application specific sound files.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-APP-PIXMAP:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_APP_PIXMAP</code></span></p></td>
<td>Application specific pixmap files.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-APP-CONFIG:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_APP_CONFIG</code></span></p></td>
<td>Application specific config files.
</td>
</tr>
<tr>
<td><p><a name="GNOME-FILE-DOMAIN-APP-HELP:CAPS"></a><span class="term"><code class="literal">GNOME_FILE_DOMAIN_APP_HELP</code></span></p></td>
<td>Application specific help files.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GnomeProgram">
<a name="GnomeProgram"></a><h3>GnomeProgram</h3>
<pre class="programlisting">typedef struct {
    GObject object;

    GnomeProgramPrivate *_priv;
} GnomeProgram;
</pre>
<p>
A structure containing information about the current application. Initialised
during a call to <a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()"><code class="function">gnome_program_init()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><span class="type">GObject</span> <em class="structfield"><code><a name="GnomeProgram.object"></a>object</code></em>;</span></p></td>
<td>A <span class="type">GObject</span> containing the parameters and their values which were set
dring initialisation.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">GnomeProgramPrivate</span> *<em class="structfield"><code><a name="GnomeProgram.-priv"></a>_priv</code></em>;</span></p></td>
<td>Private data about the program instance.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GnomeModuleInfo">
<a name="GnomeModuleInfo"></a><h3>GnomeModuleInfo</h3>
<pre class="programlisting">typedef struct {
    const char *name;
    const char *version;
    const char *description;
    GnomeModuleRequirement *requirements; /* last element has NULL version */

    GnomeModuleHook instance_init;
    GnomeModuleHook pre_args_parse, post_args_parse;

#ifdef GNOME_DISABLE_DEPRECATED
    void *_options;
#else
    struct poptOption *options;
#endif

    GnomeModuleInitHook init_pass;

    GnomeModuleClassInitHook class_init;

    const char *opt_prefix;
    GnomeModuleGetGOptionGroupFunc get_goption_group_func;
} GnomeModuleInfo;
</pre>
<p>
A structure containing information about a module. This contains descriptive
information about the module, as well as how to initialise it and what its
dependencies are (chained via the <em class="parameter"><code>requirements</code></em> parameter).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="GnomeModuleInfo.name"></a>name</code></em>;</span></p></td>
<td>The module name.
</td>
</tr>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="GnomeModuleInfo.version"></a>version</code></em>;</span></p></td>
<td>The module's version string.
</td>
</tr>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="GnomeModuleInfo.description"></a>description</code></em>;</span></p></td>
<td>A string describing the module (can be <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libgnome-gnome-program.html#GnomeModuleRequirement" title="GnomeModuleRequirement"><span class="type">GnomeModuleRequirement</span></a> *<em class="structfield"><code><a name="GnomeModuleInfo.requirements"></a>requirements</code></em>;</span></p></td>
<td>A pointer to an array of modules that are required by this
module. The last module in the array should have its required_version field set
to <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libgnome-gnome-program.html#GnomeModuleHook" title="GnomeModuleHook ()"><span class="type">GnomeModuleHook</span></a> <em class="structfield"><code><a name="GnomeModuleInfo.instance-init"></a>instance_init</code></em>;</span></p></td>
<td>A function to call to initialise an instance of this module
(can be <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libgnome-gnome-program.html#GnomeModuleHook" title="GnomeModuleHook ()"><span class="type">GnomeModuleHook</span></a> <em class="structfield"><code><a name="GnomeModuleInfo.pre-args-parse"></a>pre_args_parse</code></em>;</span></p></td>
<td>A function to call before parsing the arguments for this
module (can be <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libgnome-gnome-program.html#GnomeModuleHook" title="GnomeModuleHook ()"><span class="type">GnomeModuleHook</span></a> <em class="structfield"><code><a name="GnomeModuleInfo.post-args-parse"></a>post_args_parse</code></em>;</span></p></td>
<td>A function to call after parsing the arguments for this
module (can be <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">void</span> *<em class="structfield"><code><a name="GnomeModuleInfo.-options"></a>_options</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term">struct <span class="type">poptOption</span> *<em class="structfield"><code><a name="GnomeModuleInfo.options"></a>options</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libgnome-gnome-program.html#GnomeModuleInitHook" title="GnomeModuleInitHook ()"><span class="type">GnomeModuleInitHook</span></a> <em class="structfield"><code><a name="GnomeModuleInfo.init-pass"></a>init_pass</code></em>;</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><a class="link" href="libgnome-gnome-program.html#GnomeModuleClassInitHook" title="GnomeModuleClassInitHook ()"><span class="type">GnomeModuleClassInitHook</span></a> <em class="structfield"><code><a name="GnomeModuleInfo.class-init"></a>class_init</code></em>;</span></p></td>
<td>A function to call to initialise this module prior to creating any
instances (can be <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</td>
</tr>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="GnomeModuleInfo.opt-prefix"></a>opt_prefix</code></em>;</span></p></td>
<td>Unused.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="type">GnomeModuleGetGOptionGroupFunc</span> <em class="structfield"><code><a name="GnomeModuleInfo.get-goption-group-func"></a>get_goption_group_func</code></em>;</span></p></td>
<td>A function which must return a non-<a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> <span class="type">GOptionGroup</span>,
which will be added to the <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> s <span class="type">GOptionContext</span> during
#<a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()"><code class="function">gnome_program_init()</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GnomeModuleRequirement">
<a name="GnomeModuleRequirement"></a><h3>GnomeModuleRequirement</h3>
<pre class="programlisting">typedef struct {
    const char *required_version;
    const GnomeModuleInfo *module_info;
} GnomeModuleRequirement;
</pre>
<p>
A structure which allows a module to specify the minimum required versions of
modules it depends upon.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term">const <span class="type">char</span> *<em class="structfield"><code><a name="GnomeModuleRequirement.required-version"></a>required_version</code></em>;</span></p></td>
<td>The version required by the parent module.
</td>
</tr>
<tr>
<td><p><span class="term">const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> *<em class="structfield"><code><a name="GnomeModuleRequirement.module-info"></a>module_info</code></em>;</span></p></td>
<td>A <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> structure detailing the required module.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GnomeModuleInitHook ()">
<a name="GnomeModuleInitHook"></a><h3>GnomeModuleInitHook ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GnomeModuleInitHook)              (const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *mod_info);</pre>
<p>
A function that will be called to allow a module to do any pre-initialisation
it might need to do prior to having arguments parsed by the controlling parent
module (the parent will do the argument parsing for all modules in the
hierarchy).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>mod_info</code></em> :</span></p></td>
<td>The current module.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GnomeModuleClassInitHook ()">
<a name="GnomeModuleClassInitHook"></a><h3>GnomeModuleClassInitHook ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GnomeModuleClassInitHook)         (<span class="returnvalue">GnomeProgramClass</span> *klass,
                                                         const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *mod_info);</pre>
<p>
A function called to perform any class specific setup that is required by each
module.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>klass</code></em> :</span></p></td>
<td>The class of the parent module (which could be this module's class).
This will usually be <span class="type">GnomeProgramClass</span>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mod_info</code></em> :</span></p></td>
<td>The current module.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GnomeModuleHook ()">
<a name="GnomeModuleHook"></a><h3>GnomeModuleHook ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                (*GnomeModuleHook)                  (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program,
                                                         <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *mod_info);</pre>
<p>
A function that is called to perform some intialisation in a module (which
could be either the main init function or the pre or post argument parsing
phase).
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td>The <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> instance which is being initialised.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>mod_info</code></em> :</span></p></td>
<td>The current module's <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> structure.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_init ()">
<a name="gnome-program-init"></a><h3>gnome_program_init ()</h3>
<pre class="programlisting"><a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *      gnome_program_init                  (const <span class="returnvalue">char</span> *app_id,
                                                         const <span class="returnvalue">char</span> *app_version,
                                                         const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info,
                                                         <span class="returnvalue">int</span> argc,
                                                         <span class="returnvalue">char</span> **argv,
                                                         const <span class="returnvalue">char</span> *first_property_name,
                                                         ...);</pre>
<p>
Initialises the current GNOME libraries for use by the application.
<em class="parameter"><code>app_id</code></em> is used for the following purposes:
- to find the programme's help files by gnome_help_*()
- to load the app-specific gtkrc file from ~/.gnome2/$(APPID)rc
- to load/save the app's accelerators map from ~/.gnome2/accelerators/$(APPID)
- to load/save a GnomeEntry's history from gconf/apps/gnome-settings/$(APPID)/history-$(ENTRYID)</p>
<p>
Every GNOME application will need to call this function (or
<a class="link" href="libgnome-gnome-program.html#gnome-program-initv" title="gnome_program_initv ()"><code class="function">gnome_program_initv()</code></a>) early in its lifetime to initialize the various GNOME
libraries in a consistent fashion. This function is very flexible in allowing
the user to specify which modules should be initialised and any special
paramter values that should be passed to these modules (along with processing
commandline options).
</p>
<p>
It loads the specified <em class="parameter"><code>module_info</code></em>, which is normally <a class="link" href="libgnome-gnome-init.html#LIBGNOME-MODULE:CAPS" title="LIBGNOME_MODULE"><span class="type">LIBGNOME_MODULE</span></a> or
<span class="type">LIBGNOMEUI_MODULE</span> and pulls in all the dependencies.  Programs that are not
running in setuid or setgid mode will also load modules specified in the
<em class="parameter"><code>--load-modules</code></em> and also in the <em class="parameter"><code>GNOME_MODULES</code></em> environment variable.
</p>
<p>The following example shows how one might initialise a typical program
using a goption table that is defined elsewhere.
</p>
<div class="example">
<a name="id2579416"></a><p class="title"><b>Example 1. Initializing a GNOME application (deprecated, using popt)</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="type">int</span> main(<span class="type">int</span> argc, <span class="type">char</span> **argv) {
        GnomeProgram *my_app;
        GOptionContext *option_context;
        <span class="comment">/*</span><span class="comment"> We assume PACKAGE and VERSION are set to the program name and version</span>
<span class="comment">         * number respectively. Also, assume that 'options' is a global array of</span>
<span class="comment">         * poptOptions.</span>
<span class="comment">         </span><span class="comment">*/</span>
        option_context = g_option_context_new (PACKAGE);
        g_option_context_add_main_entries (option_context, options, <span class="number">NULL</span>);
        my_app = gnome_program_init(PACKAGE, VERSION, LIBGNOMEUI_MODULE,
                                    argc, argv,
                                    GNOME_PARAM_GOPTION_CONTEXT, option_context,
                                    GNOME_PARAM_NONE);
        <span class="comment">/*</span><span class="comment"> Now process any extra args, etc ... </span><span class="comment">*/</span>
}</pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<br class="example-break"><p>
Even though many applications still use popt for command-line option parsing,
it has been deprecated in Gnome-2.14 and its use is discouraged for
newly-written code. GNOME applications should aim to use the new
<span class="type">GOption</span> API. Here an example that shows how one might initialize a typical
program using a GOptionEntry table (see the GLib documentation for a more
elaborate example of an option entry table):
</p>
<div class="example">
<a name="id2579456"></a><p class="title"><b>Example 2. Initializing a GNOME application (new, using GOption)</b></p>
<div class="example-contents">
  <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr>
        <td class="listing_lines" align="right"><pre>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</pre></td>
        <td class="listing_code"><pre class="programlisting"><span class="type">int</span> main(<span class="type">int</span> argc, <span class="type">char</span> **argv) {
        gchar **remaining_args = <span class="number">NULL</span>;
        GOptionEntry option_entries[] = {
                <span class="comment">/*</span><span class="comment"> ... your application's command line options go here ... </span><span class="comment">*/</span>
                <span class="comment">/*</span><span class="comment"> last but not least a special option that collects filenames </span><span class="comment">*/</span>
                { G_OPTION_REMAINING, <span class="number">0</span>, <span class="number">0</span>, G_OPTION_ARG_FILENAME_ARRAY,
                  &amp;remaining_args,
                  <span class="number">&quot;Special option that collects any remaining arguments for us&quot;</span> },
                { <span class="number">NULL</span> }
        };
        GOptionContext *option_context;
        GnomeProgram *my_app;
        option_context = g_option_context_new (<span class="number">&quot;my-app&quot;</span>);
        <span class="comment">/*</span><span class="comment"> if you are using any libraries that have command line options</span>
<span class="comment">         * of their own and provide a GOptionGroup with them, you can</span>
<span class="comment">         * add them here as well using g_option_context_add_group()</span>
<span class="comment">         </span><span class="comment">*/</span>
        <span class="comment">/*</span><span class="comment"> now add our own application's command-line options. If you</span>
<span class="comment">         * are using gettext for translations, you should be using</span>
<span class="comment">         * GETTEXT_PACKAGE here instead of NULL</span>
<span class="comment">         </span><span class="comment">*/</span>
        g_option_context_add_main_entries (option_context, option_entries, <span class="number">NULL</span>);
        <span class="comment">/*</span><span class="comment"> We assume PACKAGE and VERSION are set to the program name and version</span>
<span class="comment">         * number respectively. Also, assume that 'option_entries' is a global</span>
<span class="comment">         * array of GOptionEntry structures.</span>
<span class="comment">         </span><span class="comment">*/</span>
        my_app = gnome_program_init(PACKAGE, VERSION,
                                    LIBGNOMEUI_MODULE, argc, argv,
                                    GNOME_PARAM_GOPTION_CONTEXT, option_context,
                                    GNOME_PARAM_NONE);
        <span class="comment">/*</span><span class="comment"> parse remaining command-line arguments that are not</span>
<span class="comment">         * options (e.g. filenames or URIs or whatever), if any</span>
<span class="comment">         </span><span class="comment">*/</span>
        <span class="keyword">if</span> (remaining_args != <span class="number">NULL</span>) {
            gint i, num_args;
                num_args = g_strv_length (remaining_args);
                <span class="keyword">for</span> (i = <span class="number">0</span>; i &lt; num_args; ++i) {
                        <span class="comment">/*</span><span class="comment"> process remaining_args[i] here </span><span class="comment">*/</span>
                }
                g_strfreev (remaining_args);
                remaining_args = <span class="number">NULL</span>;
        }</pre></td>
      </tr>
    </tbody>
  </table>
</div>

</div>
<p><br class="example-break">
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_id</code></em> :</span></p></td>
<td> Application ID string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_version</code></em> :</span></p></td>
<td> Application version string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>module_info</code></em> :</span></p></td>
<td> The module to init with this program.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td> The number of commmand line arguments contained in <em class="parameter"><code>argv</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td> A string array of command line arguments.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td> The first item in a <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of attribute
name and value pairs (so this will be an attribute name or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td> The continuation of a <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of attribute name/value
pairs.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A new <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> instance representing the current application.
Unref the returned reference right before exiting your application.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_initv ()">
<a name="gnome-program-initv"></a><h3>gnome_program_initv ()</h3>
<pre class="programlisting"><a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *      gnome_program_initv                 (<span class="returnvalue">GType</span> type,
                                                         const <span class="returnvalue">char</span> *app_id,
                                                         const <span class="returnvalue">char</span> *app_version,
                                                         const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info,
                                                         <span class="returnvalue">int</span> argc,
                                                         <span class="returnvalue">char</span> **argv,
                                                         const <span class="returnvalue">char</span> *first_property_name,
                                                         <span class="returnvalue">va_list</span> args);</pre>
<p>
Provides a non-varargs form of <a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()"><code class="function">gnome_program_init()</code></a>. Users will rarely need
to call this function directly.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td> The type of application to be initialized (usually
<span class="type">GNOME_TYPE_PROGRAM</span>).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_id</code></em> :</span></p></td>
<td> Application ID string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_version</code></em> :</span></p></td>
<td> Application version string.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>module_info</code></em> :</span></p></td>
<td> The modules to init with the application.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td> The number of command line arguments contained in <em class="parameter"><code>argv</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td> A string array of command line arguments.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></p></td>
<td> The first item in a <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of attribute
name/value.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>args</code></em> :</span></p></td>
<td> The remaining elements in the <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated list (of which
<em class="parameter"><code>first_property_name</code></em> is the first element).
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> instance representing the current application.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_get ()">
<a name="gnome-program-get"></a><h3>gnome_program_get ()</h3>
<pre class="programlisting"><a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *      gnome_program_get                   (void);</pre>
<p>
Retrieves an object that stored information about the application's state.
Other functions assume this will always return a <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> object which
(if not <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>) has already been initialized.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The application's <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> instance, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if it does not
exist.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_get_human_readable_name ()">
<a name="gnome-program-get-human-readable-name"></a><h3>gnome_program_get_human_readable_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        gnome_program_get_human_readable_name
                                                        (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);</pre>
<p>
This function returns a pointer to a static string that the
application has provided as a human readable name. The app
should provide the name with the <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-HUMAN-READABLE-NAME:CAPS" title="GNOME_PARAM_HUMAN_READABLE_NAME"><span class="type">GNOME_PARAM_HUMAN_READABLE_NAME</span></a>
init argument. Returns <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if no name was set.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td> The application object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Application human-readable name string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_get_app_id ()">
<a name="gnome-program-get-app-id"></a><h3>gnome_program_get_app_id ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        gnome_program_get_app_id            (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);</pre>
<p>
This function returns a pointer to a static string that the
application has provided as an identifier. This is not meant as a
human-readable identifier so much as a unique identifier for
programs and libraries.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td> The program object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Application ID string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_get_app_version ()">
<a name="gnome-program-get-app-version"></a><h3>gnome_program_get_app_version ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *        gnome_program_get_app_version       (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);</pre>
<p>
This function returns a pointer to a static string that the
application has provided as a version number. This is not meant as a
human-readable identifier so much as a unique identifier for
programs and libraries.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td> The application object
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Application version string.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_locate_file ()">
<a name="gnome-program-locate-file"></a><h3>gnome_program_locate_file ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *             gnome_program_locate_file           (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program,
                                                         <a class="link" href="libgnome-gnome-program.html#GnomeFileDomain" title="enum GnomeFileDomain"><span class="returnvalue">GnomeFileDomain</span></a> domain,
                                                         const <span class="returnvalue">gchar</span> *file_name,
                                                         <span class="returnvalue">gboolean</span> only_if_exists,
                                                         <span class="returnvalue">GSList</span> **ret_locations);</pre>
<p>
This function finds a full path to the <em class="parameter"><code>file_name</code></em> located in the specified
"domain". A domain is a name for a collection of related files.
For example, common domains are "libdir", "pixmap", and "config".
</p>
<p>
If <em class="parameter"><code>ret_locations</code></em> is <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, only one pathname is returned. Otherwise,
alternative paths are returned in <em class="parameter"><code>ret_locations</code></em>.
</p>
<p>
User applications should store files in the GNOME_FILE_DOMAIN_APP_*
domains. However you MUST set the correct attributes for <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> for
the APP specific prefixes (during the initialization part of the
application).
</p>
<p>
The <em class="parameter"><code>ret_locations</code></em> list and its contents should be freed by the caller, as
should the returned string.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td> A valid <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> object or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> (in which case the current
application is used).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>domain</code></em> :</span></p></td>
<td> A <a class="link" href="libgnome-gnome-program.html#GnomeFileDomain" title="enum GnomeFileDomain"><span class="type">GnomeFileDomain</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>file_name</code></em> :</span></p></td>
<td> A file name or path inside the 'domain' to find.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>only_if_exists</code></em> :</span></p></td>
<td> Only return a full pathname if the specified file
                 actually exists
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>ret_locations</code></em> :</span></p></td>
<td> If this is not <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, a list of all the possible locations
                of the file will be returned.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The full path to the file (if it exists or only_if_exists is
         <code class="literal">FALSE</code>) or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_module_register ()">
<a name="gnome-program-module-register"></a><h3>gnome_program_module_register ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_program_module_register       (const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info);</pre>
<p>
This function is used to register a module to be initialized by the
GNOME library framework. The memory pointed to by <em class="parameter"><code>module_info</code></em> must be
valid during the whole application initialization process, and the module
described by <em class="parameter"><code>module_info</code></em> must only use the <em class="parameter"><code>module_info</code></em> pointer to
register itself.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>module_info</code></em> :</span></p></td>
<td> A pointer to a GnomeModuleInfo structure describing the module
              to be initialized
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_module_registered ()">
<a name="gnome-program-module-registered"></a><h3>gnome_program_module_registered ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>            gnome_program_module_registered     (const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> *module_info);</pre>
<p>
This method checks to see whether a specific module has been
             initialized in the specified program.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>module_info</code></em> :</span></p></td>
<td> A pointer to a GnomeModuleInfo structure describing the module
              to be queried
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A value indicating whether the specified module has been
         registered/initialized in the current program
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_module_load ()">
<a name="gnome-program-module-load"></a><h3>gnome_program_module_load ()</h3>
<pre class="programlisting">const <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="returnvalue">GnomeModuleInfo</span></a> * gnome_program_module_load       (const <span class="returnvalue">char</span> *mod_name);</pre>
<p>
Loads a shared library that contains a
<a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> dynamic_module_info structure.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>mod_name</code></em> :</span></p></td>
<td> module name
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The <a class="link" href="libgnome-gnome-program.html#GnomeModuleInfo" title="GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> structure that was loaded, or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if the
module could not be loaded.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_install_property ()">
<a name="gnome-program-install-property"></a><h3>gnome_program_install_property ()</h3>
<pre class="programlisting"><span class="returnvalue">guint</span>               gnome_program_install_property      (<span class="returnvalue">GnomeProgramClass</span> *pclass,
                                                         <span class="returnvalue">GObjectGetPropertyFunc</span> get_fn,
                                                         <span class="returnvalue">GObjectSetPropertyFunc</span> set_fn,
                                                         <span class="returnvalue">GParamSpec</span> *pspec);</pre>
<p>
Install a collection of available properties, their default values and the
functions to set and retrieve these properties.
</p>
<p>
Normal applications will never need to call this function, it is mostly for
use by other platform library authors.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>pclass</code></em> :</span></p></td>
<td> A <span class="type">GnomeProgramClass</span>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>get_fn</code></em> :</span></p></td>
<td> A function to get property values.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>set_fn</code></em> :</span></p></td>
<td> A function to set property values.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pspec</code></em> :</span></p></td>
<td> A collection of properties.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The number of properties installed.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_preinit ()">
<a name="gnome-program-preinit"></a><h3>gnome_program_preinit ()</h3>
<pre class="programlisting"><span class="returnvalue">poptContext</span>         gnome_program_preinit               (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program,
                                                         const <span class="returnvalue">char</span> *app_id,
                                                         const <span class="returnvalue">char</span> *app_version,
                                                         <span class="returnvalue">int</span> argc,
                                                         <span class="returnvalue">char</span> **argv);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_program_preinit</code> has been deprecated since version 2.18 and should not be used in newly-written code. Use <a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()"><code class="function">gnome_program_init()</code></a> instead.</p>
</div>
<p>
This function performs the portion of application initialization that
needs to be done prior to command line argument parsing. The poptContext
returned can be used for <code class="function">getopt()</code>-style option processing.</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td> Application object
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_id</code></em> :</span></p></td>
<td> application ID string
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>app_version</code></em> :</span></p></td>
<td> application version string
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argc</code></em> :</span></p></td>
<td> The number of commmand line arguments contained in 'argv'
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>argv</code></em> :</span></p></td>
<td> A string array of command line arguments
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A poptContext representing the argument parsing state,
or <a href="/gnome/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> if using GOption argument parsing.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_parse_args ()">
<a name="gnome-program-parse-args"></a><h3>gnome_program_parse_args ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_program_parse_args            (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_program_parse_args</code> has been deprecated since version 2.18 and should not be used in newly-written code. Use <a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()"><code class="function">gnome_program_init()</code></a> instead.</p>
</div>
<p>
Parses the command line arguments for the application</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td> Application object
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="gnome_program_postinit ()">
<a name="gnome-program-postinit"></a><h3>gnome_program_postinit ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_program_postinit              (<a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="returnvalue">GnomeProgram</span></a> *program);</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_program_postinit</code> has been deprecated since version 2.18 and should not be used in newly-written code. Use <a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()"><code class="function">gnome_program_init()</code></a> instead.</p>
</div>
<p>
Called after <a class="link" href="libgnome-gnome-program.html#gnome-program-parse-args" title="gnome_program_parse_args ()"><code class="function">gnome_program_parse_args()</code></a>, this function
takes care of post-parse initialization and cleanup</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>program</code></em> :</span></p></td>
<td> Application object
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_POPT_TABLE">
<a name="GNOME-PARAM-POPT-TABLE:CAPS"></a><h3>GNOME_PARAM_POPT_TABLE</h3>
<pre class="programlisting">#define GNOME_PARAM_POPT_TABLE          "popt-table"
</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GNOME_PARAM_POPT_TABLE</code> is deprecated and should not be used in newly-written code. 2.14. Use GOption argument parsing instead,
with <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GOPTION-CONTEXT:CAPS" title="GNOME_PARAM_GOPTION_CONTEXT"><span class="type">GNOME_PARAM_GOPTION_CONTEXT</span></a>.</p>
</div>
<p>
This parameter contains the table of options to be passed to popt (write on
init only). Mutually exclusive with using <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-GOPTION-CONTEXT:CAPS" title="GNOME_PARAM_GOPTION_CONTEXT"><span class="type">GNOME_PARAM_GOPTION_CONTEXT</span></a>
parameter.
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_POPT_FLAGS">
<a name="GNOME-PARAM-POPT-FLAGS:CAPS"></a><h3>GNOME_PARAM_POPT_FLAGS</h3>
<pre class="programlisting">#define GNOME_PARAM_POPT_FLAGS          "popt-flags"
</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GNOME_PARAM_POPT_FLAGS</code> is deprecated and should not be used in newly-written code. 2.14. Use GOption argument parsing instead.</p>
</div>
<p>
This parameter contains the flags to use for popt (write on init only).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_POPT_CONTEXT">
<a name="GNOME-PARAM-POPT-CONTEXT:CAPS"></a><h3>GNOME_PARAM_POPT_CONTEXT</h3>
<pre class="programlisting">#define GNOME_PARAM_POPT_CONTEXT        "popt-context"
</pre>
<div class="warning" title="Warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">GNOME_PARAM_POPT_CONTEXT</code> is deprecated and should not be used in newly-written code. 2.14. Use GOption argument parsing instead.</p>
</div>
<p>
This parameter contains the context pointer that <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> is using for
popt parsing (readable).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_GOPTION_CONTEXT">
<a name="GNOME-PARAM-GOPTION-CONTEXT:CAPS"></a><h3>GNOME_PARAM_GOPTION_CONTEXT</h3>
<pre class="programlisting">#define GNOME_PARAM_GOPTION_CONTEXT     "goption-context"
</pre>
<p>
This parameter contains the GOptionContext pointer that <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> is using for
GOption parsing (write on init only). The <a class="link" href="libgnome-gnome-program.html#GnomeProgram" title="GnomeProgram"><span class="type">GnomeProgram</span></a> will assume ownership of the
passed <span class="type">GOptionContext</span>.
Mutually exclusive with using the <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-POPT-TABLE:CAPS" title="GNOME_PARAM_POPT_TABLE"><span class="type">GNOME_PARAM_POPT_TABLE</span></a> parameter.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_CREATE_DIRECTORIES">
<a name="GNOME-PARAM-CREATE-DIRECTORIES:CAPS"></a><h3>GNOME_PARAM_CREATE_DIRECTORIES</h3>
<pre class="programlisting">#define GNOME_PARAM_CREATE_DIRECTORIES  "create-directories"
</pre>
<p>
This parameter contains <code class="literal">TRUE</code> if the standard GNOME directories should be
created on startup.
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_ENABLE_SOUND">
<a name="GNOME-PARAM-ENABLE-SOUND:CAPS"></a><h3>GNOME_PARAM_ENABLE_SOUND</h3>
<pre class="programlisting">#define GNOME_PARAM_ENABLE_SOUND        "enable-sound"
</pre>
<p>
This parameter determines whether or not to enable sound on startup.
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_ESPEAKER">
<a name="GNOME-PARAM-ESPEAKER:CAPS"></a><h3>GNOME_PARAM_ESPEAKER</h3>
<pre class="programlisting">#define GNOME_PARAM_ESPEAKER            "espeaker"
</pre>
<p>
This parameter describes how to connect to esd.
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_APP_ID">
<a name="GNOME-PARAM-APP-ID:CAPS"></a><h3>GNOME_PARAM_APP_ID</h3>
<pre class="programlisting">#define GNOME_PARAM_APP_ID              "app-id"
</pre>
<p>
This parameter contains the ID string to use for the application (readable).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_APP_VERSION">
<a name="GNOME-PARAM-APP-VERSION:CAPS"></a><h3>GNOME_PARAM_APP_VERSION</h3>
<pre class="programlisting">#define GNOME_PARAM_APP_VERSION         "app-version"
</pre>
<p>
This parameter contains the application version (readable).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_GNOME_PREFIX">
<a name="GNOME-PARAM-GNOME-PREFIX:CAPS"></a><h3>GNOME_PARAM_GNOME_PREFIX</h3>
<pre class="programlisting">#define GNOME_PARAM_GNOME_PREFIX        "gnome-prefix"
</pre>
<p>
This parameter contains the prefix where the main GNOME system is installed
(readable, writable on init only).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_GNOME_SYSCONFDIR">
<a name="GNOME-PARAM-GNOME-SYSCONFDIR:CAPS"></a><h3>GNOME_PARAM_GNOME_SYSCONFDIR</h3>
<pre class="programlisting">#define GNOME_PARAM_GNOME_SYSCONFDIR    "gnome-sysconfdir"
</pre>
<p>
This parameter contains the prefix where the GNOME configuration files
are installed (readable, writable on init only).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_GNOME_DATADIR">
<a name="GNOME-PARAM-GNOME-DATADIR:CAPS"></a><h3>GNOME_PARAM_GNOME_DATADIR</h3>
<pre class="programlisting">#define GNOME_PARAM_GNOME_DATADIR       "gnome-datadir"
</pre>
<p>
This parameter contains the prefix where the GNOME data files are installed
(readable, writable on init only).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_GNOME_LIBDIR">
<a name="GNOME-PARAM-GNOME-LIBDIR:CAPS"></a><h3>GNOME_PARAM_GNOME_LIBDIR</h3>
<pre class="programlisting">#define GNOME_PARAM_GNOME_LIBDIR        "gnome-libdir"
</pre>
<p>
This parameter contains the prefix where the GNOME library files are installed
(readable, writable on init only).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_APP_PREFIX">
<a name="GNOME-PARAM-APP-PREFIX:CAPS"></a><h3>GNOME_PARAM_APP_PREFIX</h3>
<pre class="programlisting">#define GNOME_PARAM_APP_PREFIX          "app-prefix"
</pre>
<p>
This parameter contains the prefix where this application was installed
(read / write).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_APP_SYSCONFDIR">
<a name="GNOME-PARAM-APP-SYSCONFDIR:CAPS"></a><h3>GNOME_PARAM_APP_SYSCONFDIR</h3>
<pre class="programlisting">#define GNOME_PARAM_APP_SYSCONFDIR      "app-sysconfdir"
</pre>
<p>
This parameter contains the prefix where this application's configuration files
are installed (read / write).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_APP_DATADIR">
<a name="GNOME-PARAM-APP-DATADIR:CAPS"></a><h3>GNOME_PARAM_APP_DATADIR</h3>
<pre class="programlisting">#define GNOME_PARAM_APP_DATADIR         "app-datadir"
</pre>
<p>
This parameter contains the prefix where this application's data files are
installed (read / write).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_APP_LIBDIR">
<a name="GNOME-PARAM-APP-LIBDIR:CAPS"></a><h3>GNOME_PARAM_APP_LIBDIR</h3>
<pre class="programlisting">#define GNOME_PARAM_APP_LIBDIR          "app-libdir"
</pre>
<p>
This parameter contains the prefix where this application's library files are
installed (read / write).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_HUMAN_READABLE_NAME">
<a name="GNOME-PARAM-HUMAN-READABLE-NAME:CAPS"></a><h3>GNOME_PARAM_HUMAN_READABLE_NAME</h3>
<pre class="programlisting">#define GNOME_PARAM_HUMAN_READABLE_NAME "human-readable-name"
</pre>
<p>
This parameter contains the human readable name of the application (readable).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_GNOME_PATH">
<a name="GNOME-PARAM-GNOME-PATH:CAPS"></a><h3>GNOME_PARAM_GNOME_PATH</h3>
<pre class="programlisting">#define GNOME_PARAM_GNOME_PATH          "gnome-path"
</pre>
<p>
This parameter contains the path in which to look for installed files (taken
from the GNOME2_PATH environment variable).
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PARAM_NONE">
<a name="GNOME-PARAM-NONE:CAPS"></a><h3>GNOME_PARAM_NONE</h3>
<pre class="programlisting">#define GNOME_PARAM_NONE                NULL
</pre>
<p>
Used to terminate a list of parameters and their values.
</p>
</div>
<hr>
<div class="refsect2" title="GNOME_PROGRAM_STANDARD_PROPERTIES">
<a name="GNOME-PROGRAM-STANDARD-PROPERTIES:CAPS"></a><h3>GNOME_PROGRAM_STANDARD_PROPERTIES</h3>
<pre class="programlisting">#define             GNOME_PROGRAM_STANDARD_PROPERTIES</pre>
<p>
When PREFIX, SYSCONFDIR, DATADIR and LIBDIR are defined during the build
process, this macro can be used to assign these values to
<a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-PREFIX:CAPS" title="GNOME_PARAM_APP_PREFIX"><span class="type">GNOME_PARAM_APP_PREFIX</span></a>, <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-SYSCONFDIR:CAPS" title="GNOME_PARAM_APP_SYSCONFDIR"><span class="type">GNOME_PARAM_APP_SYSCONFDIR</span></a>, <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-DATADIR:CAPS" title="GNOME_PARAM_APP_DATADIR"><span class="type">GNOME_PARAM_APP_DATADIR</span></a>
and <a class="link" href="libgnome-gnome-program.html#GNOME-PARAM-APP-LIBDIR:CAPS" title="GNOME_PARAM_APP_LIBDIR"><span class="type">GNOME_PARAM_APP_LIBDIR</span></a> respectively so that the GNOME libraries
automatically know where to fetch application specific data from.  </p>
<p>
Every respectable GNOME application should set these variables and use
GNOME_PROGRAM_STANDARD_PROPERTIES in the call to <a class="link" href="libgnome-gnome-program.html#gnome-program-init" title="gnome_program_init ()"><code class="function">gnome_program_init()</code></a>.
</p>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.14</div>
</body>
</html>