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

#line 1 "xs/GtkStyle.xs"
/*
 * Copyright (c) 2003-2009 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"

#line 34 "xs/GtkStyle.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 178 "xs/GtkStyle.c"

XS_EUPXS(XS_Gtk2__Style_black); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_black)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "style");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	SV *	RETVAL;
#line 46 "xs/GtkStyle.xs"
	switch (ix) {
	    case 0: RETVAL = newSVGdkColor (&(style->black)); break;
	    case 1: RETVAL = newSVGdkColor (&(style->white)); break;
	    case 2: RETVAL = newSVPangoFontDescription_copy (style->font_desc); break;
	    case 3: RETVAL = newSViv (style->xthickness); break;
	    case 4: RETVAL = newSViv (style->ythickness); break;
	    case 5: RETVAL = newSVGdkGC (style->black_gc); break;
	    case 6: RETVAL = newSVGdkGC (style->white_gc); break;
	    default: 
		RETVAL = NULL;
		g_assert_not_reached ();
	}
#line 204 "xs/GtkStyle.c"
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Style_fg); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_fg)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "style, state");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GtkStateType	state = SvGtkStateType (ST(1))
;
	GdkColor *	RETVAL;
#line 74 "xs/GtkStyle.xs"
	switch (ix) {
	    case 0: RETVAL = &(style->fg[state]); break;
	    case 1: RETVAL = &(style->bg[state]); break;
	    case 2: RETVAL = &(style->light[state]); break;
	    case 3: RETVAL = &(style->dark[state]); break;
	    case 4: RETVAL = &(style->mid[state]); break;
	    case 5: RETVAL = &(style->text[state]); break;
	    case 6: RETVAL = &(style->base[state]); break;
	    case 7: RETVAL = &(style->text_aa[state]); break;
	    default: 
		RETVAL = NULL;
		g_assert_not_reached ();
	}
#line 239 "xs/GtkStyle.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkColor (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Style_fg_gc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_fg_gc)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 2)
       croak_xs_usage(cv,  "style, state");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GtkStateType	state = SvGtkStateType (ST(1))
;
	GdkGC *	RETVAL;
#line 104 "xs/GtkStyle.xs"
	switch (ix) {
	    case 0: RETVAL = style->fg_gc[state]; break;
	    case 1: RETVAL = style->bg_gc[state]; break;
	    case 2: RETVAL = style->light_gc[state]; break;
	    case 3: RETVAL = style->dark_gc[state]; break;
	    case 4: RETVAL = style->mid_gc[state]; break;
	    case 5: RETVAL = style->text_gc[state]; break;
	    case 6: RETVAL = style->base_gc[state]; break;
	    case 7: RETVAL = style->text_aa_gc[state]; break;
	    default: 
		RETVAL = NULL;
		g_assert_not_reached ();
	}
#line 278 "xs/GtkStyle.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkGC (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Style_bg_pixmap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_bg_pixmap)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "style, state, pixmap=NULL");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GtkStateType	state = SvGtkStateType (ST(1))
;
	GdkPixmap_ornull *	pixmap;
	GdkPixmap *	RETVAL;

	if (items < 3)
	    pixmap = NULL;
	else {
	    pixmap = SvGdkPixmap_ornull (ST(2))
;
	}
#line 128 "xs/GtkStyle.xs"
	RETVAL = style->bg_pixmap[state];
	if (items > 2 && style->bg_pixmap[state] != pixmap) {
		if (style->bg_pixmap[state])
			g_object_unref (style->bg_pixmap[state]);
		style->bg_pixmap[state] = pixmap;
		if (pixmap)
			g_object_ref (pixmap);
	}
#line 319 "xs/GtkStyle.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkPixmap (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


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

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


XS_EUPXS(XS_Gtk2__Style_copy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_copy)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "style");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GtkStyle_noinc *	RETVAL;

	RETVAL = gtk_style_copy(style);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkStyle_noinc (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Style_attached); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_attached)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "style");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	gboolean	RETVAL;
#line 156 "xs/GtkStyle.xs"
	RETVAL = GTK_STYLE_ATTACHED (style);
#line 387 "xs/GtkStyle.c"
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Style_attach); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_attach)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "style, window");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkWindow *	window = SvGdkWindow (ST(1))
;
	GtkStyle *	RETVAL;

	RETVAL = gtk_style_attach(style, window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkStyle (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
#line 166 "xs/GtkStyle.xs"
	if (RETVAL != style)
		/* claim ownership of new object */
		g_object_unref (RETVAL);
#line 418 "xs/GtkStyle.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Style_detach); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_detach)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "style");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;

	gtk_style_detach(style);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_set_background); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_set_background)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "style, window, state_type");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkWindow *	window = SvGdkWindow (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;

	gtk_style_set_background(style, window, state_type);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_apply_default_background); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_apply_default_background)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "style, window, set_bg, state_type, area, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkWindow *	window = SvGdkWindow (ST(1))
;
	gboolean	set_bg = (bool)SvTRUE(ST(2))
;
	GtkStateType	state_type = SvGtkStateType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	gint	x = (gint)SvIV(ST(5))
;
	gint	y = (gint)SvIV(ST(6))
;
	gint	width = (gint)SvIV(ST(7))
;
	gint	height = (gint)SvIV(ST(8))
;

	gtk_style_apply_default_background(style, window, set_bg, state_type, area, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_lookup_icon_set); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_lookup_icon_set)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "style, stock_id");
    {
	GtkStyle *	style = SvGtkStyle (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_style_lookup_icon_set(style, stock_id);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGtkIconSet (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Style_render_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_render_icon)
{
    dVAR; dXSARGS;
    if (items < 6 || items > 7)
       croak_xs_usage(cv,  "style, source, direction, state, size, widget, detail=NULL");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GtkIconSource *	source = SvGtkIconSource (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 gchar_ornull *	detail;
	GdkPixbuf_noinc *	RETVAL;

	if (items < 7)
	    detail = NULL;
	else {
	    /* same as SvGChar(), but allows undef as NULL */
	    if (gperl_sv_is_defined (ST(6))) {
		    sv_utf8_upgrade (ST(6));
		    detail = (const gchar_ornull *)SvPV_nolen (ST(6));
	    } else {
		    detail = NULL;
	    }
;
	}

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


XS_EUPXS(XS_Gtk2__Style_paint_flat_box); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_flat_box)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_flat_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_hline); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_hline)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "style, window, state_type, area, widget, detail, x1, x2, y");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(3))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(4))
;
	const gchar_ornull *	detail;
	gint	x1 = (gint)SvIV(ST(6))
;
	gint	x2 = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;

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

	gtk_paint_hline(style, window, state_type, area, widget, detail, x1, x2, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_vline); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_vline)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "style, window, state_type, area, widget, detail, y1_, y2_, x");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(3))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(4))
;
	const gchar_ornull *	detail;
	gint	y1_ = (gint)SvIV(ST(6))
;
	gint	y2_ = (gint)SvIV(ST(7))
;
	gint	x = (gint)SvIV(ST(8))
;

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

	gtk_paint_vline(style, window, state_type, area, widget, detail, y1_, y2_, x);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_shadow); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_shadow)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_shadow(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_polygon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_polygon)
{
    dVAR; dXSARGS;
    if (items < 10)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, fill, x1, y1, ...");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	gboolean	fill = (bool)SvTRUE(ST(7))
;
#line 291 "xs/GtkStyle.xs"
	GdkPoint *points;
	gint npoints, i;
#line 761 "xs/GtkStyle.c"

	/* same as SvGChar(), but allows undef as NULL */
	if (gperl_sv_is_defined (ST(6))) {
		sv_utf8_upgrade (ST(6));
		detail = (const gchar_ornull *)SvPV_nolen (ST(6));
	} else {
		detail = NULL;
	}
;
#line 294 "xs/GtkStyle.xs"
#define first 8
	npoints = (items - first) / 2;
	points = g_new (GdkPoint, npoints);
	for (i = 0 ; i < npoints ; i++) {
		points[i].x = SvIV (ST (first + 2*i));
		points[i].y = SvIV (ST (first + 2*i + 1));
	}
	gtk_paint_polygon (style, window, state_type, shadow_type,
	                   area, widget, detail, points, npoints, fill);
	g_free (points);
#undef first
#line 783 "xs/GtkStyle.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_arrow); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_arrow)
{
    dVAR; dXSARGS;
    if (items != 13)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	GtkArrowType	arrow_type = SvGtkArrowType (ST(7))
;
	gboolean	fill = (bool)SvTRUE(ST(8))
;
	gint	x = (gint)SvIV(ST(9))
;
	gint	y = (gint)SvIV(ST(10))
;
	gint	width = (gint)SvIV(ST(11))
;
	gint	height = (gint)SvIV(ST(12))
;

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

	gtk_paint_arrow(style, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_diamond); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_diamond)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_diamond(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_box); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_box)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_box(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_check); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_check)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget *	widget = SvGtkWidget (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_check(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_option); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_option)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget *	widget = SvGtkWidget (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_option(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_tab); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_tab)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget *	widget = SvGtkWidget (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_tab(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_shadow_gap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_shadow_gap)
{
    dVAR; dXSARGS;
    if (items != 14)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;
	GtkPositionType	gap_side = SvGtkPositionType (ST(11))
;
	gint	gap_x = (gint)SvIV(ST(12))
;
	gint	gap_width = (gint)SvIV(ST(13))
;

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

	gtk_paint_shadow_gap(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_box_gap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_box_gap)
{
    dVAR; dXSARGS;
    if (items != 14)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;
	GtkPositionType	gap_side = SvGtkPositionType (ST(11))
;
	gint	gap_x = (gint)SvIV(ST(12))
;
	gint	gap_width = (gint)SvIV(ST(13))
;

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

	gtk_paint_box_gap(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_extension); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_extension)
{
    dVAR; dXSARGS;
    if (items != 12)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;
	GtkPositionType	gap_side = SvGtkPositionType (ST(11))
;

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

	gtk_paint_extension(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_focus); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_focus)
{
    dVAR; dXSARGS;
    if (items != 10)
       croak_xs_usage(cv,  "style, window, state_type, area, widget, detail, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(3))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(4))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(6))
;
	gint	y = (gint)SvIV(ST(7))
;
	gint	width = (gint)SvIV(ST(8))
;
	gint	height = (gint)SvIV(ST(9))
;

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

	gtk_paint_focus(style, window, state_type, area, widget, detail, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_slider); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_slider)
{
    dVAR; dXSARGS;
    if (items != 12)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;
	GtkOrientation	orientation = SvGtkOrientation (ST(11))
;

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

	gtk_paint_slider(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_handle); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_handle)
{
    dVAR; dXSARGS;
    if (items != 12)
       croak_xs_usage(cv,  "style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GtkShadowType	shadow_type = SvGtkShadowType (ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;
	GtkOrientation	orientation = SvGtkOrientation (ST(11))
;

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

	gtk_paint_handle(style, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_expander); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_expander)
{
    dVAR; dXSARGS;
    if (items != 9)
       croak_xs_usage(cv,  "style, window, state_type, area, widget, detail, x, y, expander_style");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(3))
;
	GtkWidget *	widget = SvGtkWidget (ST(4))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(6))
;
	gint	y = (gint)SvIV(ST(7))
;
	GtkExpanderStyle	expander_style = SvGtkExpanderStyle (ST(8))
;

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

	gtk_paint_expander(style, window, state_type, area, widget, detail, x, y, expander_style);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_layout); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_layout)
{
    dVAR; dXSARGS;
    if (items != 10)
       croak_xs_usage(cv,  "style, window, state_type, use_text, area, widget, detail, x, y, layout");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	gboolean	use_text = (bool)SvTRUE(ST(3))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(4))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(5))
;
	const gchar_ornull *	detail;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	PangoLayout *	layout = SvPangoLayout (ST(9))
;

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

	gtk_paint_layout(style, window, state_type, use_text, area, widget, detail, x, y, layout);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Style_paint_resize_grip); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_resize_grip)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, area, widget, detail, edge, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkDrawable *	window = SvGdkDrawable (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(3))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(4))
;
	const gchar_ornull *	detail;
	GdkWindowEdge	edge = SvGdkWindowEdge (ST(6))
;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_resize_grip(style, window, state_type, area, widget, detail, edge, x, y, width, height);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Style_paint_spinner); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_paint_spinner)
{
    dVAR; dXSARGS;
    if (items != 11)
       croak_xs_usage(cv,  "style, window, state_type, area, widget, detail, step, x, y, width, height");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	GdkWindow *	window = SvGdkWindow (ST(1))
;
	GtkStateType	state_type = SvGtkStateType (ST(2))
;
	const GdkRectangle_ornull *	area = SvGdkRectangle_ornull (ST(3))
;
	GtkWidget_ornull *	widget = SvGtkWidget_ornull (ST(4))
;
	const gchar_ornull *	detail;
	guint	step = (guint)SvUV(ST(6))
;
	gint	x = (gint)SvIV(ST(7))
;
	gint	y = (gint)SvIV(ST(8))
;
	gint	width = (gint)SvIV(ST(9))
;
	gint	height = (gint)SvIV(ST(10))
;

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

	gtk_paint_spinner(style, window, state_type, area, widget, detail, step, x, y, width, height);
    }
    XSRETURN_EMPTY;
}

#endif /* 2.20 */
#if GTK_CHECK_VERSION (2, 4, 0)
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Gtk2_draw_insertion_cursor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2_draw_insertion_cursor)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "class, widget, drawable, area, location, is_primary, direction, draw_arrow");
    {
	GtkWidget *	widget = SvGtkWidget (ST(1))
;
	GdkDrawable *	drawable = SvGdkDrawable (ST(2))
;
	GdkRectangle *	area = SvGdkRectangle (ST(3))
;
	GdkRectangle *	location = SvGdkRectangle (ST(4))
;
	gboolean	is_primary = (bool)SvTRUE(ST(5))
;
	GtkTextDirection	direction = SvGtkTextDirection (ST(6))
;
	gboolean	draw_arrow = (bool)SvTRUE(ST(7))
;

	gtk_draw_insertion_cursor(widget, drawable, area, location, is_primary, direction, draw_arrow);
    }
    XSRETURN_EMPTY;
}

#endif
#if GTK_CHECK_VERSION (2, 10, 0)
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Gtk2__Style_lookup_color); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_lookup_color)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "style, color_name");
    {
#line 572 "xs/GtkStyle.xs"
        GdkColor color;
#line 1551 "xs/GtkStyle.c"
	GdkColor_copy *	RETVAL;
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	const gchar *	color_name;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	color_name = (const gchar *)SvPV_nolen (ST(1))
;
#line 574 "xs/GtkStyle.xs"
        if (!gtk_style_lookup_color (style, color_name, &color))
                XSRETURN_UNDEF;
        RETVAL = &color;
#line 1565 "xs/GtkStyle.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkColor_copy (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif
#if GTK_CHECK_VERSION (2, 16, 0)
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_Gtk2__Style_get); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Style_get)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items < 2)
       croak_xs_usage(cv,  "style, widget_package, ...");
    {
	GtkStyle *	style = SvGtkStyle (ST(0))
;
	const char *	widget_package = (const char *)SvPV_nolen(ST(1))
;
#line 610 "xs/GtkStyle.xs"
	int i;
	GType widget_type;
	gpointer class;
#line 1597 "xs/GtkStyle.c"
#line 614 "xs/GtkStyle.xs"
	/* Use CODE: instead of PPCODE: so we can handle the stack ourselves in
	 * order to avoid that xsubs called by gtk_style_get_style_property
	 * overwrite what we put on the stack. */

	PERL_UNUSED_VAR (ix);

	widget_type = gperl_type_from_package (widget_package);
	if (widget_type == 0)
		croak ("package %s is not registered with GPerl", widget_package);

	if (! g_type_is_a (widget_type, GTK_TYPE_WIDGET))
		croak ("%s is not a subclass of Gtk2::Widget", widget_package);


	class = g_type_class_ref (widget_type);
	if (class == NULL)
		croak ("can't find type class for type %s", widget_package);

	for (i = 2 ; i < items ; i++) {
		GValue value = {0, };
		gchar *name = SvGChar (ST (i));
		GParamSpec *pspec =
			gtk_widget_class_find_style_property (class, name);

		if (pspec) {
			g_value_init (&value, G_PARAM_SPEC_VALUE_TYPE (pspec));
			gtk_style_get_style_property (style, widget_type, name, &value);
			ST (i - 2) = sv_2mortal (gperl_sv_from_value (&value));
			g_value_unset (&value);
		}
		else {
			g_type_class_unref (class);
			croak ("type %s does not support style property '%s'",
			       widget_package, name);
		}
	}

	g_type_class_unref (class);

	XSRETURN (items - 2);
#line 1639 "xs/GtkStyle.c"
    }
    XSRETURN(1);
}

#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__Style); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__Style)
{
#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

    {
        CV * cv;

        cv = newXS_deffile("Gtk2::Style::black", XS_Gtk2__Style_black);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Style::black_gc", XS_Gtk2__Style_black);
        XSANY.any_i32 = 5;
        cv = newXS_deffile("Gtk2::Style::font_desc", XS_Gtk2__Style_black);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Gtk2::Style::white", XS_Gtk2__Style_black);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Gtk2::Style::white_gc", XS_Gtk2__Style_black);
        XSANY.any_i32 = 6;
        cv = newXS_deffile("Gtk2::Style::xthickness", XS_Gtk2__Style_black);
        XSANY.any_i32 = 3;
        cv = newXS_deffile("Gtk2::Style::ythickness", XS_Gtk2__Style_black);
        XSANY.any_i32 = 4;
        cv = newXS_deffile("Gtk2::Style::base", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 6;
        cv = newXS_deffile("Gtk2::Style::bg", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Gtk2::Style::dark", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 3;
        cv = newXS_deffile("Gtk2::Style::fg", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Style::light", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Gtk2::Style::mid", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 4;
        cv = newXS_deffile("Gtk2::Style::text", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 5;
        cv = newXS_deffile("Gtk2::Style::text_aa", XS_Gtk2__Style_fg);
        XSANY.any_i32 = 7;
        cv = newXS_deffile("Gtk2::Style::base_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 6;
        cv = newXS_deffile("Gtk2::Style::bg_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Gtk2::Style::dark_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 3;
        cv = newXS_deffile("Gtk2::Style::fg_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Style::light_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Gtk2::Style::mid_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 4;
        cv = newXS_deffile("Gtk2::Style::text_aa_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 7;
        cv = newXS_deffile("Gtk2::Style::text_gc", XS_Gtk2__Style_fg_gc);
        XSANY.any_i32 = 5;
        newXS_deffile("Gtk2::Style::bg_pixmap", XS_Gtk2__Style_bg_pixmap);
        newXS_deffile("Gtk2::Style::new", XS_Gtk2__Style_new);
        newXS_deffile("Gtk2::Style::copy", XS_Gtk2__Style_copy);
        newXS_deffile("Gtk2::Style::attached", XS_Gtk2__Style_attached);
        newXS_deffile("Gtk2::Style::attach", XS_Gtk2__Style_attach);
        newXS_deffile("Gtk2::Style::detach", XS_Gtk2__Style_detach);
        newXS_deffile("Gtk2::Style::set_background", XS_Gtk2__Style_set_background);
        newXS_deffile("Gtk2::Style::apply_default_background", XS_Gtk2__Style_apply_default_background);
        newXS_deffile("Gtk2::Style::lookup_icon_set", XS_Gtk2__Style_lookup_icon_set);
        newXS_deffile("Gtk2::Style::render_icon", XS_Gtk2__Style_render_icon);
        newXS_deffile("Gtk2::Style::paint_flat_box", XS_Gtk2__Style_paint_flat_box);
        newXS_deffile("Gtk2::Style::paint_hline", XS_Gtk2__Style_paint_hline);
        newXS_deffile("Gtk2::Style::paint_vline", XS_Gtk2__Style_paint_vline);
        newXS_deffile("Gtk2::Style::paint_shadow", XS_Gtk2__Style_paint_shadow);
        newXS_deffile("Gtk2::Style::paint_polygon", XS_Gtk2__Style_paint_polygon);
        newXS_deffile("Gtk2::Style::paint_arrow", XS_Gtk2__Style_paint_arrow);
        newXS_deffile("Gtk2::Style::paint_diamond", XS_Gtk2__Style_paint_diamond);
        newXS_deffile("Gtk2::Style::paint_box", XS_Gtk2__Style_paint_box);
        newXS_deffile("Gtk2::Style::paint_check", XS_Gtk2__Style_paint_check);
        newXS_deffile("Gtk2::Style::paint_option", XS_Gtk2__Style_paint_option);
        newXS_deffile("Gtk2::Style::paint_tab", XS_Gtk2__Style_paint_tab);
        newXS_deffile("Gtk2::Style::paint_shadow_gap", XS_Gtk2__Style_paint_shadow_gap);
        newXS_deffile("Gtk2::Style::paint_box_gap", XS_Gtk2__Style_paint_box_gap);
        newXS_deffile("Gtk2::Style::paint_extension", XS_Gtk2__Style_paint_extension);
        newXS_deffile("Gtk2::Style::paint_focus", XS_Gtk2__Style_paint_focus);
        newXS_deffile("Gtk2::Style::paint_slider", XS_Gtk2__Style_paint_slider);
        newXS_deffile("Gtk2::Style::paint_handle", XS_Gtk2__Style_paint_handle);
        newXS_deffile("Gtk2::Style::paint_expander", XS_Gtk2__Style_paint_expander);
        newXS_deffile("Gtk2::Style::paint_layout", XS_Gtk2__Style_paint_layout);
        newXS_deffile("Gtk2::Style::paint_resize_grip", XS_Gtk2__Style_paint_resize_grip);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::Style::paint_spinner", XS_Gtk2__Style_paint_spinner);
#endif
#if XSubPPtmpAAAB
        newXS_deffile("Gtk2::draw_insertion_cursor", XS_Gtk2_draw_insertion_cursor);
#endif
#if XSubPPtmpAAAC
        newXS_deffile("Gtk2::Style::lookup_color", XS_Gtk2__Style_lookup_color);
#endif
#if XSubPPtmpAAAD
        cv = newXS_deffile("Gtk2::Style::get", XS_Gtk2__Style_get);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Style::get_style_property", XS_Gtk2__Style_get);
        XSANY.any_i32 = 1;
#endif
    }

    /* Initialisation Section */

#line 27 "xs/GtkStyle.xs"
	/* theme engines can provide subclasses on GtkStyle which may have
	 * any name they like, and will not be registered with the gperl
	 * bindings type subsystem.  any time a user has the theme set to
	 * anything other than the default, one of these unregistered
	 * styles comes through.  set this to keep gperl_get_object from
	 * spewing harmless and unavoidable warnings all over stderr. */
	gperl_object_set_no_warn_unreg_subclass (GTK_TYPE_STYLE, TRUE);

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#line 1788 "xs/GtkStyle.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
}

