/* 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 SEXY_TYPE_URL_LABEL
  /* GObject derivative SexyUrlLabel */
# define SvSexyUrlLabel(sv)	((SexyUrlLabel*)gperl_get_object_check (sv, SEXY_TYPE_URL_LABEL))
# define newSVSexyUrlLabel(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef SexyUrlLabel SexyUrlLabel_ornull;
# define SvSexyUrlLabel_ornull(sv)	(gperl_sv_is_defined (sv) ? SvSexyUrlLabel(sv) : NULL)
# define newSVSexyUrlLabel_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef SexyUrlLabel SexyUrlLabel_noinc;
#define newSVSexyUrlLabel_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef SexyUrlLabel SexyUrlLabel_noinc_ornull;
#define newSVSexyUrlLabel_noinc_ornull(val)	((val) ? newSVSexyUrlLabel_noinc(val) : &PL_sv_undef)
#endif /* SEXY_TYPE_URL_LABEL */

#ifdef SEXY_TYPE_SPELL_ENTRY
  /* GObject derivative SexySpellEntry */
# define SvSexySpellEntry(sv)	((SexySpellEntry*)gperl_get_object_check (sv, SEXY_TYPE_SPELL_ENTRY))
# define newSVSexySpellEntry(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef SexySpellEntry SexySpellEntry_ornull;
# define SvSexySpellEntry_ornull(sv)	(gperl_sv_is_defined (sv) ? SvSexySpellEntry(sv) : NULL)
# define newSVSexySpellEntry_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef SexySpellEntry SexySpellEntry_noinc;
#define newSVSexySpellEntry_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef SexySpellEntry SexySpellEntry_noinc_ornull;
#define newSVSexySpellEntry_noinc_ornull(val)	((val) ? newSVSexySpellEntry_noinc(val) : &PL_sv_undef)
#endif /* SEXY_TYPE_SPELL_ENTRY */

#ifdef SEXY_TYPE_ICON_ENTRY
  /* GObject derivative SexyIconEntry */
# define SvSexyIconEntry(sv)	((SexyIconEntry*)gperl_get_object_check (sv, SEXY_TYPE_ICON_ENTRY))
# define newSVSexyIconEntry(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef SexyIconEntry SexyIconEntry_ornull;
# define SvSexyIconEntry_ornull(sv)	(gperl_sv_is_defined (sv) ? SvSexyIconEntry(sv) : NULL)
# define newSVSexyIconEntry_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef SexyIconEntry SexyIconEntry_noinc;
#define newSVSexyIconEntry_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef SexyIconEntry SexyIconEntry_noinc_ornull;
#define newSVSexyIconEntry_noinc_ornull(val)	((val) ? newSVSexyIconEntry_noinc(val) : &PL_sv_undef)
#endif /* SEXY_TYPE_ICON_ENTRY */

#ifdef SEXY_TYPE_TOOLTIP
  /* GObject derivative SexyTooltip */
# define SvSexyTooltip(sv)	((SexyTooltip*)gperl_get_object_check (sv, SEXY_TYPE_TOOLTIP))
# define newSVSexyTooltip(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef SexyTooltip SexyTooltip_ornull;
# define SvSexyTooltip_ornull(sv)	(gperl_sv_is_defined (sv) ? SvSexyTooltip(sv) : NULL)
# define newSVSexyTooltip_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef SexyTooltip SexyTooltip_noinc;
#define newSVSexyTooltip_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef SexyTooltip SexyTooltip_noinc_ornull;
#define newSVSexyTooltip_noinc_ornull(val)	((val) ? newSVSexyTooltip_noinc(val) : &PL_sv_undef)
#endif /* SEXY_TYPE_TOOLTIP */

#ifdef SEXY_TYPE_TREE_VIEW
  /* GObject derivative SexyTreeView */
# define SvSexyTreeView(sv)	((SexyTreeView*)gperl_get_object_check (sv, SEXY_TYPE_TREE_VIEW))
# define newSVSexyTreeView(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef SexyTreeView SexyTreeView_ornull;
# define SvSexyTreeView_ornull(sv)	(gperl_sv_is_defined (sv) ? SvSexyTreeView(sv) : NULL)
# define newSVSexyTreeView_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef SexyTreeView SexyTreeView_noinc;
#define newSVSexyTreeView_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef SexyTreeView SexyTreeView_noinc_ornull;
#define newSVSexyTreeView_noinc_ornull(val)	((val) ? newSVSexyTreeView_noinc(val) : &PL_sv_undef)
#endif /* SEXY_TYPE_TREE_VIEW */

#ifdef SEXY_TYPE_ICON_ENTRY_POSITION
  /* GEnum SexyIconEntryPosition */
# define SvSexyIconEntryPosition(sv)	((SexyIconEntryPosition)gperl_convert_enum (SEXY_TYPE_ICON_ENTRY_POSITION, sv))
# define newSVSexyIconEntryPosition(val)	(gperl_convert_back_enum (SEXY_TYPE_ICON_ENTRY_POSITION, val))
#endif /* SEXY_TYPE_ICON_ENTRY_POSITION */
