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

#line 1 "xs/GdkInput.xs"
/*
 * Copyright (c) 2003 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/GdkInput.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/GdkInput.c"
#ifndef GDK_MULTIHEAD_SAFE
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Gtk2__Gdk_devices_list); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk_devices_list)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 24 "xs/GdkInput.xs"
	GList *i, *list = NULL;
#line 181 "xs/GdkInput.c"
#line 26 "xs/GdkInput.xs"
	PERL_UNUSED_VAR (ax);
	list = gdk_devices_list ();
	for (i = list; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGdkDevice (i->data)));
#line 187 "xs/GdkInput.c"
	PUTBACK;
	return;
    }
}

#endif /* ! GDK_MULTIHEAD_SAFE */

XS_EUPXS(XS_Gtk2__Gdk__Device_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	gchar *	RETVAL;
#line 39 "xs/GdkInput.xs"
	RETVAL = device->name;
#line 207 "xs/GdkInput.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    /* same as newSVGChar(), but not in a function */
	    sv_setpv ((SV*)RETVALSV, RETVAL);
	    SvUTF8_on (RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_source); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_source)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	GdkInputSource	RETVAL;
#line 47 "xs/GdkInput.xs"
	RETVAL = device->source;
#line 233 "xs/GdkInput.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkInputSource (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_mode); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_mode)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	GdkInputMode	RETVAL;
#line 55 "xs/GdkInput.xs"
	RETVAL = device->mode;
#line 257 "xs/GdkInput.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkInputMode (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_has_cursor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_has_cursor)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	gboolean	RETVAL;
#line 63 "xs/GdkInput.xs"
	RETVAL = device->has_cursor;
#line 281 "xs/GdkInput.c"
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_axes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_axes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
#line 77 "xs/GdkInput.xs"
	int i;
#line 301 "xs/GdkInput.c"
#line 79 "xs/GdkInput.xs"
	EXTEND (sp, device->num_axes);

	for (i = 0; i < device->num_axes; i++) {
		HV *axis = newHV ();

		gperl_hv_take_sv_s (axis, "use", newSVGdkAxisUse (device->axes[i].use));
		gperl_hv_take_sv_s (axis, "min", newSVnv (device->axes[i].min));
		gperl_hv_take_sv_s (axis, "max", newSVnv (device->axes[i].max));

		PUSHs (sv_2mortal (newRV_noinc ((SV *) axis)));
	}
#line 314 "xs/GdkInput.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Device_keys); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_keys)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
#line 101 "xs/GdkInput.xs"
	int i;
#line 334 "xs/GdkInput.c"
#line 103 "xs/GdkInput.xs"
	EXTEND (sp, device->num_keys);

	for (i = 0; i < device->num_keys; i++) {
		HV *key = newHV ();

		gperl_hv_take_sv_s (key, "keyval", newSVuv (device->keys[i].keyval));
		gperl_hv_take_sv_s (key, "modifiers", newSVGdkModifierType (device->keys[i].modifiers));

		PUSHs (sv_2mortal (newRV_noinc ((SV *) key)));
	}
#line 346 "xs/GdkInput.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Device_set_source); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_set_source)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "device, source");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	GdkInputSource	source = SvGdkInputSource (ST(1))
;

	gdk_device_set_source(device, source);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Device_set_mode); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_set_mode)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "device, mode");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	GdkInputMode	mode = SvGdkInputMode (ST(1))
;
	gboolean	RETVAL;

	RETVAL = gdk_device_set_mode(device, mode);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_set_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_set_key)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "device, index_, keyval, modifiers");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	guint	index_ = (guint)SvUV(ST(1))
;
	guint	keyval = (guint)SvUV(ST(2))
;
	GdkModifierType	modifiers = SvGdkModifierType (ST(3))
;

	gdk_device_set_key(device, index_, keyval, modifiers);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Device_set_axis_use); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_set_axis_use)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "device, index_, use");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	guint	index_ = (guint)SvUV(ST(1))
;
	GdkAxisUse	use = SvGdkAxisUse (ST(2))
;

	gdk_device_set_axis_use(device, index_, use);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_state); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_state)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "device, window");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	GdkWindow *	window = SvGdkWindow (ST(1))
;
#line 152 "xs/GdkInput.xs"
	gdouble *axes = NULL;
	GdkModifierType mask;
	int i;
#line 450 "xs/GdkInput.c"
#line 156 "xs/GdkInput.xs"
	axes = g_new0 (gdouble, device->num_axes);

	gdk_device_get_state (device, window, axes, &mask);

	EXTEND (sp, device->num_axes + 1);

	PUSHs (sv_2mortal (newSVGdkModifierType (mask)));
	for (i = 0; i < device->num_axes; i++)
		PUSHs (sv_2mortal (newSVnv (axes[i])));

	g_free (axes);
#line 463 "xs/GdkInput.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_history); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_history)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "device, window, start, stop");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	GdkWindow *	window = SvGdkWindow (ST(1))
;
	guint32	start = (guint32)SvUV(ST(2))
;
	guint32	stop = (guint32)SvUV(ST(3))
;
#line 182 "xs/GdkInput.xs"
	GdkTimeCoord **events = NULL;
	gint i, j, n_events = 0;
#line 490 "xs/GdkInput.c"
#line 185 "xs/GdkInput.xs"
	if (! gdk_device_get_history (device, window, start, stop, &events, &n_events))
		XSRETURN_EMPTY;

	EXTEND (sp, n_events);

	for (i = 0; i < n_events; i++) {
		HV *event;
		AV *axes;

		axes = newAV ();

		for (j = 0; j < device->num_axes; j++)
			av_store (axes, j, newSVnv (events[i]->axes[j]));

		event = newHV ();

		gperl_hv_take_sv_s (event, "axes", newRV_noinc ((SV *) axes));
		gperl_hv_take_sv_s (event, "time", newSVuv (events[i]->time));

		PUSHs (sv_2mortal (newRV_noinc ((SV *) event)));
	}

	gdk_device_free_history (events, n_events);
#line 515 "xs/GdkInput.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_axis); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_axis)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "device, use, ...");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	GdkAxisUse	use = SvGdkAxisUse (ST(1))
;
#line 220 "xs/GdkInput.xs"
	gdouble *real_axes = NULL;
	gdouble value = 0;
	int i;
#line 537 "xs/GdkInput.c"
	gdouble	RETVAL;
	dXSTARG;
#line 224 "xs/GdkInput.xs"
#define FIRST 2
	real_axes = g_new0 (double, items - FIRST);

	for (i = FIRST; i < items; i++)
		real_axes[i - FIRST] = SvNV (ST (i));

	if (! gdk_device_get_axis (device, real_axes, use, &value))
		XSRETURN_UNDEF;

	RETVAL = value;

	g_free (real_axes);
#undef FIRST
#line 554 "xs/GdkInput.c"
	XSprePUSH; PUSHn((double)RETVAL);
    }
    XSRETURN(1);
}

#ifndef GDK_MULTIHEAD_SAFE
#define XSubPPtmpAAAB 1


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

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

#endif /* ! GDK_MULTIHEAD_SAFE */
#if GTK_CHECK_VERSION (2, 22, 0)
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Gtk2__Gdk__Device_get_axis_use); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_axis_use)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "device, index");
    {
	GdkAxisUse	RETVAL;
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	guint	index = (guint)SvUV(ST(1))
;

	RETVAL = gdk_device_get_axis_use(device, index);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkAxisUse (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_key)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "device, index");
    {
	GdkDevice *	device = SvGdkDevice (ST(0))
;
	guint	index = (guint)SvUV(ST(1))
;
	guint	keyval;
	GdkModifierType	modifiers;

	gdk_device_get_key(device, index, &keyval, &modifiers);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setuv(ST(0), (UV)keyval);
	PUSHs(sv_newmortal());
	ST(1) = newSVGdkModifierType (modifiers);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_mode); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_mode)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	GdkInputMode	RETVAL;
	GdkDevice *	device = SvGdkDevice (ST(0))
;

	RETVAL = gdk_device_get_mode(device);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkInputMode (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	const gchar *	RETVAL;
	GdkDevice *	device = SvGdkDevice (ST(0))
;

	RETVAL = gdk_device_get_name(device);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    /* same as newSVGChar(), but not in a function */
	    sv_setpv ((SV*)RETVALSV, RETVAL);
	    SvUTF8_on (RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_n_axes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_n_axes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	gint	RETVAL;
	dXSTARG;
	GdkDevice *	device = SvGdkDevice (ST(0))
;

	RETVAL = gdk_device_get_n_axes(device);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Device_get_source); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Device_get_source)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "device");
    {
	GdkInputSource	RETVAL;
	GdkDevice *	device = SvGdkDevice (ST(0))
;

	RETVAL = gdk_device_get_source(device);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkInputSource (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif /* 2.22 */

XS_EUPXS(XS_Gtk2__Gdk__Input_set_extension_events); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Input_set_extension_events)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, window, mask, mode");
    {
	GdkWindow *	window = SvGdkWindow (ST(1))
;
	GdkEventMask	mask = SvGdkEventMask (ST(2))
;
	GdkExtensionMode	mode = SvGdkExtensionMode (ST(3))
;

	gdk_input_set_extension_events(window, mask, mode);
    }
    XSRETURN_EMPTY;
}

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

#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::Gdk::devices_list", XS_Gtk2__Gdk_devices_list);
#endif
        newXS_deffile("Gtk2::Gdk::Device::name", XS_Gtk2__Gdk__Device_name);
        newXS_deffile("Gtk2::Gdk::Device::source", XS_Gtk2__Gdk__Device_source);
        newXS_deffile("Gtk2::Gdk::Device::mode", XS_Gtk2__Gdk__Device_mode);
        newXS_deffile("Gtk2::Gdk::Device::has_cursor", XS_Gtk2__Gdk__Device_has_cursor);
        newXS_deffile("Gtk2::Gdk::Device::axes", XS_Gtk2__Gdk__Device_axes);
        newXS_deffile("Gtk2::Gdk::Device::keys", XS_Gtk2__Gdk__Device_keys);
        newXS_deffile("Gtk2::Gdk::Device::set_source", XS_Gtk2__Gdk__Device_set_source);
        newXS_deffile("Gtk2::Gdk::Device::set_mode", XS_Gtk2__Gdk__Device_set_mode);
        newXS_deffile("Gtk2::Gdk::Device::set_key", XS_Gtk2__Gdk__Device_set_key);
        newXS_deffile("Gtk2::Gdk::Device::set_axis_use", XS_Gtk2__Gdk__Device_set_axis_use);
        newXS_deffile("Gtk2::Gdk::Device::get_state", XS_Gtk2__Gdk__Device_get_state);
        newXS_deffile("Gtk2::Gdk::Device::get_history", XS_Gtk2__Gdk__Device_get_history);
        newXS_deffile("Gtk2::Gdk::Device::get_axis", XS_Gtk2__Gdk__Device_get_axis);
#if XSubPPtmpAAAB
        newXS_deffile("Gtk2::Gdk::Device::get_core_pointer", XS_Gtk2__Gdk__Device_get_core_pointer);
#endif
#if XSubPPtmpAAAC
        newXS_deffile("Gtk2::Gdk::Device::get_axis_use", XS_Gtk2__Gdk__Device_get_axis_use);
        newXS_deffile("Gtk2::Gdk::Device::get_key", XS_Gtk2__Gdk__Device_get_key);
        newXS_deffile("Gtk2::Gdk::Device::get_mode", XS_Gtk2__Gdk__Device_get_mode);
        newXS_deffile("Gtk2::Gdk::Device::get_name", XS_Gtk2__Gdk__Device_get_name);
        newXS_deffile("Gtk2::Gdk::Device::get_n_axes", XS_Gtk2__Gdk__Device_get_n_axes);
        newXS_deffile("Gtk2::Gdk::Device::get_source", XS_Gtk2__Gdk__Device_get_source);
#endif
        newXS_deffile("Gtk2::Gdk::Input::set_extension_events", XS_Gtk2__Gdk__Input_set_extension_events);

    /* Initialisation Section */

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

