📄 libgnome-gnome-program.html
字号:
<td> A poptContext representing the argument parsing state,or <ahref="/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" lang="en"><a name="id2789144"></a><h3><a name="gnome-program-parse-args"></a>gnome_program_parse_args ()</h3><a class="indexterm" name="id2789157"></a><pre class="programlisting">void gnome_program_parse_args (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program);</pre><p>Parses the command line arguments for the application</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>program</code></em> :</span></td><td> Application object</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2789208"></a><h3><a name="gnome-program-postinit"></a>gnome_program_postinit ()</h3><a class="indexterm" name="id2789221"></a><pre class="programlisting">void gnome_program_postinit (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program);</pre><p>Called after <a href="libgnome-gnome-program.html#gnome-program-parse-args"><code class="function">gnome_program_parse_args()</code></a>, this functiontakes care of post-parse initialization and cleanup</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>program</code></em> :</span></td><td> Application object</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2789284"></a><h3><a name="GNOME-PARAM-POPT-TABLE:CAPS"></a>GNOME_PARAM_POPT_TABLE</h3><a class="indexterm" name="id2789299"></a><pre class="programlisting">#define GNOME_PARAM_POPT_TABLE "popt-table"</pre><div class="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 href="libgnome-gnome-program.html#GNOME-PARAM-GOPTION-CONTEXT:CAPS"><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 oninit only). Mutually exclusive with using <a href="libgnome-gnome-program.html#GNOME-PARAM-GOPTION-CONTEXT:CAPS"><span class="type">GNOME_PARAM_GOPTION_CONTEXT</span></a>parameter.</p></div><hr><div class="refsect2" lang="en"><a name="id2789349"></a><h3><a name="GNOME-PARAM-POPT-FLAGS:CAPS"></a>GNOME_PARAM_POPT_FLAGS</h3><a class="indexterm" name="id2789365"></a><pre class="programlisting">#define GNOME_PARAM_POPT_FLAGS "popt-flags"</pre><div class="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" lang="en"><a name="id2789395"></a><h3><a name="GNOME-PARAM-POPT-CONTEXT:CAPS"></a>GNOME_PARAM_POPT_CONTEXT</h3><a class="indexterm" name="id2789411"></a><pre class="programlisting">#define GNOME_PARAM_POPT_CONTEXT "popt-context"</pre><div class="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 href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> is using forpopt parsing (readable).</p></div><hr><div class="refsect2" lang="en"><a name="id2789450"></a><h3><a name="GNOME-PARAM-GOPTION-CONTEXT:CAPS"></a>GNOME_PARAM_GOPTION_CONTEXT</h3><a class="indexterm" name="id2789466"></a><pre class="programlisting">#define GNOME_PARAM_GOPTION_CONTEXT "goption-context"</pre><p>This parameter contains the GOptionContext pointer that <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> is using forGOption parsing (write on init only). The <a href="libgnome-gnome-program.html#GnomeProgram"><span class="type">GnomeProgram</span></a> will assume ownership of thepassed <ahref="/usr/share/gtk-doc/html/glib/glib-Commandline-option-parser.html#GOptionContext"><span class="type">GOptionContext</span></a>.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.</p><p>Since 2.14</p></div><hr><div class="refsect2" lang="en"><a name="id2789524"></a><h3><a name="GNOME-PARAM-CREATE-DIRECTORIES:CAPS"></a>GNOME_PARAM_CREATE_DIRECTORIES</h3><a class="indexterm" name="id2789536"></a><pre class="programlisting">#define GNOME_PARAM_CREATE_DIRECTORIES "create-directories"</pre><p>This parameter contains <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the standard GNOME directories should becreated on startup.</p></div><hr><div class="refsect2" lang="en"><a name="id2789564"></a><h3><a name="GNOME-PARAM-ENABLE-SOUND:CAPS"></a>GNOME_PARAM_ENABLE_SOUND</h3><a class="indexterm" name="id2789578"></a><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" lang="en"><a name="id2789595"></a><h3><a name="GNOME-PARAM-ESPEAKER:CAPS"></a>GNOME_PARAM_ESPEAKER</h3><a class="indexterm" name="id2789608"></a><pre class="programlisting">#define GNOME_PARAM_ESPEAKER "espeaker"</pre><p>This parameter describes how to connect to esd.</p></div><hr><div class="refsect2" lang="en"><a name="id2789625"></a><h3><a name="GNOME-PARAM-APP-ID:CAPS"></a>GNOME_PARAM_APP_ID</h3><a class="indexterm" name="id2789638"></a><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" lang="en"><a name="id2789655"></a><h3><a name="GNOME-PARAM-APP-VERSION:CAPS"></a>GNOME_PARAM_APP_VERSION</h3><a class="indexterm" name="id2789668"></a><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" lang="en"><a name="id2789685"></a><h3><a name="GNOME-PARAM-GNOME-PREFIX:CAPS"></a>GNOME_PARAM_GNOME_PREFIX</h3><a class="indexterm" name="id2789698"></a><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" lang="en"><a name="id2789716"></a><h3><a name="GNOME-PARAM-GNOME-SYSCONFDIR:CAPS"></a>GNOME_PARAM_GNOME_SYSCONFDIR</h3><a class="indexterm" name="id2789728"></a><pre class="programlisting">#define GNOME_PARAM_GNOME_SYSCONFDIR "gnome-sysconfdir"</pre><p>This parameter contains the prefix where the GNOME configuration filesare installed (readable, writable on init only).</p></div><hr><div class="refsect2" lang="en"><a name="id2789746"></a><h3><a name="GNOME-PARAM-GNOME-DATADIR:CAPS"></a>GNOME_PARAM_GNOME_DATADIR</h3><a class="indexterm" name="id2789760"></a><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" lang="en"><a name="id2789778"></a><h3><a name="GNOME-PARAM-GNOME-LIBDIR:CAPS"></a>GNOME_PARAM_GNOME_LIBDIR</h3><a class="indexterm" name="id2789791"></a><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" lang="en"><a name="id2789809"></a><h3><a name="GNOME-PARAM-APP-PREFIX:CAPS"></a>GNOME_PARAM_APP_PREFIX</h3><a class="indexterm" name="id2789822"></a><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" lang="en"><a name="id2789839"></a><h3><a name="GNOME-PARAM-APP-SYSCONFDIR:CAPS"></a>GNOME_PARAM_APP_SYSCONFDIR</h3><a class="indexterm" name="id2789852"></a><pre class="programlisting">#define GNOME_PARAM_APP_SYSCONFDIR "app-sysconfdir"</pre><p>This parameter contains the prefix where this application's configuration filesare installed (read / write).</p></div><hr><div class="refsect2" lang="en"><a name="id2789870"></a><h3><a name="GNOME-PARAM-APP-DATADIR:CAPS"></a>GNOME_PARAM_APP_DATADIR</h3><a class="indexterm" name="id2789883"></a><pre class="programlisting">#define GNOME_PARAM_APP_DATADIR "app-datadir"</pre><p>This parameter contains the prefix where this application's data files areinstalled (read / write).</p></div><hr><div class="refsect2" lang="en"><a name="id2789901"></a><h3><a name="GNOME-PARAM-APP-LIBDIR:CAPS"></a>GNOME_PARAM_APP_LIBDIR</h3><a class="indexterm" name="id2789914"></a><pre class="programlisting">#define GNOME_PARAM_APP_LIBDIR "app-libdir"</pre><p>This parameter contains the prefix where this application's library files areinstalled (read / write).</p></div><hr><div class="refsect2" lang="en"><a name="id2789932"></a><h3><a name="GNOME-PARAM-HUMAN-READABLE-NAME:CAPS"></a>GNOME_PARAM_HUMAN_READABLE_NAME</h3><a class="indexterm" name="id2789946"></a><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" lang="en"><a name="id2789963"></a><h3><a name="GNOME-PARAM-GNOME-PATH:CAPS"></a>GNOME_PARAM_GNOME_PATH</h3><a class="indexterm" name="id2789976"></a><pre class="programlisting">#define GNOME_PARAM_GNOME_PATH "gnome-path"</pre><p>This parameter contains the path in which to look for installed files (takenfrom the GNOME2_PATH environment variable).</p></div><hr><div class="refsect2" lang="en"><a name="id2789994"></a><h3><a name="GNOME-PARAM-NONE:CAPS"></a>GNOME_PARAM_NONE</h3><a class="indexterm" name="id2790007"></a><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" lang="en"><a name="id2790024"></a><h3><a name="GNOME-PROGRAM-STANDARD-PROPERTIES:CAPS"></a>GNOME_PROGRAM_STANDARD_PROPERTIES</h3><a class="indexterm" name="id2790037"></a><pre class="programlisting">#define GNOME_PROGRAM_STANDARD_PROPERTIES</pre><p>When PREFIX, SYSCONFDIR, DATADIR and LIBDIR are defined during the buildprocess, this macro can be used to assign these values to<a href="libgnome-gnome-program.html#GNOME-PARAM-APP-PREFIX:CAPS"><span class="type">GNOME_PARAM_APP_PREFIX</span></a>, <a href="libgnome-gnome-program.html#GNOME-PARAM-APP-SYSCONFDIR:CAPS"><span class="type">GNOME_PARAM_APP_SYSCONFDIR</span></a>, <a href="libgnome-gnome-program.html#GNOME-PARAM-APP-DATADIR:CAPS"><span class="type">GNOME_PARAM_APP_DATADIR</span></a>and <a href="libgnome-gnome-program.html#GNOME-PARAM-APP-LIBDIR:CAPS"><span class="type">GNOME_PARAM_APP_LIBDIR</span></a> respectively so that the GNOME librariesautomatically know where to fetch application specific data from. </p><p>Every respectable GNOME application should set these variables and useGNOME_PROGRAM_STANDARD_PROPERTIES in the call to <a href="libgnome-gnome-program.html#gnome-program-init"><code class="function">gnome_program_init()</code></a>.</p></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -