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

#line 1 "xs/GtkIconTheme.xs"
/* 
 * Copyright (C) 2003 by the gtk2-perl team (see the file AUTHORS for a
 * complete listing)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#include "gtk2perl.h"

#line 33 "xs/GtkIconTheme.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(pTHX_ const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(pTHX_ 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(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
        else
            Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
        Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#ifdef PERL_IMPLICIT_CONTEXT
#define croak_xs_usage(a,b)    S_croak_xs_usage(aTHX_ a,b)
#else
#define croak_xs_usage        S_croak_xs_usage
#endif

#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) */

#line 175 "xs/GtkIconTheme.c"

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

	RETVAL = gtk_icon_theme_new(/*void*/);
	ST(0) = newSVGtkIconTheme_noinc (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


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

	RETVAL = gtk_icon_theme_get_default(/*void*/);
	ST(0) = newSVGtkIconTheme (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconTheme_get_for_screen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_get_for_screen)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, screen");
    {
	GtkIconTheme *	RETVAL;
	GdkScreen *	screen = SvGdkScreen (ST(1))
;

	RETVAL = gtk_icon_theme_get_for_screen(screen);
	ST(0) = newSVGtkIconTheme (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconTheme_set_screen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_set_screen)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_theme, screen");
    {
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	GdkScreen *	screen = SvGdkScreen (ST(1))
;

	gtk_icon_theme_set_screen(icon_theme, screen);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconTheme_set_search_path); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_set_search_path)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "icon_theme, ...");
    {
#line 48 "xs/GtkIconTheme.xs"
	const gchar ** path = NULL;
	gint n_elements, i;
#line 258 "xs/GtkIconTheme.c"
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
#line 51 "xs/GtkIconTheme.xs"
	n_elements = items - 1;
	path = gperl_alloc_temp (sizeof (gchar*) * n_elements + 1);
	for (i = 0 ; i < n_elements ; i++)
		path[i] = gperl_filename_from_sv (ST (i + 1));
	gtk_icon_theme_set_search_path (icon_theme, path, n_elements);
#line 267 "xs/GtkIconTheme.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconTheme_get_search_path); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_get_search_path)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_theme");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 60 "xs/GtkIconTheme.xs"
	gchar ** path = NULL;
	gint n_elements, i;
#line 285 "xs/GtkIconTheme.c"
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
#line 63 "xs/GtkIconTheme.xs"
	gtk_icon_theme_get_search_path (icon_theme, &path, &n_elements);
	EXTEND (SP, n_elements);
	for (i = 0; i < n_elements; i++)
		PUSHs (sv_2mortal (gperl_sv_from_filename (path[i])));
	g_strfreev (path);
#line 294 "xs/GtkIconTheme.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__IconTheme_append_search_path); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_append_search_path)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_theme, path");
    {
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	GPerlFilename_const	path = (GPerlFilename_const) gperl_filename_from_sv (ST(1))
;

	gtk_icon_theme_append_search_path(icon_theme, path);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconTheme_prepend_search_path); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_prepend_search_path)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_theme, path");
    {
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	GPerlFilename_const	path = (GPerlFilename_const) gperl_filename_from_sv (ST(1))
;

	gtk_icon_theme_prepend_search_path(icon_theme, path);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconTheme_set_custom_theme); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_set_custom_theme)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_theme, theme_name");
    {
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	const gchar_ornull *	theme_name;

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(1))) {
		sv_utf8_upgrade (ST(1));
		theme_name = (const gchar_ornull *)SvPV_nolen (ST(1));
	} else {
		theme_name = NULL;
	}
;

	gtk_icon_theme_set_custom_theme(icon_theme, theme_name);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconTheme_has_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_has_icon)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_theme, icon_name");
    {
	gboolean	RETVAL;
	GtkIconTheme *	icon_theme = SvGtkIconTheme (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))
;

	RETVAL = gtk_icon_theme_has_icon(icon_theme, icon_name);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconTheme_lookup_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_lookup_icon)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "icon_theme, icon_name, size, flags");
    {
	GtkIconInfo_own_ornull *	RETVAL;
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	const gchar *	icon_name;
	gint	size = (gint)SvIV(ST(2))
;
	GtkIconLookupFlags	flags = SvGtkIconLookupFlags (ST(3))
;

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

	RETVAL = gtk_icon_theme_lookup_icon(icon_theme, icon_name, size, flags);
	ST(0) = newSVGtkIconInfo_own_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconTheme_load_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_load_icon)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "icon_theme, icon_name, size, flags");
    {
#line 91 "xs/GtkIconTheme.xs"
	GError * error = NULL;
#line 425 "xs/GtkIconTheme.c"
	GdkPixbuf_noinc_ornull *	RETVAL;
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	const gchar *	icon_name;
	gint	size = (gint)SvIV(ST(2))
;
	GtkIconLookupFlags	flags = SvGtkIconLookupFlags (ST(3))
;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	icon_name = (const gchar *)SvPV_nolen (ST(1))
;
#line 93 "xs/GtkIconTheme.xs"
	RETVAL = gtk_icon_theme_load_icon (icon_theme, icon_name, size,
	                                   flags, &error);
	if (!RETVAL)
		gperl_croak_gerror (NULL, error);
#line 444 "xs/GtkIconTheme.c"
	ST(0) = newSVGdkPixbuf_noinc_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconTheme_list_icons); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_list_icons)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_theme, context");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 104 "xs/GtkIconTheme.xs"
	GList * list, * i;
#line 463 "xs/GtkIconTheme.c"
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	const gchar_ornull *	context;

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(1))) {
		sv_utf8_upgrade (ST(1));
		context = (const gchar_ornull *)SvPV_nolen (ST(1));
	} else {
		context = NULL;
	}
;
#line 106 "xs/GtkIconTheme.xs"
	list = gtk_icon_theme_list_icons (icon_theme, context);
	for (i = list ; i != NULL ; i = i->next) {
		XPUSHs (sv_2mortal (newSVGChar (i->data)));
		g_free (i->data);
	}
	g_list_free (list);
#line 483 "xs/GtkIconTheme.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__IconTheme_get_example_icon_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_get_example_icon_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_theme");
    {
	gchar_own_ornull *	RETVAL;
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;

	RETVAL = gtk_icon_theme_get_example_icon_name(icon_theme);
	ST(0) = sv_newmortal();
	if (RETVAL) {
		sv_setpv ((SV*)ST(0), RETVAL);
		SvUTF8_on (ST(0));
	        g_free (RETVAL);
	} else {
		SvSetSV (ST(0), &PL_sv_undef);
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconTheme_rescan_if_needed); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_rescan_if_needed)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_theme");
    {
	gboolean	RETVAL;
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;

	RETVAL = gtk_icon_theme_rescan_if_needed(icon_theme);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconTheme_add_builtin_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_add_builtin_icon)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, icon_name, size, pixbuf");
    {
	const gchar *	icon_name;
	gint	size = (gint)SvIV(ST(2))
;
	GdkPixbuf *	pixbuf = SvGdkPixbuf (ST(3))
;

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

	gtk_icon_theme_add_builtin_icon(icon_name, size, pixbuf);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__IconTheme_get_icon_sizes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_get_icon_sizes)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_theme, icon_name");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 128 "xs/GtkIconTheme.xs"
	gint *result = NULL, *shadow = NULL;
	gint size;
#line 572 "xs/GtkIconTheme.c"
	GtkIconTheme *	icon_theme = SvGtkIconTheme (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))
;
#line 131 "xs/GtkIconTheme.xs"
	shadow = result = gtk_icon_theme_get_icon_sizes (icon_theme, icon_name);
	if (result) {
		/* The list is 0-terminated, so we loop over it until we get a
		   0. */
		while (0 != (size = *(result++)))
			XPUSHs (sv_2mortal (newSViv (size)));
		g_free (shadow);
	}
#line 590 "xs/GtkIconTheme.c"
	PUTBACK;
	return;
    }
}

#endif
#if GTK_CHECK_VERSION (2, 12, 0)
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Gtk2__IconTheme_list_contexts); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_list_contexts)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_theme");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 148 "xs/GtkIconTheme.xs"
	GList *list, *i;
#line 612 "xs/GtkIconTheme.c"
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
#line 150 "xs/GtkIconTheme.xs"
	list = gtk_icon_theme_list_contexts (icon_theme);
	for (i = list; i != NULL; i = i->next) {
		XPUSHs (sv_2mortal (newSVGChar (i->data)));
		g_free (i->data);
	}
	g_list_free (list);
#line 622 "xs/GtkIconTheme.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__IconTheme_choose_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconTheme_choose_icon)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "icon_theme, icon_names, size, flags");
    {
#line 161 "xs/GtkIconTheme.xs"
	gchar **names;
	AV *av;
	int length, i;
#line 640 "xs/GtkIconTheme.c"
	GtkIconInfo_own_ornull *	RETVAL;
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(0))
;
	SV *	icon_names = ST(1)
;
	gint	size = (gint)SvIV(ST(2))
;
	GtkIconLookupFlags	flags = SvGtkIconLookupFlags (ST(3))
;
#line 165 "xs/GtkIconTheme.xs"
	if (!gperl_sv_is_array_ref (icon_names))
		croak ("icon_names must be an array reference of icon names");
	av = (AV *) SvRV (icon_names);
	length = av_len (av) + 1;
	names = g_new0 (gchar *, length + 1);
	for (i = 0; i < length; i++) {
		SV **sv = av_fetch (av, i, 0);
		names[i] = sv && gperl_sv_is_defined (*sv) ? SvPV_nolen (*sv) : "";
	}
	names[length] = NULL;

	RETVAL = gtk_icon_theme_choose_icon (
			icon_theme,
			(const char **) names,
			size,
			flags);

	g_free (names);
#line 669 "xs/GtkIconTheme.c"
	ST(0) = newSVGtkIconInfo_own_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Gtk2__IconInfo_get_base_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_get_base_size)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_info");
    {
	gint	RETVAL;
	dXSTARG;
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;

	RETVAL = gtk_icon_info_get_base_size(icon_info);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconInfo_get_filename); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_get_filename)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_info");
    {
	const gchar_ornull *	RETVAL;
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;

	RETVAL = gtk_icon_info_get_filename(icon_info);
	ST(0) = sv_newmortal();
	/* newSVGChar() allows NULL, but T_GCHAR does not. allow NULL. */
	if (RETVAL) {
		sv_setpv ((SV*)ST(0), RETVAL);
		SvUTF8_on (ST(0));
	} else {
		SvSetSV (ST(0), &PL_sv_undef);
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconInfo_get_builtin_pixbuf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_get_builtin_pixbuf)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_info");
    {
	GdkPixbuf_ornull *	RETVAL;
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;

	RETVAL = gtk_icon_info_get_builtin_pixbuf(icon_info);
	ST(0) = newSVGdkPixbuf_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconInfo_load_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_load_icon)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_info");
    {
#line 206 "xs/GtkIconTheme.xs"
	GError *error = NULL;
#line 750 "xs/GtkIconTheme.c"
	GdkPixbuf_noinc_ornull *	RETVAL;
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;
#line 208 "xs/GtkIconTheme.xs"
	RETVAL = gtk_icon_info_load_icon (icon_info, &error);
	if (!RETVAL)
		gperl_croak_gerror (NULL, error);
#line 758 "xs/GtkIconTheme.c"
	ST(0) = newSVGdkPixbuf_noinc_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconInfo_set_raw_coordinates); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_set_raw_coordinates)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "icon_info, raw_coordinates");
    {
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;
	gboolean	raw_coordinates = (bool)SvTRUE(ST(1))
;

	gtk_icon_info_set_raw_coordinates(icon_info, raw_coordinates);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__IconInfo_get_embedded_rect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_get_embedded_rect)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_info");
    {
#line 220 "xs/GtkIconTheme.xs"
	GdkRectangle rectangle;
#line 793 "xs/GtkIconTheme.c"
	GdkRectangle_copy *	RETVAL;
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;
#line 222 "xs/GtkIconTheme.xs"
	if (!gtk_icon_info_get_embedded_rect (icon_info, &rectangle))
		XSRETURN_UNDEF;
	RETVAL = &rectangle;
#line 801 "xs/GtkIconTheme.c"
	ST(0) = newSVGdkRectangle_copy (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__IconInfo_get_attach_points); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_get_attach_points)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_info");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 237 "xs/GtkIconTheme.xs"
	GdkPoint *points = NULL;
	gint n_points;
#line 821 "xs/GtkIconTheme.c"
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;
#line 240 "xs/GtkIconTheme.xs"
	if (gtk_icon_info_get_attach_points (icon_info, &points, &n_points)) {
		int i;
		EXTEND (SP, n_points * 2);
		for (i = 0 ; i < n_points ; i++) {
			PUSHs (sv_2mortal (newSViv (points[i].x)));
			PUSHs (sv_2mortal (newSViv (points[i].y)));
		}
		g_free (points);
	}
#line 834 "xs/GtkIconTheme.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__IconInfo_get_display_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_get_display_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "icon_info");
    {
	const gchar_ornull *	RETVAL;
	GtkIconInfo *	icon_info = SvGtkIconInfo (ST(0))
;

	RETVAL = gtk_icon_info_get_display_name(icon_info);
	ST(0) = sv_newmortal();
	/* newSVGChar() allows NULL, but T_GCHAR does not. allow NULL. */
	if (RETVAL) {
		sv_setpv ((SV*)ST(0), RETVAL);
		SvUTF8_on (ST(0));
	} else {
		SvSetSV (ST(0), &PL_sv_undef);
	}
    }
    XSRETURN(1);
}

#if GTK_CHECK_VERSION (2, 14, 0)
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Gtk2__IconInfo_new_for_pixbuf); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__IconInfo_new_for_pixbuf)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, icon_theme, pixbuf");
    {
	GtkIconInfo_own *	RETVAL;
	GtkIconTheme *	icon_theme = SvGtkIconTheme (ST(1))
;
	GdkPixbuf *	pixbuf = SvGdkPixbuf (ST(2))
;

	RETVAL = gtk_icon_info_new_for_pixbuf(icon_theme, pixbuf);
	ST(0) = newSVGtkIconInfo_own (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

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

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#endif
    XS_VERSION_BOOTCHECK;

        newXS("Gtk2::IconTheme::new", XS_Gtk2__IconTheme_new, file);
        newXS("Gtk2::IconTheme::get_default", XS_Gtk2__IconTheme_get_default, file);
        newXS("Gtk2::IconTheme::get_for_screen", XS_Gtk2__IconTheme_get_for_screen, file);
        newXS("Gtk2::IconTheme::set_screen", XS_Gtk2__IconTheme_set_screen, file);
        newXS("Gtk2::IconTheme::set_search_path", XS_Gtk2__IconTheme_set_search_path, file);
        newXS("Gtk2::IconTheme::get_search_path", XS_Gtk2__IconTheme_get_search_path, file);
        newXS("Gtk2::IconTheme::append_search_path", XS_Gtk2__IconTheme_append_search_path, file);
        newXS("Gtk2::IconTheme::prepend_search_path", XS_Gtk2__IconTheme_prepend_search_path, file);
        newXS("Gtk2::IconTheme::set_custom_theme", XS_Gtk2__IconTheme_set_custom_theme, file);
        newXS("Gtk2::IconTheme::has_icon", XS_Gtk2__IconTheme_has_icon, file);
        newXS("Gtk2::IconTheme::lookup_icon", XS_Gtk2__IconTheme_lookup_icon, file);
        newXS("Gtk2::IconTheme::load_icon", XS_Gtk2__IconTheme_load_icon, file);
        newXS("Gtk2::IconTheme::list_icons", XS_Gtk2__IconTheme_list_icons, file);
        newXS("Gtk2::IconTheme::get_example_icon_name", XS_Gtk2__IconTheme_get_example_icon_name, file);
        newXS("Gtk2::IconTheme::rescan_if_needed", XS_Gtk2__IconTheme_rescan_if_needed, file);
        newXS("Gtk2::IconTheme::add_builtin_icon", XS_Gtk2__IconTheme_add_builtin_icon, file);
#if XSubPPtmpAAAA
        newXS("Gtk2::IconTheme::get_icon_sizes", XS_Gtk2__IconTheme_get_icon_sizes, file);
#endif
#if XSubPPtmpAAAB
        newXS("Gtk2::IconTheme::list_contexts", XS_Gtk2__IconTheme_list_contexts, file);
        newXS("Gtk2::IconTheme::choose_icon", XS_Gtk2__IconTheme_choose_icon, file);
#endif
        newXS("Gtk2::IconInfo::get_base_size", XS_Gtk2__IconInfo_get_base_size, file);
        newXS("Gtk2::IconInfo::get_filename", XS_Gtk2__IconInfo_get_filename, file);
        newXS("Gtk2::IconInfo::get_builtin_pixbuf", XS_Gtk2__IconInfo_get_builtin_pixbuf, file);
        newXS("Gtk2::IconInfo::load_icon", XS_Gtk2__IconInfo_load_icon, file);
        newXS("Gtk2::IconInfo::set_raw_coordinates", XS_Gtk2__IconInfo_set_raw_coordinates, file);
        newXS("Gtk2::IconInfo::get_embedded_rect", XS_Gtk2__IconInfo_get_embedded_rect, file);
        newXS("Gtk2::IconInfo::get_attach_points", XS_Gtk2__IconInfo_get_attach_points, file);
        newXS("Gtk2::IconInfo::get_display_name", XS_Gtk2__IconInfo_get_display_name, file);
#if XSubPPtmpAAAC
        newXS("Gtk2::IconInfo::new_for_pixbuf", XS_Gtk2__IconInfo_new_for_pixbuf, file);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#line 953 "xs/GtkIconTheme.c"

    /* End of Initialisation Section */

#if (PERL_REVISION == 5 && PERL_VERSION >= 9)
  if (PL_unitcheckav)
       call_list(PL_scopestack_ix, PL_unitcheckav);
#endif
    XSRETURN_YES;
}

