📄 libgnome-gnome-init.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>gnome-init</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.1"><link rel="start" href="index.html" title="GNOME Library Reference Manual"><link rel="up" href="libgnome.html#id2740192" title="Initializing applications and starting programs"><link rel="prev" href="libgnome-gnome-program.html" title="gnome-program"><link rel="next" href="libgnome-gnome-exec.html" title="gnome-exec"><meta name="generator" content="GTK-Doc V1.7 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="libgnome.html" title="GNOME Library (libgnome)"></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="libgnome-gnome-program.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="libgnome.html#id2740192"><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-exec.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr><tr><td colspan="5" class="shortcuts"><nobr><a href="#id2794948" class="shortcut">Top</a>  |  <a href="#id2795049" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="libgnome-gnome-init"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><a name="id2794948"></a><span class="refentrytitle">gnome-init</span></h2><p>gnome-init — Functions used during initialisation of libgnome and other platform libraries.</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include <libgnome/libgnome.h>#define <a href="libgnome-gnome-init.html#LIBGNOME-MODULE:CAPS">LIBGNOME_MODULE</a>const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a>* <a href="libgnome-gnome-init.html#libgnome-module-info-get">libgnome_module_info_get</a> (void);const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a>* <a href="libgnome-gnome-init.html#gnome-bonobo-module-info-get">gnome_bonobo_module_info_get</a> (void);const char* <a href="libgnome-gnome-init.html#gnome-user-dir-get">gnome_user_dir_get</a> (void);const char* <a href="libgnome-gnome-init.html#gnome-user-private-dir-get">gnome_user_private_dir_get</a> (void);const char* <a href="libgnome-gnome-init.html#gnome-user-accels-dir-get">gnome_user_accels_dir_get</a> (void);</pre></div><div class="refsect1" lang="en"><a name="id2795049"></a><h2>Description</h2><p></p></div><div class="refsect1" lang="en"><a name="id2795063"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2795073"></a><h3><a name="LIBGNOME-MODULE:CAPS"></a>LIBGNOME_MODULE</h3><a class="indexterm" name="id2795086"></a><pre class="programlisting">#define LIBGNOME_MODULE libgnome_module_info_get()</pre><p>This macro wraps the call to <a href="libgnome-gnome-init.html#libgnome-module-info-get"><code class="function">libgnome_module_info_get()</code></a> and is the usual way ofretrieving the <a href="libgnome-gnome-program.html#GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> returned by this function.</p></div><hr><div class="refsect2" lang="en"><a name="id2795123"></a><h3><a name="libgnome-module-info-get"></a>libgnome_module_info_get ()</h3><a class="indexterm" name="id2795136"></a><pre class="programlisting">const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a>* libgnome_module_info_get (void);</pre><p>Retrieves the current libgnome version and the modules it depends on.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a new <a href="libgnome-gnome-program.html#GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> structure describing the version andthe versions of the dependents.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2795188"></a><h3><a name="gnome-bonobo-module-info-get"></a>gnome_bonobo_module_info_get ()</h3><a class="indexterm" name="id2795202"></a><pre class="programlisting">const <a href="libgnome-gnome-program.html#GnomeModuleInfo">GnomeModuleInfo</a>* gnome_bonobo_module_info_get (void);</pre><p>Retrieves the bonobo module version and indicate that it requires the currentlibgnome and its dependencies (although libbonobo does not depend onlibgnome, libbonoboui does and this will also be initialised wheninitialising a GNOME app).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> a new <a href="libgnome-gnome-program.html#GnomeModuleInfo"><span class="type">GnomeModuleInfo</span></a> structure describing the version of thebonobo modules and its dependents.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2795258"></a><h3><a name="gnome-user-dir-get"></a>gnome_user_dir_get ()</h3><a class="indexterm" name="id2795270"></a><pre class="programlisting">const char* gnome_user_dir_get (void);</pre><p>Retrieves the user-specific directory for GNOME apps to use ($HOME/.gnome2is the usual GNOME 2 value).</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> An absolute path to the directory.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2795313"></a><h3><a name="gnome-user-private-dir-get"></a>gnome_user_private_dir_get ()</h3><a class="indexterm" name="id2795327"></a><pre class="programlisting">const char* gnome_user_private_dir_get (void);</pre><p>Differs from <a href="libgnome-gnome-init.html#gnome-user-dir-get"><code class="function">gnome_user_dir_get()</code></a> in that the directory returned here willhave had permissions of 0700 (rwx------) enforced when it was created. Ofcourse, the permissions may have been altered since creation, so care stillneeds to be taken.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> An absolute path to the user-specific private directory that GNOMEapps can use.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2795383"></a><h3><a name="gnome-user-accels-dir-get"></a>gnome_user_accels_dir_get ()</h3><a class="indexterm" name="id2795397"></a><pre class="programlisting">const char* gnome_user_accels_dir_get (void);</pre><p>Retrieves the user-specific directory that stores the keyboard shortcut filesfor each GNOME app. Note that most applications should be using GConf forstoring this information, but it may be necessary to use the<a href="libgnome-gnome-init.html#gnome-user-accels-dir-get"><code class="function">gnome_user_accels_dir_get()</code></a> directory for legacy applications.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The absolute path to the directory.</td></tr></tbody></table></div></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -