epoc32/include/stdapis/glib-2.0/glib/goption.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/stdapis/glib-2.0/glib/goption.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/stdapis/glib-2.0/glib/goption.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,146 @@
     1.4 -goption.h
     1.5 +/* goption.h - Option parser
     1.6 + *
     1.7 + *  Copyright (C) 2004  Anders Carlsson <andersca@gnome.org>
     1.8 + * Portions copyright (c) 2006 Nokia Corporation.  All rights reserved.
     1.9 + *
    1.10 + * This library is free software; you can redistribute it and/or
    1.11 + * modify it under the terms of the GNU Library General Public
    1.12 + * License as published by the Free Software Foundation; either
    1.13 + * version 2 of the License, or (at your option) any later version.
    1.14 + *
    1.15 + * This library is distributed in the hope that it will be useful,
    1.16 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    1.17 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the GNU
    1.18 + * Library General Public License for more details.
    1.19 + *
    1.20 + * You should have received a copy of the GNU Library General Public
    1.21 + * License along with this library; if not, write to the
    1.22 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1.23 + * Boston, MA 02111-1307, USA.
    1.24 + */
    1.25 +
    1.26 +#ifndef __G_OPTION_H__
    1.27 +#define __G_OPTION_H__
    1.28 +
    1.29 +#include <_ansi.h>
    1.30 +#include <glib/gerror.h>
    1.31 +#include <glib/gquark.h>
    1.32 +
    1.33 +G_BEGIN_DECLS
    1.34 +
    1.35 +typedef struct _GOptionContext GOptionContext;
    1.36 +typedef struct _GOptionGroup   GOptionGroup;
    1.37 +typedef struct _GOptionEntry   GOptionEntry;
    1.38 +
    1.39 +typedef enum
    1.40 +{
    1.41 +  G_OPTION_FLAG_HIDDEN		= 1 << 0,
    1.42 +  G_OPTION_FLAG_IN_MAIN		= 1 << 1,
    1.43 +  G_OPTION_FLAG_REVERSE		= 1 << 2,
    1.44 +  G_OPTION_FLAG_NO_ARG		= 1 << 3,
    1.45 +  G_OPTION_FLAG_FILENAME	= 1 << 4,
    1.46 +  G_OPTION_FLAG_OPTIONAL_ARG    = 1 << 5,
    1.47 +  G_OPTION_FLAG_NOALIAS	        = 1 << 6
    1.48 +} GOptionFlags;
    1.49 +
    1.50 +typedef enum
    1.51 +{
    1.52 +  G_OPTION_ARG_NONE,
    1.53 +  G_OPTION_ARG_STRING,
    1.54 +  G_OPTION_ARG_INT,
    1.55 +  G_OPTION_ARG_CALLBACK,
    1.56 +  G_OPTION_ARG_FILENAME,
    1.57 +  G_OPTION_ARG_STRING_ARRAY,
    1.58 +  G_OPTION_ARG_FILENAME_ARRAY
    1.59 +} GOptionArg;
    1.60 +
    1.61 +typedef gboolean (*GOptionArgFunc) (const gchar    *option_name,
    1.62 +				    const gchar    *value,
    1.63 +				    gpointer        data,
    1.64 +				    GError        **error);
    1.65 +
    1.66 +typedef gboolean (*GOptionParseFunc) (GOptionContext *context,
    1.67 +				      GOptionGroup   *group,
    1.68 +				      gpointer	      data,
    1.69 +				      GError        **error);
    1.70 +
    1.71 +typedef void (*GOptionErrorFunc) (GOptionContext *context,
    1.72 +				  GOptionGroup   *group,
    1.73 +				  gpointer        data,
    1.74 +				  GError        **error);
    1.75 +
    1.76 +#define G_OPTION_ERROR (g_option_error_quark ())
    1.77 +
    1.78 +typedef enum
    1.79 +{
    1.80 +  G_OPTION_ERROR_UNKNOWN_OPTION,
    1.81 +  G_OPTION_ERROR_BAD_VALUE,
    1.82 +  G_OPTION_ERROR_FAILED
    1.83 +} GOptionError;
    1.84 +
    1.85 +IMPORT_C GQuark g_option_error_quark (void);
    1.86 +
    1.87 +
    1.88 +struct _GOptionEntry
    1.89 +{
    1.90 +  const gchar *long_name;
    1.91 +  gchar        short_name;
    1.92 +  gint         flags;
    1.93 +
    1.94 +  GOptionArg   arg;
    1.95 +  gpointer     arg_data;
    1.96 +  
    1.97 +  const gchar *description;
    1.98 +  const gchar *arg_description;
    1.99 +};
   1.100 +
   1.101 +#define G_OPTION_REMAINING ""
   1.102 +
   1.103 +IMPORT_C GOptionContext *g_option_context_new              (const gchar         *parameter_string);
   1.104 +IMPORT_C void            g_option_context_free             (GOptionContext      *context);
   1.105 +IMPORT_C void		g_option_context_set_help_enabled (GOptionContext      *context,
   1.106 +						   gboolean		help_enabled);
   1.107 +IMPORT_C gboolean	g_option_context_get_help_enabled (GOptionContext      *context);
   1.108 +IMPORT_C void		g_option_context_set_ignore_unknown_options (GOptionContext *context,
   1.109 +							     gboolean	     ignore_unknown);
   1.110 +IMPORT_C gboolean        g_option_context_get_ignore_unknown_options (GOptionContext *context);
   1.111 +
   1.112 +IMPORT_C void            g_option_context_add_main_entries (GOptionContext      *context,
   1.113 +						   const GOptionEntry  *entries,
   1.114 +						   const gchar         *translation_domain);
   1.115 +IMPORT_C gboolean        g_option_context_parse            (GOptionContext      *context,
   1.116 +						   gint                *argc,
   1.117 +						   gchar             ***argv,
   1.118 +						   GError             **error);
   1.119 +
   1.120 +IMPORT_C void          g_option_context_add_group      (GOptionContext *context,
   1.121 +					       GOptionGroup   *group);
   1.122 +IMPORT_C void          g_option_context_set_main_group (GOptionContext *context,
   1.123 +					       GOptionGroup   *group);
   1.124 +IMPORT_C GOptionGroup *g_option_context_get_main_group (GOptionContext *context);
   1.125 +
   1.126 +
   1.127 +IMPORT_C GOptionGroup *g_option_group_new                    (const gchar        *name,
   1.128 +						     const gchar        *description,
   1.129 +						     const gchar        *help_description,
   1.130 +						     gpointer            user_data,
   1.131 +						     GDestroyNotify      destroy);
   1.132 +IMPORT_C void	      g_option_group_set_parse_hooks	    (GOptionGroup       *group,
   1.133 +						     GOptionParseFunc    pre_parse_func,
   1.134 +						     GOptionParseFunc	 post_parse_func);
   1.135 +IMPORT_C void	      g_option_group_set_error_hook	    (GOptionGroup       *group,
   1.136 +						     GOptionErrorFunc	 error_func);
   1.137 +IMPORT_C void          g_option_group_free                   (GOptionGroup       *group);
   1.138 +IMPORT_C void          g_option_group_add_entries            (GOptionGroup       *group,
   1.139 +						     const GOptionEntry *entries);
   1.140 +IMPORT_C void          g_option_group_set_translate_func     (GOptionGroup       *group,
   1.141 +						     GTranslateFunc      func,
   1.142 +						     gpointer            data,
   1.143 +						     GDestroyNotify      destroy_notify);
   1.144 +IMPORT_C void          g_option_group_set_translation_domain (GOptionGroup       *group,
   1.145 +						     const gchar        *domain);
   1.146 +
   1.147 +
   1.148 +G_END_DECLS
   1.149 +
   1.150 +#endif /* __G_OPTION_H__ */