Creates a new #GOptionGroup.
the name for the option group, this is used to provide help for the options in this group with --help-``name
a description for this group to be shown in --help
. This string is translated using the translation domain or translation function of the group
a description for the --help-``name
option. This string is translated using the translation domain or translation function of the group
user data that will be passed to the pre- and post-parse hooks, the error hook and to callbacks of %G_OPTION_ARG_CALLBACK options, or %NULL
a function that will be called to free user_data,
or %NULL
Adds the options specified in entries
to group
.
a %NULL-terminated array of #GOptionEntrys
Frees a #GOptionGroup. Note that you must not free groups which have been added to a #GOptionContext.
Increments the reference count of group
by one.
Sets the function which is used to translate user-visible strings,
for --help
output. Different groups can use different
#GTranslateFuncs. If func
is %NULL, strings are not translated.
If you are using gettext(), you only need to set the translation domain, see g_option_group_set_translation_domain().
the #GTranslateFunc, or %NULL
A convenience function to use gettext() for translating user-visible strings.
the domain to use
Decrements the reference count of group
by one.
If the reference count drops to 0, the group
will be freed.
and all memory allocated by the group
is released.
Creates a new #GOptionGroup.
the name for the option group, this is used to provide help for the options in this group with --help-``name
a description for this group to be shown in --help
. This string is translated using the translation domain or translation function of the group
a description for the --help-``name
option. This string is translated using the translation domain or translation function of the group
user data that will be passed to the pre- and post-parse hooks, the error hook and to callbacks of %G_OPTION_ARG_CALLBACK options, or %NULL
a function that will be called to free user_data,
or %NULL
A
GOptionGroup
struct defines the options in a single group. The struct has only private fields and should not be directly accessed.All options in a group share the same translation function. Libraries which need to parse commandline options are expected to provide a function for getting a
GOptionGroup
holding their options, which the application can then add to its #GOptionContext.