📄 libgnome-gnome-help.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-help</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="ch01s03.html" title="Displaying help and external info"><link rel="prev" href="ch01s03.html" title="Displaying help and external info"><link rel="next" href="libgnome-gnome-url.html" title="gnome-url"><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="ch01s03.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="ch01s03.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-url.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="#id2813830" class="shortcut">Top</a>  |  <a href="#id2815202" class="shortcut">Description</a></nobr></td></tr></table><div class="refentry" lang="en"><a name="libgnome-gnome-help"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><a name="id2813830"></a><span class="refentrytitle">gnome-help</span></h2><p>gnome-help — Display application and GNOME system help.</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include <libgnome/libgnome.h>enum <a href="libgnome-gnome-help.html#GnomeHelpError">GnomeHelpError</a>;#define <a href="libgnome-gnome-help.html#GNOME-HELP-ERROR:CAPS">GNOME_HELP_ERROR</a><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="libgnome-gnome-help.html#gnome-help-display">gnome_help_display</a> (const char *file_name, const char *link_id, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="libgnome-gnome-help.html#gnome-help-display-with-doc-id">gnome_help_display_with_doc_id</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program, const char *doc_id, const char *file_name, const char *link_id, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="libgnome-gnome-help.html#gnome-help-display-with-doc-id-and-env">gnome_help_display_with_doc_id_and_env</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program, const char *doc_id, const char *file_name, const char *link_id, char **envp, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="libgnome-gnome-help.html#gnome-help-display-desktop">gnome_help_display_desktop</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program, const char *doc_id, const char *file_name, const char *link_id, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="libgnome-gnome-help.html#gnome-help-display-desktop-with-env">gnome_help_display_desktop_with_env</a> (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program, const char *doc_id, const char *file_name, const char *link_id, char **envp, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="libgnome-gnome-help.html#gnome-help-display-uri">gnome_help_display_uri</a> (const char *help_uri, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> <a href="libgnome-gnome-help.html#gnome-help-display-uri-with-env">gnome_help_display_uri_with_env</a> (const char *help_uri, char **envp, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre></div><div class="refsect1" lang="en"><a name="id2815202"></a><h2>Description</h2><p>These functions provide a way to display help files that are either installedas part of the main GNOME installation or that are specific to the currentapplication.</p></div><div class="refsect1" lang="en"><a name="id2815219"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2815230"></a><h3><a name="GnomeHelpError"></a>enum GnomeHelpError</h3><a class="indexterm" name="id2815243"></a><pre class="programlisting">typedef enum { GNOME_HELP_ERROR_INTERNAL, GNOME_HELP_ERROR_NOT_FOUND} GnomeHelpError;</pre><p>The different error codes which can be thrown in the <a href="libgnome-gnome-help.html#GNOME-HELP-ERROR:CAPS"><span class="type">GNOME_HELP_ERROR</span></a> domain.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><a name="GNOME-HELP-ERROR-INTERNAL:CAPS"></a><code class="literal">GNOME_HELP_ERROR_INTERNAL</code></span></td><td>Something went wrong internally. This is mostlikely caused by a resource problem or bad installation.</td></tr><tr><td><span class="term"><a name="GNOME-HELP-ERROR-NOT-FOUND:CAPS"></a><code class="literal">GNOME_HELP_ERROR_NOT_FOUND</code></span></td><td>Help file does not exist.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2815321"></a><h3><a name="GNOME-HELP-ERROR:CAPS"></a>GNOME_HELP_ERROR</h3><a class="indexterm" name="id2815335"></a><pre class="programlisting">#define GNOME_HELP_ERROR (gnome_help_error_quark ())</pre><p>The class (or domain) of errors raised directly by the gnome-help module. Thisis used as a value in the domain field of the <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> structure.</p></div><hr><div class="refsect2" lang="en"><a name="id2815361"></a><h3><a name="gnome-help-display"></a>gnome_help_display ()</h3><a class="indexterm" name="id2815374"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gnome_help_display (const char *file_name, const char *link_id, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Displays the help file specified by <em class="parameter"><code>file_name</code></em> at location <em class="parameter"><code>link_id</code></em> in thepreferred help browser of the user.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>file_name</code></em> :</span></td><td> The name of the help document to display.</td></tr><tr><td><span class="term"><em class="parameter"><code>link_id</code></em> :</span></td><td> Can be <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. If set, refers to an anchor or section id within therequested document.</td></tr><tr><td><span class="term"><em class="parameter"><code>error</code></em> :</span></td><td> A <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> instance that will hold the specifics of any error whichoccurs during processing, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise (in which case <em class="parameter"><code>error</code></em> willcontain the actual error).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2815547"></a><h3><a name="gnome-help-display-with-doc-id"></a>gnome_help_display_with_doc_id ()</h3><a class="indexterm" name="id2815561"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gnome_help_display_with_doc_id (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program, const char *doc_id, const char *file_name, const char *link_id, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Displays the help file specified by <em class="parameter"><code>file_name</code></em> at location <em class="parameter"><code>link_id</code></em> withinthe <em class="parameter"><code>doc_id</code></em> domain in the preferred help browser of the user. Most of thetime, you want to call <a href="libgnome-gnome-help.html#gnome-help-display"><code class="function">gnome_help_display()</code></a> instead.</p><p>This function will display the help through creating a "ghelp" URI, bylooking for <em class="parameter"><code>file_name</code></em> in the applications installed help location (found by<a href="libgnome-gnome-program.html#GNOME-FILE-DOMAIN-APP-HELP:CAPS"><span class="type">GNOME_FILE_DOMAIN_APP_HELP</span></a>) and its app_id. The resulting URI is roughlyin the form "ghelp:appid/file_name?link_id". If a matching file cannot befound, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em> is set.</p><p>Please note that this only displays application help. To display help filesfrom the global GNOME domain, you will want to use<a href="libgnome-gnome-help.html#gnome-help-display-desktop"><code class="function">gnome_help_display_desktop()</code></a>.</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> The current application object, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for the default one.</td></tr><tr><td><span class="term"><em class="parameter"><code>doc_id</code></em> :</span></td><td> The document identifier, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to default to the application ID(app_id) of the specified <em class="parameter"><code>program</code></em>.</td></tr><tr><td><span class="term"><em class="parameter"><code>file_name</code></em> :</span></td><td> The name of the help document to display.</td></tr><tr><td><span class="term"><em class="parameter"><code>link_id</code></em> :</span></td><td> Can be <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. If set, refers to an anchor or section id within therequested document.</td></tr><tr><td><span class="term"><em class="parameter"><code>error</code></em> :</span></td><td> A <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> instance that will hold the specifics of any error whichoccurs during processing, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise (in which case <em class="parameter"><code>error</code></em> willcontain the actual error).</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2815881"></a><h3><a name="gnome-help-display-with-doc-id-and-env"></a>gnome_help_display_with_doc_id_and_env ()</h3><a class="indexterm" name="id2815898"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gnome_help_display_with_doc_id_and_env (<a href="libgnome-gnome-program.html#GnomeProgram">GnomeProgram</a> *program, const char *doc_id, const char *file_name, const char *link_id, char **envp, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Like <code class="function">gnome_display_with_doc_id()</code>, but the the contents of <em class="parameter"><code>envp</code></em>will become the url viewer's environment rather than inheritingfrom the parents environment.</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> The current application object, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> for the default one.</td></tr><tr><td><span class="term"><em class="parameter"><code>doc_id</code></em> :</span></td><td> The document identifier, or <a
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -