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

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

#include "gtk2perl.h"

#line 21 "xs/GdkVisual.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 165 "xs/GdkVisual.c"

XS_EUPXS(XS_Gtk2__Gdk_query_depths); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk_query_depths)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 20 "xs/GdkVisual.xs"
	gint *depths = NULL;
	gint i, count = 0;
#line 179 "xs/GdkVisual.c"
#line 23 "xs/GdkVisual.xs"
	gdk_query_depths (&depths, &count);

	if (count <= 0 || depths == NULL)
		XSRETURN_EMPTY;

	EXTEND (sp, count);

	for (i = 0; i < count; i++)
		PUSHs (sv_2mortal (newSViv (depths[i])));
#line 190 "xs/GdkVisual.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk_query_visual_types); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk_query_visual_types)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 37 "xs/GdkVisual.xs"
	GdkVisualType *visual_types = NULL;
	gint i, count = 0;
#line 209 "xs/GdkVisual.c"
#line 40 "xs/GdkVisual.xs"
	gdk_query_visual_types (&visual_types, &count);

	if (count <= 0 || visual_types == NULL)
		XSRETURN_EMPTY;

	EXTEND (sp, count);

	for (i = 0; i < count; i++)
		PUSHs (sv_2mortal (newSVGdkVisualType (visual_types[i])));
#line 220 "xs/GdkVisual.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk_list_visuals); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk_list_visuals)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 54 "xs/GdkVisual.xs"
	GList *i, *visuals = NULL;
#line 238 "xs/GdkVisual.c"
#line 56 "xs/GdkVisual.xs"
	PERL_UNUSED_VAR (ax);
	visuals = gdk_list_visuals ();
	for (i = visuals; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGdkVisual (i->data)));
	g_list_free (visuals);
#line 245 "xs/GdkVisual.c"
	PUTBACK;
	return;
    }
}


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

	RETVAL = gdk_visual_get_best_depth(/* void */);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


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

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


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

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


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

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


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_best_with_depth); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_best_with_depth)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, depth");
    {
	gint	depth = (gint)SvIV(ST(1))
;
	GdkVisual_ornull *	RETVAL;

	RETVAL = gdk_visual_get_best_with_depth(depth);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkVisual_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_best_with_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_best_with_type)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, visual_type");
    {
	GdkVisualType	visual_type = SvGdkVisualType (ST(1))
;
	GdkVisual_ornull *	RETVAL;

	RETVAL = gdk_visual_get_best_with_type(visual_type);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkVisual_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_best_with_both); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_best_with_both)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, depth, visual_type");
    {
	gint	depth = (gint)SvIV(ST(1))
;
	GdkVisualType	visual_type = SvGdkVisualType (ST(2))
;
	GdkVisual_ornull *	RETVAL;

	RETVAL = gdk_visual_get_best_with_both(depth, visual_type);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkVisual_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_screen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_screen)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	GdkScreen *	RETVAL;

	RETVAL = gdk_visual_get_screen(visual);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkScreen (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Gtk2__Gdk__Visual_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_type)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	GdkVisualType	RETVAL;
#line 125 "xs/GdkVisual.xs"
	RETVAL = visual->type;
#line 442 "xs/GdkVisual.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkVisualType (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_byte_order); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_byte_order)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	GdkByteOrder	RETVAL;
#line 133 "xs/GdkVisual.xs"
	RETVAL = visual->byte_order;
#line 466 "xs/GdkVisual.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkByteOrder (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_depth); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_depth)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	gint	RETVAL;
	dXSTARG;
#line 150 "xs/GdkVisual.xs"
	RETVAL = 0; /* -W */
	switch (ix) {
		case 0: RETVAL = visual->depth; break;
		case 1: RETVAL = visual->colormap_size; break;
		case 2: RETVAL = visual->bits_per_rgb; break;
		case 3: RETVAL = visual->red_shift; break;
		case 4: RETVAL = visual->red_prec; break;
		case 5: RETVAL = visual->green_shift; break;
		case 6: RETVAL = visual->green_prec; break;
		case 7: RETVAL = visual->blue_shift; break;
		case 8: RETVAL = visual->blue_prec; break;
		default: g_assert_not_reached ();
	}
#line 504 "xs/GdkVisual.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_red_mask); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_red_mask)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	guint32	RETVAL;
	dXSTARG;
#line 173 "xs/GdkVisual.xs"
	RETVAL = 0; /* -W */
	switch (ix) {
		case 0: RETVAL = visual->red_mask; break;
		case 1: RETVAL = visual->green_mask; break;
		case 2: RETVAL = visual->blue_mask; break;
		default: g_assert_not_reached();
	}
#line 531 "xs/GdkVisual.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_blue_pixel_details); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_blue_pixel_details)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	guint32	mask;
	gint	shift;
	gint	precision;

	gdk_visual_get_blue_pixel_details(visual, &mask, &shift, &precision);
	XSprePUSH;	EXTEND(SP,3);
	PUSHs(sv_newmortal());
	sv_setuv(ST(0), (UV)mask);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)shift);
	PUSHs(sv_newmortal());
	sv_setiv(ST(2), (IV)precision);
    }
    XSRETURN(3);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_green_pixel_details); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_green_pixel_details)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	guint32	mask;
	gint	shift;
	gint	precision;

	gdk_visual_get_green_pixel_details(visual, &mask, &shift, &precision);
	XSprePUSH;	EXTEND(SP,3);
	PUSHs(sv_newmortal());
	sv_setuv(ST(0), (UV)mask);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)shift);
	PUSHs(sv_newmortal());
	sv_setiv(ST(2), (IV)precision);
    }
    XSRETURN(3);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_red_pixel_details); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_red_pixel_details)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisual *	visual = SvGdkVisual (ST(0))
;
	guint32	mask;
	gint	shift;
	gint	precision;

	gdk_visual_get_red_pixel_details(visual, &mask, &shift, &precision);
	XSprePUSH;	EXTEND(SP,3);
	PUSHs(sv_newmortal());
	sv_setuv(ST(0), (UV)mask);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)shift);
	PUSHs(sv_newmortal());
	sv_setiv(ST(2), (IV)precision);
    }
    XSRETURN(3);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_bits_per_rgb); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_bits_per_rgb)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	gint	RETVAL;
	dXSTARG;
	GdkVisual *	visual = SvGdkVisual (ST(0))
;

	RETVAL = gdk_visual_get_bits_per_rgb(visual);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_byte_order); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_byte_order)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkByteOrder	RETVAL;
	GdkVisual *	visual = SvGdkVisual (ST(0))
;

	RETVAL = gdk_visual_get_byte_order(visual);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkByteOrder (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_colormap_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_colormap_size)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	gint	RETVAL;
	dXSTARG;
	GdkVisual *	visual = SvGdkVisual (ST(0))
;

	RETVAL = gdk_visual_get_colormap_size(visual);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_depth); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_depth)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	gint	RETVAL;
	dXSTARG;
	GdkVisual *	visual = SvGdkVisual (ST(0))
;

	RETVAL = gdk_visual_get_depth(visual);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Visual_get_visual_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Visual_get_visual_type)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "visual");
    {
	GdkVisualType	RETVAL;
	GdkVisual *	visual = SvGdkVisual (ST(0))
;

	RETVAL = gdk_visual_get_visual_type(visual);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkVisualType (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif /* 2.22 */
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__Gdk__Visual); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__Gdk__Visual)
{
#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::Gdk::query_depths", XS_Gtk2__Gdk_query_depths);
        newXS_deffile("Gtk2::Gdk::query_visual_types", XS_Gtk2__Gdk_query_visual_types);
        newXS_deffile("Gtk2::Gdk::list_visuals", XS_Gtk2__Gdk_list_visuals);
        newXS_deffile("Gtk2::Gdk::Visual::get_best_depth", XS_Gtk2__Gdk__Visual_get_best_depth);
        newXS_deffile("Gtk2::Gdk::Visual::get_best_type", XS_Gtk2__Gdk__Visual_get_best_type);
        newXS_deffile("Gtk2::Gdk::Visual::get_system", XS_Gtk2__Gdk__Visual_get_system);
        newXS_deffile("Gtk2::Gdk::Visual::get_best", XS_Gtk2__Gdk__Visual_get_best);
        newXS_deffile("Gtk2::Gdk::Visual::get_best_with_depth", XS_Gtk2__Gdk__Visual_get_best_with_depth);
        newXS_deffile("Gtk2::Gdk::Visual::get_best_with_type", XS_Gtk2__Gdk__Visual_get_best_with_type);
        newXS_deffile("Gtk2::Gdk::Visual::get_best_with_both", XS_Gtk2__Gdk__Visual_get_best_with_both);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::Gdk::Visual::get_screen", XS_Gtk2__Gdk__Visual_get_screen);
#endif
        newXS_deffile("Gtk2::Gdk::Visual::type", XS_Gtk2__Gdk__Visual_type);
        newXS_deffile("Gtk2::Gdk::Visual::byte_order", XS_Gtk2__Gdk__Visual_byte_order);
        cv = newXS_deffile("Gtk2::Gdk::Visual::bits_per_rgb", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Gtk2::Gdk::Visual::blue_prec", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 8;
        cv = newXS_deffile("Gtk2::Gdk::Visual::blue_shift", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 7;
        cv = newXS_deffile("Gtk2::Gdk::Visual::colormap_size", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Gtk2::Gdk::Visual::depth", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Gdk::Visual::green_prec", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 6;
        cv = newXS_deffile("Gtk2::Gdk::Visual::green_shift", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 5;
        cv = newXS_deffile("Gtk2::Gdk::Visual::red_prec", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 4;
        cv = newXS_deffile("Gtk2::Gdk::Visual::red_shift", XS_Gtk2__Gdk__Visual_depth);
        XSANY.any_i32 = 3;
        cv = newXS_deffile("Gtk2::Gdk::Visual::blue_mask", XS_Gtk2__Gdk__Visual_red_mask);
        XSANY.any_i32 = 2;
        cv = newXS_deffile("Gtk2::Gdk::Visual::green_mask", XS_Gtk2__Gdk__Visual_red_mask);
        XSANY.any_i32 = 1;
        cv = newXS_deffile("Gtk2::Gdk::Visual::red_mask", XS_Gtk2__Gdk__Visual_red_mask);
        XSANY.any_i32 = 0;
#if XSubPPtmpAAAB
        newXS_deffile("Gtk2::Gdk::Visual::get_blue_pixel_details", XS_Gtk2__Gdk__Visual_get_blue_pixel_details);
        newXS_deffile("Gtk2::Gdk::Visual::get_green_pixel_details", XS_Gtk2__Gdk__Visual_get_green_pixel_details);
        newXS_deffile("Gtk2::Gdk::Visual::get_red_pixel_details", XS_Gtk2__Gdk__Visual_get_red_pixel_details);
        newXS_deffile("Gtk2::Gdk::Visual::get_bits_per_rgb", XS_Gtk2__Gdk__Visual_get_bits_per_rgb);
        newXS_deffile("Gtk2::Gdk::Visual::get_byte_order", XS_Gtk2__Gdk__Visual_get_byte_order);
        newXS_deffile("Gtk2::Gdk::Visual::get_colormap_size", XS_Gtk2__Gdk__Visual_get_colormap_size);
        newXS_deffile("Gtk2::Gdk::Visual::get_depth", XS_Gtk2__Gdk__Visual_get_depth);
        newXS_deffile("Gtk2::Gdk::Visual::get_visual_type", XS_Gtk2__Gdk__Visual_get_visual_type);
#endif

    /* Initialisation Section */

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

