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

#line 1 "xs/GtkIconFactory.xs"
/*
 * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the 
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
 * Boston, MA  02110-1301  USA.
 *
 * $Id$
 */
#include "gtk2perl.h"

/*
 * Programs and libraries can register their own GtkIconSizes, making the
 * standard enum handling rather incorrect.  so, we override that stuff
 * here.  FIXME if this stuff is ever needed outside this file, we'll have
 * to undef and prototype in gtk2perl.h, instead.
 */
#undef newSVGtkIconSize
#undef SvGtkIconSize

static SV *
newSVGtkIconSize (GtkIconSize size)
{
	/* crap.  there is no try.  do, or do not. */
	/* SV * sv = gperl_try_convert_back_enum (GTK_TYPE_ICON_SIZE, size); */
	SV * sv = gperl_convert_back_enum_pass_unknown (GTK_TYPE_ICON_SIZE,
							size);
	if (looks_like_number (sv)) {
		/* fall back... */
		const char * name;
		name = gtk_icon_size_get_name (size);
		if (name)
			sv_setpv (sv, name);
	}
	return sv;
}

static GtkIconSize
SvGtkIconSize (SV * sv)
{
	GtkIconSize size;
	if (gperl_try_convert_enum (GTK_TYPE_ICON_SIZE, sv, (gint*)&size))
		return size;
	/* fall back... */
	return gtk_icon_size_from_name (SvPV_nolen (sv));
}


#line 70 "xs/GtkIconFactory.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 214 "xs/GtkIconFactory.c"

XS_EUPXS(XS_Gtk2__IconFactory_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconFactory_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	GtkIconFactory_noinc *	RETVAL;

	RETVAL = gtk_icon_factory_new(/*void*/);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconFactory_noinc (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconFactory_add); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconFactory_add)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "factory, stock_id, icon_set");
    {
	GtkIconFactory *	factory = SvGtkIconFactory (ST(0))
;
	const gchar *	stock_id;
	GtkIconSet *	icon_set = SvGtkIconSet (ST(2))
;

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

	gtk_icon_factory_add(factory, stock_id, icon_set);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconFactory_lookup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconFactory_lookup)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "factory, stock_id");
    {
	GtkIconFactory *	factory = SvGtkIconFactory (ST(0))
;
	const gchar *	stock_id;
	GtkIconSet *	RETVAL;

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

	RETVAL = gtk_icon_factory_lookup(factory, stock_id);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSet (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconFactory_add_default); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconFactory_add_default)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "factory");
    {
	GtkIconFactory *	factory = SvGtkIconFactory (ST(0))
;

	gtk_icon_factory_add_default(factory);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconFactory_remove_default); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconFactory_remove_default)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "factory");
    {
	GtkIconFactory *	factory = SvGtkIconFactory (ST(0))
;

	gtk_icon_factory_remove_default(factory);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconFactory_lookup_default); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconFactory_lookup_default)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, stock_id");
    {
	const gchar *	stock_id;
	GtkIconSet *	RETVAL;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	stock_id = (const gchar *)SvPV_nolen (ST(1))
;
#line 97 "xs/GtkIconFactory.xs"
	RETVAL = gtk_icon_factory_lookup_default (stock_id);
	if (!RETVAL)
		XSRETURN_UNDEF;
#line 340 "xs/GtkIconFactory.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSet (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSize_lookup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSize_lookup)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, size");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GtkIconSize	size = SvGtkIconSize (ST(1))
;
#line 113 "xs/GtkIconFactory.xs"
	gint width;
	gint height;
#line 366 "xs/GtkIconFactory.c"
#line 116 "xs/GtkIconFactory.xs"
	if (!gtk_icon_size_lookup (size, &width, &height))
		XSRETURN_EMPTY;
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSViv (width)));
	PUSHs (sv_2mortal (newSViv (height)));
#line 373 "xs/GtkIconFactory.c"
	PUTBACK;
	return;
    }
}

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


XS_EUPXS(XS_Gtk2__IconSize_lookup_for_settings); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSize_lookup_for_settings)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, settings, size");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GtkSettings *	settings = SvGtkSettings (ST(1))
;
	GtkIconSize	size = SvGtkIconSize (ST(2))
;
#line 133 "xs/GtkIconFactory.xs"
	gint width;
	gint height;
#line 399 "xs/GtkIconFactory.c"
#line 136 "xs/GtkIconFactory.xs"
	if (!gtk_icon_size_lookup_for_settings (settings, size, &width, &height))
		XSRETURN_EMPTY;
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (newSViv (width)));
	PUSHs (sv_2mortal (newSViv (height)));
#line 406 "xs/GtkIconFactory.c"
	PUTBACK;
	return;
    }
}

#endif /* >= 2.2.0 */

XS_EUPXS(XS_Gtk2__IconSize_register); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSize_register)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, name, width, height");
    {
	const gchar *	name;
	gint	width = (gint)SvIV(ST(2))
;
	gint	height = (gint)SvIV(ST(3))
;
	GtkIconSize	RETVAL;

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

	RETVAL = gtk_icon_size_register(name, width, height);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSize (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSize_register_alias); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSize_register_alias)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, alias, target");
    {
	const gchar *	alias;
	GtkIconSize	target = SvGtkIconSize (ST(2))
;

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

	gtk_icon_size_register_alias(alias, target);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSize_from_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSize_from_name)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, name");
    {
	const gchar *	name;
	GtkIconSize	RETVAL;

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

	RETVAL = gtk_icon_size_from_name(name);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSize (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSet_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSet_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	GtkIconSet_own *	RETVAL;

	RETVAL = gtk_icon_set_new(/*void*/);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSet_own (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSet_new_from_pixbuf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSet_new_from_pixbuf)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, pixbuf");
    {
	GdkPixbuf *	pixbuf = SvGdkPixbuf (ST(1))
;
	GtkIconSet_own *	RETVAL;

	RETVAL = gtk_icon_set_new_from_pixbuf(pixbuf);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSet_own (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSet_render_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSet_render_icon)
{
    dVAR; dXSARGS;
    if (items < 6 || items > 7)
       croak_xs_usage(cv,  "icon_set, style, direction, state, size, widget, detail=NULL");
    {
	GtkIconSet *	icon_set = SvGtkIconSet (ST(0))
;
	GtkStyle_ornull *	style = SvGtkStyle_ornull (ST(1))
;
	GtkTextDirection	direction = SvGtkTextDirection (ST(2))
;
	GtkStateType	state = SvGtkStateType (ST(3))
;
	GtkIconSize	size = SvGtkIconSize (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const char *	detail;
	GdkPixbuf_noinc *	RETVAL;

	if (items < 7)
	    detail = NULL;
	else {
	    detail = (const char *)SvPV_nolen(ST(6))
;
	}

	RETVAL = gtk_icon_set_render_icon(icon_set, style, direction, state, size, widget, detail);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkPixbuf_noinc (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSet_add_source); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSet_add_source)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_set, source");
    {
	GtkIconSet *	icon_set = SvGtkIconSet (ST(0))
;
	GtkIconSource *	source = SvGtkIconSource (ST(1))
;

	gtk_icon_set_add_source(icon_set, source);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSet_get_sizes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSet_get_sizes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_set");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GtkIconSet *	icon_set = SvGtkIconSet (ST(0))
;
#line 216 "xs/GtkIconFactory.xs"
	GtkIconSize * sizes = NULL;
	gint n_sizes, i;
#line 611 "xs/GtkIconFactory.c"
#line 219 "xs/GtkIconFactory.xs"
	gtk_icon_set_get_sizes (icon_set, &sizes, &n_sizes);
	EXTEND (SP, n_sizes);
	for (i = 0 ; i < n_sizes ; i++)
		PUSHs (sv_2mortal (newSVGtkIconSize (sizes[i])));
	g_free (sizes);
#line 618 "xs/GtkIconFactory.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__IconSource_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	GtkIconSource_own *	RETVAL;

	RETVAL = gtk_icon_source_new(/*void*/);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSource_own (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_set_filename); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_filename)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, filename");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GPerlFilename	filename = (GPerlFilename) gperl_filename_from_sv (ST(1))
;

	gtk_icon_source_set_filename(source, filename);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_get_filename); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_filename)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GPerlFilename_const	RETVAL;

	RETVAL = gtk_icon_source_get_filename(source);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv (RETVALSV, sv_2mortal (gperl_sv_from_filename (RETVAL)));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_set_pixbuf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_pixbuf)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, pixbuf");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GdkPixbuf *	pixbuf = SvGdkPixbuf (ST(1))
;

	gtk_icon_source_set_pixbuf(source, pixbuf);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_get_pixbuf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_pixbuf)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GdkPixbuf_ornull *	RETVAL;

	RETVAL = gtk_icon_source_get_pixbuf(source);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkPixbuf_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_set_direction_wildcarded); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_direction_wildcarded)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, setting");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gtk_icon_source_set_direction_wildcarded(source, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_set_state_wildcarded); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_state_wildcarded)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, setting");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gtk_icon_source_set_state_wildcarded(source, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_set_size_wildcarded); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_size_wildcarded)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, setting");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gtk_icon_source_set_size_wildcarded(source, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_get_size_wildcarded); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_size_wildcarded)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_icon_source_get_size_wildcarded(source);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_get_state_wildcarded); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_state_wildcarded)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_icon_source_get_state_wildcarded(source);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_get_direction_wildcarded); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_direction_wildcarded)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gtk_icon_source_get_direction_wildcarded(source);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_set_direction); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_direction)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, direction");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GtkTextDirection	direction = SvGtkTextDirection (ST(1))
;

	gtk_icon_source_set_direction(source, direction);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_set_state); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_state)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, state");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GtkStateType	state = SvGtkStateType (ST(1))
;

	gtk_icon_source_set_state(source, state);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_set_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_size)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, size");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GtkIconSize	size = SvGtkIconSize (ST(1))
;

	gtk_icon_source_set_size(source, size);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_get_direction); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_direction)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GtkTextDirection	RETVAL;

	RETVAL = gtk_icon_source_get_direction(source);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkTextDirection (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_get_state); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_state)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GtkStateType	RETVAL;

	RETVAL = gtk_icon_source_get_state(source);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkStateType (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconSource_get_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_size)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	GtkIconSize	RETVAL;

	RETVAL = gtk_icon_source_get_size(source);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSize (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#if GTK_CHECK_VERSION(2,4,0)
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Gtk2__IconSource_set_icon_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_set_icon_name)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source, icon_name");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	const gchar *	icon_name;

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

	gtk_icon_source_set_icon_name(source, icon_name);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconSource_get_icon_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconSource_get_icon_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "source");
    {
	GtkIconSource *	source = SvGtkIconSource (ST(0))
;
	const gchar *	RETVAL;

	RETVAL = gtk_icon_source_get_icon_name(source);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    /* same as newSVGChar(), but not in a function */
	    sv_setpv ((SV*)RETVALSV, RETVAL);
	    SvUTF8_on (RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__IconFactory); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__IconFactory)
{
#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::IconFactory::new", XS_Gtk2__IconFactory_new);
        newXS_deffile("Gtk2::IconFactory::add", XS_Gtk2__IconFactory_add);
        newXS_deffile("Gtk2::IconFactory::lookup", XS_Gtk2__IconFactory_lookup);
        newXS_deffile("Gtk2::IconFactory::add_default", XS_Gtk2__IconFactory_add_default);
        newXS_deffile("Gtk2::IconFactory::remove_default", XS_Gtk2__IconFactory_remove_default);
        newXS_deffile("Gtk2::IconFactory::lookup_default", XS_Gtk2__IconFactory_lookup_default);
        newXS_deffile("Gtk2::IconSize::lookup", XS_Gtk2__IconSize_lookup);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::IconSize::lookup_for_settings", XS_Gtk2__IconSize_lookup_for_settings);
#endif
        newXS_deffile("Gtk2::IconSize::register", XS_Gtk2__IconSize_register);
        newXS_deffile("Gtk2::IconSize::register_alias", XS_Gtk2__IconSize_register_alias);
        newXS_deffile("Gtk2::IconSize::from_name", XS_Gtk2__IconSize_from_name);
        newXS_deffile("Gtk2::IconSet::new", XS_Gtk2__IconSet_new);
        newXS_deffile("Gtk2::IconSet::new_from_pixbuf", XS_Gtk2__IconSet_new_from_pixbuf);
        newXS_deffile("Gtk2::IconSet::render_icon", XS_Gtk2__IconSet_render_icon);
        newXS_deffile("Gtk2::IconSet::add_source", XS_Gtk2__IconSet_add_source);
        newXS_deffile("Gtk2::IconSet::get_sizes", XS_Gtk2__IconSet_get_sizes);
        newXS_deffile("Gtk2::IconSource::new", XS_Gtk2__IconSource_new);
        newXS_deffile("Gtk2::IconSource::set_filename", XS_Gtk2__IconSource_set_filename);
        newXS_deffile("Gtk2::IconSource::get_filename", XS_Gtk2__IconSource_get_filename);
        newXS_deffile("Gtk2::IconSource::set_pixbuf", XS_Gtk2__IconSource_set_pixbuf);
        newXS_deffile("Gtk2::IconSource::get_pixbuf", XS_Gtk2__IconSource_get_pixbuf);
        newXS_deffile("Gtk2::IconSource::set_direction_wildcarded", XS_Gtk2__IconSource_set_direction_wildcarded);
        newXS_deffile("Gtk2::IconSource::set_state_wildcarded", XS_Gtk2__IconSource_set_state_wildcarded);
        newXS_deffile("Gtk2::IconSource::set_size_wildcarded", XS_Gtk2__IconSource_set_size_wildcarded);
        newXS_deffile("Gtk2::IconSource::get_size_wildcarded", XS_Gtk2__IconSource_get_size_wildcarded);
        newXS_deffile("Gtk2::IconSource::get_state_wildcarded", XS_Gtk2__IconSource_get_state_wildcarded);
        newXS_deffile("Gtk2::IconSource::get_direction_wildcarded", XS_Gtk2__IconSource_get_direction_wildcarded);
        newXS_deffile("Gtk2::IconSource::set_direction", XS_Gtk2__IconSource_set_direction);
        newXS_deffile("Gtk2::IconSource::set_state", XS_Gtk2__IconSource_set_state);
        newXS_deffile("Gtk2::IconSource::set_size", XS_Gtk2__IconSource_set_size);
        newXS_deffile("Gtk2::IconSource::get_direction", XS_Gtk2__IconSource_get_direction);
        newXS_deffile("Gtk2::IconSource::get_state", XS_Gtk2__IconSource_get_state);
        newXS_deffile("Gtk2::IconSource::get_size", XS_Gtk2__IconSource_get_size);
#if XSubPPtmpAAAB
        newXS_deffile("Gtk2::IconSource::set_icon_name", XS_Gtk2__IconSource_set_icon_name);
        newXS_deffile("Gtk2::IconSource::get_icon_name", XS_Gtk2__IconSource_get_icon_name);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#line 1083 "xs/GtkIconFactory.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
}

