G_BEGIN_DECLS
-/* Should go into gtypes.h */
-typedef const gchar * (*GTranslateFunc) (const gchar *str,
- gpointer data);
-
typedef struct _GOptionContext GOptionContext;
typedef struct _GOptionGroup GOptionGroup;
typedef struct _GOptionEntry GOptionEntry;
{
G_OPTION_FLAG_HIDDEN = 1 << 0,
G_OPTION_FLAG_IN_MAIN = 1 << 1,
+ G_OPTION_FLAG_REVERSE = 1 << 2,
+ G_OPTION_FLAG_NO_ARG = 1 << 3,
+ G_OPTION_FLAG_FILENAME = 1 << 4
} GOptionFlags;
typedef enum
G_OPTION_ARG_CALLBACK,
G_OPTION_ARG_FILENAME,
G_OPTION_ARG_STRING_ARRAY,
- G_OPTION_ARG_FILENAME_ARRAY,
+ G_OPTION_ARG_FILENAME_ARRAY
} GOptionArg;
typedef gboolean (*GOptionArgFunc) (const gchar *option_name,
gpointer data,
GError **error);
-#define G_OPTION_ERROR (g_option_context_error_quark ())
+#define G_OPTION_ERROR (g_option_error_quark ())
typedef enum
{
G_OPTION_ERROR_FAILED
} GOptionError;
-GQuark g_option_context_error_quark (void) G_GNUC_CONST;
+GQuark g_option_error_quark (void);
struct _GOptionEntry
{
- const char *long_name;
- char short_name;
- int flags;
+ const gchar *long_name;
+ gchar short_name;
+ gint flags;
- GOptionArg arg;
- gpointer arg_data;
+ GOptionArg arg;
+ gpointer arg_data;
- const char *description;
- const char *arg_description;
+ const gchar *description;
+ const gchar *arg_description;
};
+#define G_OPTION_REMAINING ""
+
GOptionContext *g_option_context_new (const gchar *parameter_string);
void g_option_context_free (GOptionContext *context);
void g_option_context_set_help_enabled (GOptionContext *context,
GOptionGroup *g_option_group_new (const gchar *name,
const gchar *description,
- const char *help_description,
+ const gchar *help_description,
gpointer user_data,
GDestroyNotify destroy);
void g_option_group_set_parse_hooks (GOptionGroup *group,
const gchar *domain);
-
-
-
G_END_DECLS
#endif /* __G_OPTION_H__ */