5
5
<title>gnome-program</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.69.1">
7
7
<link rel="start" href="index.html" title="GNOME Library Reference Manual">
8
<link rel="up" href="libgnome.html#id2740192" title="Initializing applications and starting programs">
9
<link rel="prev" href="libgnome.html" title="GNOME Library (libgnome)">
8
<link rel="up" href="ch01.html" title="Initializing Applications and Starting Programs">
9
<link rel="prev" href="ch01.html" title="Initializing Applications and Starting Programs">
10
10
<link rel="next" href="libgnome-gnome-init.html" title="gnome-init">
11
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="chapter" href="libgnome.html" title="GNOME Library (libgnome)">
13
<link rel="part" href="libgnome.html" title="Part I. GNOME Library (libgnome)">
14
<link rel="chapter" href="ch01.html" title="Initializing Applications and Starting Programs">
15
<link rel="chapter" href="ch02.html" title="Configuration">
16
<link rel="chapter" href="ch03.html" title="Displaying Help and External Info">
17
<link rel="chapter" href="ch04.html" title="Miscellaneous">
18
<link rel="chapter" href="ch05.html" title="Lower Level Interactions">
19
<link rel="chapter" href="ch06.html" title="Deprecated Modules">
20
<link rel="index" href="ix01.html" title="Index">
21
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
22
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
23
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
24
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
25
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
26
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
27
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
28
<link rel="index" href="ix09.html" title="Index of new symbols in 2.14">
29
<link rel="index" href="ix10.html" title="Index of new symbols in 2.16">
15
31
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
16
32
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
33
<tr valign="middle">
18
<td><a accesskey="p" href="libgnome.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
19
<td><a accesskey="u" href="libgnome.html#id2740192"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
34
<td><a accesskey="p" href="ch01.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
35
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
20
36
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
21
37
<th width="100%" align="center">GNOME Library Reference Manual</th>
22
38
<td><a accesskey="n" href="libgnome-gnome-init.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
24
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2776405" class="shortcut">Top</a>
40
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2960588" class="shortcut">Top</a>
26
<a href="#id2785922" class="shortcut">Description</a></nobr></td></tr>
42
<a href="#id2970147" class="shortcut">Description</a></nobr></td></tr>
28
44
<div class="refentry" lang="en">
29
45
<a name="libgnome-gnome-program"></a><div class="titlepage"></div>
30
46
<div class="refnamediv"><table width="100%"><tr>
33
<a name="id2776405"></a><span class="refentrytitle">gnome-program</span>
49
<a name="id2960588"></a><span class="refentrytitle">gnome-program</span>
35
51
<p>gnome-program — Initialize and retrieve information about a GNOME application.</p>
76
92
const char* <a href="libgnome-gnome-program.html#gnome-program-get-app-id">gnome_program_get_app_id</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program);
77
93
const char* <a href="libgnome-gnome-program.html#gnome-program-get-app-version">gnome_program_get_app_version</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program);
79
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
95
href="../glib/glib-Basic-Types.html#gchar"
80
96
>gchar</a>* <a href="libgnome-gnome-program.html#gnome-program-locate-file">gnome_program_locate_file</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program,
81
97
<a href="libgnome-gnome-program.html#GnomeFileDomain">GnomeFileDomain</a> domain,
83
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
99
href="../glib/glib-Basic-Types.html#gchar"
84
100
>gchar</a> *file_name,
86
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
102
href="../glib/glib-Basic-Types.html#gboolean"
87
103
>gboolean</a> only_if_exists,
89
href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"
105
href="../glib/glib-Singly-Linked-Lists.html#GSList"
90
106
>GSList</a> **ret_locations);
92
108
void <a href="libgnome-gnome-program.html#gnome-program-module-register">gnome_program_module_register</a> (const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a> *module_info);
94
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
110
href="../glib/glib-Basic-Types.html#gboolean"
95
111
>gboolean</a> <a href="libgnome-gnome-program.html#gnome-program-module-registered">gnome_program_module_registered</a> (const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a> *module_info);
96
112
const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a>* <a href="libgnome-gnome-program.html#gnome-program-module-load">gnome_program_module_load</a>
97
113
(const char *mod_name);
99
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
115
href="../glib/glib-Basic-Types.html#guint"
100
116
>guint</a> <a href="libgnome-gnome-program.html#gnome-program-install-property">gnome_program_install_property</a> (GnomeProgramClass *pclass,
102
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObjectGetPropertyFunc"
118
href="../gobject/gobject-The-Base-Object-Type.html#GObjectGetPropertyFunc"
103
119
>GObjectGetPropertyFunc</a> get_fn,
105
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObjectSetPropertyFunc"
121
href="../gobject/gobject-The-Base-Object-Type.html#GObjectSetPropertyFunc"
106
122
>GObjectSetPropertyFunc</a> set_fn,
108
href="/usr/share/gtk-doc/html/gobject/gobject-GParamSpec.html#GParamSpec"
124
href="../gobject/gobject-GParamSpec.html#GParamSpec"
109
125
>GParamSpec</a> *pspec);
110
126
poptContext <a href="libgnome-gnome-program.html#gnome-program-preinit">gnome_program_preinit</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program,
111
127
const char *app_id,
143
159
<div class="refsect1" lang="en">
144
<a name="id2785922"></a><h2>Description</h2>
160
<a name="id2970147"></a><h2>Description</h2>
149
165
<div class="refsect1" lang="en">
150
<a name="id2785936"></a><h2>Details</h2>
166
<a name="id2970161"></a><h2>Details</h2>
151
167
<div class="refsect2" lang="en">
152
<a name="id2785946"></a><h3>
168
<a name="id2970171"></a><h3>
153
169
<a name="GnomeFileDomain"></a>enum GnomeFileDomain</h3>
154
<a class="indexterm" name="id2785959"></a><pre class="programlisting">typedef enum {
170
<a class="indexterm" name="id2970184"></a><pre class="programlisting">typedef enum {
155
171
GNOME_FILE_DOMAIN_UNKNOWN = 0,
157
173
/* Gnome installed files */
186
202
<col align="left" valign="top">
190
<span class="term"><a name="GNOME-FILE-DOMAIN-UNKNOWN:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_UNKNOWN</code></span></td>
205
<td><span class="term"><a name="GNOME-FILE-DOMAIN-UNKNOWN:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_UNKNOWN</code></span></td>
191
206
<td>An unknown file domain (should never be used).
196
<span class="term"><a name="GNOME-FILE-DOMAIN-LIBDIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_LIBDIR</code></span></td>
210
<td><span class="term"><a name="GNOME-FILE-DOMAIN-LIBDIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_LIBDIR</code></span></td>
197
211
<td>Libraries in the main GNOME installation.
202
<span class="term"><a name="GNOME-FILE-DOMAIN-DATADIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_DATADIR</code></span></td>
215
<td><span class="term"><a name="GNOME-FILE-DOMAIN-DATADIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_DATADIR</code></span></td>
203
216
<td>Data files in the main GNOME installation.
208
<span class="term"><a name="GNOME-FILE-DOMAIN-SOUND:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_SOUND</code></span></td>
220
<td><span class="term"><a name="GNOME-FILE-DOMAIN-SOUND:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_SOUND</code></span></td>
209
221
<td>Sound files in the main GNOME installation.
214
<span class="term"><a name="GNOME-FILE-DOMAIN-PIXMAP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_PIXMAP</code></span></td>
225
<td><span class="term"><a name="GNOME-FILE-DOMAIN-PIXMAP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_PIXMAP</code></span></td>
215
226
<td>Pixmap files in the main GNOME installation.
220
<span class="term"><a name="GNOME-FILE-DOMAIN-CONFIG:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_CONFIG</code></span></td>
230
<td><span class="term"><a name="GNOME-FILE-DOMAIN-CONFIG:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_CONFIG</code></span></td>
221
231
<td>Config files in the main GNOME installation.
226
<span class="term"><a name="GNOME-FILE-DOMAIN-HELP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_HELP</code></span></td>
235
<td><span class="term"><a name="GNOME-FILE-DOMAIN-HELP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_HELP</code></span></td>
227
236
<td>Help files in the main GNOME installation.
232
<span class="term"><a name="GNOME-FILE-DOMAIN-APP-LIBDIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_LIBDIR</code></span></td>
240
<td><span class="term"><a name="GNOME-FILE-DOMAIN-APP-LIBDIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_LIBDIR</code></span></td>
233
241
<td>Application specific libraries.
238
<span class="term"><a name="GNOME-FILE-DOMAIN-APP-DATADIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_DATADIR</code></span></td>
245
<td><span class="term"><a name="GNOME-FILE-DOMAIN-APP-DATADIR:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_DATADIR</code></span></td>
239
246
<td>Application specific data files.
244
<span class="term"><a name="GNOME-FILE-DOMAIN-APP-SOUND:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_SOUND</code></span></td>
250
<td><span class="term"><a name="GNOME-FILE-DOMAIN-APP-SOUND:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_SOUND</code></span></td>
245
251
<td>Application specific sound files.
250
<span class="term"><a name="GNOME-FILE-DOMAIN-APP-PIXMAP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_PIXMAP</code></span></td>
255
<td><span class="term"><a name="GNOME-FILE-DOMAIN-APP-PIXMAP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_PIXMAP</code></span></td>
251
256
<td>Application specific pixmap files.
256
<span class="term"><a name="GNOME-FILE-DOMAIN-APP-CONFIG:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_CONFIG</code></span></td>
260
<td><span class="term"><a name="GNOME-FILE-DOMAIN-APP-CONFIG:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_CONFIG</code></span></td>
257
261
<td>Application specific config files.
262
<span class="term"><a name="GNOME-FILE-DOMAIN-APP-HELP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_HELP</code></span></td>
265
<td><span class="term"><a name="GNOME-FILE-DOMAIN-APP-HELP:CAPS"></a><code class="literal">GNOME_FILE_DOMAIN_APP_HELP</code></span></td>
263
266
<td>Application specific help files.
285
288
<col align="left" valign="top">
289
<span class="term"><a
290
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
291
<td><span class="term"><a
292
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
291
293
>GObject</a> <em class="structfield"><code>object</code></em>;</span></td>
293
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"
295
href="../gobject/gobject-The-Base-Object-Type.html#GObject"
294
296
><span class="type">GObject</span></a> containing the parameters and their values which were set
295
297
dring initialisation.
300
<span class="term">GnomeProgramPrivate *<em class="structfield"><code>_priv</code></em>;</span></td>
301
<td><span class="term">GnomeProgramPrivate *<em class="structfield"><code>_priv</code></em>;</span></td>
301
302
<td>Private data about the program instance.
341
342
<col align="left" valign="top">
345
<span class="term">const char *<em class="structfield"><code>name</code></em>;</span></td>
345
<td><span class="term">const char *<em class="structfield"><code>name</code></em>;</span></td>
346
346
<td>The module name.
351
<span class="term">const char *<em class="structfield"><code>version</code></em>;</span></td>
350
<td><span class="term">const char *<em class="structfield"><code>version</code></em>;</span></td>
352
351
<td>The module's version string.
357
<span class="term">const char *<em class="structfield"><code>description</code></em>;</span></td>
355
<td><span class="term">const char *<em class="structfield"><code>description</code></em>;</span></td>
358
356
<td>A string describing the module (can be <a
359
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
357
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
360
358
><code class="literal">NULL</code></a>).
365
<span class="term"><a href="libgnome-gnome-program.html#GnomeModuleRequirement">GnomeModuleRequirement</a> *<em class="structfield"><code>requirements</code></em>;</span></td>
362
<td><span class="term"><a href="libgnome-gnome-program.html#GnomeModuleRequirement">GnomeModuleRequirement</a> *<em class="structfield"><code>requirements</code></em>;</span></td>
366
363
<td>A pointer to an array of modules that are required by this
367
364
module. The last module in the array should have its required_version field set
369
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
366
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
370
367
><code class="literal">NULL</code></a>.
375
<span class="term"><a href="libgnome-gnome-program.html#GnomeModuleHook">GnomeModuleHook</a> <em class="structfield"><code>instance_init</code></em>;</span></td>
371
<td><span class="term"><a href="libgnome-gnome-program.html#GnomeModuleHook">GnomeModuleHook</a> <em class="structfield"><code>instance_init</code></em>;</span></td>
376
372
<td>A function to call to initialise an instance of this module
378
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
374
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
379
375
><code class="literal">NULL</code></a>).
384
<span class="term"><a href="libgnome-gnome-program.html#GnomeModuleHook">GnomeModuleHook</a> <em class="structfield"><code>pre_args_parse</code></em>;</span></td>
379
<td><span class="term"><a href="libgnome-gnome-program.html#GnomeModuleHook">GnomeModuleHook</a> <em class="structfield"><code>pre_args_parse</code></em>;</span></td>
385
380
<td>A function to call before parsing the arguments for this
386
381
module (can be <a
387
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
382
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
388
383
><code class="literal">NULL</code></a>).
393
<span class="term"><a href="libgnome-gnome-program.html#GnomeModuleHook">GnomeModuleHook</a> <em class="structfield"><code>post_args_parse</code></em>;</span></td>
387
<td><span class="term"><a href="libgnome-gnome-program.html#GnomeModuleHook">GnomeModuleHook</a> <em class="structfield"><code>post_args_parse</code></em>;</span></td>
394
388
<td>A function to call after parsing the arguments for this
395
389
module (can be <a
396
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
390
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
397
391
><code class="literal">NULL</code></a>).
402
<span class="term"><a href="libgnome-gnome-program.html#GnomeModuleClassInitHook">GnomeModuleClassInitHook</a> <em class="structfield"><code>class_init</code></em>;</span></td>
395
<td><span class="term"><a href="libgnome-gnome-program.html#GnomeModuleClassInitHook">GnomeModuleClassInitHook</a> <em class="structfield"><code>class_init</code></em>;</span></td>
403
396
<td>A function to call to initialise this module prior to creating any
404
397
instances (can be <a
405
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
398
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
406
399
><code class="literal">NULL</code></a>).
411
<span class="term">const char *<em class="structfield"><code>opt_prefix</code></em>;</span></td>
403
<td><span class="term">const char *<em class="structfield"><code>opt_prefix</code></em>;</span></td>
417
<span class="term">GnomeModuleGetGOptionGroupFunc <em class="structfield"><code>get_goption_group_func</code></em>;</span></td>
408
<td><span class="term">GnomeModuleGetGOptionGroupFunc <em class="structfield"><code>get_goption_group_func</code></em>;</span></td>
418
409
<td>A function which must return a non-<a
419
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
410
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
420
411
><code class="literal">NULL</code></a> <a
421
href="/usr/share/gtk-doc/html/glib/glib-Commandline-option-parser.html#GOptionGroup"
412
href="../glib/glib-Commandline-option-parser.html#GOptionGroup"
422
413
><span class="type">GOptionGroup</span></a>,
423
414
which will be added to the <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> s <a
424
href="/usr/share/gtk-doc/html/glib/glib-Commandline-option-parser.html#GOptionContext"
415
href="../glib/glib-Commandline-option-parser.html#GOptionContext"
425
416
><span class="type">GOptionContext</span></a> during
426
417
#<a href="libgnome-gnome-program.html#gnome-program-init"><code class="function">gnome_program_init()</code></a>.
675
659
<col align="left" valign="top">
679
<span class="term"><em class="parameter"><code>app_id</code></em> :</span></td>
662
<td><span class="term"><em class="parameter"><code>app_id</code></em> :</span></td>
680
663
<td> Application ID string.
685
<span class="term"><em class="parameter"><code>app_version</code></em> :</span></td>
667
<td><span class="term"><em class="parameter"><code>app_version</code></em> :</span></td>
686
668
<td> Application version string.
691
<span class="term"><em class="parameter"><code>module_info</code></em> :</span></td>
672
<td><span class="term"><em class="parameter"><code>module_info</code></em> :</span></td>
692
673
<td> The module to init with this program.
697
<span class="term"><em class="parameter"><code>argc</code></em> :</span></td>
677
<td><span class="term"><em class="parameter"><code>argc</code></em> :</span></td>
698
678
<td> The number of commmand line arguments contained in <em class="parameter"><code>argv</code></em>.
703
<span class="term"><em class="parameter"><code>argv</code></em> :</span></td>
682
<td><span class="term"><em class="parameter"><code>argv</code></em> :</span></td>
704
683
<td> A string array of command line arguments.
709
<span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></td>
687
<td><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></td>
710
688
<td> The first item in a <a
711
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
689
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
712
690
><code class="literal">NULL</code></a>-terminated list of attribute
713
691
name and value pairs (so this will be an attribute name or <a
714
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
692
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
715
693
><code class="literal">NULL</code></a>).
720
<span class="term"><em class="parameter"><code>...</code></em> :</span></td>
697
<td><span class="term"><em class="parameter"><code>...</code></em> :</span></td>
721
698
<td> The continuation of a <a
722
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
699
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
723
700
><code class="literal">NULL</code></a>-terminated list of attribute name/value
729
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
705
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
730
706
<td> A <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> instance representing the current application.
757
733
<col align="left" valign="top">
761
<span class="term"><em class="parameter"><code>type</code></em> :</span></td>
736
<td><span class="term"><em class="parameter"><code>type</code></em> :</span></td>
762
737
<td> The type of application to be initialized (usually
763
738
<span class="type">GNOME_TYPE_PROGRAM</span>).
768
<span class="term"><em class="parameter"><code>app_id</code></em> :</span></td>
742
<td><span class="term"><em class="parameter"><code>app_id</code></em> :</span></td>
769
743
<td> Application ID string.
774
<span class="term"><em class="parameter"><code>app_version</code></em> :</span></td>
747
<td><span class="term"><em class="parameter"><code>app_version</code></em> :</span></td>
775
748
<td> Application version string.
780
<span class="term"><em class="parameter"><code>module_info</code></em> :</span></td>
752
<td><span class="term"><em class="parameter"><code>module_info</code></em> :</span></td>
781
753
<td> The modules to init with the application.
786
<span class="term"><em class="parameter"><code>argc</code></em> :</span></td>
757
<td><span class="term"><em class="parameter"><code>argc</code></em> :</span></td>
787
758
<td> The number of command line arguments contained in <em class="parameter"><code>argv</code></em>.
792
<span class="term"><em class="parameter"><code>argv</code></em> :</span></td>
762
<td><span class="term"><em class="parameter"><code>argv</code></em> :</span></td>
793
763
<td> A string array of command line arguments.
798
<span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></td>
767
<td><span class="term"><em class="parameter"><code>first_property_name</code></em> :</span></td>
799
768
<td> The first item in a <a
800
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
769
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
801
770
><code class="literal">NULL</code></a>-terminated list of attribute
807
<span class="term"><em class="parameter"><code>args</code></em> :</span></td>
775
<td><span class="term"><em class="parameter"><code>args</code></em> :</span></td>
808
776
<td> The remaining elements in the <a
809
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
777
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
810
778
><code class="literal">NULL</code></a> terminated list (of which
811
779
<em class="parameter"><code>first_property_name</code></em> is the first element).
816
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
783
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
817
784
<td> A <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> instance representing the current application.
824
791
<div class="refsect2" lang="en">
825
<a name="id2787893"></a><h3>
792
<a name="id2972118"></a><h3>
826
793
<a name="gnome-program-get"></a>gnome_program_get ()</h3>
827
<a class="indexterm" name="id2787906"></a><pre class="programlisting"><a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a>* gnome_program_get (void);</pre>
794
<a class="indexterm" name="id2972131"></a><pre class="programlisting"><a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a>* gnome_program_get (void);</pre>
829
796
Retrieves an object that stored information about the application's state.
830
797
Other functions assume this will always return a <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> object which
832
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
799
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
833
800
><code class="literal">NULL</code></a>) has already been initialized.</p>
851
817
<div class="refsect2" lang="en">
852
<a name="id2787986"></a><h3>
818
<a name="id2972211"></a><h3>
853
819
<a name="gnome-program-get-human-readable-name"></a>gnome_program_get_human_readable_name ()</h3>
854
<a class="indexterm" name="id2788000"></a><pre class="programlisting">const char* gnome_program_get_human_readable_name
820
<a class="indexterm" name="id2972225"></a><pre class="programlisting">const char* gnome_program_get_human_readable_name
855
821
(<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program);</pre>
857
823
This function returns a pointer to a static string that the
858
824
application has provided as a human readable name. The app
859
825
should provide the name with the <a href="libgnome-gnome-program.html#GNOME-PARAM-HUMAN-READABLE-NAME:CAPS"><span class="type">GNOME_PARAM_HUMAN_READABLE_NAME</span></a>
860
826
init argument. Returns <a
861
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
827
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
862
828
><code class="literal">NULL</code></a> if no name was set.</p>
947
907
<div class="refsect2" lang="en">
948
<a name="id2788244"></a><h3>
908
<a name="id2972469"></a><h3>
949
909
<a name="gnome-program-locate-file"></a>gnome_program_locate_file ()</h3>
950
<a class="indexterm" name="id2788257"></a><pre class="programlisting"><a
951
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
910
<a class="indexterm" name="id2972482"></a><pre class="programlisting"><a
911
href="../glib/glib-Basic-Types.html#gchar"
952
912
>gchar</a>* gnome_program_locate_file (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program,
953
913
<a href="libgnome-gnome-program.html#GnomeFileDomain">GnomeFileDomain</a> domain,
955
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"
915
href="../glib/glib-Basic-Types.html#gchar"
956
916
>gchar</a> *file_name,
958
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
918
href="../glib/glib-Basic-Types.html#gboolean"
959
919
>gboolean</a> only_if_exists,
961
href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"
921
href="../glib/glib-Singly-Linked-Lists.html#GSList"
962
922
>GSList</a> **ret_locations);</pre>
964
924
This function finds a full path to the <em class="parameter"><code>file_name</code></em> located in the specified
987
947
<col align="left" valign="top">
991
<span class="term"><em class="parameter"><code>program</code></em> :</span></td>
950
<td><span class="term"><em class="parameter"><code>program</code></em> :</span></td>
992
951
<td> A valid <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> object or <a
993
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
952
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
994
953
><code class="literal">NULL</code></a> (in which case the current
995
954
application is used).
1000
<span class="term"><em class="parameter"><code>domain</code></em> :</span></td>
958
<td><span class="term"><em class="parameter"><code>domain</code></em> :</span></td>
1001
959
<td> A <a href="libgnome-gnome-program.html#GnomeFileDomain"><span class="type">GnomeFileDomain</span></a>.
1006
<span class="term"><em class="parameter"><code>file_name</code></em> :</span></td>
963
<td><span class="term"><em class="parameter"><code>file_name</code></em> :</span></td>
1007
964
<td> A file name or path inside the 'domain' to find.
1012
<span class="term"><em class="parameter"><code>only_if_exists</code></em> :</span></td>
968
<td><span class="term"><em class="parameter"><code>only_if_exists</code></em> :</span></td>
1013
969
<td> Only return a full pathname if the specified file
1019
<span class="term"><em class="parameter"><code>ret_locations</code></em> :</span></td>
974
<td><span class="term"><em class="parameter"><code>ret_locations</code></em> :</span></td>
1020
975
<td> If this is not <a
1021
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
976
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
1022
977
><code class="literal">NULL</code></a>, a list of all the possible locations
1023
978
of the file will be returned.
1028
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
982
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1029
983
<td> The full path to the file (if it exists or only_if_exists is
1031
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"
985
href="../glib/glib-Standard-Macros.html#FALSE:CAPS"
1032
986
><code class="literal">FALSE</code></a>) or <a
1033
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
987
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
1034
988
><code class="literal">NULL</code></a>.
1066
1019
<div class="refsect2" lang="en">
1067
<a name="id2788616"></a><h3>
1020
<a name="id2972841"></a><h3>
1068
1021
<a name="gnome-program-module-registered"></a>gnome_program_module_registered ()</h3>
1069
<a class="indexterm" name="id2788630"></a><pre class="programlisting"><a
1070
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"
1022
<a class="indexterm" name="id2972854"></a><pre class="programlisting"><a
1023
href="../glib/glib-Basic-Types.html#gboolean"
1071
1024
>gboolean</a> gnome_program_module_registered (const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a> *module_info);</pre>
1073
1026
This method checks to see whether a specific module has been
1111
1062
<col align="left" valign="top">
1115
<span class="term"><em class="parameter"><code>mod_name</code></em> :</span></td>
1065
<td><span class="term"><em class="parameter"><code>mod_name</code></em> :</span></td>
1116
1066
<td> module name
1121
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1070
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1122
1071
<td> The <a href="libgnome-gnome-program.html#GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> structure that was loaded, or <a
1123
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
1072
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
1124
1073
><code class="literal">NULL</code></a> if the
1125
1074
module could not be loaded.
1132
1081
<div class="refsect2" lang="en">
1133
<a name="id2788800"></a><h3>
1082
<a name="id2973025"></a><h3>
1134
1083
<a name="gnome-program-install-property"></a>gnome_program_install_property ()</h3>
1135
<a class="indexterm" name="id2788814"></a><pre class="programlisting"><a
1136
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"
1084
<a class="indexterm" name="id2973039"></a><pre class="programlisting"><a
1085
href="../glib/glib-Basic-Types.html#guint"
1137
1086
>guint</a> gnome_program_install_property (GnomeProgramClass *pclass,
1139
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObjectGetPropertyFunc"
1088
href="../gobject/gobject-The-Base-Object-Type.html#GObjectGetPropertyFunc"
1140
1089
>GObjectGetPropertyFunc</a> get_fn,
1142
href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObjectSetPropertyFunc"
1091
href="../gobject/gobject-The-Base-Object-Type.html#GObjectSetPropertyFunc"
1143
1092
>GObjectSetPropertyFunc</a> set_fn,
1145
href="/usr/share/gtk-doc/html/gobject/gobject-GParamSpec.html#GParamSpec"
1094
href="../gobject/gobject-GParamSpec.html#GParamSpec"
1146
1095
>GParamSpec</a> *pspec);</pre>
1148
1097
Install a collection of available properties, their default values and the
1158
1107
<col align="left" valign="top">
1162
<span class="term"><em class="parameter"><code>pclass</code></em> :</span></td>
1110
<td><span class="term"><em class="parameter"><code>pclass</code></em> :</span></td>
1163
1111
<td> A <span class="type">GnomeProgramClass</span>.
1168
<span class="term"><em class="parameter"><code>get_fn</code></em> :</span></td>
1115
<td><span class="term"><em class="parameter"><code>get_fn</code></em> :</span></td>
1169
1116
<td> A function to get property values.
1174
<span class="term"><em class="parameter"><code>set_fn</code></em> :</span></td>
1120
<td><span class="term"><em class="parameter"><code>set_fn</code></em> :</span></td>
1175
1121
<td> A function to set property values.
1180
<span class="term"><em class="parameter"><code>pspec</code></em> :</span></td>
1125
<td><span class="term"><em class="parameter"><code>pspec</code></em> :</span></td>
1181
1126
<td> A collection of properties.
1186
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1130
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1187
1131
<td> The number of properties installed.
1210
1154
<col align="left" valign="top">
1214
<span class="term"><em class="parameter"><code>program</code></em> :</span></td>
1157
<td><span class="term"><em class="parameter"><code>program</code></em> :</span></td>
1215
1158
<td> Application object
1220
<span class="term"><em class="parameter"><code>app_id</code></em> :</span></td>
1162
<td><span class="term"><em class="parameter"><code>app_id</code></em> :</span></td>
1221
1163
<td> application ID string
1226
<span class="term"><em class="parameter"><code>app_version</code></em> :</span></td>
1167
<td><span class="term"><em class="parameter"><code>app_version</code></em> :</span></td>
1227
1168
<td> application version string
1232
<span class="term"><em class="parameter"><code>argc</code></em> :</span></td>
1172
<td><span class="term"><em class="parameter"><code>argc</code></em> :</span></td>
1233
1173
<td> The number of commmand line arguments contained in 'argv'
1238
<span class="term"><em class="parameter"><code>argv</code></em> :</span></td>
1177
<td><span class="term"><em class="parameter"><code>argv</code></em> :</span></td>
1239
1178
<td> A string array of command line arguments
1244
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1182
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1245
1183
<td> A poptContext representing the argument parsing state,
1247
href="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"
1185
href="../liboil/liboil-liboiljunk.html#NULL:CAPS"
1248
1186
><code class="literal">NULL</code></a> if using GOption argument parsing.
1342
1278
<div class="refsect2" lang="en">
1343
<a name="id2789450"></a><h3>
1279
<a name="id2973675"></a><h3>
1344
1280
<a name="GNOME-PARAM-GOPTION-CONTEXT:CAPS"></a>GNOME_PARAM_GOPTION_CONTEXT</h3>
1345
<a class="indexterm" name="id2789466"></a><pre class="programlisting">#define GNOME_PARAM_GOPTION_CONTEXT "goption-context"
1281
<a class="indexterm" name="id2973691"></a><pre class="programlisting">#define GNOME_PARAM_GOPTION_CONTEXT "goption-context"
1348
1284
This parameter contains the GOptionContext pointer that <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> is using for
1349
1285
GOption parsing (write on init only). The <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> will assume ownership of the
1351
href="/usr/share/gtk-doc/html/glib/glib-Commandline-option-parser.html#GOptionContext"
1287
href="../glib/glib-Commandline-option-parser.html#GOptionContext"
1352
1288
><span class="type">GOptionContext</span></a>.
1353
1289
Mutually exclusive with using the <a href="libgnome-gnome-program.html#GNOME-PARAM-POPT-TABLE:CAPS"><span class="type">GNOME_PARAM_POPT_TABLE</span></a> parameter.
1361
1297
<div class="refsect2" lang="en">
1362
<a name="id2789524"></a><h3>
1298
<a name="id2973748"></a><h3>
1363
1299
<a name="GNOME-PARAM-CREATE-DIRECTORIES:CAPS"></a>GNOME_PARAM_CREATE_DIRECTORIES</h3>
1364
<a class="indexterm" name="id2789536"></a><pre class="programlisting">#define GNOME_PARAM_CREATE_DIRECTORIES "create-directories"
1300
<a class="indexterm" name="id2973761"></a><pre class="programlisting">#define GNOME_PARAM_CREATE_DIRECTORIES "create-directories"
1367
1303
This parameter contains <a
1368
href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"
1304
href="../glib/glib-Standard-Macros.html#TRUE:CAPS"
1369
1305
><code class="literal">TRUE</code></a> if the standard GNOME directories should be
1370
1306
created on startup.
1374
1310
<div class="refsect2" lang="en">
1375
<a name="id2789564"></a><h3>
1311
<a name="id2973789"></a><h3>
1376
1312
<a name="GNOME-PARAM-ENABLE-SOUND:CAPS"></a>GNOME_PARAM_ENABLE_SOUND</h3>
1377
<a class="indexterm" name="id2789578"></a><pre class="programlisting">#define GNOME_PARAM_ENABLE_SOUND "enable-sound"
1313
<a class="indexterm" name="id2973803"></a><pre class="programlisting">#define GNOME_PARAM_ENABLE_SOUND "enable-sound"
1380
1316
This parameter determines whether or not to enable sound on startup.