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

#line 1 "xs/GdkRegion.xs"
/*
 * Copyright (c) 2003, 2010 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., 59 Temple Place - Suite 330, 
 * Boston, MA  02111-1307  USA.
 *
 * $Id$
 */
#include "gtk2perl.h"
#include "gperl_marshal.h"

/* ------------------------------------------------------------------------- */

GType
gtk2perl_gdk_region_get_type (void)
{
	static GType t = 0;
	if (!t)
		t = g_boxed_type_register_static ("GdkRegion",
		      (GBoxedCopyFunc) gdk_region_copy,
		      (GBoxedFreeFunc) gdk_region_destroy);
	return t;
}

/* ------------------------------------------------------------------------- */

static void
gtk2perl_gdk_span_func (GdkSpan *span,
                        GPerlCallback *callback)
{
	dGPERL_CALLBACK_MARSHAL_SP;
	GPERL_CALLBACK_MARSHAL_INIT (callback);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSViv (span->x)));
	PUSHs (sv_2mortal (newSViv (span->y)));
	PUSHs (sv_2mortal (newSViv (span->width)));
	if (callback->data)
		XPUSHs (sv_2mortal (newSVsv (callback->data)));

	PUTBACK;

	call_sv (callback->func, G_DISCARD);

	FREETMPS;
	LEAVE;
}

/* ------------------------------------------------------------------------- */

#line 78 "xs/GdkRegion.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 222 "xs/GdkRegion.c"

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

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


XS_EUPXS(XS_Gtk2__Gdk__Region_polygon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_polygon)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, points_ref, fill_rule");
    {
	SV *	points_ref = ST(1)
;
	GdkFillRule	fill_rule = SvGdkFillRule (ST(2))
;
#line 82 "xs/GdkRegion.xs"
	GdkPoint *points = NULL;
	gint npoints, i;
	AV *array;
	SV **value;
#line 261 "xs/GdkRegion.c"
	GdkRegion_own *	RETVAL;
#line 87 "xs/GdkRegion.xs"
	if (!gperl_sv_is_array_ref (points_ref))
		croak ("point list has to be a reference to an array");

	array = (AV *) SvRV (points_ref);
	npoints = (av_len (array) + 1) / 2;
	points = g_new0 (GdkPoint, npoints);

	for (i = 0; i < npoints; i++) {
		if ((value = av_fetch (array, 2*i, 0)) && gperl_sv_is_defined (*value))
			points[i].x = SvIV (*value);
		if ((value = av_fetch (array, 2*i + 1, 0)) && gperl_sv_is_defined (*value))
			points[i].y = SvIV (*value);
	}

	RETVAL = gdk_region_polygon (points, npoints, fill_rule);

	g_free (points);
#line 281 "xs/GdkRegion.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkRegion_own (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Region_rectangle); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_rectangle)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, rectangle");
    {
	GdkRectangle *	rectangle = SvGdkRectangle (ST(1))
;
	GdkRegion_own *	RETVAL;

	RETVAL = gdk_region_rectangle(rectangle);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkRegion_own (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Region_get_clipbox); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_get_clipbox)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "region");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
#line 123 "xs/GdkRegion.xs"
	GdkRectangle rectangle;
#line 327 "xs/GdkRegion.c"
	GdkRectangle_copy *	RETVAL;
#line 125 "xs/GdkRegion.xs"
	gdk_region_get_clipbox (region, &rectangle);
	RETVAL = &rectangle;
#line 332 "xs/GdkRegion.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkRectangle_copy (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Region_get_rectangles); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_get_rectangles)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "region");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
#line 139 "xs/GdkRegion.xs"
	GdkRectangle *rectangles = NULL;
	gint n_rectangles;
	int i;
#line 359 "xs/GdkRegion.c"
#line 143 "xs/GdkRegion.xs"
	gdk_region_get_rectangles (region, &rectangles, &n_rectangles);
	EXTEND (SP, n_rectangles);
	for (i = 0 ; i < n_rectangles ; i++)
		PUSHs (sv_2mortal (newSVGdkRectangle_copy (rectangles + i)));
	g_free (rectangles);
#line 366 "xs/GdkRegion.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Region_empty); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_empty)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "region");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gdk_region_empty(region);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Region_equal); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_equal)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "region1, region2");
    {
	GdkRegion *	region1 = SvGdkRegion (ST(0))
;
	GdkRegion *	region2 = SvGdkRegion (ST(1))
;
	gboolean	RETVAL;

	RETVAL = gdk_region_equal(region1, region2);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Region_point_in); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_point_in)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "region, x, y");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
	int	x = (int)SvIV(ST(1))
;
	int	y = (int)SvIV(ST(2))
;
	gboolean	RETVAL;

	RETVAL = gdk_region_point_in(region, x, y);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Region_rect_in); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_rect_in)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "region, rect");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
	GdkRectangle *	rect = SvGdkRectangle (ST(1))
;
	GdkOverlapType	RETVAL;

	RETVAL = gdk_region_rect_in(region, rect);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkOverlapType (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Region_offset); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_offset)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "region, dx, dy");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
	gint	dx = (gint)SvIV(ST(1))
;
	gint	dy = (gint)SvIV(ST(2))
;

	gdk_region_offset(region, dx, dy);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Region_shrink); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_shrink)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "region, dx, dy");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
	gint	dx = (gint)SvIV(ST(1))
;
	gint	dy = (gint)SvIV(ST(2))
;

	gdk_region_shrink(region, dx, dy);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Region_union_with_rect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_union_with_rect)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "region, rect");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
	GdkRectangle *	rect = SvGdkRectangle (ST(1))
;

	gdk_region_union_with_rect(region, rect);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Region_intersect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_intersect)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source1, source2");
    {
	GdkRegion *	source1 = SvGdkRegion (ST(0))
;
	GdkRegion *	source2 = SvGdkRegion (ST(1))
;

	gdk_region_intersect(source1, source2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Region_union); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_union)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source1, source2");
    {
	GdkRegion *	source1 = SvGdkRegion (ST(0))
;
	GdkRegion *	source2 = SvGdkRegion (ST(1))
;

	gdk_region_union(source1, source2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Region_subtract); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_subtract)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source1, source2");
    {
	GdkRegion *	source1 = SvGdkRegion (ST(0))
;
	GdkRegion *	source2 = SvGdkRegion (ST(1))
;

	gdk_region_subtract(source1, source2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Region_xor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_xor)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "source1, source2");
    {
	GdkRegion *	source1 = SvGdkRegion (ST(0))
;
	GdkRegion *	source2 = SvGdkRegion (ST(1))
;

	gdk_region_xor(source1, source2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Region_spans_intersect_foreach); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_spans_intersect_foreach)
{
    dVAR; dXSARGS;
    if (items < 4 || items > 5)
       croak_xs_usage(cv,  "region, spans_ref, sorted, func, data=NULL");
    {
	GdkRegion *	region = SvGdkRegion (ST(0))
;
	SV *	spans_ref = ST(1)
;
	gboolean	sorted = (bool)SvTRUE(ST(2))
;
	SV *	func = ST(3)
;
	SV *	data;
#line 249 "xs/GdkRegion.xs"
	GdkSpan *spans = NULL;
	int n_spans, i;
	AV *array;
	SV **value;
	GPerlCallback * callback;
#line 610 "xs/GdkRegion.c"

	if (items < 5)
	    data = NULL;
	else {
	    data = ST(4)
;
	}
#line 255 "xs/GdkRegion.xs"
	if (!gperl_sv_is_array_ref (spans_ref))
		croak ("span list must be an arrayref of triples [ $x,$y,$width,$x,$y,$width,...]");

	array = (AV *) SvRV (spans_ref);
	n_spans = av_len (array) + 1;
	if ((n_spans % 3) != 0)
		croak ("span list not a multiple of 3");
	n_spans /= 3;

	/* gdk_region_spans_intersect_foreach() is happy to take n_spans==0
	   and do nothing, but it doesn't like spans==NULL (as of Gtk 2.20),
	   and NULL is what g_new0() gives for a count of 0.  So explicit
	   skip if n_spans==0.  */
	if (n_spans != 0) {
		spans = g_new0 (GdkSpan, n_spans);

		for (i = 0; i < n_spans; i++) {
			if ((value = av_fetch (array, 3*i, 0)) && gperl_sv_is_defined (*value))
				spans[i].x = SvIV (*value);
			if ((value = av_fetch (array, 3*i + 1, 0)) && gperl_sv_is_defined (*value))
				spans[i].y = SvIV (*value);
			if ((value = av_fetch (array, 3*i + 2, 0)) && gperl_sv_is_defined (*value))
				spans[i].width = SvIV (*value);
		}

		callback = gperl_callback_new (func, data, 0, NULL, 0);

		gdk_region_spans_intersect_foreach (region,
		                                    spans,
		                                    n_spans,
		                                    sorted,
		                                    (GdkSpanFunc) gtk2perl_gdk_span_func,
		                                    callback);

		gperl_callback_destroy (callback);
		g_free (spans);
	}
#line 656 "xs/GdkRegion.c"
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Region_rect_equal); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Region_rect_equal)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "region, rectangle");
    {
	gboolean	RETVAL;
	const GdkRegion *	region = SvGdkRegion (ST(0))
;
	const GdkRectangle *	rectangle = SvGdkRectangle (ST(1))
;

	RETVAL = gdk_region_rect_equal(region, rectangle);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__Gdk__Region); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__Gdk__Region)
{
#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::Region::new", XS_Gtk2__Gdk__Region_new);
        newXS_deffile("Gtk2::Gdk::Region::polygon", XS_Gtk2__Gdk__Region_polygon);
        newXS_deffile("Gtk2::Gdk::Region::rectangle", XS_Gtk2__Gdk__Region_rectangle);
        newXS_deffile("Gtk2::Gdk::Region::get_clipbox", XS_Gtk2__Gdk__Region_get_clipbox);
        newXS_deffile("Gtk2::Gdk::Region::get_rectangles", XS_Gtk2__Gdk__Region_get_rectangles);
        newXS_deffile("Gtk2::Gdk::Region::empty", XS_Gtk2__Gdk__Region_empty);
        newXS_deffile("Gtk2::Gdk::Region::equal", XS_Gtk2__Gdk__Region_equal);
        newXS_deffile("Gtk2::Gdk::Region::point_in", XS_Gtk2__Gdk__Region_point_in);
        newXS_deffile("Gtk2::Gdk::Region::rect_in", XS_Gtk2__Gdk__Region_rect_in);
        newXS_deffile("Gtk2::Gdk::Region::offset", XS_Gtk2__Gdk__Region_offset);
        newXS_deffile("Gtk2::Gdk::Region::shrink", XS_Gtk2__Gdk__Region_shrink);
        newXS_deffile("Gtk2::Gdk::Region::union_with_rect", XS_Gtk2__Gdk__Region_union_with_rect);
        newXS_deffile("Gtk2::Gdk::Region::intersect", XS_Gtk2__Gdk__Region_intersect);
        newXS_deffile("Gtk2::Gdk::Region::union", XS_Gtk2__Gdk__Region_union);
        newXS_deffile("Gtk2::Gdk::Region::subtract", XS_Gtk2__Gdk__Region_subtract);
        newXS_deffile("Gtk2::Gdk::Region::xor", XS_Gtk2__Gdk__Region_xor);
        newXS_deffile("Gtk2::Gdk::Region::spans_intersect_foreach", XS_Gtk2__Gdk__Region_spans_intersect_foreach);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::Gdk::Region::rect_equal", XS_Gtk2__Gdk__Region_rect_equal);
#endif

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#line 738 "xs/GdkRegion.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
}

