diff options
Diffstat (limited to 'glib/goption.h')
-rw-r--r-- | glib/goption.h | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/glib/goption.h b/glib/goption.h index 3d525a548..739311f6e 100644 --- a/glib/goption.h +++ b/glib/goption.h @@ -60,7 +60,8 @@ typedef struct _GOptionEntry GOptionEntry; * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the * `--help` output, even if it is defined in a group. * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this - * flag indicates that the sense of the option is reversed. + * flag indicates that the sense of the option is reversed. i.e. %FALSE will + * be stored into the argument rather than %TRUE. * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, * this flag indicates that the callback does not take any argument * (like a %G_OPTION_ARG_NONE option). Since 2.8 @@ -94,7 +95,7 @@ typedef enum /** * GOptionArg: - * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags. + * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags or booleans. * @G_OPTION_ARG_STRING: The option takes a UTF-8 string argument. * @G_OPTION_ARG_INT: The option takes an integer argument. * @G_OPTION_ARG_CALLBACK: The option provides a callback (of type @@ -137,8 +138,8 @@ typedef enum * single dash followed by a single letter (for a short name) or two dashes * followed by a long option name. * @value: The value to be parsed. - * @user_data: User data added to the #GOptionGroup containing the option when - * it was created with g_option_group_new() + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() * @error: A return location for errors. The error code %G_OPTION_ERROR_FAILED * is intended to be used for errors in #GOptionArgFunc callbacks. * @@ -150,15 +151,15 @@ typedef enum */ typedef gboolean (*GOptionArgFunc) (const gchar *option_name, const gchar *value, - gpointer user_data, + gpointer data, GError **error); /** * GOptionParseFunc: * @context: The active #GOptionContext * @group: The group to which the function belongs - * @user_data: User data added to the #GOptionGroup containing the option when - * it was created with g_option_group_new() + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() * @error: A return location for error details * * The type of function that can be called before and after parsing. @@ -168,22 +169,22 @@ typedef gboolean (*GOptionArgFunc) (const gchar *option_name, */ typedef gboolean (*GOptionParseFunc) (GOptionContext *context, GOptionGroup *group, - gpointer user_data, + gpointer data, GError **error); /** * GOptionErrorFunc: * @context: The active #GOptionContext * @group: The group to which the function belongs - * @user_data: User data added to the #GOptionGroup containing the option when - * it was created with g_option_group_new() + * @data: User data added to the #GOptionGroup containing the option when it + * was created with g_option_group_new() * @error: The #GError containing details about the parse error * * The type of function to be used as callback when a parse error occurs. */ typedef void (*GOptionErrorFunc) (GOptionContext *context, GOptionGroup *group, - gpointer user_data, + gpointer data, GError **error); /** |