/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.28 from the
 * contents of GtkCellLayout.xs. Do not edit this file, edit GtkCellLayout.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "xs/GtkCellLayout.xs"
/*
 * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
 *
 * Licensed under the LGPL, see LICENSE file for more information.
 *
 * $Id$
 */

#include "gtk2perl.h"

/*
typedef void (* GtkCellLayoutDataFunc) (GtkCellLayout   *cell_layout,
                                        GtkCellRenderer *cell,
                                        GtkTreeModel    *tree_model,
                                        GtkTreeIter     *iter,
                                        gpointer         data);
*/

static void
gtk2perl_cell_layout_data_func (GtkCellLayout   *cell_layout,
                                GtkCellRenderer *cell,
                                GtkTreeModel    *tree_model,
                                GtkTreeIter     *iter,
                                gpointer         data)
{
	GPerlCallback * callback = (GPerlCallback *) data;

	gperl_callback_invoke (callback, NULL, cell_layout, cell,
	                       tree_model, iter);
}


/*
   GInterface support
 */

#define GET_METHOD(obj, name) \
	HV * stash = gperl_object_stash_from_type (G_OBJECT_TYPE (obj)); \
	GV * slot = gv_fetchmethod (stash, name);

#define METHOD_EXISTS (slot && GvCV (slot))

#define GET_METHOD_OR_DIE(obj, name) \
	GET_METHOD (obj, name); \
	if (!METHOD_EXISTS) \
		die ("No implementation for %s::%s", \
		     gperl_package_from_type (G_OBJECT_TYPE (obj)), name);

#define PREP(obj) \
	dSP; \
	ENTER; \
	SAVETMPS; \
	PUSHMARK (SP) ; \
	PUSHs (sv_2mortal (newSVGObject (G_OBJECT (obj))));

#define CALL \
	PUTBACK; \
	call_sv ((SV *) GvCV (slot), G_VOID | G_DISCARD);

#define FINISH \
	FREETMPS; \
	LEAVE;


static void
gtk2perl_cell_layout_pack_start (GtkCellLayout         *cell_layout,
                                 GtkCellRenderer       *cell,
                                 gboolean               expand)
{
	GET_METHOD_OR_DIE (cell_layout, "PACK_START");

	{
		PREP (cell_layout);
		XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell)));
		XPUSHs (sv_2mortal (boolSV (expand)));
		CALL;
		FINISH;
	}
}

static void
gtk2perl_cell_layout_pack_end (GtkCellLayout         *cell_layout,
                               GtkCellRenderer       *cell,
                               gboolean               expand)
{
	GET_METHOD_OR_DIE (cell_layout, "PACK_END");

	{
		PREP (cell_layout);
		XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell)));
		XPUSHs (sv_2mortal (boolSV (expand)));
		CALL;
		FINISH;
	}
}

static void
gtk2perl_cell_layout_clear (GtkCellLayout *cell_layout)
{
	GET_METHOD_OR_DIE (cell_layout, "CLEAR");

	{
		PREP (cell_layout);
		CALL;
		FINISH;
	}
}

static void
gtk2perl_cell_layout_add_attribute (GtkCellLayout         *cell_layout,
                                    GtkCellRenderer       *cell,
                                    const gchar           *attribute,
                                    gint                   column)
{
	GET_METHOD_OR_DIE (cell_layout, "ADD_ATTRIBUTE");

	{
		PREP (cell_layout);
		XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell)));
		XPUSHs (sv_2mortal (newSVGChar (attribute)));
		XPUSHs (sv_2mortal (newSViv (column)));
		CALL;
		FINISH;
	}
}

/* The strategy for passing the function pointer to Perl land is the same as
 * the one used in GtkTreeSortable.xs. */

typedef struct {
	GtkCellLayoutDataFunc func;
	gpointer data;
	GtkDestroyNotify destroy;
} Gtk2PerlCellLayoutDataFunc;

static void
create_callback (GtkCellLayoutDataFunc func,
                 gpointer              data,
                 GtkDestroyNotify      destroy,
		 SV                  **code_return,
                 SV                  **data_return)
{
	HV *stash;
	SV *code_sv, *data_sv;
	Gtk2PerlCellLayoutDataFunc *wrapper;

	wrapper = g_new0 (Gtk2PerlCellLayoutDataFunc, 1);
	wrapper->func = func;
	wrapper->data = data;
	wrapper->destroy = destroy;
	data_sv = newSViv (PTR2IV (wrapper));

	stash = gv_stashpv ("Gtk2::CellLayout::DataFunc", TRUE);
	code_sv = sv_bless (newRV (data_sv), stash);

	*code_return = code_sv;
	*data_return = data_sv;
}

static void
gtk2perl_cell_layout_set_cell_data_func (GtkCellLayout         *cell_layout,
                                         GtkCellRenderer       *cell,
                                         GtkCellLayoutDataFunc  func,
                                         gpointer               func_data,
                                         GDestroyNotify         destroy)
{
	GET_METHOD_OR_DIE (cell_layout, "SET_CELL_DATA_FUNC");

	{
		SV *code_sv, *data_sv;
		PREP (cell_layout);

		XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell)));

		if (func) {
			create_callback (func, func_data, destroy,
					 &code_sv, &data_sv);

			XPUSHs (sv_2mortal (code_sv));
			XPUSHs (sv_2mortal (data_sv));
		}

		CALL;
		FINISH;
	}
}

static void
gtk2perl_cell_layout_clear_attributes (GtkCellLayout         *cell_layout,
                                       GtkCellRenderer       *cell)
{
	GET_METHOD_OR_DIE (cell_layout, "CLEAR_ATTRIBUTES");

	{
		PREP (cell_layout);
		XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell)));
		CALL;
		FINISH;
	}
}

static void
gtk2perl_cell_layout_reorder (GtkCellLayout         *cell_layout,
                              GtkCellRenderer       *cell,
                              gint                   position)
{
	GET_METHOD_OR_DIE (cell_layout, "REORDER");

	{
		PREP (cell_layout);
		XPUSHs (sv_2mortal (newSVGtkCellRenderer (cell)));
		XPUSHs (sv_2mortal (newSViv (position)));
		CALL;
		FINISH;
	}
}

#if GTK_CHECK_VERSION (2, 12, 0)

static GList*
gtk2perl_cell_layout_get_cells (GtkCellLayout *cell_layout)
{
	GList * cells = NULL;

	GET_METHOD (cell_layout, "GET_CELLS");

	if (METHOD_EXISTS) {
		int count;
		PREP (cell_layout);
		PUTBACK;
		count = call_sv ((SV *) GvCV (slot), G_ARRAY);
		SPAGAIN;
		while (count > 0) {
			SV * sv = POPs;
			cells = g_list_prepend (cells, SvGtkCellRenderer (sv));
			count--;
		}
		PUTBACK;
		FINISH;
	}

	return cells;
}

#endif

static void
gtk2perl_cell_layout_init (GtkCellLayoutIface * iface)
{
	iface->pack_start = gtk2perl_cell_layout_pack_start;
	iface->pack_end = gtk2perl_cell_layout_pack_end;
	iface->clear = gtk2perl_cell_layout_clear;
	iface->add_attribute = gtk2perl_cell_layout_add_attribute;
	iface->set_cell_data_func = gtk2perl_cell_layout_set_cell_data_func;
	iface->clear_attributes = gtk2perl_cell_layout_clear_attributes;
	iface->reorder = gtk2perl_cell_layout_reorder;
#if GTK_CHECK_VERSION (2, 12, 0)
	iface->get_cells = gtk2perl_cell_layout_get_cells;
#endif
}

#line 272 "xs/GtkCellLayout.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
	    Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
        else
	    Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
	Perl_croak_nocontext("Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#define croak_xs_usage        S_croak_xs_usage

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#if PERL_VERSION_LE(5, 21, 5)
#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
#else
#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
#endif

#line 416 "xs/GtkCellLayout.c"

XS_EUPXS(XS_Gtk2__CellLayout__ADD_INTERFACE); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout__ADD_INTERFACE)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, target_class");
    {
	const char *	target_class = (const char *)SvPV_nolen(ST(1))
;
#line 350 "xs/GtkCellLayout.xs"
    {
	static const GInterfaceInfo iface_info = {
		(GInterfaceInitFunc) gtk2perl_cell_layout_init,
		(GInterfaceFinalizeFunc) NULL,
		(gpointer) NULL
	};
	GType gtype = gperl_object_type_from_package (target_class);
	g_type_add_interface_static (gtype, GTK_TYPE_CELL_LAYOUT, &iface_info);
    }
#line 437 "xs/GtkCellLayout.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_pack_start); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_pack_start)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "cell_layout, cell, expand");
    {
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(1))
;
	gboolean	expand = (bool)SvTRUE(ST(2))
;

	gtk_cell_layout_pack_start(cell_layout, cell, expand);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_pack_end); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_pack_end)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "cell_layout, cell, expand");
    {
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(1))
;
	gboolean	expand = (bool)SvTRUE(ST(2))
;

	gtk_cell_layout_pack_end(cell_layout, cell, expand);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_clear); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_clear)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "cell_layout");
    {
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;

	gtk_cell_layout_clear(cell_layout);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_set_attributes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_set_attributes)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "cell_layout, cell, ...");
    {
#line 388 "xs/GtkCellLayout.xs"
	gint i;
#line 508 "xs/GtkCellLayout.c"
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(1))
;
#line 390 "xs/GtkCellLayout.xs"
	if (items < 2 || 0 != (items - 2) % 2)
		croak ("usage: $cell_layout->set_attributes ($cell, name => column, ...)\n"
		       "   expecting a list of name => column pairs"); 
	gtk_cell_layout_clear_attributes (cell_layout, cell);
	for (i = 2 ; i < items ; i+=2) {
		gtk_cell_layout_add_attribute (cell_layout, cell,
		                               SvPV_nolen (ST (i)),
		                               SvIV (ST (i+1)));
	}
#line 523 "xs/GtkCellLayout.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_add_attribute); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_add_attribute)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "cell_layout, cell, attribute, column");
    {
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(1))
;
	const gchar *	attribute;
	gint	column = (gint)SvIV(ST(3))
;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(2));
	attribute = (const gchar *)SvPV_nolen (ST(2))
;

	gtk_cell_layout_add_attribute(cell_layout, cell, attribute, column);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_set_cell_data_func); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_set_cell_data_func)
{
    dVAR; dXSARGS;
    if (items < 3 || items > 4)
       croak_xs_usage(cv,  "cell_layout, cell, func, func_data=NULL");
    {
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(1))
;
	SV *	func = ST(2)
;
	SV *	func_data;

	if (items < 4)
	    func_data = NULL;
	else {
	    func_data = ST(3)
;
	}
#line 431 "xs/GtkCellLayout.xs"
	if (gperl_sv_is_defined (func)) {
		GType param_types[4];
		GPerlCallback * callback;

		param_types[0] = GTK_TYPE_CELL_LAYOUT;
		param_types[1] = GTK_TYPE_CELL_RENDERER;
		param_types[2] = GTK_TYPE_TREE_MODEL;
		param_types[3] = GTK_TYPE_TREE_ITER;
		callback = gperl_callback_new (func, func_data, 4, param_types,
		                               G_TYPE_NONE);
		gtk_cell_layout_set_cell_data_func
		                    (cell_layout, cell,
		                     gtk2perl_cell_layout_data_func, callback,
			             (GDestroyNotify) gperl_callback_destroy);
	} else
		gtk_cell_layout_set_cell_data_func (cell_layout, cell,
						    NULL, NULL, NULL);
#line 594 "xs/GtkCellLayout.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_clear_attributes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_clear_attributes)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "cell_layout, cell");
    {
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(1))
;

	gtk_cell_layout_clear_attributes(cell_layout, cell);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout_reorder); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_reorder)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "cell_layout, cell, position");
    {
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(1))
;
	gint	position = (gint)SvIV(ST(2))
;

	gtk_cell_layout_reorder(cell_layout, cell, position);
    }
    XSRETURN_EMPTY;
}

#if GTK_CHECK_VERSION (2, 12, 0)
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Gtk2__CellLayout_get_cells); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout_get_cells)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "cell_layout");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 472 "xs/GtkCellLayout.xs"
	GList *result, *i;
#line 652 "xs/GtkCellLayout.c"
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(0))
;
#line 474 "xs/GtkCellLayout.xs"
	PUTBACK;
	result = gtk_cell_layout_get_cells (cell_layout);
	SPAGAIN;
	if (!result) /* can happen if the widget doesn't implement get_cells */
		XSRETURN_UNDEF;
	for (i = result; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGtkCellRenderer (i->data)));
	g_list_free (result);
#line 664 "xs/GtkCellLayout.c"
	PUTBACK;
	return;
    }
}

#endif

XS_EUPXS(XS_Gtk2__CellLayout__DataFunc_invoke); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout__DataFunc_invoke)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "code, cell_layout, cell, tree_model, iter, data");
    {
#line 492 "xs/GtkCellLayout.xs"
	Gtk2PerlCellLayoutDataFunc *wrapper;
#line 681 "xs/GtkCellLayout.c"
	SV *	code = ST(0)
;
	GtkCellLayout *	cell_layout = SvGtkCellLayout (ST(1))
;
	GtkCellRenderer *	cell = SvGtkCellRenderer (ST(2))
;
	GtkTreeModel *	tree_model = SvGtkTreeModel (ST(3))
;
	GtkTreeIter *	iter = SvGtkTreeIter (ST(4))
;
#line 494 "xs/GtkCellLayout.xs"
	wrapper = INT2PTR (Gtk2PerlCellLayoutDataFunc*, SvIV (SvRV (code)));
	if (!wrapper || !wrapper->func)
		croak ("Invalid reference encountered in cell data func");
	wrapper->func (cell_layout, cell, tree_model, iter, wrapper->data);
#line 697 "xs/GtkCellLayout.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__CellLayout__DataFunc_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__CellLayout__DataFunc_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "code");
    {
#line 502 "xs/GtkCellLayout.xs"
	Gtk2PerlCellLayoutDataFunc *wrapper;
#line 712 "xs/GtkCellLayout.c"
	SV *	code = ST(0)
;
#line 504 "xs/GtkCellLayout.xs"
	if (!gperl_sv_is_defined (code) || !SvROK (code))
		return;
	wrapper = INT2PTR (Gtk2PerlCellLayoutDataFunc*, SvIV (SvRV (code)));
	if (wrapper && wrapper->destroy)
		wrapper->destroy (wrapper->data);
	if (wrapper)
		g_free (wrapper);
#line 723 "xs/GtkCellLayout.c"
    }
    XSRETURN_EMPTY;
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__CellLayout); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__CellLayout)
{
#if PERL_VERSION_LE(5, 21, 5)
    dVAR; dXSARGS;
#else
    dVAR; dXSBOOTARGSXSAPIVERCHK;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(file);

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#if PERL_VERSION_LE(5, 21, 5)
    XS_VERSION_BOOTCHECK;
#  ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#  endif
#endif

        newXS_deffile("Gtk2::CellLayout::_ADD_INTERFACE", XS_Gtk2__CellLayout__ADD_INTERFACE);
        newXS_deffile("Gtk2::CellLayout::pack_start", XS_Gtk2__CellLayout_pack_start);
        newXS_deffile("Gtk2::CellLayout::pack_end", XS_Gtk2__CellLayout_pack_end);
        newXS_deffile("Gtk2::CellLayout::clear", XS_Gtk2__CellLayout_clear);
        newXS_deffile("Gtk2::CellLayout::set_attributes", XS_Gtk2__CellLayout_set_attributes);
        newXS_deffile("Gtk2::CellLayout::add_attribute", XS_Gtk2__CellLayout_add_attribute);
        newXS_deffile("Gtk2::CellLayout::set_cell_data_func", XS_Gtk2__CellLayout_set_cell_data_func);
        newXS_deffile("Gtk2::CellLayout::clear_attributes", XS_Gtk2__CellLayout_clear_attributes);
        newXS_deffile("Gtk2::CellLayout::reorder", XS_Gtk2__CellLayout_reorder);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::CellLayout::get_cells", XS_Gtk2__CellLayout_get_cells);
#endif
        newXS_deffile("Gtk2::CellLayout::DataFunc::invoke", XS_Gtk2__CellLayout__DataFunc_invoke);
        newXS_deffile("Gtk2::CellLayout::DataFunc::DESTROY", XS_Gtk2__CellLayout__DataFunc_DESTROY);

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#line 775 "xs/GtkCellLayout.c"

    /* End of Initialisation Section */

#if PERL_VERSION_LE(5, 21, 5)
#  if PERL_VERSION_GE(5, 9, 0)
    if (PL_unitcheckav)
        call_list(PL_scopestack_ix, PL_unitcheckav);
#  endif
    XSRETURN_YES;
#else
    Perl_xs_boot_epilog(aTHX_ ax);
#endif
}

