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

#line 1 "xs/GnomeCanvas.xs"
/*
 * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 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.
 *
 * $Header: /cvsroot/gtk2-perl/gtk2-perl-xs/GnomeCanvas/xs/GnomeCanvas.xs,v 1.20 2004/08/16 02:10:26 muppetman Exp $
 */
#include "gnomecanvasperl.h"

SV *
newSVArtAffine (double affine[6])
{
	AV * a;
	
	if (!affine)
		return &PL_sv_undef;
		
	a = newAV();
	
	av_push (a, newSVnv (affine[0]));
	av_push (a, newSVnv (affine[1]));
	av_push (a, newSVnv (affine[2]));
	av_push (a, newSVnv (affine[3]));
	av_push (a, newSVnv (affine[4]));
	av_push (a, newSVnv (affine[5]));

	return newRV_noinc ((SV*)a);
}

double*
SvArtAffine (SV * sv)
{
	AV * av;
	double * affine;
	if ((!sv) || (!SvOK (sv)) || (!SvRV (sv)) ||
	    (SvTYPE (SvRV(sv)) != SVt_PVAV) ||
	    5 != av_len ((AV*) SvRV (sv)))
		croak ("affine transforms must be expressed as a reference to an array containing the six transform values");
	av = (AV*) SvRV (sv);
	affine = gperl_alloc_temp (6 * sizeof (double));
	affine[0] = SvNV (*av_fetch (av, 0, 0));
	affine[1] = SvNV (*av_fetch (av, 1, 0));
	affine[2] = SvNV (*av_fetch (av, 2, 0));
	affine[3] = SvNV (*av_fetch (av, 3, 0));
	affine[4] = SvNV (*av_fetch (av, 4, 0));
	affine[5] = SvNV (*av_fetch (av, 5, 0));
	return affine;
}

#line 73 "xs/GnomeCanvas.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 215 "xs/GnomeCanvas.c"

XS_EUPXS(XS_Gnome2__Canvas_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_new)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    {
	GtkWidget *	RETVAL;
#line 304 "xs/GnomeCanvas.xs"
	if (ix == 1)
		RETVAL = gnome_canvas_new_aa ();
	else
		RETVAL = gnome_canvas_new ();
#line 231 "xs/GnomeCanvas.c"
	ST(0) = newSVGtkWidget (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_root); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_root)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "canvas");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	GnomeCanvasGroup *	RETVAL;

	RETVAL = gnome_canvas_root(canvas);
	ST(0) = newSVGnomeCanvasGroup (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_aa); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_aa)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "canvas");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	SV *	RETVAL;
#line 340 "xs/GnomeCanvas.xs"
	RETVAL = NULL;
	switch (ix) {
	    case 0: RETVAL = newSViv (canvas->aa); break;
	    case 1: /* fall through */
	    case 2: RETVAL = newSVnv (canvas->pixels_per_unit); break;
	}
#line 276 "xs/GnomeCanvas.c"
	ST(0) = RETVAL;
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_set_pixels_per_unit); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_set_pixels_per_unit)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "canvas, n");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	double	n = (double)SvNV(ST(1))
;

	gnome_canvas_set_pixels_per_unit(canvas, n);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_set_scroll_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_set_scroll_region)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "canvas, x1, y1, x2, y2");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	double	x1 = (double)SvNV(ST(1))
;
	double	y1 = (double)SvNV(ST(2))
;
	double	x2 = (double)SvNV(ST(3))
;
	double	y2 = (double)SvNV(ST(4))
;

	gnome_canvas_set_scroll_region(canvas, x1, y1, x2, y2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_get_scroll_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_get_scroll_region)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "canvas");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	double	x1;
	double	y1;
	double	x2;
	double	y2;

	gnome_canvas_get_scroll_region(canvas, &x1, &y1, &x2, &y2);
	XSprePUSH;	EXTEND(SP,4);
	PUSHs(sv_newmortal());
	sv_setnv(ST(0), (double)x1);
	PUSHs(sv_newmortal());
	sv_setnv(ST(1), (double)y1);
	PUSHs(sv_newmortal());
	sv_setnv(ST(2), (double)x2);
	PUSHs(sv_newmortal());
	sv_setnv(ST(3), (double)y2);
    }
    XSRETURN(4);
}


XS_EUPXS(XS_Gnome2__Canvas_set_center_scroll_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_set_center_scroll_region)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "canvas, center_scroll_region");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	gboolean	center_scroll_region = (bool)SvTRUE(ST(1))
;

	gnome_canvas_set_center_scroll_region(canvas, center_scroll_region);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_get_center_scroll_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_get_center_scroll_region)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "canvas");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gnome_canvas_get_center_scroll_region(canvas);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_scroll_to); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_scroll_to)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "canvas, cx, cy");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	int	cx = (int)SvIV(ST(1))
;
	int	cy = (int)SvIV(ST(2))
;

	gnome_canvas_scroll_to(canvas, cx, cy);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_get_scroll_offsets); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_get_scroll_offsets)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "canvas");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	int	cx;
	int	cy;

	gnome_canvas_get_scroll_offsets(canvas, &cx, &cy);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setiv(ST(0), (IV)cx);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)cy);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gnome2__Canvas_update_now); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_update_now)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "canvas");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;

	gnome_canvas_update_now(canvas);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_get_item_at); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_get_item_at)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "canvas, x, y");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	double	x = (double)SvNV(ST(1))
;
	double	y = (double)SvNV(ST(2))
;
	GnomeCanvasItem *	RETVAL;

	RETVAL = gnome_canvas_get_item_at(canvas, x, y);
	ST(0) = newSVGnomeCanvasItem (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_request_redraw); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_request_redraw)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "canvas, x1, y1, x2, y2");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	int	x1 = (int)SvIV(ST(1))
;
	int	y1 = (int)SvIV(ST(2))
;
	int	x2 = (int)SvIV(ST(3))
;
	int	y2 = (int)SvIV(ST(4))
;

	gnome_canvas_request_redraw(canvas, x1, y1, x2, y2);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_w2c_affine); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_w2c_affine)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "canvas, a=NULL");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	SV *	a;
#line 437 "xs/GnomeCanvas.xs"
	double affine[6];
#line 509 "xs/GnomeCanvas.c"
	SV *	RETVAL;

	if (items < 2)
	    a = NULL;
	else {
	    a = ST(1)
;
	}
#line 439 "xs/GnomeCanvas.xs"
	if (a != NULL || items > 1)
		warn ("Gnome2::Canvas::w2c_affine() was broken before 1.002;"
		      " the second parameter does nothing (see the Gnome2::"
		      "Canvas manpage)");
	gnome_canvas_w2c_affine (canvas, affine);
	RETVAL = newSVArtAffine (affine);
#line 525 "xs/GnomeCanvas.c"
	ST(0) = RETVAL;
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_w2c_d); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_w2c_d)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 3)
       croak_xs_usage(cv,  "canvas, wx, wy");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	double	wx = (double)SvNV(ST(1))
;
	double	wy = (double)SvNV(ST(2))
;
	double	cx;
	double	cy;

	gnome_canvas_w2c_d(canvas, wx, wy, &cx, &cy);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setnv(ST(0), (double)cx);
	PUSHs(sv_newmortal());
	sv_setnv(ST(1), (double)cy);
#line 454 "xs/GnomeCanvas.xs"
	PERL_UNUSED_VAR (ix);
#line 558 "xs/GnomeCanvas.c"
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gnome2__Canvas_c2w); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_c2w)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "canvas, cx, cy");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	int	cx = (int)SvIV(ST(1))
;
	int	cy = (int)SvIV(ST(2))
;
	double	wx;
	double	wy;

	gnome_canvas_c2w(canvas, cx, cy, &wx, &wy);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setnv(ST(0), (double)wx);
	PUSHs(sv_newmortal());
	sv_setnv(ST(1), (double)wy);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gnome2__Canvas_window_to_world); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_window_to_world)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "canvas, winx, winy");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	double	winx = (double)SvNV(ST(1))
;
	double	winy = (double)SvNV(ST(2))
;
	double	worldx;
	double	worldy;

	gnome_canvas_window_to_world(canvas, winx, winy, &worldx, &worldy);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setnv(ST(0), (double)worldx);
	PUSHs(sv_newmortal());
	sv_setnv(ST(1), (double)worldy);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gnome2__Canvas_world_to_window); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_world_to_window)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "canvas, worldx, worldy");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	double	worldx = (double)SvNV(ST(1))
;
	double	worldy = (double)SvNV(ST(2))
;
	double	winx;
	double	winy;

	gnome_canvas_world_to_window(canvas, worldx, worldy, &winx, &winy);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setnv(ST(0), (double)winx);
	PUSHs(sv_newmortal());
	sv_setnv(ST(1), (double)winy);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gnome2__Canvas_get_color); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_get_color)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "canvas, spec");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	const char *	spec = (const char *)SvPV_nolen(ST(1))
;
#line 478 "xs/GnomeCanvas.xs"
	int result;
	GdkColor color;
#line 661 "xs/GnomeCanvas.c"
#line 481 "xs/GnomeCanvas.xs"
	result = gnome_canvas_get_color (canvas, spec, &color);
	EXTEND (sp, 2);
	PUSHs (sv_2mortal (newSViv (result)));
	PUSHs (sv_2mortal (newSVGdkColor (&color)));
#line 667 "xs/GnomeCanvas.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gnome2__Canvas_get_color_pixel); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_get_color_pixel)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "canvas, rgba");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	guint	rgba = (guint)SvUV(ST(1))
;
	gulong	RETVAL;
	dXSTARG;

	RETVAL = gnome_canvas_get_color_pixel(canvas, rgba);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_set_stipple_origin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_set_stipple_origin)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "canvas, gc");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	GdkGC *	gc = SvGdkGC (ST(1))
;

	gnome_canvas_set_stipple_origin(canvas, gc);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_set_dither); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_set_dither)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "canvas, dither");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	GdkRgbDither	dither = SvGdkRgbDither (ST(1))
;

	gnome_canvas_set_dither(canvas, dither);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gnome2__Canvas_get_dither); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_get_dither)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "canvas");
    {
	GnomeCanvas *	canvas = SvGnomeCanvas (ST(0))
;
	GdkRgbDither	RETVAL;

	RETVAL = gnome_canvas_get_dither(canvas);
	ST(0) = newSVGdkRgbDither (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gnome2__Canvas_GET_VERSION_INFO); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_GET_VERSION_INFO)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 523 "xs/GnomeCanvas.xs"
	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSViv (GNOME_CANVAS_MAJOR_VERSION)));
	PUSHs (sv_2mortal (newSViv (GNOME_CANVAS_MINOR_VERSION)));
	PUSHs (sv_2mortal (newSViv (GNOME_CANVAS_MICRO_VERSION)));
	PERL_UNUSED_VAR (ax);
#line 765 "xs/GnomeCanvas.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gnome2__Canvas_CHECK_VERSION); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gnome2__Canvas_CHECK_VERSION)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, major, minor, micro");
    {
	int	major = (int)SvIV(ST(1))
;
	int	minor = (int)SvIV(ST(2))
;
	int	micro = (int)SvIV(ST(3))
;
	gboolean	RETVAL;
#line 535 "xs/GnomeCanvas.xs"
	RETVAL = GNOME_CANVAS_CHECK_VERSION (major, minor, micro);
#line 788 "xs/GnomeCanvas.c"
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

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

        cv = newXS("Gnome2::Canvas::new", XS_Gnome2__Canvas_new, file);
        XSANY.any_i32 = 0;
        cv = newXS("Gnome2::Canvas::new_aa", XS_Gnome2__Canvas_new, file);
        XSANY.any_i32 = 1;
        newXS("Gnome2::Canvas::root", XS_Gnome2__Canvas_root, file);
        cv = newXS("Gnome2::Canvas::aa", XS_Gnome2__Canvas_aa, file);
        XSANY.any_i32 = 0;
        cv = newXS("Gnome2::Canvas::get_pixels_per_unit", XS_Gnome2__Canvas_aa, file);
        XSANY.any_i32 = 2;
        cv = newXS("Gnome2::Canvas::pixels_per_unit", XS_Gnome2__Canvas_aa, file);
        XSANY.any_i32 = 1;
        newXS("Gnome2::Canvas::set_pixels_per_unit", XS_Gnome2__Canvas_set_pixels_per_unit, file);
        newXS("Gnome2::Canvas::set_scroll_region", XS_Gnome2__Canvas_set_scroll_region, file);
        newXS("Gnome2::Canvas::get_scroll_region", XS_Gnome2__Canvas_get_scroll_region, file);
        newXS("Gnome2::Canvas::set_center_scroll_region", XS_Gnome2__Canvas_set_center_scroll_region, file);
        newXS("Gnome2::Canvas::get_center_scroll_region", XS_Gnome2__Canvas_get_center_scroll_region, file);
        newXS("Gnome2::Canvas::scroll_to", XS_Gnome2__Canvas_scroll_to, file);
        newXS("Gnome2::Canvas::get_scroll_offsets", XS_Gnome2__Canvas_get_scroll_offsets, file);
        newXS("Gnome2::Canvas::update_now", XS_Gnome2__Canvas_update_now, file);
        newXS("Gnome2::Canvas::get_item_at", XS_Gnome2__Canvas_get_item_at, file);
        newXS("Gnome2::Canvas::request_redraw", XS_Gnome2__Canvas_request_redraw, file);
        newXS("Gnome2::Canvas::w2c_affine", XS_Gnome2__Canvas_w2c_affine, file);
        cv = newXS("Gnome2::Canvas::w2c", XS_Gnome2__Canvas_w2c_d, file);
        XSANY.any_i32 = 1;
        cv = newXS("Gnome2::Canvas::w2c_d", XS_Gnome2__Canvas_w2c_d, file);
        XSANY.any_i32 = 0;
        newXS("Gnome2::Canvas::c2w", XS_Gnome2__Canvas_c2w, file);
        newXS("Gnome2::Canvas::window_to_world", XS_Gnome2__Canvas_window_to_world, file);
        newXS("Gnome2::Canvas::world_to_window", XS_Gnome2__Canvas_world_to_window, file);
        newXS("Gnome2::Canvas::get_color", XS_Gnome2__Canvas_get_color, file);
        newXS("Gnome2::Canvas::get_color_pixel", XS_Gnome2__Canvas_get_color_pixel, file);
        newXS("Gnome2::Canvas::set_stipple_origin", XS_Gnome2__Canvas_set_stipple_origin, file);
        newXS("Gnome2::Canvas::set_dither", XS_Gnome2__Canvas_set_dither, file);
        newXS("Gnome2::Canvas::get_dither", XS_Gnome2__Canvas_get_dither, file);
        newXS("Gnome2::Canvas::GET_VERSION_INFO", XS_Gnome2__Canvas_GET_VERSION_INFO, file);
        newXS("Gnome2::Canvas::CHECK_VERSION", XS_Gnome2__Canvas_CHECK_VERSION, file);

    /* Initialisation Section */

#line 66 "xs/GnomeCanvas.xs"
	{
#include "register.xsh"
#include "boot.xsh"
	gperl_handle_logs_for ("GnomeCanvas");
	}

#line 860 "xs/GnomeCanvas.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;
}

