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

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

#line 33 "xs/GdkDisplay.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 175 "xs/GdkDisplay.c"

XS_EUPXS(XS_Gtk2__Gdk__Display_open); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_open)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, display_name");
    {
	GdkDisplay_ornull *	RETVAL;
	const gchar_ornull *	display_name;

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

	RETVAL = gdk_display_open(display_name);
	ST(0) = newSVGdkDisplay_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	const gchar *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

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


XS_EUPXS(XS_Gtk2__Gdk__Display_get_n_screens); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_n_screens)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gint	RETVAL;
	dXSTARG;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_get_n_screens(display);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_screen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_screen)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "display, screen_num");
    {
	GdkScreen *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	gint	screen_num = (gint)SvIV(ST(1))
;

	RETVAL = gdk_display_get_screen(display, screen_num);
	ST(0) = newSVGdkScreen (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_default_screen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_default_screen)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkScreen *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_get_default_screen(display);
	ST(0) = newSVGdkScreen (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_pointer_ungrab); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_pointer_ungrab)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "display, time_");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	guint32	time_ = (guint32)SvUV(ST(1))
;

	gdk_display_pointer_ungrab(display, time_);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Display_keyboard_ungrab); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_keyboard_ungrab)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "display, time_");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	guint32	time_ = (guint32)SvUV(ST(1))
;

	gdk_display_keyboard_ungrab(display, time_);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Display_pointer_is_grabbed); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_pointer_is_grabbed)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_pointer_is_grabbed(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_beep); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_beep)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	gdk_display_beep(display);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Display_sync); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_sync)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	gdk_display_sync(display);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Display_close); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_close)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	gdk_display_close(display);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Display_list_devices); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_list_devices)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
#line 67 "xs/GdkDisplay.xs"
	GList * devices, * i;
#line 399 "xs/GdkDisplay.c"
#line 69 "xs/GdkDisplay.xs"
	devices = gdk_display_list_devices (display);
	for (i = devices ; i != NULL ; i = i->next)
		XPUSHs (sv_2mortal (newSVGdkDevice (i->data)));
	g_list_free (devices);
#line 405 "xs/GdkDisplay.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_event); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_event)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkEvent *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_get_event(display);
	ST(0) = newSVGdkEvent (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_peek_event); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_peek_event)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkEvent *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_peek_event(display);
	ST(0) = newSVGdkEvent (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_put_event); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_put_event)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "display, event");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	GdkEvent *	event = SvGdkEvent (ST(1))
;

	gdk_display_put_event(display, event);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Display_set_double_click_time); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_set_double_click_time)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "display, msec");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	guint	msec = (guint)SvUV(ST(1))
;

	gdk_display_set_double_click_time(display, msec);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Display_set_double_click_distance); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_set_double_click_distance)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "display, distance");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	guint	distance = (guint)SvUV(ST(1))
;

	gdk_display_set_double_click_distance(display, distance);
    }
    XSRETURN_EMPTY;
}

#endif

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

	RETVAL = gdk_display_get_default(/*void*/);
	ST(0) = newSVGdkDisplay_ornull (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_core_pointer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_core_pointer)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	GdkDevice *	RETVAL;

	RETVAL = gdk_display_get_core_pointer(display);
	ST(0) = newSVGdkDevice (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_pointer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_pointer)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 112 "xs/GdkDisplay.xs"
	GdkScreen *screen = NULL;
	gint x;
	gint y;
	GdkModifierType mask;
#line 558 "xs/GdkDisplay.c"
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
#line 117 "xs/GdkDisplay.xs"
	gdk_display_get_pointer (display, &screen, &x, &y, &mask);
	EXTEND (SP, 4);
	PUSHs (sv_2mortal (newSVGdkScreen (screen)));
	PUSHs (sv_2mortal (newSViv (x)));
	PUSHs (sv_2mortal (newSViv (y)));
	PUSHs (sv_2mortal (newSVGdkModifierType (mask)));
#line 568 "xs/GdkDisplay.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_window_at_pointer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_window_at_pointer)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 132 "xs/GdkDisplay.xs"
	GdkWindow * window;
	gint win_x = 0, win_y = 0;
#line 587 "xs/GdkDisplay.c"
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
#line 135 "xs/GdkDisplay.xs"
	window = gdk_display_get_window_at_pointer (display, &win_x, &win_y);
	if (!window)
		XSRETURN_EMPTY;
	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSVGdkWindow (window)));
	PUSHs (sv_2mortal (newSViv (win_x)));
	PUSHs (sv_2mortal (newSViv (win_y)));
#line 598 "xs/GdkDisplay.c"
	PUTBACK;
	return;
    }
}

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


XS_EUPXS(XS_Gtk2__Gdk__Display_supports_cursor_alpha); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_supports_cursor_alpha)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_supports_cursor_alpha(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_supports_cursor_color); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_supports_cursor_color)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_supports_cursor_color(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_default_cursor_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_default_cursor_size)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	guint	RETVAL;
	dXSTARG;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_get_default_cursor_size(display);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_maximal_cursor_size); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_maximal_cursor_size)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	guint	width;
	guint	height;

	gdk_display_get_maximal_cursor_size(display, &width, &height);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setuv(ST(0), (UV)width);
	PUSHs(sv_newmortal());
	sv_setuv(ST(1), (UV)height);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_flush); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_flush)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	gdk_display_flush(display);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Display_get_default_group); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_get_default_group)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	GdkWindow *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_get_default_group(display);
	ST(0) = newSVGdkWindow (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Gdk__Display_supports_selection_notification); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_supports_selection_notification)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_supports_selection_notification(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_request_selection_notification); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_request_selection_notification)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "display, selection");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	GdkAtom	selection = SvGdkAtom (ST(1))
;

	RETVAL = gdk_display_request_selection_notification(display, selection);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_supports_clipboard_persistence); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_supports_clipboard_persistence)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_supports_clipboard_persistence(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_store_clipboard); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_store_clipboard)
{
    dVAR; dXSARGS;
    if (items < 3)
       croak_xs_usage(cv,  "display, clipboard_window, time_, ...");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	GdkWindow *	clipboard_window = SvGdkWindow (ST(1))
;
	guint32	time_ = (guint32)SvUV(ST(2))
;
#line 185 "xs/GdkDisplay.xs"
	GdkAtom *targets = NULL;
	gint n_targets = 0;
#line 797 "xs/GdkDisplay.c"
#line 188 "xs/GdkDisplay.xs"
	if (items > 3) {
		int i;

		n_targets = items - 3;
		targets = g_new0 (GdkAtom, n_targets);

		for (i = 3; i < items; i++)
			targets[i - 3] = SvGdkAtom (ST (i));
	}

	gdk_display_store_clipboard (display, clipboard_window, time_, targets, n_targets);

	if (targets)
		g_free (targets);
#line 813 "xs/GdkDisplay.c"
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Display_warp_pointer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_warp_pointer)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "display, screen, x, y");
    {
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;
	GdkScreen *	screen = SvGdkScreen (ST(1))
;
	gint	x = (gint)SvIV(ST(2))
;
	gint	y = (gint)SvIV(ST(3))
;

	gdk_display_warp_pointer(display, screen, x, y);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Display_supports_shapes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_supports_shapes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_supports_shapes(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Display_supports_input_shapes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_supports_input_shapes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_supports_input_shapes(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#if GTK_CHECK_VERSION (2, 12, 0)
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_Gtk2__Gdk__Display_supports_composite); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_supports_composite)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_supports_composite(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#if GTK_CHECK_VERSION (2, 22, 0)
#define XSubPPtmpAAAG 1


XS_EUPXS(XS_Gtk2__Gdk__Display_is_closed); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Display_is_closed)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "display");
    {
	gboolean	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(0))
;

	RETVAL = gdk_display_is_closed(display);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

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

        newXS("Gtk2::Gdk::Display::open", XS_Gtk2__Gdk__Display_open, file);
        newXS("Gtk2::Gdk::Display::get_name", XS_Gtk2__Gdk__Display_get_name, file);
        newXS("Gtk2::Gdk::Display::get_n_screens", XS_Gtk2__Gdk__Display_get_n_screens, file);
        newXS("Gtk2::Gdk::Display::get_screen", XS_Gtk2__Gdk__Display_get_screen, file);
        newXS("Gtk2::Gdk::Display::get_default_screen", XS_Gtk2__Gdk__Display_get_default_screen, file);
        newXS("Gtk2::Gdk::Display::pointer_ungrab", XS_Gtk2__Gdk__Display_pointer_ungrab, file);
        newXS("Gtk2::Gdk::Display::keyboard_ungrab", XS_Gtk2__Gdk__Display_keyboard_ungrab, file);
        newXS("Gtk2::Gdk::Display::pointer_is_grabbed", XS_Gtk2__Gdk__Display_pointer_is_grabbed, file);
        newXS("Gtk2::Gdk::Display::beep", XS_Gtk2__Gdk__Display_beep, file);
        newXS("Gtk2::Gdk::Display::sync", XS_Gtk2__Gdk__Display_sync, file);
        newXS("Gtk2::Gdk::Display::close", XS_Gtk2__Gdk__Display_close, file);
        newXS("Gtk2::Gdk::Display::list_devices", XS_Gtk2__Gdk__Display_list_devices, file);
        newXS("Gtk2::Gdk::Display::get_event", XS_Gtk2__Gdk__Display_get_event, file);
        newXS("Gtk2::Gdk::Display::peek_event", XS_Gtk2__Gdk__Display_peek_event, file);
        newXS("Gtk2::Gdk::Display::put_event", XS_Gtk2__Gdk__Display_put_event, file);
        newXS("Gtk2::Gdk::Display::set_double_click_time", XS_Gtk2__Gdk__Display_set_double_click_time, file);
#if XSubPPtmpAAAA
        newXS("Gtk2::Gdk::Display::set_double_click_distance", XS_Gtk2__Gdk__Display_set_double_click_distance, file);
#endif
        newXS("Gtk2::Gdk::Display::get_default", XS_Gtk2__Gdk__Display_get_default, file);
        newXS("Gtk2::Gdk::Display::get_core_pointer", XS_Gtk2__Gdk__Display_get_core_pointer, file);
        newXS("Gtk2::Gdk::Display::get_pointer", XS_Gtk2__Gdk__Display_get_pointer, file);
        newXS("Gtk2::Gdk::Display::get_window_at_pointer", XS_Gtk2__Gdk__Display_get_window_at_pointer, file);
#if XSubPPtmpAAAB
        newXS("Gtk2::Gdk::Display::supports_cursor_alpha", XS_Gtk2__Gdk__Display_supports_cursor_alpha, file);
        newXS("Gtk2::Gdk::Display::supports_cursor_color", XS_Gtk2__Gdk__Display_supports_cursor_color, file);
        newXS("Gtk2::Gdk::Display::get_default_cursor_size", XS_Gtk2__Gdk__Display_get_default_cursor_size, file);
        newXS("Gtk2::Gdk::Display::get_maximal_cursor_size", XS_Gtk2__Gdk__Display_get_maximal_cursor_size, file);
        newXS("Gtk2::Gdk::Display::flush", XS_Gtk2__Gdk__Display_flush, file);
        newXS("Gtk2::Gdk::Display::get_default_group", XS_Gtk2__Gdk__Display_get_default_group, file);
#endif
#if XSubPPtmpAAAC
        newXS("Gtk2::Gdk::Display::supports_selection_notification", XS_Gtk2__Gdk__Display_supports_selection_notification, file);
        newXS("Gtk2::Gdk::Display::request_selection_notification", XS_Gtk2__Gdk__Display_request_selection_notification, file);
        newXS("Gtk2::Gdk::Display::supports_clipboard_persistence", XS_Gtk2__Gdk__Display_supports_clipboard_persistence, file);
        newXS("Gtk2::Gdk::Display::store_clipboard", XS_Gtk2__Gdk__Display_store_clipboard, file);
#endif
#if XSubPPtmpAAAD
        newXS("Gtk2::Gdk::Display::warp_pointer", XS_Gtk2__Gdk__Display_warp_pointer, file);
#endif
#if XSubPPtmpAAAE
        newXS("Gtk2::Gdk::Display::supports_shapes", XS_Gtk2__Gdk__Display_supports_shapes, file);
        newXS("Gtk2::Gdk::Display::supports_input_shapes", XS_Gtk2__Gdk__Display_supports_input_shapes, file);
#endif
#if XSubPPtmpAAAF
        newXS("Gtk2::Gdk::Display::supports_composite", XS_Gtk2__Gdk__Display_supports_composite, file);
#endif
#if XSubPPtmpAAAG
        newXS("Gtk2::Gdk::Display::is_closed", XS_Gtk2__Gdk__Display_is_closed, file);
#endif

    /* Initialisation Section */

#line 26 "xs/GdkDisplay.xs"
	/* the various gdk backends will provide private subclasses of
	 * GdkDisplay; we shouldn't complain about them. */
	gperl_object_set_no_warn_unreg_subclass (GDK_TYPE_DISPLAY, TRUE);

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#if XSubPPtmpAAAE
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#endif
#line 1021 "xs/GdkDisplay.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;
}

