/* This file is automatically generated. Any changes made here will be lost. */

/* This header defines simple perlapi-ish macros for creating SV wrappers
 * and extracting the GPerl value from SV wrappers.  These macros are used
 * by the autogenerated typemaps, and are defined here so that you can use
 * the same logic anywhere in your code (e.g., if you handle the argument
 * stack by hand instead of using the typemap). */

#ifdef GCONF_TYPE_ENGINE
  /* GBoxed GConfEngine */
  typedef GConfEngine GConfEngine_ornull;
# define SvGConfEngine(sv)	((GConfEngine *) gperl_get_boxed_check ((sv), GCONF_TYPE_ENGINE))
# define SvGConfEngine_ornull(sv)	(gperl_sv_is_defined (sv) ? SvGConfEngine (sv) : NULL)
  typedef GConfEngine GConfEngine_own;
  typedef GConfEngine GConfEngine_copy;
  typedef GConfEngine GConfEngine_own_ornull;
# define newSVGConfEngine(val)	(gperl_new_boxed ((gpointer) (val), GCONF_TYPE_ENGINE, FALSE))
# define newSVGConfEngine_ornull(val)	((val) ? newSVGConfEngine(val) : &PL_sv_undef)
# define newSVGConfEngine_own(val)	(gperl_new_boxed ((gpointer) (val), GCONF_TYPE_ENGINE, TRUE))
# define newSVGConfEngine_copy(val)	(gperl_new_boxed_copy ((gpointer) (val), GCONF_TYPE_ENGINE))
# define newSVGConfEngine_own_ornull(val)	((val) ? newSVGConfEngine_own(val) : &PL_sv_undef)
#endif /* GCONF_TYPE_ENGINE */

#ifdef GCONF_TYPE_CLIENT
  /* GObject derivative GConfClient */
# define SvGConfClient(sv)	((GConfClient*)gperl_get_object_check (sv, GCONF_TYPE_CLIENT))
# define newSVGConfClient(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef GConfClient GConfClient_ornull;
# define SvGConfClient_ornull(sv)	(gperl_sv_is_defined (sv) ? SvGConfClient(sv) : NULL)
# define newSVGConfClient_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef GConfClient GConfClient_noinc;
#define newSVGConfClient_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef GConfClient GConfClient_noinc_ornull;
#define newSVGConfClient_noinc_ornull(val)	((val) ? newSVGConfClient_noinc(val) : &PL_sv_undef)
#endif /* GCONF_TYPE_CLIENT */

#ifdef GCONF_TYPE_VALUE_TYPE
  /* GEnum GConfValueType */
# define SvGConfValueType(sv)	((GConfValueType)gperl_convert_enum (GCONF_TYPE_VALUE_TYPE, sv))
# define newSVGConfValueType(val)	(gperl_convert_back_enum (GCONF_TYPE_VALUE_TYPE, val))
#endif /* GCONF_TYPE_VALUE_TYPE */

#ifdef GCONF_TYPE_UNSET_FLAGS
  /* GFlags GConfUnsetFlags */
# define SvGConfUnsetFlags(sv)	((GConfUnsetFlags)gperl_convert_flags (GCONF_TYPE_UNSET_FLAGS, sv))
# define newSVGConfUnsetFlags(val)	(gperl_convert_back_flags (GCONF_TYPE_UNSET_FLAGS, val))
#endif /* GCONF_TYPE_UNSET_FLAGS */

#ifdef GCONF_TYPE_CLIENT_PRELOAD_TYPE
  /* GEnum GConfClientPreloadType */
# define SvGConfClientPreloadType(sv)	((GConfClientPreloadType)gperl_convert_enum (GCONF_TYPE_CLIENT_PRELOAD_TYPE, sv))
# define newSVGConfClientPreloadType(val)	(gperl_convert_back_enum (GCONF_TYPE_CLIENT_PRELOAD_TYPE, val))
#endif /* GCONF_TYPE_CLIENT_PRELOAD_TYPE */

#ifdef GCONF_TYPE_CLIENT_ERROR_HANDLING_MODE
  /* GEnum GConfClientErrorHandlingMode */
# define SvGConfClientErrorHandlingMode(sv)	((GConfClientErrorHandlingMode)gperl_convert_enum (GCONF_TYPE_CLIENT_ERROR_HANDLING_MODE, sv))
# define newSVGConfClientErrorHandlingMode(val)	(gperl_convert_back_enum (GCONF_TYPE_CLIENT_ERROR_HANDLING_MODE, val))
#endif /* GCONF_TYPE_CLIENT_ERROR_HANDLING_MODE */
