/* 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 WNCK_TYPE_PAGER
  /* GtkObject derivative WnckPager */
# define SvWnckPager(sv)	((WnckPager*)gperl_get_object_check (sv, WNCK_TYPE_PAGER))
# define newSVWnckPager(val)	(gtk2perl_new_gtkobject (GTK_OBJECT (val)))
  typedef WnckPager WnckPager_ornull;
# define SvWnckPager_ornull(sv)	(gperl_sv_is_defined (sv) ? SvWnckPager(sv) : NULL)
# define newSVWnckPager_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gtk2perl_new_gtkobject (GTK_OBJECT (val)))
#endif /* WNCK_TYPE_PAGER */

#ifdef WNCK_TYPE_TASKLIST
  /* GtkObject derivative WnckTasklist */
# define SvWnckTasklist(sv)	((WnckTasklist*)gperl_get_object_check (sv, WNCK_TYPE_TASKLIST))
# define newSVWnckTasklist(val)	(gtk2perl_new_gtkobject (GTK_OBJECT (val)))
  typedef WnckTasklist WnckTasklist_ornull;
# define SvWnckTasklist_ornull(sv)	(gperl_sv_is_defined (sv) ? SvWnckTasklist(sv) : NULL)
# define newSVWnckTasklist_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gtk2perl_new_gtkobject (GTK_OBJECT (val)))
#endif /* WNCK_TYPE_TASKLIST */

#ifdef WNCK_TYPE_APPLICATION
  /* GObject derivative WnckApplication */
# define SvWnckApplication(sv)	((WnckApplication*)gperl_get_object_check (sv, WNCK_TYPE_APPLICATION))
# define newSVWnckApplication(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef WnckApplication WnckApplication_ornull;
# define SvWnckApplication_ornull(sv)	(gperl_sv_is_defined (sv) ? SvWnckApplication(sv) : NULL)
# define newSVWnckApplication_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef WnckApplication WnckApplication_noinc;
#define newSVWnckApplication_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef WnckApplication WnckApplication_noinc_ornull;
#define newSVWnckApplication_noinc_ornull(val)	((val) ? newSVWnckApplication_noinc(val) : &PL_sv_undef)
#endif /* WNCK_TYPE_APPLICATION */

#ifdef WNCK_TYPE_CLASS_GROUP
  /* GObject derivative WnckClassGroup */
# define SvWnckClassGroup(sv)	((WnckClassGroup*)gperl_get_object_check (sv, WNCK_TYPE_CLASS_GROUP))
# define newSVWnckClassGroup(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef WnckClassGroup WnckClassGroup_ornull;
# define SvWnckClassGroup_ornull(sv)	(gperl_sv_is_defined (sv) ? SvWnckClassGroup(sv) : NULL)
# define newSVWnckClassGroup_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef WnckClassGroup WnckClassGroup_noinc;
#define newSVWnckClassGroup_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef WnckClassGroup WnckClassGroup_noinc_ornull;
#define newSVWnckClassGroup_noinc_ornull(val)	((val) ? newSVWnckClassGroup_noinc(val) : &PL_sv_undef)
#endif /* WNCK_TYPE_CLASS_GROUP */

#ifdef WNCK_TYPE_SCREEN
  /* GObject derivative WnckScreen */
# define SvWnckScreen(sv)	((WnckScreen*)gperl_get_object_check (sv, WNCK_TYPE_SCREEN))
# define newSVWnckScreen(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef WnckScreen WnckScreen_ornull;
# define SvWnckScreen_ornull(sv)	(gperl_sv_is_defined (sv) ? SvWnckScreen(sv) : NULL)
# define newSVWnckScreen_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef WnckScreen WnckScreen_noinc;
#define newSVWnckScreen_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef WnckScreen WnckScreen_noinc_ornull;
#define newSVWnckScreen_noinc_ornull(val)	((val) ? newSVWnckScreen_noinc(val) : &PL_sv_undef)
#endif /* WNCK_TYPE_SCREEN */

#ifdef WNCK_TYPE_WINDOW
  /* GObject derivative WnckWindow */
# define SvWnckWindow(sv)	((WnckWindow*)gperl_get_object_check (sv, WNCK_TYPE_WINDOW))
# define newSVWnckWindow(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef WnckWindow WnckWindow_ornull;
# define SvWnckWindow_ornull(sv)	(gperl_sv_is_defined (sv) ? SvWnckWindow(sv) : NULL)
# define newSVWnckWindow_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef WnckWindow WnckWindow_noinc;
#define newSVWnckWindow_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef WnckWindow WnckWindow_noinc_ornull;
#define newSVWnckWindow_noinc_ornull(val)	((val) ? newSVWnckWindow_noinc(val) : &PL_sv_undef)
#endif /* WNCK_TYPE_WINDOW */

#ifdef WNCK_TYPE_WORKSPACE
  /* GObject derivative WnckWorkspace */
# define SvWnckWorkspace(sv)	((WnckWorkspace*)gperl_get_object_check (sv, WNCK_TYPE_WORKSPACE))
# define newSVWnckWorkspace(val)	(gperl_new_object (G_OBJECT (val), FALSE))
  typedef WnckWorkspace WnckWorkspace_ornull;
# define SvWnckWorkspace_ornull(sv)	(gperl_sv_is_defined (sv) ? SvWnckWorkspace(sv) : NULL)
# define newSVWnckWorkspace_ornull(val)	(((val) == NULL) ? &PL_sv_undef : gperl_new_object (G_OBJECT (val), FALSE))
typedef WnckWorkspace WnckWorkspace_noinc;
#define newSVWnckWorkspace_noinc(val)	(gperl_new_object (G_OBJECT (val), TRUE))
typedef WnckWorkspace WnckWorkspace_noinc_ornull;
#define newSVWnckWorkspace_noinc_ornull(val)	((val) ? newSVWnckWorkspace_noinc(val) : &PL_sv_undef)
#endif /* WNCK_TYPE_WORKSPACE */

#ifdef WNCK_TYPE_MOTION_DIRECTION
  /* GEnum WnckMotionDirection */
# define SvWnckMotionDirection(sv)	((WnckMotionDirection)gperl_convert_enum (WNCK_TYPE_MOTION_DIRECTION, sv))
# define newSVWnckMotionDirection(val)	(gperl_convert_back_enum (WNCK_TYPE_MOTION_DIRECTION, val))
#endif /* WNCK_TYPE_MOTION_DIRECTION */

#ifdef WNCK_TYPE_PAGER_DISPLAY_MODE
  /* GEnum WnckPagerDisplayMode */
# define SvWnckPagerDisplayMode(sv)	((WnckPagerDisplayMode)gperl_convert_enum (WNCK_TYPE_PAGER_DISPLAY_MODE, sv))
# define newSVWnckPagerDisplayMode(val)	(gperl_convert_back_enum (WNCK_TYPE_PAGER_DISPLAY_MODE, val))
#endif /* WNCK_TYPE_PAGER_DISPLAY_MODE */

#ifdef WNCK_TYPE_TASKLIST_GROUPING_TYPE
  /* GEnum WnckTasklistGroupingType */
# define SvWnckTasklistGroupingType(sv)	((WnckTasklistGroupingType)gperl_convert_enum (WNCK_TYPE_TASKLIST_GROUPING_TYPE, sv))
# define newSVWnckTasklistGroupingType(val)	(gperl_convert_back_enum (WNCK_TYPE_TASKLIST_GROUPING_TYPE, val))
#endif /* WNCK_TYPE_TASKLIST_GROUPING_TYPE */

#ifdef WNCK_TYPE_WINDOW_GRAVITY
  /* GEnum WnckWindowGravity */
# define SvWnckWindowGravity(sv)	((WnckWindowGravity)gperl_convert_enum (WNCK_TYPE_WINDOW_GRAVITY, sv))
# define newSVWnckWindowGravity(val)	(gperl_convert_back_enum (WNCK_TYPE_WINDOW_GRAVITY, val))
#endif /* WNCK_TYPE_WINDOW_GRAVITY */

#ifdef WNCK_TYPE_WINDOW_TYPE
  /* GEnum WnckWindowType */
# define SvWnckWindowType(sv)	((WnckWindowType)gperl_convert_enum (WNCK_TYPE_WINDOW_TYPE, sv))
# define newSVWnckWindowType(val)	(gperl_convert_back_enum (WNCK_TYPE_WINDOW_TYPE, val))
#endif /* WNCK_TYPE_WINDOW_TYPE */

#ifdef WNCK_TYPE_WINDOW_ACTIONS
  /* GFlags WnckWindowActions */
# define SvWnckWindowActions(sv)	((WnckWindowActions)gperl_convert_flags (WNCK_TYPE_WINDOW_ACTIONS, sv))
# define newSVWnckWindowActions(val)	(gperl_convert_back_flags (WNCK_TYPE_WINDOW_ACTIONS, val))
#endif /* WNCK_TYPE_WINDOW_ACTIONS */

#ifdef WNCK_TYPE_WINDOW_MOVE_RESIZE_MASK
  /* GFlags WnckWindowMoveResizeMask */
# define SvWnckWindowMoveResizeMask(sv)	((WnckWindowMoveResizeMask)gperl_convert_flags (WNCK_TYPE_WINDOW_MOVE_RESIZE_MASK, sv))
# define newSVWnckWindowMoveResizeMask(val)	(gperl_convert_back_flags (WNCK_TYPE_WINDOW_MOVE_RESIZE_MASK, val))
#endif /* WNCK_TYPE_WINDOW_MOVE_RESIZE_MASK */

#ifdef WNCK_TYPE_WINDOW_STATE
  /* GFlags WnckWindowState */
# define SvWnckWindowState(sv)	((WnckWindowState)gperl_convert_flags (WNCK_TYPE_WINDOW_STATE, sv))
# define newSVWnckWindowState(val)	(gperl_convert_back_flags (WNCK_TYPE_WINDOW_STATE, val))
#endif /* WNCK_TYPE_WINDOW_STATE */
