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

#line 1 "xs/GdkDnd.xs"
/*
 * Copyright (c) 2003 by the gtk2-perl team (see the file AUTHORS)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2.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 34 "xs/GdkDnd.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 176 "xs/GdkDnd.c"

XS_EUPXS(XS_Gtk2__Gdk__DragContext_protocol); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_protocol)
{
    dVAR; dXSARGS;
    dXSI32;
    if (items != 1)
       croak_xs_usage(cv,  "dc");
    {
	GdkDragContext *	dc = SvGdkDragContext (ST(0))
;
	SV *	RETVAL;
#line 38 "xs/GdkDnd.xs"
	switch (ix) {
	    case 0: RETVAL = newSVGdkDragProtocol (dc->protocol); break;
	    case 1: RETVAL = newSViv (dc->is_source); break;
	    case 2: RETVAL = newSVGdkWindow (dc->source_window); break;
	    case 3: RETVAL = newSVGdkWindow (dc->dest_window); break;
	    /* must use get_targets to access targets */
	    case 5: RETVAL = newSVGdkDragAction (dc->actions); break;
	    case 6: RETVAL = newSVGdkDragAction (dc->suggested_action); break;
	    case 7: RETVAL = newSVGdkDragAction (dc->action); break;
	    case 8: RETVAL = newSVuv (dc->start_time); break;
	    default:
		RETVAL = NULL;
		g_assert_not_reached ();
	}
#line 204 "xs/GdkDnd.c"
	ST(0) = RETVAL;
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_targets); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_targets)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "dc");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDragContext *	dc = SvGdkDragContext (ST(0))
;
#line 62 "xs/GdkDnd.xs"
	GList * i;
#line 225 "xs/GdkDnd.c"
#line 64 "xs/GdkDnd.xs"
	for (i = dc->targets; i != NULL ; i = i->next)
		XPUSHs (sv_2mortal (newSVGdkAtom ((GdkAtom)i->data)));
#line 229 "xs/GdkDnd.c"
	PUTBACK;
	return;
    }
}


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

	RETVAL = gdk_drag_context_new(/* void */);
	ST(0) = newSVGdkDragContext_noinc (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_actions); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_actions)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "context");
    {
	GdkDragAction	RETVAL;
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;

	RETVAL = gdk_drag_context_get_actions(context);
	ST(0) = newSVGdkDragAction (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_selected_action); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_selected_action)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "context");
    {
	GdkDragAction	RETVAL;
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;

	RETVAL = gdk_drag_context_get_selected_action(context);
	ST(0) = newSVGdkDragAction (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_suggested_action); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_suggested_action)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "context");
    {
	GdkDragAction	RETVAL;
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;

	RETVAL = gdk_drag_context_get_suggested_action(context);
	ST(0) = newSVGdkDragAction (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_list_targets); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_list_targets)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "context");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 89 "xs/GdkDnd.xs"
	GList * i;
#line 324 "xs/GdkDnd.c"
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
#line 91 "xs/GdkDnd.xs"
	for (i = gdk_drag_context_list_targets (context); i != NULL ; i = i->next)
		XPUSHs (sv_2mortal (newSVGdkAtom ((GdkAtom)i->data)));
#line 330 "xs/GdkDnd.c"
	PUTBACK;
	return;
    }
}


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

	RETVAL = gdk_drag_context_get_source_window(context);
	ST(0) = newSVGdkWindow (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}

#endif /* 2.22 */

XS_EUPXS(XS_Gtk2__Gdk__DragContext_status); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_status)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "context, action, time_=GDK_CURRENT_TIME");
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	GdkDragAction	action = SvGdkDragAction (ST(1))
;
	guint32	time_;

	if (items < 3)
	    time_ = GDK_CURRENT_TIME;
	else {
	    time_ = (guint32)SvUV(ST(2))
;
	}

	gdk_drag_status(context, action, time_);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_selection); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_selection)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "context");
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	GdkAtom	RETVAL;

	RETVAL = gdk_drag_get_selection(context);
	ST(0) = newSVGdkAtom (RETVAL);
	sv_2mortal(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_begin); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_begin)
{
    dVAR; dXSARGS;
    if (items < 2)
       croak_xs_usage(cv,  "class, window, ...");
    {
	GdkWindow *	window = SvGdkWindow (ST(1))
;
#line 122 "xs/GdkDnd.xs"
	GList *targets = NULL;
	int i;
#line 414 "xs/GdkDnd.c"
	GdkDragContext_noinc *	RETVAL;
#line 125 "xs/GdkDnd.xs"
	for (i = items - 1 ; i >= 2 ; i--)
		targets = g_list_prepend (targets,
		                        GUINT_TO_POINTER (SvGdkAtom (ST (i))));
			/* the Gdk source code uses GUINT_TO_POINTER
			 * when storing atoms in hashes. */
	RETVAL = gdk_drag_begin (window, targets);
#line 423 "xs/GdkDnd.c"
	ST(0) = newSVGdkDragContext_noinc (RETVAL);
	sv_2mortal(ST(0));
#line 134 "xs/GdkDnd.xs"
	g_list_free (targets);
#line 428 "xs/GdkDnd.c"
    }
    XSRETURN(1);
}

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


XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_protocol_for_display); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_protocol_for_display)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, display, xid");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDisplay *	display = SvGdkDisplay (ST(1))
;
	guint32	xid = (guint32)SvUV(ST(2))
;
#line 147 "xs/GdkDnd.xs"
	GdkDragProtocol protocol;
	guint32 ret;
#line 453 "xs/GdkDnd.c"
#line 150 "xs/GdkDnd.xs"
	ret = gdk_drag_get_protocol_for_display (display, xid, &protocol);
	XPUSHs (sv_2mortal (newSVuv (ret)));
	XPUSHs (sv_2mortal (ret 
	                    ? newSVGdkDragProtocol (protocol)
	                    : newSVsv (&PL_sv_undef)));
#line 460 "xs/GdkDnd.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_find_window_for_screen); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_find_window_for_screen)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "context, drag_window, screen, x_root, y_root");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	GdkWindow *	drag_window = SvGdkWindow (ST(1))
;
	GdkScreen *	screen = SvGdkScreen (ST(2))
;
	gint	x_root = (gint)SvIV(ST(3))
;
	gint	y_root = (gint)SvIV(ST(4))
;
#line 168 "xs/GdkDnd.xs"
	GdkWindow *dest_window = NULL;
	GdkDragProtocol protocol;
#line 489 "xs/GdkDnd.c"
#line 171 "xs/GdkDnd.xs"
	gdk_drag_find_window_for_screen (context, drag_window, screen, 
	                                 x_root, y_root, 
	                                 &dest_window, &protocol);
	XPUSHs (sv_2mortal (newSVGdkWindow (dest_window)));
	XPUSHs (sv_2mortal ((dest_window
	                     ? newSVGdkDragProtocol (protocol)
	                     : newSVsv (&PL_sv_undef))));
#line 498 "xs/GdkDnd.c"
	PUTBACK;
	return;
    }
}

#endif /* >= 2.2.0 */

XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_protocol); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_get_protocol)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "class, xid");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	guint32	xid = (guint32)SvUV(ST(1))
;
#line 189 "xs/GdkDnd.xs"
	GdkDragProtocol protocol;
	guint32 ret;
#line 520 "xs/GdkDnd.c"
#line 192 "xs/GdkDnd.xs"
	ret = gdk_drag_get_protocol (xid, &protocol);
	XPUSHs (sv_2mortal (newSVuv (ret)));
	XPUSHs (sv_2mortal (newSVGdkDragProtocol (protocol)));
#line 525 "xs/GdkDnd.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_find_window); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_find_window)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "context, drag_window, x_root, y_root");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	GdkWindow *	drag_window = SvGdkWindow (ST(1))
;
	gint	x_root = (gint)SvIV(ST(2))
;
	gint	y_root = (gint)SvIV(ST(3))
;
#line 208 "xs/GdkDnd.xs"
	GdkWindow *dest_window;
	GdkDragProtocol protocol;
#line 552 "xs/GdkDnd.c"
#line 211 "xs/GdkDnd.xs"
	gdk_drag_find_window (context, drag_window, x_root, y_root, 
	                      &dest_window, &protocol);
	XPUSHs (sv_2mortal (newSVGdkWindow_ornull (dest_window)));
	XPUSHs (sv_2mortal (dest_window
	                    ? newSVGdkDragProtocol (protocol)
	                    : newSVsv (&PL_sv_undef)));
#line 560 "xs/GdkDnd.c"
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_motion); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_motion)
{
    dVAR; dXSARGS;
    if (items != 8)
       croak_xs_usage(cv,  "context, dest_window, protocol, x_root, y_root, suggested_action, possible_actions, time_");
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	GdkWindow *	dest_window = SvGdkWindow (ST(1))
;
	GdkDragProtocol	protocol = SvGdkDragProtocol (ST(2))
;
	gint	x_root = (gint)SvIV(ST(3))
;
	gint	y_root = (gint)SvIV(ST(4))
;
	GdkDragAction	suggested_action = SvGdkDragAction (ST(5))
;
	GdkDragAction	possible_actions = SvGdkDragAction (ST(6))
;
	guint32	time_ = (guint32)SvUV(ST(7))
;
	gboolean	RETVAL;

	RETVAL = gdk_drag_motion(context, dest_window, protocol, x_root, y_root, suggested_action, possible_actions, time_);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_drop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_drop)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "context, time_");
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	guint32	time_ = (guint32)SvUV(ST(1))
;

	gdk_drag_drop(context, time_);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_abort); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_abort)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "context, time_");
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	guint32	time_ = (guint32)SvUV(ST(1))
;

	gdk_drag_abort(context, time_);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_drop_reply); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_drop_reply)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "context, ok, time_=GDK_CURRENT_TIME");
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	gboolean	ok = (bool)SvTRUE(ST(1))
;
	guint32	time_;

	if (items < 3)
	    time_ = GDK_CURRENT_TIME;
	else {
	    time_ = (guint32)SvUV(ST(2))
;
	}

	gdk_drop_reply(context, ok, time_);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Gtk2__Gdk__DragContext_drop_finish); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_drop_finish)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "context, success, time_=GDK_CURRENT_TIME");
    {
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;
	gboolean	success = (bool)SvTRUE(ST(1))
;
	guint32	time_;

	if (items < 3)
	    time_ = GDK_CURRENT_TIME;
	else {
	    time_ = (guint32)SvUV(ST(2))
;
	}

	gdk_drop_finish(context, success, time_);
    }
    XSRETURN_EMPTY;
}

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


XS_EUPXS(XS_Gtk2__Gdk__DragContext_drag_drop_succeeded); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Gtk2__Gdk__DragContext_drag_drop_succeeded)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "context");
    {
	gboolean	RETVAL;
	GdkDragContext *	context = SvGdkDragContext (ST(0))
;

	RETVAL = gdk_drag_drop_succeeded(context);
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Gtk2__Gdk__Dnd); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Gtk2__Gdk__Dnd)
{
    dVAR; dXSARGS;
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#endif
    XS_VERSION_BOOTCHECK;

    {
        CV * cv;

        cv = newXS("Gtk2::Gdk::DragContext::action", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 7;
        cv = newXS("Gtk2::Gdk::DragContext::actions", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 5;
        cv = newXS("Gtk2::Gdk::DragContext::dest_window", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 3;
        cv = newXS("Gtk2::Gdk::DragContext::is_source", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 1;
        cv = newXS("Gtk2::Gdk::DragContext::protocol", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 0;
        cv = newXS("Gtk2::Gdk::DragContext::source_window", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 2;
        cv = newXS("Gtk2::Gdk::DragContext::start_time", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 8;
        cv = newXS("Gtk2::Gdk::DragContext::suggested_action", XS_Gtk2__Gdk__DragContext_protocol, file);
        XSANY.any_i32 = 6;
        newXS("Gtk2::Gdk::DragContext::targets", XS_Gtk2__Gdk__DragContext_targets, file);
        newXS("Gtk2::Gdk::DragContext::new", XS_Gtk2__Gdk__DragContext_new, file);
#if XSubPPtmpAAAA
        newXS("Gtk2::Gdk::DragContext::get_actions", XS_Gtk2__Gdk__DragContext_get_actions, file);
        newXS("Gtk2::Gdk::DragContext::get_selected_action", XS_Gtk2__Gdk__DragContext_get_selected_action, file);
        newXS("Gtk2::Gdk::DragContext::get_suggested_action", XS_Gtk2__Gdk__DragContext_get_suggested_action, file);
        newXS("Gtk2::Gdk::DragContext::list_targets", XS_Gtk2__Gdk__DragContext_list_targets, file);
        newXS("Gtk2::Gdk::DragContext::get_source_window", XS_Gtk2__Gdk__DragContext_get_source_window, file);
#endif
        newXS("Gtk2::Gdk::DragContext::status", XS_Gtk2__Gdk__DragContext_status, file);
        newXS("Gtk2::Gdk::DragContext::get_selection", XS_Gtk2__Gdk__DragContext_get_selection, file);
        newXS("Gtk2::Gdk::DragContext::begin", XS_Gtk2__Gdk__DragContext_begin, file);
#if XSubPPtmpAAAB
        newXS("Gtk2::Gdk::DragContext::get_protocol_for_display", XS_Gtk2__Gdk__DragContext_get_protocol_for_display, file);
        newXS("Gtk2::Gdk::DragContext::find_window_for_screen", XS_Gtk2__Gdk__DragContext_find_window_for_screen, file);
#endif
        newXS("Gtk2::Gdk::DragContext::get_protocol", XS_Gtk2__Gdk__DragContext_get_protocol, file);
        newXS("Gtk2::Gdk::DragContext::find_window", XS_Gtk2__Gdk__DragContext_find_window, file);
        newXS("Gtk2::Gdk::DragContext::motion", XS_Gtk2__Gdk__DragContext_motion, file);
        newXS("Gtk2::Gdk::DragContext::drop", XS_Gtk2__Gdk__DragContext_drop, file);
        newXS("Gtk2::Gdk::DragContext::abort", XS_Gtk2__Gdk__DragContext_abort, file);
        newXS("Gtk2::Gdk::DragContext::drop_reply", XS_Gtk2__Gdk__DragContext_drop_reply, file);
        newXS("Gtk2::Gdk::DragContext::drop_finish", XS_Gtk2__Gdk__DragContext_drop_finish, file);
#if XSubPPtmpAAAC
        newXS("Gtk2::Gdk::DragContext::drag_drop_succeeded", XS_Gtk2__Gdk__DragContext_drag_drop_succeeded, file);
#endif
    }

    /* Initialisation Section */

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

