~ubuntu-branches/ubuntu/trusty/glib2.0/trusty-proposed

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-Commandline-option-parser.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-03-09 11:28:22 UTC
  • mfrom: (3.4.8 experimental)
  • Revision ID: james.westby@ubuntu.com-20100309112822-j4n0v3xbtsup8s97
Tags: 2.23.5-1ubuntu1
* Resync on Debian
* debian/patches/01_gettext-desktopfiles.patch:
  - updated to use gettext for X-GNOME-Fullname too
* debian/patches/71_gio_launch_handler.patch:
  - new gio default launch handle feature required for wncksync
* debian/control.in, 
  debian/patches/80-gtester-subunit.patch:
  - gtester-report subunit support
* debian/libglib2.0-0.symbols:
  - updated the symbols list for the gio launcher handler
* debian/rules:
  - don't break build on test suite errors, debian recently activated this but
    the build breaks even when there is no error in the testsuite

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
<head>
4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
5
<title>Commandline option parser</title>
6
 
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
7
7
<link rel="home" href="index.html" title="GLib Reference Manual">
8
8
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
9
9
<link rel="prev" href="glib-Shell-related-Utilities.html" title="Shell-related Utilities">
10
10
<link rel="next" href="glib-Glob-style-pattern-matching.html" title="Glob-style pattern matching">
11
 
<meta name="generator" content="GTK-Doc V1.13 (XML mode)">
 
11
<meta name="generator" content="GTK-Doc V1.11 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
13
<link rel="chapter" href="glib.html" title="GLib Overview">
14
14
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
42
42
</tr>
43
43
<tr><td colspan="5" class="shortcuts">
44
44
<a href="#glib-Commandline-option-parser.synopsis" class="shortcut">Top</a>
45
 
                   | 
46
 
                  <a href="#glib-Commandline-option-parser.description" class="shortcut">Description</a>
 
45
                 | 
 
46
                <a href="#glib-Commandline-option-parser.description" class="shortcut">Description</a>
47
47
</td></tr>
48
48
</table>
49
49
<div class="refentry" title="Commandline option parser">
58
58
<div class="refsynopsisdiv" title="Synopsis">
59
59
<a name="glib-Commandline-option-parser.synopsis"></a><h2>Synopsis</h2>
60
60
<pre class="synopsis">
 
61
 
61
62
#include &lt;glib.h&gt;
62
63
 
63
64
enum                <a class="link" href="glib-Commandline-option-parser.html#GOptionError" title="enum GOptionError">GOptionError</a>;
64
 
#define             <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ERROR:CAPS" title="G_OPTION_ERROR">G_OPTION_ERROR</a>
65
 
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="glib-Commandline-option-parser.html#GOptionArgFunc" title="GOptionArgFunc ()">*GOptionArgFunc</a>)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *option_name,
66
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *value,
67
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
68
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
 
65
#define             <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ERROR--CAPS" title="G_OPTION_ERROR">G_OPTION_ERROR</a>
 
66
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (<a class="link" href="glib-Commandline-option-parser.html#GOptionArgFunc" title="GOptionArgFunc ()">*GOptionArgFunc</a>)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *option_name,
 
67
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *value,
 
68
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
69
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
69
70
                    <a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a>;
70
 
<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *    <a class="link" href="glib-Commandline-option-parser.html#g-option-context-new" title="g_option_context_new ()">g_option_context_new</a>                (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *parameter_string);
71
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-summary" title="g_option_context_set_summary ()">g_option_context_set_summary</a>        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
72
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *summary);
73
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-summary" title="g_option_context_get_summary ()">g_option_context_get_summary</a>        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);
74
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-description" title="g_option_context_set_description ()">g_option_context_set_description</a>    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
75
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *description);
76
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-description" title="g_option_context_get_description ()">g_option_context_get_description</a>    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);
77
 
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       (<a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()">*GTranslateFunc</a>)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *str,
78
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data);
79
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translate-func" title="g_option_context_set_translate_func ()">g_option_context_set_translate_func</a> (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
80
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="returnvalue">GTranslateFunc</span></a> func,
81
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
82
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="returnvalue">GDestroyNotify</span></a> destroy_notify);
83
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translation-domain" title="g_option_context_set_translation_domain ()">g_option_context_set_translation_domain</a>
84
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
85
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain);
86
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-free" title="g_option_context_free ()">g_option_context_free</a>               (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);
87
 
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Commandline-option-parser.html#g-option-context-parse" title="g_option_context_parse ()">g_option_context_parse</a>              (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
88
 
                                                         <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> *argc,
89
 
                                                         <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ***argv,
90
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
91
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-help-enabled" title="g_option_context_set_help_enabled ()">g_option_context_set_help_enabled</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
92
 
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> help_enabled);
93
 
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-help-enabled" title="g_option_context_get_help_enabled ()">g_option_context_get_help_enabled</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);
94
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-ignore-unknown-options" title="g_option_context_set_ignore_unknown_options ()">g_option_context_set_ignore_unknown_options</a>
95
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
96
 
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> ignore_unknown);
97
 
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-ignore-unknown-options" title="g_option_context_get_ignore_unknown_options ()">g_option_context_get_ignore_unknown_options</a>
98
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);
99
 
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-help" title="g_option_context_get_help ()">g_option_context_get_help</a>           (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
100
 
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> main_help,
101
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);
 
71
<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *    <a class="link" href="glib-Commandline-option-parser.html#g-option-context-new" title="g_option_context_new ()">g_option_context_new</a>                (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *parameter_string);
 
72
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-summary" title="g_option_context_set_summary ()">g_option_context_set_summary</a>        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
73
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *summary);
 
74
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-summary" title="g_option_context_get_summary ()">g_option_context_get_summary</a>        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);
 
75
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-description" title="g_option_context_set_description ()">g_option_context_set_description</a>    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
76
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *description);
 
77
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-description" title="g_option_context_get_description ()">g_option_context_get_description</a>    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);
 
78
const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       (<a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()">*GTranslateFunc</a>)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *str,
 
79
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);
 
80
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translate-func" title="g_option_context_set_translate_func ()">g_option_context_set_translate_func</a> (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
81
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()">GTranslateFunc</a> func,
 
82
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
83
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> destroy_notify);
 
84
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translation-domain" title="g_option_context_set_translation_domain ()">g_option_context_set_translation_domain</a>
 
85
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
86
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain);
 
87
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-free" title="g_option_context_free ()">g_option_context_free</a>               (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);
 
88
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Commandline-option-parser.html#g-option-context-parse" title="g_option_context_parse ()">g_option_context_parse</a>              (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
89
                                                         <a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> *argc,
 
90
                                                         <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> ***argv,
 
91
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
 
92
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-help-enabled" title="g_option_context_set_help_enabled ()">g_option_context_set_help_enabled</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
93
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> help_enabled);
 
94
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-help-enabled" title="g_option_context_get_help_enabled ()">g_option_context_get_help_enabled</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);
 
95
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-ignore-unknown-options" title="g_option_context_set_ignore_unknown_options ()">g_option_context_set_ignore_unknown_options</a>
 
96
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
97
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> ignore_unknown);
 
98
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-ignore-unknown-options" title="g_option_context_get_ignore_unknown_options ()">g_option_context_get_ignore_unknown_options</a>
 
99
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);
 
100
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *             <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-help" title="g_option_context_get_help ()">g_option_context_get_help</a>           (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
101
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> main_help,
 
102
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);
102
103
enum                <a class="link" href="glib-Commandline-option-parser.html#GOptionArg" title="enum GOptionArg">GOptionArg</a>;
103
104
enum                <a class="link" href="glib-Commandline-option-parser.html#GOptionFlags" title="enum GOptionFlags">GOptionFlags</a>;
104
 
#define             <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS" title="G_OPTION_REMAINING">G_OPTION_REMAINING</a>
 
105
#define             <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-REMAINING--CAPS" title="G_OPTION_REMAINING">G_OPTION_REMAINING</a>
105
106
                    <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry">GOptionEntry</a>;
106
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-add-main-entries" title="g_option_context_add_main_entries ()">g_option_context_add_main_entries</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
107
 
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="returnvalue">GOptionEntry</span></a> *entries,
108
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *translation_domain);
 
107
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-add-main-entries" title="g_option_context_add_main_entries ()">g_option_context_add_main_entries</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
108
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry">GOptionEntry</a> *entries,
 
109
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *translation_domain);
109
110
                    <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a>;
110
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-add-group" title="g_option_context_add_group ()">g_option_context_add_group</a>          (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
111
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);
112
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-main-group" title="g_option_context_set_main_group ()">g_option_context_set_main_group</a>     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
113
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);
114
 
<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *      <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-main-group" title="g_option_context_get_main_group ()">g_option_context_get_main_group</a>     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);
115
 
<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *      <a class="link" href="glib-Commandline-option-parser.html#g-option-group-new" title="g_option_group_new ()">g_option_group_new</a>                  (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
116
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *description,
117
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *help_description,
118
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> user_data,
119
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="returnvalue">GDestroyNotify</span></a> destroy);
120
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-free" title="g_option_group_free ()">g_option_group_free</a>                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);
121
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-add-entries" title="g_option_group_add_entries ()">g_option_group_add_entries</a>          (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
122
 
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="returnvalue">GOptionEntry</span></a> *entries);
123
 
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()">*GOptionParseFunc</a>)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
124
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
125
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
126
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
127
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-parse-hooks" title="g_option_group_set_parse_hooks ()">g_option_group_set_parse_hooks</a>      (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
128
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()"><span class="returnvalue">GOptionParseFunc</span></a> pre_parse_func,
129
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()"><span class="returnvalue">GOptionParseFunc</span></a> post_parse_func);
130
 
<span class="returnvalue">void</span>                (<a class="link" href="glib-Commandline-option-parser.html#GOptionErrorFunc" title="GOptionErrorFunc ()">*GOptionErrorFunc</a>)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
131
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
132
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
133
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
134
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-error-hook" title="g_option_group_set_error_hook ()">g_option_group_set_error_hook</a>       (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
135
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionErrorFunc" title="GOptionErrorFunc ()"><span class="returnvalue">GOptionErrorFunc</span></a> error_func);
136
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-translate-func" title="g_option_group_set_translate_func ()">g_option_group_set_translate_func</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
137
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="returnvalue">GTranslateFunc</span></a> func,
138
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
139
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="returnvalue">GDestroyNotify</span></a> destroy_notify);
140
 
<span class="returnvalue">void</span>                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-translation-domain" title="g_option_group_set_translation_domain ()">g_option_group_set_translation_domain</a>
141
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
142
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain);
 
111
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-add-group" title="g_option_context_add_group ()">g_option_context_add_group</a>          (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
112
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);
 
113
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-main-group" title="g_option_context_set_main_group ()">g_option_context_set_main_group</a>     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
114
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);
 
115
<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *      <a class="link" href="glib-Commandline-option-parser.html#g-option-context-get-main-group" title="g_option_context_get_main_group ()">g_option_context_get_main_group</a>     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);
 
116
<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *      <a class="link" href="glib-Commandline-option-parser.html#g-option-group-new" title="g_option_group_new ()">g_option_group_new</a>                  (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *name,
 
117
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *description,
 
118
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *help_description,
 
119
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data,
 
120
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> destroy);
 
121
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-free" title="g_option_group_free ()">g_option_group_free</a>                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);
 
122
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-add-entries" title="g_option_group_add_entries ()">g_option_group_add_entries</a>          (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
123
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry">GOptionEntry</a> *entries);
 
124
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (<a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()">*GOptionParseFunc</a>)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
125
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
126
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
127
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
 
128
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-parse-hooks" title="g_option_group_set_parse_hooks ()">g_option_group_set_parse_hooks</a>      (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
129
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()">GOptionParseFunc</a> pre_parse_func,
 
130
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()">GOptionParseFunc</a> post_parse_func);
 
131
void                (<a class="link" href="glib-Commandline-option-parser.html#GOptionErrorFunc" title="GOptionErrorFunc ()">*GOptionErrorFunc</a>)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
132
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
133
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
134
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);
 
135
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-error-hook" title="g_option_group_set_error_hook ()">g_option_group_set_error_hook</a>       (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
136
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionErrorFunc" title="GOptionErrorFunc ()">GOptionErrorFunc</a> error_func);
 
137
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-translate-func" title="g_option_group_set_translate_func ()">g_option_group_set_translate_func</a>   (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
138
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()">GTranslateFunc</a> func,
 
139
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
140
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> destroy_notify);
 
141
void                <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-translation-domain" title="g_option_group_set_translation_domain ()">g_option_group_set_translation_domain</a>
 
142
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
143
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain);
143
144
</pre>
144
145
</div>
145
146
<div class="refsect1" title="Description">
214
215
incorporate options from multiple sources. The intended use for this is
215
216
to let applications collect option groups from the libraries it uses,
216
217
add them to their <a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="type">GOptionContext</span></a>, and parse all options by a single call
217
 
to <a class="link" href="glib-Commandline-option-parser.html#g-option-context-parse" title="g_option_context_parse ()"><code class="function">g_option_context_parse()</code></a>. See <a href="http://library.gnome.org/devel/gtk/unstable/gtk-General.html#gtk-get-option-group"><code class="function">gtk_get_option_group()</code></a> for an example.
 
218
to <a class="link" href="glib-Commandline-option-parser.html#g-option-context-parse" title="g_option_context_parse ()"><code class="function">g_option_context_parse()</code></a>. See <code class="function">gtk_get_option_group()</code> for an example.
218
219
</p>
219
220
<p>
220
221
If an option is declared to be of type string or filename, GOption takes
264
265
 
265
266
}
266
267
</pre></div>
 
268
<p>
 
269
</p>
267
270
</div>
268
271
<div class="refsect1" title="Details">
269
272
<a name="glib-Commandline-option-parser.details"></a><h2>Details</h2>
278
281
</pre>
279
282
<p>
280
283
Error codes returned by option parsing.</p>
 
284
<p>
 
285
</p>
281
286
<div class="variablelist"><table border="0">
282
287
<col align="left" valign="top">
283
288
<tbody>
284
289
<tr>
285
 
<td><p><a name="G-OPTION-ERROR-UNKNOWN-OPTION:CAPS"></a><span class="term"><code class="literal">G_OPTION_ERROR_UNKNOWN_OPTION</code></span></p></td>
 
290
<td><p><a name="G-OPTION-ERROR-UNKNOWN-OPTION--CAPS"></a><span class="term"><code class="literal">G_OPTION_ERROR_UNKNOWN_OPTION</code></span></p></td>
286
291
<td> An option was not known to the parser.
287
292
 This error will only be reported, if the parser hasn't been instructed
288
293
 to ignore unknown options, see <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-ignore-unknown-options" title="g_option_context_set_ignore_unknown_options ()"><code class="function">g_option_context_set_ignore_unknown_options()</code></a>.
289
294
</td>
290
295
</tr>
291
296
<tr>
292
 
<td><p><a name="G-OPTION-ERROR-BAD-VALUE:CAPS"></a><span class="term"><code class="literal">G_OPTION_ERROR_BAD_VALUE</code></span></p></td>
 
297
<td><p><a name="G-OPTION-ERROR-BAD-VALUE--CAPS"></a><span class="term"><code class="literal">G_OPTION_ERROR_BAD_VALUE</code></span></p></td>
293
298
<td> A value couldn't be parsed.
294
299
</td>
295
300
</tr>
296
301
<tr>
297
 
<td><p><a name="G-OPTION-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">G_OPTION_ERROR_FAILED</code></span></p></td>
 
302
<td><p><a name="G-OPTION-ERROR-FAILED--CAPS"></a><span class="term"><code class="literal">G_OPTION_ERROR_FAILED</code></span></p></td>
298
303
<td> A <a class="link" href="glib-Commandline-option-parser.html#GOptionArgFunc" title="GOptionArgFunc ()"><span class="type">GOptionArgFunc</span></a> callback failed.
299
304
</td>
300
305
</tr>
303
308
</div>
304
309
<hr>
305
310
<div class="refsect2" title="G_OPTION_ERROR">
306
 
<a name="G-OPTION-ERROR:CAPS"></a><h3>G_OPTION_ERROR</h3>
307
 
<pre class="programlisting">#define             G_OPTION_ERROR</pre>
 
311
<a name="G-OPTION-ERROR--CAPS"></a><h3>G_OPTION_ERROR</h3>
 
312
<pre class="programlisting">#define G_OPTION_ERROR (g_option_error_quark ())
 
313
</pre>
308
314
<p>
309
315
Error domain for option parsing. Errors in this domain will
310
316
be from the <a class="link" href="glib-Commandline-option-parser.html#GOptionError" title="enum GOptionError"><span class="type">GOptionError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> for information on 
311
317
error domains.</p>
 
318
<p>
 
319
</p>
312
320
</div>
313
321
<hr>
314
322
<div class="refsect2" title="GOptionArgFunc ()">
315
323
<a name="GOptionArgFunc"></a><h3>GOptionArgFunc ()</h3>
316
 
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (*GOptionArgFunc)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *option_name,
317
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *value,
318
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
319
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
 
324
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (*GOptionArgFunc)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *option_name,
 
325
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *value,
 
326
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
327
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
320
328
<p>
321
 
The type of function to be passed as callback for <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK:CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>
 
329
The type of function to be passed as callback for <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK--CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>
322
330
options.</p>
 
331
<p>
 
332
</p>
323
333
<div class="variablelist"><table border="0">
324
334
<col align="left" valign="top">
325
335
<tbody>
343
353
</tr>
344
354
<tr>
345
355
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
346
 
<td> A return location for errors. The error code <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ERROR-FAILED:CAPS"><code class="literal">G_OPTION_ERROR_FAILED</code></a>
 
356
<td> A return location for errors. The error code <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ERROR-FAILED--CAPS"><code class="literal">G_OPTION_ERROR_FAILED</code></a>
347
357
 is intended to be used for errors in <a class="link" href="glib-Commandline-option-parser.html#GOptionArgFunc" title="GOptionArgFunc ()"><span class="type">GOptionArgFunc</span></a> callbacks.
348
358
</td>
349
359
</tr>
350
360
<tr>
351
361
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
352
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the option was successfully parsed, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if an error 
 
362
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the option was successfully parsed, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> if an error 
353
363
 occurred, in which case <em class="parameter"><code>error</code></em> should be set with <a class="link" href="glib-Error-Reporting.html#g-set-error" title="g_set_error ()"><code class="function">g_set_error()</code></a>
354
364
</td>
355
365
</tr>
364
374
A <span class="structname">GOptionContext</span> struct defines which options
365
375
are accepted by the commandline option parser. The struct has only private 
366
376
fields and should not be directly accessed.</p>
 
377
<p>
 
378
</p>
367
379
</div>
368
380
<hr>
369
381
<div class="refsect2" title="g_option_context_new ()">
370
382
<a name="g-option-context-new"></a><h3>g_option_context_new ()</h3>
371
 
<pre class="programlisting"><a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *    g_option_context_new                (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *parameter_string);</pre>
 
383
<pre class="programlisting"><a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *    g_option_context_new                (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *parameter_string);</pre>
372
384
<p>
373
385
Creates a new option context. 
374
386
</p>
376
388
The <em class="parameter"><code>parameter_string</code></em> can serve multiple purposes. It can be used
377
389
to add descriptions for "rest" arguments, which are not parsed by
378
390
the <a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="type">GOptionContext</span></a>, typically something like "FILES" or
379
 
"FILE1 FILE2...". If you are using <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS" title="G_OPTION_REMAINING"><span class="type">G_OPTION_REMAINING</span></a> for
 
391
"FILE1 FILE2...". If you are using <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-REMAINING--CAPS" title="G_OPTION_REMAINING"><span class="type">G_OPTION_REMAINING</span></a> for
380
392
collecting "rest" arguments, GLib handles this automatically by
381
393
using the <em class="parameter"><code>arg_description</code></em> of the corresponding <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="type">GOptionEntry</span></a> in
382
394
the usage summary.
392
404
Note that the <em class="parameter"><code>parameter_string</code></em> is translated using the
393
405
function set with <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translate-func" title="g_option_context_set_translate_func ()"><code class="function">g_option_context_set_translate_func()</code></a>, so
394
406
it should normally be passed untranslated.</p>
 
407
<p>
 
408
</p>
395
409
<div class="variablelist"><table border="0">
396
410
<col align="left" valign="top">
397
411
<tbody>
417
431
<hr>
418
432
<div class="refsect2" title="g_option_context_set_summary ()">
419
433
<a name="g-option-context-set-summary"></a><h3>g_option_context_set_summary ()</h3>
420
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_set_summary        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
421
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *summary);</pre>
 
434
<pre class="programlisting">void                g_option_context_set_summary        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
435
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *summary);</pre>
422
436
<p>
423
437
Adds a string to be displayed in <code class="option">--help</code> output
424
438
before the list of options. This is typically a summary of the
428
442
Note that the summary is translated (see 
429
443
<a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translate-func" title="g_option_context_set_translate_func ()"><code class="function">g_option_context_set_translate_func()</code></a> and
430
444
<a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translation-domain" title="g_option_context_set_translation_domain ()"><code class="function">g_option_context_set_translation_domain()</code></a>).</p>
 
445
<p>
 
446
</p>
431
447
<div class="variablelist"><table border="0">
432
448
<col align="left" valign="top">
433
449
<tbody>
439
455
<tr>
440
456
<td><p><span class="term"><em class="parameter"><code>summary</code></em> :</span></p></td>
441
457
<td> a string to be shown in <code class="option">--help</code> output 
442
 
 before the list of options, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
458
 before the list of options, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
443
459
</td>
444
460
</tr>
445
461
</tbody>
449
465
<hr>
450
466
<div class="refsect2" title="g_option_context_get_summary ()">
451
467
<a name="g-option-context-get-summary"></a><h3>g_option_context_get_summary ()</h3>
452
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       g_option_context_get_summary        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);</pre>
 
468
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       g_option_context_get_summary        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);</pre>
453
469
<p>
454
470
Returns the summary. See <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-summary" title="g_option_context_set_summary ()"><code class="function">g_option_context_set_summary()</code></a>.</p>
 
471
<p>
 
472
</p>
455
473
<div class="variablelist"><table border="0">
456
474
<col align="left" valign="top">
457
475
<tbody>
473
491
<hr>
474
492
<div class="refsect2" title="g_option_context_set_description ()">
475
493
<a name="g-option-context-set-description"></a><h3>g_option_context_set_description ()</h3>
476
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_set_description    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
477
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *description);</pre>
 
494
<pre class="programlisting">void                g_option_context_set_description    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
495
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *description);</pre>
478
496
<p>
479
497
Adds a string to be displayed in <code class="option">--help</code> output
480
498
after the list of options. This text often includes a bug reporting
483
501
<p>
484
502
Note that the summary is translated (see 
485
503
<a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translate-func" title="g_option_context_set_translate_func ()"><code class="function">g_option_context_set_translate_func()</code></a>).</p>
 
504
<p>
 
505
</p>
486
506
<div class="variablelist"><table border="0">
487
507
<col align="left" valign="top">
488
508
<tbody>
494
514
<tr>
495
515
<td><p><span class="term"><em class="parameter"><code>description</code></em> :</span></p></td>
496
516
<td> a string to be shown in <code class="option">--help</code> output 
497
 
  after the list of options, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
517
  after the list of options, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
498
518
</td>
499
519
</tr>
500
520
</tbody>
504
524
<hr>
505
525
<div class="refsect2" title="g_option_context_get_description ()">
506
526
<a name="g-option-context-get-description"></a><h3>g_option_context_get_description ()</h3>
507
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       g_option_context_get_description    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);</pre>
 
527
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       g_option_context_get_description    (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);</pre>
508
528
<p>
509
529
Returns the description. See <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-description" title="g_option_context_set_description ()"><code class="function">g_option_context_set_description()</code></a>.</p>
 
530
<p>
 
531
</p>
510
532
<div class="variablelist"><table border="0">
511
533
<col align="left" valign="top">
512
534
<tbody>
528
550
<hr>
529
551
<div class="refsect2" title="GTranslateFunc ()">
530
552
<a name="GTranslateFunc"></a><h3>GTranslateFunc ()</h3>
531
 
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *       (*GTranslateFunc)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *str,
532
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data);</pre>
 
553
<pre class="programlisting">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *       (*GTranslateFunc)                   (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *str,
 
554
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data);</pre>
533
555
<p>
534
556
The type of functions which are used to translate user-visible
535
557
strings, for <code class="option">--help</code> output.</p>
 
558
<p>
 
559
</p>
536
560
<div class="variablelist"><table border="0">
537
561
<col align="left" valign="top">
538
562
<tbody>
559
583
<hr>
560
584
<div class="refsect2" title="g_option_context_set_translate_func ()">
561
585
<a name="g-option-context-set-translate-func"></a><h3>g_option_context_set_translate_func ()</h3>
562
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_set_translate_func (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
563
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="returnvalue">GTranslateFunc</span></a> func,
564
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
565
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="returnvalue">GDestroyNotify</span></a> destroy_notify);</pre>
 
586
<pre class="programlisting">void                g_option_context_set_translate_func (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
587
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()">GTranslateFunc</a> func,
 
588
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
589
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> destroy_notify);</pre>
566
590
<p>
567
591
Sets the function which is used to translate the contexts 
568
592
user-visible strings, for <code class="option">--help</code> output. 
569
 
If <em class="parameter"><code>func</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, strings are not translated.
 
593
If <em class="parameter"><code>func</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>, strings are not translated.
570
594
</p>
571
595
<p>
572
596
Note that option groups have their own translation functions, 
577
601
<p>
578
602
If you are using <code class="function">gettext()</code>, you only need to set the translation
579
603
domain, see <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-translation-domain" title="g_option_context_set_translation_domain ()"><code class="function">g_option_context_set_translation_domain()</code></a>.</p>
 
604
<p>
 
605
</p>
580
606
<div class="variablelist"><table border="0">
581
607
<col align="left" valign="top">
582
608
<tbody>
587
613
</tr>
588
614
<tr>
589
615
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
590
 
<td> the <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="type">GTranslateFunc</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> 
 
616
<td> the <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="type">GTranslateFunc</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> 
591
617
</td>
592
618
</tr>
593
619
<tr>
594
620
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
595
 
<td> user data to pass to <em class="parameter"><code>func</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
621
<td> user data to pass to <em class="parameter"><code>func</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
596
622
</td>
597
623
</tr>
598
624
<tr>
599
625
<td><p><span class="term"><em class="parameter"><code>destroy_notify</code></em> :</span></p></td>
600
 
<td> a function which gets called to free <em class="parameter"><code>data</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
626
<td> a function which gets called to free <em class="parameter"><code>data</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
601
627
</td>
602
628
</tr>
603
629
</tbody>
607
633
<hr>
608
634
<div class="refsect2" title="g_option_context_set_translation_domain ()">
609
635
<a name="g-option-context-set-translation-domain"></a><h3>g_option_context_set_translation_domain ()</h3>
610
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_set_translation_domain
611
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
612
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain);</pre>
 
636
<pre class="programlisting">void                g_option_context_set_translation_domain
 
637
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
638
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain);</pre>
613
639
<p>
614
640
A convenience function to use <code class="function">gettext()</code> for translating
615
641
user-visible strings.</p>
 
642
<p>
 
643
</p>
616
644
<div class="variablelist"><table border="0">
617
645
<col align="left" valign="top">
618
646
<tbody>
633
661
<hr>
634
662
<div class="refsect2" title="g_option_context_free ()">
635
663
<a name="g-option-context-free"></a><h3>g_option_context_free ()</h3>
636
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_free               (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);</pre>
 
664
<pre class="programlisting">void                g_option_context_free               (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);</pre>
637
665
<p>
638
666
Frees context and all the groups which have been 
639
667
added to it.
641
669
<p>
642
670
Please note that parsed arguments need to be freed separately (see
643
671
<a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="type">GOptionEntry</span></a>).</p>
 
672
<p>
 
673
</p>
644
674
<div class="variablelist"><table border="0">
645
675
<col align="left" valign="top">
646
676
<tbody><tr>
654
684
<hr>
655
685
<div class="refsect2" title="g_option_context_parse ()">
656
686
<a name="g-option-context-parse"></a><h3>g_option_context_parse ()</h3>
657
 
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_option_context_parse              (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
658
 
                                                         <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> *argc,
659
 
                                                         <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ***argv,
660
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
 
687
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_option_context_parse              (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
688
                                                         <a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> *argc,
 
689
                                                         <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> ***argv,
 
690
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
661
691
<p>
662
692
Parses the command line arguments, recognizing options
663
693
which have been added to <em class="parameter"><code>context</code></em>. A side-effect of 
684
714
<a class="link" href="glib-running.html#setlocale" title="Locale">current locale</a> for 
685
715
automatic character set conversion of string and filename
686
716
arguments.</p>
 
717
<p>
 
718
</p>
687
719
<div class="variablelist"><table border="0">
688
720
<col align="left" valign="top">
689
721
<tbody>
709
741
</tr>
710
742
<tr>
711
743
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
712
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the parsing was successful, 
713
 
              <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if an error occurred
 
744
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the parsing was successful, 
 
745
              <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> if an error occurred
714
746
 
715
747
</td>
716
748
</tr>
721
753
<hr>
722
754
<div class="refsect2" title="g_option_context_set_help_enabled ()">
723
755
<a name="g-option-context-set-help-enabled"></a><h3>g_option_context_set_help_enabled ()</h3>
724
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_set_help_enabled   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
725
 
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> help_enabled);</pre>
 
756
<pre class="programlisting">void                g_option_context_set_help_enabled   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
757
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> help_enabled);</pre>
726
758
<p>
727
759
Enables or disables automatic generation of <code class="option">--help</code> 
728
760
output. By default, <a class="link" href="glib-Commandline-option-parser.html#g-option-context-parse" title="g_option_context_parse ()"><code class="function">g_option_context_parse()</code></a> recognizes
730
762
<code class="option">-?</code>, <code class="option">--help-all</code>
731
763
and <code class="option">--help-</code><em class="replaceable"><code>groupname</code></em> and creates
732
764
suitable output to stdout.</p>
 
765
<p>
 
766
</p>
733
767
<div class="variablelist"><table border="0">
734
768
<col align="left" valign="top">
735
769
<tbody>
740
774
</tr>
741
775
<tr>
742
776
<td><p><span class="term"><em class="parameter"><code>help_enabled</code></em> :</span></p></td>
743
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> to enable <code class="option">--help</code>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> to disable it
 
777
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> to enable <code class="option">--help</code>, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> to disable it
744
778
</td>
745
779
</tr>
746
780
</tbody>
750
784
<hr>
751
785
<div class="refsect2" title="g_option_context_get_help_enabled ()">
752
786
<a name="g-option-context-get-help-enabled"></a><h3>g_option_context_get_help_enabled ()</h3>
753
 
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_option_context_get_help_enabled   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);</pre>
 
787
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_option_context_get_help_enabled   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);</pre>
754
788
<p>
755
789
Returns whether automatic <code class="option">--help</code> generation
756
790
is turned on for <em class="parameter"><code>context</code></em>. See <a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-help-enabled" title="g_option_context_set_help_enabled ()"><code class="function">g_option_context_set_help_enabled()</code></a>.</p>
 
791
<p>
 
792
</p>
757
793
<div class="variablelist"><table border="0">
758
794
<col align="left" valign="top">
759
795
<tbody>
764
800
</tr>
765
801
<tr>
766
802
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
767
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if automatic help generation is turned on.
 
803
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if automatic help generation is turned on.
768
804
 
769
805
</td>
770
806
</tr>
775
811
<hr>
776
812
<div class="refsect2" title="g_option_context_set_ignore_unknown_options ()">
777
813
<a name="g-option-context-set-ignore-unknown-options"></a><h3>g_option_context_set_ignore_unknown_options ()</h3>
778
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_set_ignore_unknown_options
779
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
780
 
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> ignore_unknown);</pre>
 
814
<pre class="programlisting">void                g_option_context_set_ignore_unknown_options
 
815
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
816
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> ignore_unknown);</pre>
781
817
<p>
782
818
Sets whether to ignore unknown options or not. If an argument is 
783
819
ignored, it is left in the <em class="parameter"><code>argv</code></em> array after parsing. By default, 
787
823
This setting does not affect non-option arguments (i.e. arguments 
788
824
which don't start with a dash). But note that GOption cannot reliably
789
825
determine whether a non-option belongs to a preceding unknown option.</p>
 
826
<p>
 
827
</p>
790
828
<div class="variablelist"><table border="0">
791
829
<col align="left" valign="top">
792
830
<tbody>
797
835
</tr>
798
836
<tr>
799
837
<td><p><span class="term"><em class="parameter"><code>ignore_unknown</code></em> :</span></p></td>
800
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> to ignore unknown options, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> to produce
 
838
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> to ignore unknown options, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> to produce
801
839
   an error when unknown options are met
802
840
</td>
803
841
</tr>
808
846
<hr>
809
847
<div class="refsect2" title="g_option_context_get_ignore_unknown_options ()">
810
848
<a name="g-option-context-get-ignore-unknown-options"></a><h3>g_option_context_get_ignore_unknown_options ()</h3>
811
 
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            g_option_context_get_ignore_unknown_options
812
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);</pre>
 
849
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            g_option_context_get_ignore_unknown_options
 
850
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);</pre>
813
851
<p>
814
852
Returns whether unknown options are ignored or not. See
815
853
<a class="link" href="glib-Commandline-option-parser.html#g-option-context-set-ignore-unknown-options" title="g_option_context_set_ignore_unknown_options ()"><code class="function">g_option_context_set_ignore_unknown_options()</code></a>.</p>
 
854
<p>
 
855
</p>
816
856
<div class="variablelist"><table border="0">
817
857
<col align="left" valign="top">
818
858
<tbody>
823
863
</tr>
824
864
<tr>
825
865
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
826
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if unknown options are ignored.
 
866
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if unknown options are ignored.
827
867
 
828
868
</td>
829
869
</tr>
834
874
<hr>
835
875
<div class="refsect2" title="g_option_context_get_help ()">
836
876
<a name="g-option-context-get-help"></a><h3>g_option_context_get_help ()</h3>
837
 
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *             g_option_context_get_help           (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
838
 
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> main_help,
839
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);</pre>
 
877
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *             g_option_context_get_help           (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
878
                                                         <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a> main_help,
 
879
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);</pre>
840
880
<p>
841
881
Returns a formatted, translated help text for the given context.
842
882
To obtain the text produced by <code class="option">--help</code>, call
845
885
<code class="literal">g_option_context_get_help (context, FALSE, NULL)</code>.
846
886
To obtain the help text for an option group, call
847
887
<code class="literal">g_option_context_get_help (context, FALSE, group)</code>.</p>
 
888
<p>
 
889
</p>
848
890
<div class="variablelist"><table border="0">
849
891
<col align="left" valign="top">
850
892
<tbody>
855
897
</tr>
856
898
<tr>
857
899
<td><p><span class="term"><em class="parameter"><code>main_help</code></em> :</span></p></td>
858
 
<td> if <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a>, only include the main group 
 
900
<td> if <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a>, only include the main group 
859
901
</td>
860
902
</tr>
861
903
<tr>
862
904
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
863
 
<td> the <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="type">GOptionGroup</span></a> to create help for, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
905
<td> the <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="type">GOptionGroup</span></a> to create help for, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
864
906
</td>
865
907
</tr>
866
908
<tr>
895
937
can be specified in several ways; with a short option:
896
938
<code class="option">-x arg</code>, with a long option: <code class="option">--name arg</code>
897
939
or combined in a single argument: <code class="option">--name=arg</code>.</p>
 
940
<p>
 
941
</p>
898
942
<div class="variablelist"><table border="0">
899
943
<col align="left" valign="top">
900
944
<tbody>
901
945
<tr>
902
 
<td><p><a name="G-OPTION-ARG-NONE:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_NONE</code></span></p></td>
 
946
<td><p><a name="G-OPTION-ARG-NONE--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_NONE</code></span></p></td>
903
947
<td> No extra argument. This is useful for simple flags.
904
948
</td>
905
949
</tr>
906
950
<tr>
907
 
<td><p><a name="G-OPTION-ARG-STRING:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_STRING</code></span></p></td>
 
951
<td><p><a name="G-OPTION-ARG-STRING--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_STRING</code></span></p></td>
908
952
<td> The option takes a string argument.
909
953
</td>
910
954
</tr>
911
955
<tr>
912
 
<td><p><a name="G-OPTION-ARG-INT:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_INT</code></span></p></td>
 
956
<td><p><a name="G-OPTION-ARG-INT--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_INT</code></span></p></td>
913
957
<td> The option takes an integer argument.
914
958
</td>
915
959
</tr>
916
960
<tr>
917
 
<td><p><a name="G-OPTION-ARG-CALLBACK:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_CALLBACK</code></span></p></td>
 
961
<td><p><a name="G-OPTION-ARG-CALLBACK--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_CALLBACK</code></span></p></td>
918
962
<td> The option provides a callback to parse the
919
963
 extra argument.
920
964
</td>
921
965
</tr>
922
966
<tr>
923
 
<td><p><a name="G-OPTION-ARG-FILENAME:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_FILENAME</code></span></p></td>
 
967
<td><p><a name="G-OPTION-ARG-FILENAME--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_FILENAME</code></span></p></td>
924
968
<td> The option takes a filename as argument.
925
969
</td>
926
970
</tr>
927
971
<tr>
928
 
<td><p><a name="G-OPTION-ARG-STRING-ARRAY:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></span></p></td>
 
972
<td><p><a name="G-OPTION-ARG-STRING-ARRAY--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></span></p></td>
929
973
<td> The option takes a string argument, multiple
930
974
 uses of the option are collected into an array of strings.
931
975
</td>
932
976
</tr>
933
977
<tr>
934
 
<td><p><a name="G-OPTION-ARG-FILENAME-ARRAY:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></span></p></td>
 
978
<td><p><a name="G-OPTION-ARG-FILENAME-ARRAY--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></span></p></td>
935
979
<td> The option takes a filename as argument, 
936
980
 multiple uses of the option are collected into an array of strings.
937
981
</td>
938
982
</tr>
939
983
<tr>
940
 
<td><p><a name="G-OPTION-ARG-DOUBLE:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_DOUBLE</code></span></p></td>
 
984
<td><p><a name="G-OPTION-ARG-DOUBLE--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_DOUBLE</code></span></p></td>
941
985
<td> The option takes a double argument. The argument
942
986
 can be formatted either for the user's locale or for the "C" locale. Since 2.12
943
987
</td>
944
988
</tr>
945
989
<tr>
946
 
<td><p><a name="G-OPTION-ARG-INT64:CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_INT64</code></span></p></td>
947
 
<td> The option takes a 64-bit integer. Like <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-INT:CAPS"><code class="literal">G_OPTION_ARG_INT</code></a>
 
990
<td><p><a name="G-OPTION-ARG-INT64--CAPS"></a><span class="term"><code class="literal">G_OPTION_ARG_INT64</code></span></p></td>
 
991
<td> The option takes a 64-bit integer. Like <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-INT--CAPS"><code class="literal">G_OPTION_ARG_INT</code></a>
948
992
 but for larger numbers. The number can be in decimal base, or in hexadecimal
949
993
 (when prefixed with <code class="literal">0x</code>, for example, <code class="literal">0xffffffff</code>).
950
994
 Since 2.12
962
1006
  G_OPTION_FLAG_IN_MAIN         = 1 &lt;&lt; 1,
963
1007
  G_OPTION_FLAG_REVERSE         = 1 &lt;&lt; 2,
964
1008
  G_OPTION_FLAG_NO_ARG          = 1 &lt;&lt; 3,
965
 
  G_OPTION_FLAG_FILENAME = 1 &lt;&lt; 4,
 
1009
  G_OPTION_FLAG_FILENAME        = 1 &lt;&lt; 4,
966
1010
  G_OPTION_FLAG_OPTIONAL_ARG    = 1 &lt;&lt; 5,
967
1011
  G_OPTION_FLAG_NOALIAS         = 1 &lt;&lt; 6
968
1012
} GOptionFlags;
969
1013
</pre>
970
1014
<p>
971
1015
Flags which modify individual options.</p>
 
1016
<p>
 
1017
</p>
972
1018
<div class="variablelist"><table border="0">
973
1019
<col align="left" valign="top">
974
1020
<tbody>
975
1021
<tr>
976
 
<td><p><a name="G-OPTION-FLAG-HIDDEN:CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_HIDDEN</code></span></p></td>
 
1022
<td><p><a name="G-OPTION-FLAG-HIDDEN--CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_HIDDEN</code></span></p></td>
977
1023
<td> The option doesn't appear in <code class="option">--help</code>
978
1024
 output.
979
1025
</td>
980
1026
</tr>
981
1027
<tr>
982
 
<td><p><a name="G-OPTION-FLAG-IN-MAIN:CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_IN_MAIN</code></span></p></td>
 
1028
<td><p><a name="G-OPTION-FLAG-IN-MAIN--CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_IN_MAIN</code></span></p></td>
983
1029
<td> The option appears in the main section of the
984
1030
 <code class="option">--help</code> output, even if it is defined in a group.
985
1031
</td>
986
1032
</tr>
987
1033
<tr>
988
 
<td><p><a name="G-OPTION-FLAG-REVERSE:CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_REVERSE</code></span></p></td>
989
 
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-NONE:CAPS"><code class="literal">G_OPTION_ARG_NONE</code></a> kind, this flag
 
1034
<td><p><a name="G-OPTION-FLAG-REVERSE--CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_REVERSE</code></span></p></td>
 
1035
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-NONE--CAPS"><code class="literal">G_OPTION_ARG_NONE</code></a> kind, this flag
990
1036
 indicates that the sense of the option is reversed.
991
1037
</td>
992
1038
</tr>
993
1039
<tr>
994
 
<td><p><a name="G-OPTION-FLAG-NO-ARG:CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_NO_ARG</code></span></p></td>
995
 
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK:CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a> kind,
 
1040
<td><p><a name="G-OPTION-FLAG-NO-ARG--CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_NO_ARG</code></span></p></td>
 
1041
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK--CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a> kind,
996
1042
 this flag indicates that the callback does not take any argument
997
 
 (like a <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-NONE:CAPS"><code class="literal">G_OPTION_ARG_NONE</code></a> option). Since 2.8
 
1043
 (like a <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-NONE--CAPS"><code class="literal">G_OPTION_ARG_NONE</code></a> option). Since 2.8
998
1044
</td>
999
1045
</tr>
1000
1046
<tr>
1001
 
<td><p><a name="G-OPTION-FLAG-FILENAME:CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_FILENAME</code></span></p></td>
1002
 
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK:CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>
 
1047
<td><p><a name="G-OPTION-FLAG-FILENAME--CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_FILENAME</code></span></p></td>
 
1048
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK--CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>
1003
1049
 kind, this flag indicates that the argument should be passed to the
1004
1050
 callback in the GLib filename encoding rather than UTF-8. Since 2.8
1005
1051
</td>
1006
1052
</tr>
1007
1053
<tr>
1008
 
<td><p><a name="G-OPTION-FLAG-OPTIONAL-ARG:CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_OPTIONAL_ARG</code></span></p></td>
1009
 
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK:CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a> 
 
1054
<td><p><a name="G-OPTION-FLAG-OPTIONAL-ARG--CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_OPTIONAL_ARG</code></span></p></td>
 
1055
<td> For options of the <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK--CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a> 
1010
1056
 kind, this flag indicates that the argument supply is optional. If no argument
1011
1057
 is given then data of <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()"><code class="literal">GOptionParseFunc</code></a> will be set to NULL. Since 2.8
1012
1058
</td>
1013
1059
</tr>
1014
1060
<tr>
1015
 
<td><p><a name="G-OPTION-FLAG-NOALIAS:CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_NOALIAS</code></span></p></td>
 
1061
<td><p><a name="G-OPTION-FLAG-NOALIAS--CAPS"></a><span class="term"><code class="literal">G_OPTION_FLAG_NOALIAS</code></span></p></td>
1016
1062
<td> This flag turns off the automatic conflict resolution
1017
1063
 which prefixes long option names with <code class="literal">groupname-</code> if 
1018
1064
 there is a conflict. This option should only be used in situations where
1026
1072
</div>
1027
1073
<hr>
1028
1074
<div class="refsect2" title="G_OPTION_REMAINING">
1029
 
<a name="G-OPTION-REMAINING:CAPS"></a><h3>G_OPTION_REMAINING</h3>
1030
 
<pre class="programlisting">#define             G_OPTION_REMAINING</pre>
 
1075
<a name="G-OPTION-REMAINING--CAPS"></a><h3>G_OPTION_REMAINING</h3>
 
1076
<pre class="programlisting">#define G_OPTION_REMAINING ""
 
1077
</pre>
1031
1078
<p>
1032
1079
If a long option in the main group has this name, it is not treated as a 
1033
1080
regular option. Instead it collects all non-option arguments which would
1034
1081
otherwise be left in <code class="literal">argv</code>. The option must be of type
1035
 
<a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK:CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>, <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING-ARRAY:CAPS"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></a>
1036
 
or <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME-ARRAY:CAPS"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></a>.
 
1082
<a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK--CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>, <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING-ARRAY--CAPS"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></a>
 
1083
or <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME-ARRAY--CAPS"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></a>.
1037
1084
</p>
1038
1085
<p>
1039
 
Using <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-REMAINING:CAPS" title="G_OPTION_REMAINING"><span class="type">G_OPTION_REMAINING</span></a> instead of simply scanning <code class="literal">argv</code>
 
1086
Using <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-REMAINING--CAPS" title="G_OPTION_REMAINING"><span class="type">G_OPTION_REMAINING</span></a> instead of simply scanning <code class="literal">argv</code>
1040
1087
for leftover arguments has the advantage that GOption takes care of 
1041
1088
necessary encoding conversions for strings or filenames.</p>
 
1089
<p>
 
1090
</p>
1042
1091
<p class="since">Since 2.6</p>
1043
1092
</div>
1044
1093
<hr>
1060
1109
A <span class="structname">GOptionEntry</span> defines a single option.
1061
1110
To have an effect, they must be added to a <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="type">GOptionGroup</span></a> with
1062
1111
<a class="link" href="glib-Commandline-option-parser.html#g-option-context-add-main-entries" title="g_option_context_add_main_entries ()"><code class="function">g_option_context_add_main_entries()</code></a> or <a class="link" href="glib-Commandline-option-parser.html#g-option-group-add-entries" title="g_option_group_add_entries ()"><code class="function">g_option_group_add_entries()</code></a>.</p>
 
1112
<p>
 
1113
</p>
1063
1114
<div class="variablelist"><table border="0">
1064
1115
<col align="left" valign="top">
1065
1116
<tbody>
1066
1117
<tr>
1067
 
<td><p><span class="term">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GOptionEntry.long-name"></a>long_name</code></em>;</span></p></td>
 
1118
<td><p><span class="term">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *<em class="structfield"><code>long_name</code></em>;</span></p></td>
1068
1119
<td> The long name of an option can be used to specify it
1069
1120
 in a commandline as --<em class="replaceable"><code>long_name</code></em>. Every
1070
1121
 option must have a long name. To resolve conflicts if multiple
1074
1125
</td>
1075
1126
</tr>
1076
1127
<tr>
1077
 
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> <em class="structfield"><code><a name="GOptionEntry.short-name"></a>short_name</code></em>;</span></p></td>
 
1128
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> <em class="structfield"><code>short_name</code></em>;</span></p></td>
1078
1129
<td> If an option has a short name, it can be specified
1079
1130
 -<em class="replaceable"><code>short_name</code></em> in a commandline. <em class="parameter"><code>short_name</code></em> must be 
1080
1131
 a printable ASCII character different from '-', or zero if the option has no
1082
1133
</td>
1083
1134
</tr>
1084
1135
<tr>
1085
 
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> <em class="structfield"><code><a name="GOptionEntry.flags"></a>flags</code></em>;</span></p></td>
 
1136
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gint" title="gint">gint</a> <em class="structfield"><code>flags</code></em>;</span></p></td>
1086
1137
<td> Flags from <a class="link" href="glib-Commandline-option-parser.html#GOptionFlags" title="enum GOptionFlags"><span class="type">GOptionFlags</span></a>.
1087
1138
</td>
1088
1139
</tr>
1089
1140
<tr>
1090
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#GOptionArg" title="enum GOptionArg"><span class="type">GOptionArg</span></a> <em class="structfield"><code><a name="GOptionEntry.arg"></a>arg</code></em>;</span></p></td>
 
1141
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#GOptionArg" title="enum GOptionArg">GOptionArg</a> <em class="structfield"><code>arg</code></em>;</span></p></td>
1091
1142
<td> The type of the option, as a <a class="link" href="glib-Commandline-option-parser.html#GOptionArg" title="enum GOptionArg"><span class="type">GOptionArg</span></a>.
1092
1143
</td>
1093
1144
</tr>
1094
1145
<tr>
1095
 
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="type">gpointer</span></a> <em class="structfield"><code><a name="GOptionEntry.arg-data"></a>arg_data</code></em>;</span></p></td>
1096
 
<td> If the <em class="parameter"><code>arg</code></em> type is <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK:CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>, then <em class="parameter"><code>arg_data</code></em> must 
 
1146
<td><p><span class="term"><a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> <em class="structfield"><code>arg_data</code></em>;</span></p></td>
 
1147
<td> If the <em class="parameter"><code>arg</code></em> type is <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK--CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a>, then <em class="parameter"><code>arg_data</code></em> must 
1097
1148
 point to a <a class="link" href="glib-Commandline-option-parser.html#GOptionArgFunc" title="GOptionArgFunc ()"><span class="type">GOptionArgFunc</span></a> callback function, which will be called to handle 
1098
1149
 the extra argument. Otherwise, <em class="parameter"><code>arg_data</code></em> is a pointer to a location to store 
1099
1150
 the value, the required type of the location depends on the <em class="parameter"><code>arg</code></em> type:
1101
1152
<col align="left" valign="top">
1102
1153
<tbody>
1103
1154
<tr>
1104
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-NONE:CAPS"><code class="literal">G_OPTION_ARG_NONE</code></a></span></p></td>
 
1155
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-NONE--CAPS"><code class="literal">G_OPTION_ARG_NONE</code></a></span></p></td>
1105
1156
<td><p><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><code class="literal">gboolean</code></a></p></td>
1106
1157
</tr>
1107
1158
<tr>
1108
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING:CAPS"><code class="literal">G_OPTION_ARG_STRING</code></a></span></p></td>
 
1159
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING--CAPS"><code class="literal">G_OPTION_ARG_STRING</code></a></span></p></td>
1109
1160
<td><p><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><code class="literal">gchar</code></a>*</p></td>
1110
1161
</tr>
1111
1162
<tr>
1112
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-INT:CAPS"><code class="literal">G_OPTION_ARG_INT</code></a></span></p></td>
 
1163
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-INT--CAPS"><code class="literal">G_OPTION_ARG_INT</code></a></span></p></td>
1113
1164
<td><p><a class="link" href="glib-Basic-Types.html#gint" title="gint"><code class="literal">gint</code></a></p></td>
1114
1165
</tr>
1115
1166
<tr>
1116
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME:CAPS"><code class="literal">G_OPTION_ARG_FILENAME</code></a></span></p></td>
 
1167
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME--CAPS"><code class="literal">G_OPTION_ARG_FILENAME</code></a></span></p></td>
1117
1168
<td><p><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><code class="literal">gchar</code></a>*</p></td>
1118
1169
</tr>
1119
1170
<tr>
1120
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING-ARRAY:CAPS"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></a></span></p></td>
1121
 
<td><p><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><code class="literal">gchar</code></a>**</p></td>
1122
 
</tr>
1123
 
<tr>
1124
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME-ARRAY:CAPS"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></a></span></p></td>
1125
 
<td><p><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><code class="literal">gchar</code></a>**</p></td>
1126
 
</tr>
1127
 
<tr>
1128
 
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-DOUBLE:CAPS"><code class="literal">G_OPTION_ARG_DOUBLE</code></a></span></p></td>
 
1171
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING-ARRAY--CAPS"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></a></span></p></td>
 
1172
<td><p><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><code class="literal">gchar</code></a>**</p></td>
 
1173
</tr>
 
1174
<tr>
 
1175
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME-ARRAY--CAPS"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></a></span></p></td>
 
1176
<td><p><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><code class="literal">gchar</code></a>**</p></td>
 
1177
</tr>
 
1178
<tr>
 
1179
<td><p><span class="term"><a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-DOUBLE--CAPS"><code class="literal">G_OPTION_ARG_DOUBLE</code></a></span></p></td>
1129
1180
<td><p><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><code class="literal">gdouble</code></a></p></td>
1130
1181
</tr>
1131
1182
</tbody>
1132
1183
</table></div>
1133
 
 If <em class="parameter"><code>arg</code></em> type is <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING:CAPS"><code class="literal">G_OPTION_ARG_STRING</code></a> or <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME:CAPS"><code class="literal">G_OPTION_ARG_FILENAME</code></a> the location
 
1184
 If <em class="parameter"><code>arg</code></em> type is <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING--CAPS"><code class="literal">G_OPTION_ARG_STRING</code></a> or <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME--CAPS"><code class="literal">G_OPTION_ARG_FILENAME</code></a> the location
1134
1185
 will contain a newly allocated string if the option was given. That string
1135
1186
 needs to be freed by the callee using <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>. Likewise if <em class="parameter"><code>arg</code></em> type is
1136
 
 <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING-ARRAY:CAPS"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></a> or <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME-ARRAY:CAPS"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></a>, the data should
 
1187
 <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-STRING-ARRAY--CAPS"><code class="literal">G_OPTION_ARG_STRING_ARRAY</code></a> or <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-FILENAME-ARRAY--CAPS"><code class="literal">G_OPTION_ARG_FILENAME_ARRAY</code></a>, the data should
1137
1188
 be freed using <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>.
1138
1189
</td>
1139
1190
</tr>
1140
1191
<tr>
1141
 
<td><p><span class="term">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GOptionEntry.description"></a>description</code></em>;</span></p></td>
 
1192
<td><p><span class="term">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *<em class="structfield"><code>description</code></em>;</span></p></td>
1142
1193
<td> the description for the option in <code class="option">--help</code>
1143
1194
 output. The <em class="parameter"><code>description</code></em> is translated using the <em class="parameter"><code>translate_func</code></em> of the
1144
1195
 group, see <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-translation-domain" title="g_option_group_set_translation_domain ()"><code class="function">g_option_group_set_translation_domain()</code></a>.
1145
1196
</td>
1146
1197
</tr>
1147
1198
<tr>
1148
 
<td><p><span class="term">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *<em class="structfield"><code><a name="GOptionEntry.arg-description"></a>arg_description</code></em>;</span></p></td>
 
1199
<td><p><span class="term">const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *<em class="structfield"><code>arg_description</code></em>;</span></p></td>
1149
1200
<td> The placeholder to use for the extra argument parsed
1150
1201
 by the option in <code class="option">--help</code>
1151
1202
 output. The <em class="parameter"><code>arg_description</code></em> is translated using the <em class="parameter"><code>translate_func</code></em> of the
1158
1209
<hr>
1159
1210
<div class="refsect2" title="g_option_context_add_main_entries ()">
1160
1211
<a name="g-option-context-add-main-entries"></a><h3>g_option_context_add_main_entries ()</h3>
1161
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_add_main_entries   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
1162
 
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="returnvalue">GOptionEntry</span></a> *entries,
1163
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *translation_domain);</pre>
 
1212
<pre class="programlisting">void                g_option_context_add_main_entries   (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
1213
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry">GOptionEntry</a> *entries,
 
1214
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *translation_domain);</pre>
1164
1215
<p>
1165
1216
A convenience function which creates a main group if it doesn't 
1166
1217
exist, adds the <em class="parameter"><code>entries</code></em> to it and sets the translation domain.</p>
 
1218
<p>
 
1219
</p>
1167
1220
<div class="variablelist"><table border="0">
1168
1221
<col align="left" valign="top">
1169
1222
<tbody>
1174
1227
</tr>
1175
1228
<tr>
1176
1229
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
1177
 
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="type">GOptionEntry</span></a>s
 
1230
<td> a <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="type">GOptionEntry</span></a>s
1178
1231
</td>
1179
1232
</tr>
1180
1233
<tr>
1181
1234
<td><p><span class="term"><em class="parameter"><code>translation_domain</code></em> :</span></p></td>
1182
1235
<td> a translation domain to use for translating
1183
1236
   the <code class="option">--help</code> output for the options in <em class="parameter"><code>entries</code></em>
1184
 
   with <code class="function">gettext()</code>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
1237
   with <code class="function">gettext()</code>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
1185
1238
</td>
1186
1239
</tr>
1187
1240
</tbody>
1201
1254
need to parse commandline options are expected to provide a function for
1202
1255
getting a <span class="structname">GOptionGroup</span> holding their options, which
1203
1256
the application can then add to its <a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="type">GOptionContext</span></a>.</p>
 
1257
<p>
 
1258
</p>
1204
1259
</div>
1205
1260
<hr>
1206
1261
<div class="refsect2" title="g_option_context_add_group ()">
1207
1262
<a name="g-option-context-add-group"></a><h3>g_option_context_add_group ()</h3>
1208
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_add_group          (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
1209
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);</pre>
 
1263
<pre class="programlisting">void                g_option_context_add_group          (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
1264
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);</pre>
1210
1265
<p>
1211
1266
Adds a <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="type">GOptionGroup</span></a> to the <em class="parameter"><code>context</code></em>, so that parsing with <em class="parameter"><code>context</code></em>
1212
1267
will recognize the options in the group. Note that the group will
1213
1268
be freed together with the context when <a class="link" href="glib-Commandline-option-parser.html#g-option-context-free" title="g_option_context_free ()"><code class="function">g_option_context_free()</code></a> is
1214
1269
called, so you must not free the group yourself after adding it
1215
1270
to a context.</p>
 
1271
<p>
 
1272
</p>
1216
1273
<div class="variablelist"><table border="0">
1217
1274
<col align="left" valign="top">
1218
1275
<tbody>
1233
1290
<hr>
1234
1291
<div class="refsect2" title="g_option_context_set_main_group ()">
1235
1292
<a name="g-option-context-set-main-group"></a><h3>g_option_context_set_main_group ()</h3>
1236
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_context_set_main_group     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
1237
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);</pre>
 
1293
<pre class="programlisting">void                g_option_context_set_main_group     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
1294
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);</pre>
1238
1295
<p>
1239
1296
Sets a <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="type">GOptionGroup</span></a> as main group of the <em class="parameter"><code>context</code></em>. 
1240
1297
This has the same effect as calling <a class="link" href="glib-Commandline-option-parser.html#g-option-context-add-group" title="g_option_context_add_group ()"><code class="function">g_option_context_add_group()</code></a>, 
1241
1298
the only difference is that the options in the main group are 
1242
1299
treated differently when generating <code class="option">--help</code> output.</p>
 
1300
<p>
 
1301
</p>
1243
1302
<div class="variablelist"><table border="0">
1244
1303
<col align="left" valign="top">
1245
1304
<tbody>
1260
1319
<hr>
1261
1320
<div class="refsect2" title="g_option_context_get_main_group ()">
1262
1321
<a name="g-option-context-get-main-group"></a><h3>g_option_context_get_main_group ()</h3>
1263
 
<pre class="programlisting"><a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *      g_option_context_get_main_group     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context);</pre>
 
1322
<pre class="programlisting"><a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *      g_option_context_get_main_group     (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context);</pre>
1264
1323
<p>
1265
1324
Returns a pointer to the main group of <em class="parameter"><code>context</code></em>.</p>
 
1325
<p>
 
1326
</p>
1266
1327
<div class="variablelist"><table border="0">
1267
1328
<col align="left" valign="top">
1268
1329
<tbody>
1273
1334
</tr>
1274
1335
<tr>
1275
1336
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1276
 
<td> the main group of <em class="parameter"><code>context</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if <em class="parameter"><code>context</code></em> doesn't
 
1337
<td> the main group of <em class="parameter"><code>context</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> if <em class="parameter"><code>context</code></em> doesn't
1277
1338
 have a main group. Note that group belongs to <em class="parameter"><code>context</code></em> and should
1278
1339
 not be modified or freed.
1279
1340
 
1286
1347
<hr>
1287
1348
<div class="refsect2" title="g_option_group_new ()">
1288
1349
<a name="g-option-group-new"></a><h3>g_option_group_new ()</h3>
1289
 
<pre class="programlisting"><a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *      g_option_group_new                  (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
1290
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *description,
1291
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *help_description,
1292
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> user_data,
1293
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="returnvalue">GDestroyNotify</span></a> destroy);</pre>
 
1350
<pre class="programlisting"><a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *      g_option_group_new                  (const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *name,
 
1351
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *description,
 
1352
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *help_description,
 
1353
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> user_data,
 
1354
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> destroy);</pre>
1294
1355
<p>
1295
1356
Creates a new <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="type">GOptionGroup</span></a>.</p>
 
1357
<p>
 
1358
</p>
1296
1359
<div class="variablelist"><table border="0">
1297
1360
<col align="left" valign="top">
1298
1361
<tbody>
1319
1382
<tr>
1320
1383
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
1321
1384
<td> user data that will be passed to the pre- and post-parse hooks,
1322
 
  the error hook and to callbacks of <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK:CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a> options, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
1385
  the error hook and to callbacks of <a class="link" href="glib-Commandline-option-parser.html#G-OPTION-ARG-CALLBACK--CAPS"><code class="literal">G_OPTION_ARG_CALLBACK</code></a> options, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
1323
1386
</td>
1324
1387
</tr>
1325
1388
<tr>
1326
1389
<td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td>
1327
 
<td> a function that will be called to free <em class="parameter"><code>user_data</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
1390
<td> a function that will be called to free <em class="parameter"><code>user_data</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
1328
1391
</td>
1329
1392
</tr>
1330
1393
<tr>
1341
1404
<hr>
1342
1405
<div class="refsect2" title="g_option_group_free ()">
1343
1406
<a name="g-option-group-free"></a><h3>g_option_group_free ()</h3>
1344
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_group_free                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group);</pre>
 
1407
<pre class="programlisting">void                g_option_group_free                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group);</pre>
1345
1408
<p>
1346
1409
Frees a <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="type">GOptionGroup</span></a>. Note that you must <span class="emphasis"><em>not</em></span>
1347
1410
free groups which have been added to a <a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="type">GOptionContext</span></a>.</p>
 
1411
<p>
 
1412
</p>
1348
1413
<div class="variablelist"><table border="0">
1349
1414
<col align="left" valign="top">
1350
1415
<tbody><tr>
1358
1423
<hr>
1359
1424
<div class="refsect2" title="g_option_group_add_entries ()">
1360
1425
<a name="g-option-group-add-entries"></a><h3>g_option_group_add_entries ()</h3>
1361
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_group_add_entries          (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
1362
 
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="returnvalue">GOptionEntry</span></a> *entries);</pre>
 
1426
<pre class="programlisting">void                g_option_group_add_entries          (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
1427
                                                         const <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry">GOptionEntry</a> *entries);</pre>
1363
1428
<p>
1364
1429
Adds the options specified in <em class="parameter"><code>entries</code></em> to <em class="parameter"><code>group</code></em>.</p>
 
1430
<p>
 
1431
</p>
1365
1432
<div class="variablelist"><table border="0">
1366
1433
<col align="left" valign="top">
1367
1434
<tbody>
1372
1439
</tr>
1373
1440
<tr>
1374
1441
<td><p><span class="term"><em class="parameter"><code>entries</code></em> :</span></p></td>
1375
 
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="type">GOptionEntry</span></a>s
 
1442
<td> a <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of <a class="link" href="glib-Commandline-option-parser.html#GOptionEntry" title="GOptionEntry"><span class="type">GOptionEntry</span></a>s
1376
1443
</td>
1377
1444
</tr>
1378
1445
</tbody>
1382
1449
<hr>
1383
1450
<div class="refsect2" title="GOptionParseFunc ()">
1384
1451
<a name="GOptionParseFunc"></a><h3>GOptionParseFunc ()</h3>
1385
 
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a>            (*GOptionParseFunc)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
1386
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
1387
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
1388
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
 
1452
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean">gboolean</a>            (*GOptionParseFunc)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
1453
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
1454
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
1455
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
1389
1456
<p>
1390
1457
The type of function that can be called before and after parsing.</p>
 
1458
<p>
 
1459
</p>
1391
1460
<div class="variablelist"><table border="0">
1392
1461
<col align="left" valign="top">
1393
1462
<tbody>
1414
1483
</tr>
1415
1484
<tr>
1416
1485
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1417
 
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the function completed successfully, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if an error 
 
1486
<td> <a class="link" href="glib-Standard-Macros.html#TRUE--CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the function completed successfully, <a class="link" href="glib-Standard-Macros.html#FALSE--CAPS" title="FALSE"><code class="literal">FALSE</code></a> if an error 
1418
1487
 occurred, in which case <em class="parameter"><code>error</code></em> should be set with <a class="link" href="glib-Error-Reporting.html#g-set-error" title="g_set_error ()"><code class="function">g_set_error()</code></a>
1419
1488
</td>
1420
1489
</tr>
1424
1493
<hr>
1425
1494
<div class="refsect2" title="g_option_group_set_parse_hooks ()">
1426
1495
<a name="g-option-group-set-parse-hooks"></a><h3>g_option_group_set_parse_hooks ()</h3>
1427
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_group_set_parse_hooks      (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
1428
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()"><span class="returnvalue">GOptionParseFunc</span></a> pre_parse_func,
1429
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()"><span class="returnvalue">GOptionParseFunc</span></a> post_parse_func);</pre>
 
1496
<pre class="programlisting">void                g_option_group_set_parse_hooks      (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
1497
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()">GOptionParseFunc</a> pre_parse_func,
 
1498
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionParseFunc" title="GOptionParseFunc ()">GOptionParseFunc</a> post_parse_func);</pre>
1430
1499
<p>
1431
1500
Associates two functions with <em class="parameter"><code>group</code></em> which will be called 
1432
1501
from <a class="link" href="glib-Commandline-option-parser.html#g-option-context-parse" title="g_option_context_parse ()"><code class="function">g_option_context_parse()</code></a> before the first option is parsed
1436
1505
Note that the user data to be passed to <em class="parameter"><code>pre_parse_func</code></em> and
1437
1506
<em class="parameter"><code>post_parse_func</code></em> can be specified when constructing the group
1438
1507
with <a class="link" href="glib-Commandline-option-parser.html#g-option-group-new" title="g_option_group_new ()"><code class="function">g_option_group_new()</code></a>.</p>
 
1508
<p>
 
1509
</p>
1439
1510
<div class="variablelist"><table border="0">
1440
1511
<col align="left" valign="top">
1441
1512
<tbody>
1446
1517
</tr>
1447
1518
<tr>
1448
1519
<td><p><span class="term"><em class="parameter"><code>pre_parse_func</code></em> :</span></p></td>
1449
 
<td> a function to call before parsing, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
1520
<td> a function to call before parsing, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
1450
1521
</td>
1451
1522
</tr>
1452
1523
<tr>
1453
1524
<td><p><span class="term"><em class="parameter"><code>post_parse_func</code></em> :</span></p></td>
1454
 
<td> a function to call after parsing, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
1525
<td> a function to call after parsing, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
1455
1526
</td>
1456
1527
</tr>
1457
1528
</tbody>
1461
1532
<hr>
1462
1533
<div class="refsect2" title="GOptionErrorFunc ()">
1463
1534
<a name="GOptionErrorFunc"></a><h3>GOptionErrorFunc ()</h3>
1464
 
<pre class="programlisting"><span class="returnvalue">void</span>                (*GOptionErrorFunc)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext"><span class="returnvalue">GOptionContext</span></a> *context,
1465
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
1466
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
1467
 
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
 
1535
<pre class="programlisting">void                (*GOptionErrorFunc)                 (<a class="link" href="glib-Commandline-option-parser.html#GOptionContext" title="GOptionContext">GOptionContext</a> *context,
 
1536
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
1537
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
1538
                                                         <a class="link" href="glib-Error-Reporting.html#GError" title="GError">GError</a> **error);</pre>
1468
1539
<p>
1469
1540
The type of function to be used as callback when a parse error occurs.</p>
 
1541
<p>
 
1542
</p>
1470
1543
<div class="variablelist"><table border="0">
1471
1544
<col align="left" valign="top">
1472
1545
<tbody>
1497
1570
<hr>
1498
1571
<div class="refsect2" title="g_option_group_set_error_hook ()">
1499
1572
<a name="g-option-group-set-error-hook"></a><h3>g_option_group_set_error_hook ()</h3>
1500
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_group_set_error_hook       (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
1501
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionErrorFunc" title="GOptionErrorFunc ()"><span class="returnvalue">GOptionErrorFunc</span></a> error_func);</pre>
 
1573
<pre class="programlisting">void                g_option_group_set_error_hook       (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
1574
                                                         <a class="link" href="glib-Commandline-option-parser.html#GOptionErrorFunc" title="GOptionErrorFunc ()">GOptionErrorFunc</a> error_func);</pre>
1502
1575
<p>
1503
1576
Associates a function with <em class="parameter"><code>group</code></em> which will be called 
1504
1577
from <a class="link" href="glib-Commandline-option-parser.html#g-option-context-parse" title="g_option_context_parse ()"><code class="function">g_option_context_parse()</code></a> when an error occurs.
1506
1579
<p>
1507
1580
Note that the user data to be passed to <em class="parameter"><code>error_func</code></em> can be
1508
1581
specified when constructing the group with <a class="link" href="glib-Commandline-option-parser.html#g-option-group-new" title="g_option_group_new ()"><code class="function">g_option_group_new()</code></a>.</p>
 
1582
<p>
 
1583
</p>
1509
1584
<div class="variablelist"><table border="0">
1510
1585
<col align="left" valign="top">
1511
1586
<tbody>
1526
1601
<hr>
1527
1602
<div class="refsect2" title="g_option_group_set_translate_func ()">
1528
1603
<a name="g-option-group-set-translate-func"></a><h3>g_option_group_set_translate_func ()</h3>
1529
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_group_set_translate_func   (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
1530
 
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="returnvalue">GTranslateFunc</span></a> func,
1531
 
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer"><span class="returnvalue">gpointer</span></a> data,
1532
 
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()"><span class="returnvalue">GDestroyNotify</span></a> destroy_notify);</pre>
 
1604
<pre class="programlisting">void                g_option_group_set_translate_func   (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
1605
                                                         <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()">GTranslateFunc</a> func,
 
1606
                                                         <a class="link" href="glib-Basic-Types.html#gpointer" title="gpointer">gpointer</a> data,
 
1607
                                                         <a class="link" href="glib-Datasets.html#GDestroyNotify" title="GDestroyNotify ()">GDestroyNotify</a> destroy_notify);</pre>
1533
1608
<p>
1534
1609
Sets the function which is used to translate user-visible
1535
1610
strings, for <code class="option">--help</code> output. Different
1536
1611
groups can use different <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="type">GTranslateFunc</span></a>s. If <em class="parameter"><code>func</code></em>
1537
 
is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, strings are not translated.
 
1612
is <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>, strings are not translated.
1538
1613
</p>
1539
1614
<p>
1540
1615
If you are using <code class="function">gettext()</code>, you only need to set the translation
1541
1616
domain, see <a class="link" href="glib-Commandline-option-parser.html#g-option-group-set-translation-domain" title="g_option_group_set_translation_domain ()"><code class="function">g_option_group_set_translation_domain()</code></a>.</p>
 
1617
<p>
 
1618
</p>
1542
1619
<div class="variablelist"><table border="0">
1543
1620
<col align="left" valign="top">
1544
1621
<tbody>
1549
1626
</tr>
1550
1627
<tr>
1551
1628
<td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td>
1552
 
<td> the <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="type">GTranslateFunc</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> 
 
1629
<td> the <a class="link" href="glib-Commandline-option-parser.html#GTranslateFunc" title="GTranslateFunc ()"><span class="type">GTranslateFunc</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a> 
1553
1630
</td>
1554
1631
</tr>
1555
1632
<tr>
1556
1633
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
1557
 
<td> user data to pass to <em class="parameter"><code>func</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
1634
<td> user data to pass to <em class="parameter"><code>func</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
1558
1635
</td>
1559
1636
</tr>
1560
1637
<tr>
1561
1638
<td><p><span class="term"><em class="parameter"><code>destroy_notify</code></em> :</span></p></td>
1562
 
<td> a function which gets called to free <em class="parameter"><code>data</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
 
1639
<td> a function which gets called to free <em class="parameter"><code>data</code></em>, or <a class="link" href="glib-Standard-Macros.html#NULL--CAPS" title="NULL"><code class="literal">NULL</code></a>
1563
1640
</td>
1564
1641
</tr>
1565
1642
</tbody>
1569
1646
<hr>
1570
1647
<div class="refsect2" title="g_option_group_set_translation_domain ()">
1571
1648
<a name="g-option-group-set-translation-domain"></a><h3>g_option_group_set_translation_domain ()</h3>
1572
 
<pre class="programlisting"><span class="returnvalue">void</span>                g_option_group_set_translation_domain
1573
 
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup"><span class="returnvalue">GOptionGroup</span></a> *group,
1574
 
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *domain);</pre>
 
1649
<pre class="programlisting">void                g_option_group_set_translation_domain
 
1650
                                                        (<a class="link" href="glib-Commandline-option-parser.html#GOptionGroup" title="GOptionGroup">GOptionGroup</a> *group,
 
1651
                                                         const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar">gchar</a> *domain);</pre>
1575
1652
<p>
1576
1653
A convenience function to use <code class="function">gettext()</code> for translating
1577
1654
user-visible strings.</p>
 
1655
<p>
 
1656
</p>
1578
1657
<div class="variablelist"><table border="0">
1579
1658
<col align="left" valign="top">
1580
1659
<tbody>
1596
1675
</div>
1597
1676
<div class="footer">
1598
1677
<hr>
1599
 
          Generated by GTK-Doc V1.13</div>
 
1678
          Generated by GTK-Doc V1.11</div>
1600
1679
</body>
1601
 
</html>
 
 
b'\\ No newline at end of file'
 
1680
</html>