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

#line 1 "xs/GdkWindow.xs"
/*
 * Copyright (c) 2003-2005, 2009 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., 51 Franklin Street, Fifth Floor, 
 * Boston, MA  02110-1301  USA.
 *
 * $Id$
 */

#include "gtk2perl.h"
#include <gperl_marshal.h>

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

#if 0 /* not used at the moment */
static SV *
newSVGdkWindowAttr (GdkWindowAttr *attr)
{
	HV *object = newHV ();

	if (attr && attr->x && attr->y) {
		gperl_hv_take_sv_s (object, "title", newSVGChar (attr->title));
		gperl_hv_take_sv_s (object, "event_mask", newSVGdkEventMask (attr->event_mask));
		gperl_hv_take_sv_s (object, "x", newSViv (attr->x));
		gperl_hv_take_sv_s (object, "y", newSViv (attr->y));
		gperl_hv_take_sv_s (object, "width", newSViv (attr->width));
		gperl_hv_take_sv_s (object, "height", newSViv (attr->height));
		gperl_hv_take_sv_s (object, "wclass", newSVGdkWindowClass (attr->wclass));
		gperl_hv_take_sv_s (object, "visual", newSVGdkVisual (attr->visual));
		gperl_hv_take_sv_s (object, "colormap", newSVGdkColormap (attr->colormap));
		gperl_hv_take_sv_s (object, "window_type", newSVGdkWindowType (attr->window_type));
		gperl_hv_take_sv_s (object, "cursor", newSVGdkCursor (attr->cursor));
		gperl_hv_take_sv_s (object, "wmclass_name", newSVGChar (attr->wmclass_name));
		gperl_hv_take_sv_s (object, "wmclass_class", newSVGChar (attr->wmclass_class));
		gperl_hv_take_sv_s (object, "override_redirect", boolSV (attr->override_redirect));
	}

	return sv_bless (newRV_noinc ((SV *) object),
	                 gv_stashpv ("Gtk2::Gdk::Window::Attr", 1));
}
#endif

#define GTK2PERL_WINDOW_ATTR_FETCH(member, key, type) \
	member = hv_fetch (hv, key, strlen (key), FALSE); \
	if (member) attr->member = type (*member);

static GdkWindowAttr *
SvGdkWindowAttrReal (SV *object, GdkWindowAttributesType *mask)
{
	HV *hv = (HV *) SvRV (object);
	SV **title, **event_mask, **x, **y, **width, **height, **wclass,
	   **visual, **colormap, **window_type, **cursor, **wmclass_name,
	   **wmclass_class, **override_redirect;

	GdkWindowAttr *attr = gperl_alloc_temp (sizeof (GdkWindowAttr));

	/* better start with an empty mask */
	if (mask) *mask = 0;

	if (gperl_sv_is_hash_ref (object)) {
		GTK2PERL_WINDOW_ATTR_FETCH (title, "title", SvGChar);
		GTK2PERL_WINDOW_ATTR_FETCH (event_mask, "event_mask", SvGdkEventMask);
		GTK2PERL_WINDOW_ATTR_FETCH (x, "x", SvIV);
		GTK2PERL_WINDOW_ATTR_FETCH (y, "y", SvIV);
		GTK2PERL_WINDOW_ATTR_FETCH (width, "width", SvIV);
		GTK2PERL_WINDOW_ATTR_FETCH (height, "height", SvIV);
		GTK2PERL_WINDOW_ATTR_FETCH (wclass, "wclass", SvGdkWindowClass);
		GTK2PERL_WINDOW_ATTR_FETCH (visual, "visual", SvGdkVisual);
		GTK2PERL_WINDOW_ATTR_FETCH (colormap, "colormap", SvGdkColormap);
		GTK2PERL_WINDOW_ATTR_FETCH (window_type, "window_type", SvGdkWindowType);
		GTK2PERL_WINDOW_ATTR_FETCH (cursor, "cursor", SvGdkCursor);
		GTK2PERL_WINDOW_ATTR_FETCH (wmclass_name, "wmclass_name", SvGChar);
		GTK2PERL_WINDOW_ATTR_FETCH (wmclass_class, "wmclass_class", SvGChar);
		GTK2PERL_WINDOW_ATTR_FETCH (override_redirect, "override_redirect", sv_2bool);

		if (mask) {
			if (title) *mask |= GDK_WA_TITLE;
			if (x) *mask |= GDK_WA_X;
			if (y) *mask |= GDK_WA_Y;
			if (wmclass_name && wmclass_class) *mask |= GDK_WA_WMCLASS;
			if (visual) *mask |= GDK_WA_VISUAL;
			if (colormap) *mask |= GDK_WA_COLORMAP;
			if (cursor) *mask |= GDK_WA_CURSOR;
			if (override_redirect) *mask |= GDK_WA_NOREDIR;
		}
	}

	return attr;
}

#if GTK_CHECK_VERSION (2, 18, 0)

static void
gtk2perl_offscreen_coord_translate_marshal (GClosure * closure,
                                            GValue * return_value,
                                            guint n_param_values,
                                            const GValue * param_values,
                                            gpointer invocation_hint,
                                            gpointer marshal_data)

{
	gdouble * return_x, * return_y;
	dGPERL_CLOSURE_MARSHAL_ARGS;

	GPERL_CLOSURE_MARSHAL_INIT (closure, marshal_data);

	PERL_UNUSED_VAR (return_value);
	PERL_UNUSED_VAR (n_param_values);
	PERL_UNUSED_VAR (invocation_hint);

	ENTER;
	SAVETMPS;

	PUSHMARK (SP);

	GPERL_CLOSURE_MARSHAL_PUSH_INSTANCE (param_values);

	XPUSHs (sv_2mortal (newSVnv (g_value_get_double (param_values+1))));
	XPUSHs (sv_2mortal (newSVnv (g_value_get_double (param_values+2))));
	return_x = g_value_get_pointer (param_values+3);
	return_y = g_value_get_pointer (param_values+4);

	GPERL_CLOSURE_MARSHAL_PUSH_DATA;

	PUTBACK;

	GPERL_CLOSURE_MARSHAL_CALL (G_ARRAY);

	if (count == 2) {
		*return_y = POPn;
		*return_x = POPn;
	} else {
		/* NOTE: croaking here can cause bad things to happen to the
		 * app, because croaking in signal handlers is bad juju. */
		croak ("callback must return 2 values : x and y");
	}

	PUTBACK;
	FREETMPS;
	LEAVE;
}
#endif


#if 0 /* not used at the moment */
static GdkWindowAttr *
SvGdkWindowAttr (SV *object)
{
	return SvGdkWindowAttrReal (object, NULL);
}
#endif

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

static GPerlCallback *
gtk2perl_gdk_window_invalidate_maybe_recurse_func_create (SV * func, SV * data)
{
	GType param_types [1];
	param_types[0] = GDK_TYPE_WINDOW;
	return gperl_callback_new (func, data, G_N_ELEMENTS (param_types),
				   param_types, G_TYPE_BOOLEAN);
}

static gboolean
gtk2perl_gdk_window_invalidate_maybe_recurse_func (GdkWindow *window,
			                           gpointer data)
{
	GPerlCallback * callback = (GPerlCallback*)data;
	GValue value = {0,};
	gboolean retval;

	g_value_init (&value, callback->return_type);
	gperl_callback_invoke (callback, &value, window);
	retval = g_value_get_boolean (&value);
	g_value_unset (&value);

	return retval;
}

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

#line 204 "xs/GdkWindow.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 348 "xs/GdkWindow.c"

XS_EUPXS(XS_Gtk2__Gdk__Window_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_new)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, parent, attributes_ref");
    {
	GdkWindow_ornull *	parent = SvGdkWindow_ornull (ST(1))
;
	SV *	attributes_ref = ST(2)
;
#line 282 "xs/GdkWindow.xs"
	GdkWindowAttr *attributes;
	GdkWindowAttributesType attributes_mask;
#line 364 "xs/GdkWindow.c"
	GdkWindow *	RETVAL;
#line 285 "xs/GdkWindow.xs"
	attributes = SvGdkWindowAttrReal (attributes_ref, &attributes_mask);
	RETVAL = gdk_window_new (parent, attributes, attributes_mask);
#line 369 "xs/GdkWindow.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_destroy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_destroy)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_destroy(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_window_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_window_type)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindowType	RETVAL;

	RETVAL = gdk_window_get_window_type(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindowType (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_at_pointer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_at_pointer)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 308 "xs/GdkWindow.xs"
	GdkWindow * window;
	gint win_x, win_y;
#line 432 "xs/GdkWindow.c"
#line 311 "xs/GdkWindow.xs"
	window = gdk_window_at_pointer (&win_x, &win_y);
	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSVGdkWindow (window)));
	PUSHs (sv_2mortal (newSViv (win_x)));
	PUSHs (sv_2mortal (newSViv (win_y)));
	PERL_UNUSED_VAR (ax);
#line 440 "xs/GdkWindow.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Window_show); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_show)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_show(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_hide); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_hide)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_hide(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_withdraw); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_withdraw)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_withdraw(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_show_unraised); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_show_unraised)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_show_unraised(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_move); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_move)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, x, y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x = (gint)SvIV(ST(1))
;
	gint	y = (gint)SvIV(ST(2))
;

	gdk_window_move(window, x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_resize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_resize)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, width, height");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	width = (gint)SvIV(ST(1))
;
	gint	height = (gint)SvIV(ST(2))
;

	gdk_window_resize(window, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_move_resize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_move_resize)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "window, x, y, width, height");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x = (gint)SvIV(ST(1))
;
	gint	y = (gint)SvIV(ST(2))
;
	gint	width = (gint)SvIV(ST(3))
;
	gint	height = (gint)SvIV(ST(4))
;

	gdk_window_move_resize(window, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_reparent); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_reparent)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "window, new_parent, x, y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindow *	new_parent = SvGdkWindow (ST(1))
;
	gint	x = (gint)SvIV(ST(2))
;
	gint	y = (gint)SvIV(ST(3))
;

	gdk_window_reparent(window, new_parent, x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_clear); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_clear)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_clear(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_clear_area); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_clear_area)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "window, x, y, width, height");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x = (gint)SvIV(ST(1))
;
	gint	y = (gint)SvIV(ST(2))
;
	gint	width = (gint)SvIV(ST(3))
;
	gint	height = (gint)SvIV(ST(4))
;

	gdk_window_clear_area(window, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_clear_area_e); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_clear_area_e)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "window, x, y, width, height");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x = (gint)SvIV(ST(1))
;
	gint	y = (gint)SvIV(ST(2))
;
	gint	width = (gint)SvIV(ST(3))
;
	gint	height = (gint)SvIV(ST(4))
;

	gdk_window_clear_area_e(window, x, y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_raise); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_raise)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_raise(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_lower); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_lower)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_lower(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_focus); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_focus)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, timestamp");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	guint32	timestamp = (guint32)SvUV(ST(1))
;

	gdk_window_focus(window, timestamp);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_user_data); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_user_data)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, user_data");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gulong	user_data = (gulong)SvUV(ST(1))
;

	gdk_window_set_user_data(window, (gpointer) user_data);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_override_redirect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_override_redirect)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, override_redirect");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	override_redirect = (bool)SvTRUE(ST(1))
;

	gdk_window_set_override_redirect(window, override_redirect);
    }
    XSRETURN_EMPTY;
}


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

	gdk_window_scroll(window, dx, dy);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_shape_combine_mask); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_shape_combine_mask)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "window, mask, x, y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkBitmap_ornull *	mask = SvGdkBitmap_ornull (ST(1))
;
	gint	x = (gint)SvIV(ST(2))
;
	gint	y = (gint)SvIV(ST(3))
;

	gdk_window_shape_combine_mask(window, mask, x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_shape_combine_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_shape_combine_region)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "window, shape_region, offset_x, offset_y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRegion_ornull *	shape_region = SvGdkRegion_ornull (ST(1))
;
	gint	offset_x = (gint)SvIV(ST(2))
;
	gint	offset_y = (gint)SvIV(ST(3))
;

	gdk_window_shape_combine_region(window, shape_region, offset_x, offset_y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_child_shapes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_child_shapes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_set_child_shapes(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_merge_child_shapes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_merge_child_shapes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_merge_child_shapes(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_static_gravities); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_static_gravities)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, use_static");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	use_static = (bool)SvTRUE(ST(1))
;
	gboolean	RETVAL;

	RETVAL = gdk_window_set_static_gravities(window, use_static);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_is_visible); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_is_visible)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gdk_window_is_visible(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_is_viewable); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_is_viewable)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	RETVAL;

	RETVAL = gdk_window_is_viewable(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_state); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_state)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindowState	RETVAL;

	RETVAL = gdk_window_get_state(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindowState (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#ifndef GDK_MULTIHEAD_SAFE
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Gtk2__Gdk__Window_foreign_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_foreign_new)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, anid");
    {
	GdkWindow *	RETVAL;
	GdkNativeWindow	anid = (GdkNativeWindow)SvUV(ST(1))
;

	RETVAL = gdk_window_foreign_new(anid);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_lookup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_lookup)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, anid");
    {
	GdkWindow *	RETVAL;
	GdkNativeWindow	anid = (GdkNativeWindow)SvUV(ST(1))
;

	RETVAL = gdk_window_lookup(anid);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Gdk__Window_foreign_new_for_display); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_foreign_new_for_display)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, display, anid");
    {
	GdkWindow *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(1))
;
	GdkNativeWindow	anid = (GdkNativeWindow)SvUV(ST(2))
;

	RETVAL = gdk_window_foreign_new_for_display(display, anid);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_lookup_for_display); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_lookup_for_display)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, display, anid");
    {
	GdkWindow *	RETVAL;
	GdkDisplay *	display = SvGdkDisplay (ST(1))
;
	GdkNativeWindow	anid = (GdkNativeWindow)SvUV(ST(2))
;

	RETVAL = gdk_window_lookup_for_display(display, anid);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif /* have GdkDisplay */

XS_EUPXS(XS_Gtk2__Gdk__Window_set_type_hint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_type_hint)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, hint");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindowTypeHint	hint = SvGdkWindowTypeHint (ST(1))
;

	gdk_window_set_type_hint(window, hint);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_modal_hint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_modal_hint)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, modal");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	modal = (bool)SvTRUE(ST(1))
;

	gdk_window_set_modal_hint(window, modal);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Window_set_skip_taskbar_hint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_skip_taskbar_hint)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, skips_taskbar");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	skips_taskbar = (bool)SvTRUE(ST(1))
;

	gdk_window_set_skip_taskbar_hint(window, skips_taskbar);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_skip_pager_hint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_skip_pager_hint)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, skips_pager");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	skips_pager = (bool)SvTRUE(ST(1))
;

	gdk_window_set_skip_pager_hint(window, skips_pager);
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_Gtk2__Gdk__Window_set_geometry_hints); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_geometry_hints)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "window, geometry_ref, geom_mask_sv=NULL");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	SV *	geometry_ref = ST(1)
;
	SV *	geom_mask_sv;
#line 588 "xs/GdkWindow.xs"
	GdkGeometry *geometry;
	GdkWindowHints geom_mask;
#line 1117 "xs/GdkWindow.c"

	if (items < 3)
	    geom_mask_sv = NULL;
	else {
	    geom_mask_sv = ST(2)
;
	}
#line 591 "xs/GdkWindow.xs"
	if (!gperl_sv_is_defined (geom_mask_sv)) {
		geometry = SvGdkGeometryReal (geometry_ref, &geom_mask);
	} else {
		geometry = SvGdkGeometry (geometry_ref);
		geom_mask = SvGdkWindowHints (geom_mask_sv);
	}

	gdk_window_set_geometry_hints (window, geometry, geom_mask);
#line 1134 "xs/GdkWindow.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_gdk_set_sm_client_id); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_gdk_set_sm_client_id)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "sm_client_id");
    {
	const gchar *	sm_client_id;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(0));
	sm_client_id = (const gchar *)SvPV_nolen (ST(0))
;

	gdk_set_sm_client_id(sm_client_id);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_begin_paint_rect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_begin_paint_rect)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, rectangle");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRectangle *	rectangle = SvGdkRectangle (ST(1))
;

	gdk_window_begin_paint_rect(window, rectangle);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_begin_paint_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_begin_paint_region)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, region");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRegion *	region = SvGdkRegion (ST(1))
;

	gdk_window_begin_paint_region(window, region);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_end_paint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_end_paint)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_end_paint(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_title); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_title)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, title");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	const gchar *	title;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	title = (const gchar *)SvPV_nolen (ST(1))
;

	gdk_window_set_title(window, title);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_role); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_role)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, role");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	const gchar *	role;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	role = (const gchar *)SvPV_nolen (ST(1))
;

	gdk_window_set_role(window, role);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_transient_for); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_transient_for)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, parent");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindow *	parent = SvGdkWindow (ST(1))
;

	gdk_window_set_transient_for(window, parent);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_background); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_background)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, color");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkColor *	color = SvGdkColor (ST(1))
;

	gdk_window_set_background(window, color);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_back_pixmap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_back_pixmap)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "window, pixmap, parent_relative = 0");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkPixmap_ornull *	pixmap = SvGdkPixmap_ornull (ST(1))
;
	gboolean	parent_relative;

	if (items < 3)
	    parent_relative = 0;
	else {
	    parent_relative = (bool)SvTRUE(ST(2))
;
	}

	gdk_window_set_back_pixmap(window, pixmap, parent_relative);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_cursor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_cursor)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, cursor");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkCursor_ornull *	cursor = SvGdkCursor_ornull (ST(1))
;

	gdk_window_set_cursor(window, cursor);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_user_data); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_user_data)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gulong	RETVAL;
	dXSTARG;
#line 664 "xs/GdkWindow.xs"
	gdk_window_get_user_data (window, (gpointer*)&RETVAL);
	if( !RETVAL )
		XSRETURN_UNDEF;
#line 1351 "xs/GdkWindow.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_geometry); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_geometry)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x;
	gint	y;
	gint	width;
	gint	height;
	gint	depth;

	gdk_window_get_geometry(window, &x, &y, &width, &height, &depth);
	XSprePUSH;	EXTEND(SP,5);
	PUSHs(sv_newmortal());
	sv_setiv(ST(0), (IV)x);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)y);
	PUSHs(sv_newmortal());
	sv_setiv(ST(2), (IV)width);
	PUSHs(sv_newmortal());
	sv_setiv(ST(3), (IV)height);
	PUSHs(sv_newmortal());
	sv_setiv(ST(4), (IV)depth);
    }
    XSRETURN(5);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_position); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_position)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x;
	gint	y;

	gdk_window_get_position(window, &x, &y);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setiv(ST(0), (IV)x);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)y);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_origin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_origin)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x;
	gint	y;

	gdk_window_get_origin(window, &x, &y);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setiv(ST(0), (IV)x);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)y);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_root_origin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_root_origin)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x;
	gint	y;

	gdk_window_get_root_origin(window, &x, &y);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setiv(ST(0), (IV)x);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)y);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_frame_extents); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_frame_extents)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
#line 688 "xs/GdkWindow.xs"
	GdkRectangle rect;
#line 1470 "xs/GdkWindow.c"
	GdkRectangle_copy *	RETVAL;
#line 690 "xs/GdkWindow.xs"
	gdk_window_get_frame_extents (window, &rect);
	RETVAL = &rect;
#line 1475 "xs/GdkWindow.c"
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkRectangle_copy (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_pointer); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_pointer)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 704 "xs/GdkWindow.xs"
	GdkWindow       * win;
	gint              x;
	gint              y;
	GdkModifierType   mask;
#line 1501 "xs/GdkWindow.c"
	GdkWindow *	window = SvGdkWindow (ST(0))
;
#line 709 "xs/GdkWindow.xs"
	win = gdk_window_get_pointer (window, &x, &y, &mask);
	EXTEND (SP, 4);
	PUSHs (sv_2mortal (newSVGdkWindow_ornull (win)));
	PUSHs (sv_2mortal (newSViv (x)));
	PUSHs (sv_2mortal (newSViv (y)));
	PUSHs (sv_2mortal (newSVGdkModifierType (mask)));
#line 1511 "xs/GdkWindow.c"
	PUTBACK;
	return;
    }
}


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

	RETVAL = gdk_window_get_parent(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


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

	RETVAL = gdk_window_get_toplevel(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_children); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_children)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
#line 743 "xs/GdkWindow.xs"
	GList *windows = NULL, *i;
#line 1578 "xs/GdkWindow.c"
#line 745 "xs/GdkWindow.xs"
	PERL_UNUSED_VAR (ix);
	windows = gdk_window_peek_children (window);
	for (i = windows; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGdkWindow (i->data)));
#line 1584 "xs/GdkWindow.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_events); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_events)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkEventMask	RETVAL;

	RETVAL = gdk_window_get_events(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkEventMask (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_events); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_events)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, event_mask");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkEventMask	event_mask = SvGdkEventMask (ST(1))
;

	gdk_window_set_events(window, event_mask);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_icon_list); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_icon_list)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "window, ...");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
#line 771 "xs/GdkWindow.xs"
	int i;
	GList *pixbufs = NULL;
#line 1644 "xs/GdkWindow.c"
#line 774 "xs/GdkWindow.xs"
	for (i = 1; i < items; i++)
		pixbufs = g_list_append (pixbufs, SvGdkPixbuf (ST (i)));
	gdk_window_set_icon_list (window, pixbufs);
	g_list_free (pixbufs);
#line 1650 "xs/GdkWindow.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_icon); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_icon)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "window, icon_window, pixmap, mask");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindow_ornull *	icon_window = SvGdkWindow_ornull (ST(1))
;
	GdkPixmap_ornull *	pixmap = SvGdkPixmap_ornull (ST(2))
;
	GdkBitmap_ornull *	mask = SvGdkBitmap_ornull (ST(3))
;

	gdk_window_set_icon(window, icon_window, pixmap, mask);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_icon_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_icon_name)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, name");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	const gchar_ornull *	name;

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

	gdk_window_set_icon_name(window, name);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Window_set_accept_focus); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_accept_focus)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, accept_focus");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	accept_focus = (bool)SvTRUE(ST(1))
;

	gdk_window_set_accept_focus(window, accept_focus);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_keep_above); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_keep_above)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, setting");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gdk_window_set_keep_above(window, setting);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_keep_below); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_keep_below)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, setting");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	setting = (bool)SvTRUE(ST(1))
;

	gdk_window_set_keep_below(window, setting);
    }
    XSRETURN_EMPTY;
}


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

	RETVAL = gdk_window_get_group(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Gtk2__Gdk__Window_set_group); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_group)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, leader");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindow_ornull *	leader = SvGdkWindow_ornull (ST(1))
;

	gdk_window_set_group(window, leader);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_decorations); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_decorations)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, decorations");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWMDecoration	decorations = SvGdkWMDecoration (ST(1))
;

	gdk_window_set_decorations(window, decorations);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_decorations); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_decorations)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 821 "xs/GdkWindow.xs"
	gboolean result;
	GdkWMDecoration decorations;
#line 1833 "xs/GdkWindow.c"
	GdkWindow *	window = SvGdkWindow (ST(0))
;
#line 824 "xs/GdkWindow.xs"
	result = gdk_window_get_decorations (window, &decorations);
	EXTEND (SP, 2);
	PUSHs (sv_2mortal (boolSV (result)));
	PUSHs (sv_2mortal (newSVGdkWMDecoration (decorations)));
#line 1841 "xs/GdkWindow.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_functions); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_functions)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, functions");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWMFunction	functions = SvGdkWMFunction (ST(1))
;

	gdk_window_set_functions(window, functions);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_toplevels); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_toplevels)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "class");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 843 "xs/GdkWindow.xs"
	GList *windows = NULL, *i;
#line 1877 "xs/GdkWindow.c"
#line 845 "xs/GdkWindow.xs"
	windows = gdk_window_get_toplevels ();

	for (i = windows; i != NULL; i = i->next)
		XPUSHs (sv_2mortal (newSVGdkWindow (i->data)));

	g_list_free (windows);
	PERL_UNUSED_VAR (ax);
#line 1886 "xs/GdkWindow.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__Window_iconify); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_iconify)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_iconify(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_deiconify); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_deiconify)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_deiconify(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_stick); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_stick)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_stick(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_unstick); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_unstick)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_unstick(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_maximize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_maximize)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_maximize(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_unmaximize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_unmaximize)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_unmaximize(window);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Window_fullscreen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_fullscreen)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_fullscreen(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_unfullscreen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_unfullscreen)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_unfullscreen(window);
    }
    XSRETURN_EMPTY;
}

#endif

XS_EUPXS(XS_Gtk2__Gdk__Window_register_dnd); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_register_dnd)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_register_dnd(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_begin_resize_drag); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_begin_resize_drag)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "window, edge, button, root_x, root_y, timestamp");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindowEdge	edge = SvGdkWindowEdge (ST(1))
;
	gint	button = (gint)SvIV(ST(2))
;
	gint	root_x = (gint)SvIV(ST(3))
;
	gint	root_y = (gint)SvIV(ST(4))
;
	guint32	timestamp = (guint32)SvUV(ST(5))
;

	gdk_window_begin_resize_drag(window, edge, button, root_x, root_y, timestamp);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_begin_move_drag); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_begin_move_drag)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "window, button, root_x, root_y, timestamp");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	button = (gint)SvIV(ST(1))
;
	gint	root_x = (gint)SvIV(ST(2))
;
	gint	root_y = (gint)SvIV(ST(3))
;
	guint32	timestamp = (guint32)SvUV(ST(4))
;

	gdk_window_begin_move_drag(window, button, root_x, root_y, timestamp);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_invalidate_rect); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_invalidate_rect)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, rectangle, invalidate_children");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRectangle_ornull *	rectangle = SvGdkRectangle_ornull (ST(1))
;
	gboolean	invalidate_children = (bool)SvTRUE(ST(2))
;

	gdk_window_invalidate_rect(window, rectangle, invalidate_children);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_invalidate_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_invalidate_region)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, region, invalidate_children");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRegion *	region = SvGdkRegion (ST(1))
;
	gboolean	invalidate_children = (bool)SvTRUE(ST(2))
;

	gdk_window_invalidate_region(window, region, invalidate_children);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_invalidate_maybe_recurse); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_invalidate_maybe_recurse)
{
    dVAR; dXSARGS;
    if (items < 3 || items > 4)
       croak_xs_usage(cv,  "window, region, func, data=NULL");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRegion *	region = SvGdkRegion (ST(1))
;
	SV *	func = ST(2)
;
	SV *	data;
#line 942 "xs/GdkWindow.xs"
	GPerlCallback *callback;
#line 2147 "xs/GdkWindow.c"

	if (items < 4)
	    data = NULL;
	else {
	    data = ST(3)
;
	}
#line 944 "xs/GdkWindow.xs"
	callback = gtk2perl_gdk_window_invalidate_maybe_recurse_func_create (func, data);
	gdk_window_invalidate_maybe_recurse (window,
	                                     region,
	                                     gtk2perl_gdk_window_invalidate_maybe_recurse_func,
	                                     callback);
	gperl_callback_destroy (callback);
#line 2162 "xs/GdkWindow.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_update_area); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_update_area)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRegion_own_ornull *	RETVAL;

	RETVAL = gdk_window_get_update_area(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkRegion_own_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_freeze_updates); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_freeze_updates)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_freeze_updates(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_thaw_updates); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_thaw_updates)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_thaw_updates(window);
    }
    XSRETURN_EMPTY;
}


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

	gdk_window_process_all_updates(/*void*/);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_debug_updates); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_debug_updates)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class_or_instance, enable");
    {
	gboolean	enable = (bool)SvTRUE(ST(1))
;

	gdk_window_set_debug_updates(enable);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_process_updates); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_process_updates)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, update_children");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	update_children = (bool)SvTRUE(ST(1))
;

	gdk_window_process_updates(window, update_children);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_internal_paint_info); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_internal_paint_info)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 988 "xs/GdkWindow.xs"
	GdkDrawable *real_drawable = NULL;
	gint x_offset;
	gint y_offset;
#line 2284 "xs/GdkWindow.c"
	GdkWindow *	window = SvGdkWindow (ST(0))
;
#line 992 "xs/GdkWindow.xs"
	gdk_window_get_internal_paint_info (window, &real_drawable, &x_offset, &y_offset);
	EXTEND (SP, 3);
	PUSHs (sv_2mortal (newSVGdkDrawable (real_drawable)));
	PUSHs (sv_2mortal (newSViv (x_offset)));
	PUSHs (sv_2mortal (newSViv (y_offset)));
#line 2293 "xs/GdkWindow.c"
	PUTBACK;
	return;
    }
}

#if GTK_CHECK_VERSION (2, 6, 0)
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_Gtk2__Gdk__Window_enable_synchronized_configure); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_enable_synchronized_configure)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_enable_synchronized_configure(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_configure_finished); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_configure_finished)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_configure_finished(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_focus_on_map); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_focus_on_map)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, focus_on_map");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	focus_on_map = (bool)SvTRUE(ST(1))
;

	gdk_window_set_focus_on_map(window, focus_on_map);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Window_set_urgency_hint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_urgency_hint)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, urgent");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	urgent = (bool)SvTRUE(ST(1))
;

	gdk_window_set_urgency_hint(window, urgent);
    }
    XSRETURN_EMPTY;
}


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

	gdk_window_move_region(window, region, dx, dy);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Window_get_type_hint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_type_hint)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindowTypeHint	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_get_type_hint(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindowTypeHint (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_input_shape_combine_mask); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_input_shape_combine_mask)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "window, mask, x, y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkBitmap_ornull *	mask = SvGdkBitmap_ornull (ST(1))
;
	gint	x = (gint)SvIV(ST(2))
;
	gint	y = (gint)SvIV(ST(3))
;

	gdk_window_input_shape_combine_mask(window, mask, x, y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_input_shape_combine_region); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_input_shape_combine_region)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "window, shape, offset_x, offset_y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkRegion_ornull *	shape = SvGdkRegion_ornull (ST(1))
;
	gint	offset_x = (gint)SvIV(ST(2))
;
	gint	offset_y = (gint)SvIV(ST(3))
;

	gdk_window_input_shape_combine_region(window, shape, offset_x, offset_y);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_child_input_shapes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_child_input_shapes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_set_child_input_shapes(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_merge_child_input_shapes); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_merge_child_input_shapes)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_merge_child_input_shapes(window);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__Window_beep); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_beep)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_beep(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_startup_id); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_startup_id)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, startup_id");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	const gchar *	startup_id;

	/* same as SvGChar(), but not in a function */
	sv_utf8_upgrade (ST(1));
	startup_id = (const gchar *)SvPV_nolen (ST(1))
;

	gdk_window_set_startup_id(window, startup_id);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_opacity); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_opacity)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, opacity");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gdouble	opacity = (double)SvNV(ST(1))
;

	gdk_window_set_opacity(window, opacity);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_composited); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_composited)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "window, composited");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gboolean	composited = (bool)SvTRUE(ST(1))
;

	gdk_window_set_composited(window, composited);
    }
    XSRETURN_EMPTY;
}

#endif
#if GTK_CHECK_VERSION (2, 14, 0)
#define XSubPPtmpAAAJ 1


XS_EUPXS(XS_Gtk2__Gdk__Window_redirect_to_drawable); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_redirect_to_drawable)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "window, drawable, src_x, src_y, dest_x, dest_y, width, height");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkDrawable *	drawable = SvGdkDrawable (ST(1))
;
	gint	src_x = (gint)SvIV(ST(2))
;
	gint	src_y = (gint)SvIV(ST(3))
;
	gint	dest_x = (gint)SvIV(ST(4))
;
	gint	dest_y = (gint)SvIV(ST(5))
;
	gint	width = (gint)SvIV(ST(6))
;
	gint	height = (gint)SvIV(ST(7))
;

	gdk_window_redirect_to_drawable(window, drawable, src_x, src_y, dest_x, dest_y, width, height);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_remove_redirection); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_remove_redirection)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_remove_redirection(window);
    }
    XSRETURN_EMPTY;
}

#endif /* 2.14 */
#if GTK_CHECK_VERSION (2, 18, 0)
#define XSubPPtmpAAAK 1


XS_EUPXS(XS_Gtk2__Gdk__Window_flush); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_flush)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_flush(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_ensure_native); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_ensure_native)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_ensure_native(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_cursor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_cursor)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkCursor_ornull *	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_get_cursor(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkCursor_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_restack); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_restack)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, sibling, above");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	GdkWindow_ornull *	sibling = SvGdkWindow_ornull (ST(1))
;
	gboolean	above = (bool)SvTRUE(ST(2))
;

	gdk_window_restack(window, sibling, above);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_geometry_changed); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_geometry_changed)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	gdk_window_geometry_changed(window);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_root_coords); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_root_coords)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, x, y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gint	x = (gint)SvIV(ST(1))
;
	gint	y = (gint)SvIV(ST(2))
;
	gint	root_x;
	gint	root_y;

	gdk_window_get_root_coords(window, x, y, &root_x, &root_y);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setiv(ST(0), (IV)root_x);
	PUSHs(sv_newmortal());
	sv_setiv(ST(1), (IV)root_y);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_is_destroyed); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_is_destroyed)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_is_destroyed(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif /* 2.18 */
#if GTK_CHECK_VERSION (2, 22, 0)
#define XSubPPtmpAAAL 1


XS_EUPXS(XS_Gtk2__Gdk__Window_coords_from_parent); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_coords_from_parent)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, parent_x, parent_y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gdouble	parent_x = (double)SvNV(ST(1))
;
	gdouble	parent_y = (double)SvNV(ST(2))
;
	gdouble	x;
	gdouble	y;

	gdk_window_coords_from_parent(window, parent_x, parent_y, &x, &y);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setnv(ST(0), (double)x);
	PUSHs(sv_newmortal());
	sv_setnv(ST(1), (double)y);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_coords_to_parent); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_coords_to_parent)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "window, x, y");
    {
	GdkWindow *	window = SvGdkWindow (ST(0))
;
	gdouble	x = (double)SvNV(ST(1))
;
	gdouble	y = (double)SvNV(ST(2))
;
	gdouble	parent_x;
	gdouble	parent_y;

	gdk_window_coords_to_parent(window, x, y, &parent_x, &parent_y);
	XSprePUSH;	EXTEND(SP,2);
	PUSHs(sv_newmortal());
	sv_setnv(ST(0), (double)parent_x);
	PUSHs(sv_newmortal());
	sv_setnv(ST(1), (double)parent_y);
    }
    XSRETURN(2);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_accept_focus); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_accept_focus)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_get_accept_focus(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_composited); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_composited)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_get_composited(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


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

	RETVAL = gdk_window_get_effective_parent(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


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

	RETVAL = gdk_window_get_effective_toplevel(window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_focus_on_map); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_focus_on_map)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_get_focus_on_map(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_modal_hint); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_modal_hint)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_get_modal_hint(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_has_native); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_has_native)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_has_native(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_is_input_only); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_is_input_only)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_is_input_only(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_is_shaped); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_is_shaped)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "window");
    {
	gboolean	RETVAL;
	GdkWindow *	window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_window_is_shaped(window);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif /* 2.22 */
#if GTK_CHECK_VERSION (2, 18, 0)
#define XSubPPtmpAAAM 1


XS_EUPXS(XS_Gtk2__Gdk__Window_get_pixmap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_pixmap)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "offscreen_window");
    {
	GdkPixmap_ornull *	RETVAL;
	GdkWindow *	offscreen_window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_offscreen_window_get_pixmap(offscreen_window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkPixmap_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__Window_set_embedder); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_set_embedder)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "offscreen_window, embedder");
    {
	GdkWindow *	offscreen_window = SvGdkWindow (ST(0))
;
	GdkWindow *	embedder = SvGdkWindow (ST(1))
;

	gdk_offscreen_window_set_embedder(offscreen_window, embedder);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__Window_get_embedder); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__Window_get_embedder)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "offscreen_window");
    {
	GdkWindow_ornull *	RETVAL;
	GdkWindow *	offscreen_window = SvGdkWindow (ST(0))
;

	RETVAL = gdk_offscreen_window_get_embedder(offscreen_window);
	{
	    SV * RETVALSV;
	    RETVALSV = newSVGdkWindow_ornull (RETVAL);
	    RETVALSV = sv_2mortal(RETVALSV);
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif /* 2.18 */

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

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

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__Gdk__Window); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__Gdk__Window)
{
#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::Window::new", XS_Gtk2__Gdk__Window_new);
        newXS_deffile("Gtk2::Gdk::Window::destroy", XS_Gtk2__Gdk__Window_destroy);
        newXS_deffile("Gtk2::Gdk::Window::get_window_type", XS_Gtk2__Gdk__Window_get_window_type);
        newXS_deffile("Gtk2::Gdk::Window::at_pointer", XS_Gtk2__Gdk__Window_at_pointer);
        newXS_deffile("Gtk2::Gdk::Window::show", XS_Gtk2__Gdk__Window_show);
        newXS_deffile("Gtk2::Gdk::Window::hide", XS_Gtk2__Gdk__Window_hide);
        newXS_deffile("Gtk2::Gdk::Window::withdraw", XS_Gtk2__Gdk__Window_withdraw);
        newXS_deffile("Gtk2::Gdk::Window::show_unraised", XS_Gtk2__Gdk__Window_show_unraised);
        newXS_deffile("Gtk2::Gdk::Window::move", XS_Gtk2__Gdk__Window_move);
        newXS_deffile("Gtk2::Gdk::Window::resize", XS_Gtk2__Gdk__Window_resize);
        newXS_deffile("Gtk2::Gdk::Window::move_resize", XS_Gtk2__Gdk__Window_move_resize);
        newXS_deffile("Gtk2::Gdk::Window::reparent", XS_Gtk2__Gdk__Window_reparent);
        newXS_deffile("Gtk2::Gdk::Window::clear", XS_Gtk2__Gdk__Window_clear);
        newXS_deffile("Gtk2::Gdk::Window::clear_area", XS_Gtk2__Gdk__Window_clear_area);
        newXS_deffile("Gtk2::Gdk::Window::clear_area_e", XS_Gtk2__Gdk__Window_clear_area_e);
        newXS_deffile("Gtk2::Gdk::Window::raise", XS_Gtk2__Gdk__Window_raise);
        newXS_deffile("Gtk2::Gdk::Window::lower", XS_Gtk2__Gdk__Window_lower);
        newXS_deffile("Gtk2::Gdk::Window::focus", XS_Gtk2__Gdk__Window_focus);
        newXS_deffile("Gtk2::Gdk::Window::set_user_data", XS_Gtk2__Gdk__Window_set_user_data);
        newXS_deffile("Gtk2::Gdk::Window::set_override_redirect", XS_Gtk2__Gdk__Window_set_override_redirect);
        newXS_deffile("Gtk2::Gdk::Window::scroll", XS_Gtk2__Gdk__Window_scroll);
        newXS_deffile("Gtk2::Gdk::Window::shape_combine_mask", XS_Gtk2__Gdk__Window_shape_combine_mask);
        newXS_deffile("Gtk2::Gdk::Window::shape_combine_region", XS_Gtk2__Gdk__Window_shape_combine_region);
        newXS_deffile("Gtk2::Gdk::Window::set_child_shapes", XS_Gtk2__Gdk__Window_set_child_shapes);
        newXS_deffile("Gtk2::Gdk::Window::merge_child_shapes", XS_Gtk2__Gdk__Window_merge_child_shapes);
        newXS_deffile("Gtk2::Gdk::Window::set_static_gravities", XS_Gtk2__Gdk__Window_set_static_gravities);
        newXS_deffile("Gtk2::Gdk::Window::is_visible", XS_Gtk2__Gdk__Window_is_visible);
        newXS_deffile("Gtk2::Gdk::Window::is_viewable", XS_Gtk2__Gdk__Window_is_viewable);
        newXS_deffile("Gtk2::Gdk::Window::get_state", XS_Gtk2__Gdk__Window_get_state);
#if XSubPPtmpAAAA
        newXS_deffile("Gtk2::Gdk::Window::foreign_new", XS_Gtk2__Gdk__Window_foreign_new);
        newXS_deffile("Gtk2::Gdk::Window::lookup", XS_Gtk2__Gdk__Window_lookup);
#endif
#if XSubPPtmpAAAB
        newXS_deffile("Gtk2::Gdk::Window::foreign_new_for_display", XS_Gtk2__Gdk__Window_foreign_new_for_display);
        newXS_deffile("Gtk2::Gdk::Window::lookup_for_display", XS_Gtk2__Gdk__Window_lookup_for_display);
#endif
        newXS_deffile("Gtk2::Gdk::Window::set_type_hint", XS_Gtk2__Gdk__Window_set_type_hint);
        newXS_deffile("Gtk2::Gdk::Window::set_modal_hint", XS_Gtk2__Gdk__Window_set_modal_hint);
#if XSubPPtmpAAAC
        newXS_deffile("Gtk2::Gdk::Window::set_skip_taskbar_hint", XS_Gtk2__Gdk__Window_set_skip_taskbar_hint);
        newXS_deffile("Gtk2::Gdk::Window::set_skip_pager_hint", XS_Gtk2__Gdk__Window_set_skip_pager_hint);
#endif
        newXS_deffile("Gtk2::Gdk::Window::set_geometry_hints", XS_Gtk2__Gdk__Window_set_geometry_hints);
        newXS_deffile("Gtk2::Gdk::Window::gdk_set_sm_client_id", XS_Gtk2__Gdk__Window_gdk_set_sm_client_id);
        newXS_deffile("Gtk2::Gdk::Window::begin_paint_rect", XS_Gtk2__Gdk__Window_begin_paint_rect);
        newXS_deffile("Gtk2::Gdk::Window::begin_paint_region", XS_Gtk2__Gdk__Window_begin_paint_region);
        newXS_deffile("Gtk2::Gdk::Window::end_paint", XS_Gtk2__Gdk__Window_end_paint);
        newXS_deffile("Gtk2::Gdk::Window::set_title", XS_Gtk2__Gdk__Window_set_title);
        newXS_deffile("Gtk2::Gdk::Window::set_role", XS_Gtk2__Gdk__Window_set_role);
        newXS_deffile("Gtk2::Gdk::Window::set_transient_for", XS_Gtk2__Gdk__Window_set_transient_for);
        newXS_deffile("Gtk2::Gdk::Window::set_background", XS_Gtk2__Gdk__Window_set_background);
        newXS_deffile("Gtk2::Gdk::Window::set_back_pixmap", XS_Gtk2__Gdk__Window_set_back_pixmap);
        newXS_deffile("Gtk2::Gdk::Window::set_cursor", XS_Gtk2__Gdk__Window_set_cursor);
        newXS_deffile("Gtk2::Gdk::Window::get_user_data", XS_Gtk2__Gdk__Window_get_user_data);
        newXS_deffile("Gtk2::Gdk::Window::get_geometry", XS_Gtk2__Gdk__Window_get_geometry);
        newXS_deffile("Gtk2::Gdk::Window::get_position", XS_Gtk2__Gdk__Window_get_position);
        newXS_deffile("Gtk2::Gdk::Window::get_origin", XS_Gtk2__Gdk__Window_get_origin);
        newXS_deffile("Gtk2::Gdk::Window::get_root_origin", XS_Gtk2__Gdk__Window_get_root_origin);
        newXS_deffile("Gtk2::Gdk::Window::get_frame_extents", XS_Gtk2__Gdk__Window_get_frame_extents);
        newXS_deffile("Gtk2::Gdk::Window::get_pointer", XS_Gtk2__Gdk__Window_get_pointer);
        newXS_deffile("Gtk2::Gdk::Window::get_parent", XS_Gtk2__Gdk__Window_get_parent);
        newXS_deffile("Gtk2::Gdk::Window::get_toplevel", XS_Gtk2__Gdk__Window_get_toplevel);
        cv = newXS_deffile("Gtk2::Gdk::Window::get_children", XS_Gtk2__Gdk__Window_get_children);
        XSANY.any_i32 = 0;
        cv = newXS_deffile("Gtk2::Gdk::Window::peek_children", XS_Gtk2__Gdk__Window_get_children);
        XSANY.any_i32 = 1;
        newXS_deffile("Gtk2::Gdk::Window::get_events", XS_Gtk2__Gdk__Window_get_events);
        newXS_deffile("Gtk2::Gdk::Window::set_events", XS_Gtk2__Gdk__Window_set_events);
        newXS_deffile("Gtk2::Gdk::Window::set_icon_list", XS_Gtk2__Gdk__Window_set_icon_list);
        newXS_deffile("Gtk2::Gdk::Window::set_icon", XS_Gtk2__Gdk__Window_set_icon);
        newXS_deffile("Gtk2::Gdk::Window::set_icon_name", XS_Gtk2__Gdk__Window_set_icon_name);
#if XSubPPtmpAAAD
        newXS_deffile("Gtk2::Gdk::Window::set_accept_focus", XS_Gtk2__Gdk__Window_set_accept_focus);
        newXS_deffile("Gtk2::Gdk::Window::set_keep_above", XS_Gtk2__Gdk__Window_set_keep_above);
        newXS_deffile("Gtk2::Gdk::Window::set_keep_below", XS_Gtk2__Gdk__Window_set_keep_below);
        newXS_deffile("Gtk2::Gdk::Window::get_group", XS_Gtk2__Gdk__Window_get_group);
#endif
        newXS_deffile("Gtk2::Gdk::Window::set_group", XS_Gtk2__Gdk__Window_set_group);
        newXS_deffile("Gtk2::Gdk::Window::set_decorations", XS_Gtk2__Gdk__Window_set_decorations);
        newXS_deffile("Gtk2::Gdk::Window::get_decorations", XS_Gtk2__Gdk__Window_get_decorations);
        newXS_deffile("Gtk2::Gdk::Window::set_functions", XS_Gtk2__Gdk__Window_set_functions);
        newXS_deffile("Gtk2::Gdk::Window::get_toplevels", XS_Gtk2__Gdk__Window_get_toplevels);
        newXS_deffile("Gtk2::Gdk::Window::iconify", XS_Gtk2__Gdk__Window_iconify);
        newXS_deffile("Gtk2::Gdk::Window::deiconify", XS_Gtk2__Gdk__Window_deiconify);
        newXS_deffile("Gtk2::Gdk::Window::stick", XS_Gtk2__Gdk__Window_stick);
        newXS_deffile("Gtk2::Gdk::Window::unstick", XS_Gtk2__Gdk__Window_unstick);
        newXS_deffile("Gtk2::Gdk::Window::maximize", XS_Gtk2__Gdk__Window_maximize);
        newXS_deffile("Gtk2::Gdk::Window::unmaximize", XS_Gtk2__Gdk__Window_unmaximize);
#if XSubPPtmpAAAE
        newXS_deffile("Gtk2::Gdk::Window::fullscreen", XS_Gtk2__Gdk__Window_fullscreen);
        newXS_deffile("Gtk2::Gdk::Window::unfullscreen", XS_Gtk2__Gdk__Window_unfullscreen);
#endif
        newXS_deffile("Gtk2::Gdk::Window::register_dnd", XS_Gtk2__Gdk__Window_register_dnd);
        newXS_deffile("Gtk2::Gdk::Window::begin_resize_drag", XS_Gtk2__Gdk__Window_begin_resize_drag);
        newXS_deffile("Gtk2::Gdk::Window::begin_move_drag", XS_Gtk2__Gdk__Window_begin_move_drag);
        newXS_deffile("Gtk2::Gdk::Window::invalidate_rect", XS_Gtk2__Gdk__Window_invalidate_rect);
        newXS_deffile("Gtk2::Gdk::Window::invalidate_region", XS_Gtk2__Gdk__Window_invalidate_region);
        newXS_deffile("Gtk2::Gdk::Window::invalidate_maybe_recurse", XS_Gtk2__Gdk__Window_invalidate_maybe_recurse);
        newXS_deffile("Gtk2::Gdk::Window::get_update_area", XS_Gtk2__Gdk__Window_get_update_area);
        newXS_deffile("Gtk2::Gdk::Window::freeze_updates", XS_Gtk2__Gdk__Window_freeze_updates);
        newXS_deffile("Gtk2::Gdk::Window::thaw_updates", XS_Gtk2__Gdk__Window_thaw_updates);
        newXS_deffile("Gtk2::Gdk::Window::process_all_updates", XS_Gtk2__Gdk__Window_process_all_updates);
        newXS_deffile("Gtk2::Gdk::Window::set_debug_updates", XS_Gtk2__Gdk__Window_set_debug_updates);
        newXS_deffile("Gtk2::Gdk::Window::process_updates", XS_Gtk2__Gdk__Window_process_updates);
        newXS_deffile("Gtk2::Gdk::Window::get_internal_paint_info", XS_Gtk2__Gdk__Window_get_internal_paint_info);
#if XSubPPtmpAAAF
        newXS_deffile("Gtk2::Gdk::Window::enable_synchronized_configure", XS_Gtk2__Gdk__Window_enable_synchronized_configure);
        newXS_deffile("Gtk2::Gdk::Window::configure_finished", XS_Gtk2__Gdk__Window_configure_finished);
        newXS_deffile("Gtk2::Gdk::Window::set_focus_on_map", XS_Gtk2__Gdk__Window_set_focus_on_map);
#endif
#if XSubPPtmpAAAG
        newXS_deffile("Gtk2::Gdk::Window::set_urgency_hint", XS_Gtk2__Gdk__Window_set_urgency_hint);
        newXS_deffile("Gtk2::Gdk::Window::move_region", XS_Gtk2__Gdk__Window_move_region);
#endif
#if XSubPPtmpAAAH
        newXS_deffile("Gtk2::Gdk::Window::get_type_hint", XS_Gtk2__Gdk__Window_get_type_hint);
        newXS_deffile("Gtk2::Gdk::Window::input_shape_combine_mask", XS_Gtk2__Gdk__Window_input_shape_combine_mask);
        newXS_deffile("Gtk2::Gdk::Window::input_shape_combine_region", XS_Gtk2__Gdk__Window_input_shape_combine_region);
        newXS_deffile("Gtk2::Gdk::Window::set_child_input_shapes", XS_Gtk2__Gdk__Window_set_child_input_shapes);
        newXS_deffile("Gtk2::Gdk::Window::merge_child_input_shapes", XS_Gtk2__Gdk__Window_merge_child_input_shapes);
#endif
#if XSubPPtmpAAAI
        newXS_deffile("Gtk2::Gdk::Window::beep", XS_Gtk2__Gdk__Window_beep);
        newXS_deffile("Gtk2::Gdk::Window::set_startup_id", XS_Gtk2__Gdk__Window_set_startup_id);
        newXS_deffile("Gtk2::Gdk::Window::set_opacity", XS_Gtk2__Gdk__Window_set_opacity);
        newXS_deffile("Gtk2::Gdk::Window::set_composited", XS_Gtk2__Gdk__Window_set_composited);
#endif
#if XSubPPtmpAAAJ
        newXS_deffile("Gtk2::Gdk::Window::redirect_to_drawable", XS_Gtk2__Gdk__Window_redirect_to_drawable);
        newXS_deffile("Gtk2::Gdk::Window::remove_redirection", XS_Gtk2__Gdk__Window_remove_redirection);
#endif
#if XSubPPtmpAAAK
        newXS_deffile("Gtk2::Gdk::Window::flush", XS_Gtk2__Gdk__Window_flush);
        newXS_deffile("Gtk2::Gdk::Window::ensure_native", XS_Gtk2__Gdk__Window_ensure_native);
        newXS_deffile("Gtk2::Gdk::Window::get_cursor", XS_Gtk2__Gdk__Window_get_cursor);
        newXS_deffile("Gtk2::Gdk::Window::restack", XS_Gtk2__Gdk__Window_restack);
        newXS_deffile("Gtk2::Gdk::Window::geometry_changed", XS_Gtk2__Gdk__Window_geometry_changed);
        newXS_deffile("Gtk2::Gdk::Window::get_root_coords", XS_Gtk2__Gdk__Window_get_root_coords);
        newXS_deffile("Gtk2::Gdk::Window::is_destroyed", XS_Gtk2__Gdk__Window_is_destroyed);
#endif
#if XSubPPtmpAAAL
        newXS_deffile("Gtk2::Gdk::Window::coords_from_parent", XS_Gtk2__Gdk__Window_coords_from_parent);
        newXS_deffile("Gtk2::Gdk::Window::coords_to_parent", XS_Gtk2__Gdk__Window_coords_to_parent);
        newXS_deffile("Gtk2::Gdk::Window::get_accept_focus", XS_Gtk2__Gdk__Window_get_accept_focus);
        newXS_deffile("Gtk2::Gdk::Window::get_composited", XS_Gtk2__Gdk__Window_get_composited);
        newXS_deffile("Gtk2::Gdk::Window::get_effective_parent", XS_Gtk2__Gdk__Window_get_effective_parent);
        newXS_deffile("Gtk2::Gdk::Window::get_effective_toplevel", XS_Gtk2__Gdk__Window_get_effective_toplevel);
        newXS_deffile("Gtk2::Gdk::Window::get_focus_on_map", XS_Gtk2__Gdk__Window_get_focus_on_map);
        newXS_deffile("Gtk2::Gdk::Window::get_modal_hint", XS_Gtk2__Gdk__Window_get_modal_hint);
        newXS_deffile("Gtk2::Gdk::Window::has_native", XS_Gtk2__Gdk__Window_has_native);
        newXS_deffile("Gtk2::Gdk::Window::is_input_only", XS_Gtk2__Gdk__Window_is_input_only);
        newXS_deffile("Gtk2::Gdk::Window::is_shaped", XS_Gtk2__Gdk__Window_is_shaped);
#endif
#if XSubPPtmpAAAM
        newXS_deffile("Gtk2::Gdk::Window::get_pixmap", XS_Gtk2__Gdk__Window_get_pixmap);
        newXS_deffile("Gtk2::Gdk::Window::set_embedder", XS_Gtk2__Gdk__Window_set_embedder);
        newXS_deffile("Gtk2::Gdk::Window::get_embedder", XS_Gtk2__Gdk__Window_get_embedder);
#endif
        newXS_deffile("Gtk2::Gdk::get_default_root_window", XS_Gtk2__Gdk_get_default_root_window);

    /* Initialisation Section */

#line 221 "xs/GdkWindow.xs"
#if GTK_CHECK_VERSION (2, 18, 0)
	gperl_signal_set_marshaller_for (GDK_TYPE_WINDOW, "from-embedder",
		gtk2perl_offscreen_coord_translate_marshal);
	gperl_signal_set_marshaller_for (GDK_TYPE_WINDOW, "to-embedder",
		gtk2perl_offscreen_coord_translate_marshal);
#endif

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#if XSubPPtmpAAAE
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#endif
#if XSubPPtmpAAAH
#endif
#if XSubPPtmpAAAI
#endif
#if XSubPPtmpAAAJ
#endif
#if XSubPPtmpAAAK
#endif
#if XSubPPtmpAAAL
#endif
#if XSubPPtmpAAAM
#endif
#line 3314 "xs/GdkWindow.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
}

