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

/////////////////////////////////////////////////////////////////////////////
// Name:        ext/dnd/DND.xs
// Purpose:     XS for Drag'n'Drop and Clipboard
// Author:      Mattia Barbon
// Modified by:
// Created:     12/08/2001
// RCS-ID:      $Id: DND.xs 3083 2011-07-04 16:44:05Z mdootson $
// Copyright:   (c) 2001-2011 Mattia Barbon
// Licence:     This program is free software; you can redistribute it and/or
//              modify it under the same terms as Perl itself
/////////////////////////////////////////////////////////////////////////////

#define PERL_NO_GET_CONTEXT

#include "cpp/wxapi.h"

#undef THIS

#include <wx/dataobj.h>
#include "cpp/dn_constants.cpp"

typedef wxDataObjectBase::Direction Direction;
typedef wxDataFormat::NativeFormat  NativeFormat;

#include <wx/dataobj.h>

#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


/* INCLUDE:  Including 'XS/DataObject.xs' from 'DND.xs' */


/* INCLUDE:  Including 'XS/Clipboard.xs' from 'XS/DataObject.xs' */

#include <wx/clipbrd.h>

XS_EUPXS(XS_Wx__Clipboard_AddData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_AddData)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, data");
    {
	wxDataObject*    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;
    wxPli_object_set_deleteable( aTHX_ ST(1), false );
    SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
    RETVAL = THIS->AddData( data );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__Clipboard_Clear); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_Clear)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;

	THIS->Clear();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__Clipboard_Close); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_Close)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;

	THIS->Close();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__Clipboard_Flush); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_Flush)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;

	RETVAL = THIS->Flush();
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__Clipboard_GetData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_GetData)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, data");
    {
	wxDataObject*    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;
    RETVAL = THIS->GetData( *data );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__Clipboard_IsOpened); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_IsOpened)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;

	RETVAL = THIS->IsOpened();
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__Clipboard_IsSupported); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_IsSupported)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, format");
    {
	wxDataFormat*    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;
    RETVAL = THIS->IsSupported( *format );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__Clipboard_Open); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_Open)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;

	RETVAL = THIS->Open();
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__Clipboard_SetData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_SetData)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, data");
    {
	wxDataObject*    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;
    wxPli_object_set_deleteable( aTHX_ ST(1), false );
    SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
    RETVAL = THIS->SetData( data );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__Clipboard_UsePrimarySelection); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_UsePrimarySelection)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "THIS, primary = true");
    {
	bool	primary;
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;

	if (items < 2)
	    primary = true;
	else {
	    primary = (bool)SvTRUE(ST(1))
;
	}

	THIS->UsePrimarySelection(primary);
    }
    XSRETURN_EMPTY;
}

#if WXPERL_W_VERSION_GE( 2, 9, 0 )
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Wx__Clipboard_IsUsingPrimarySelection); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__Clipboard_IsUsingPrimarySelection)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxClipboard *    THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" )
;
	bool	RETVAL;

	RETVAL = THIS->IsUsingPrimarySelection();
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}

#endif

/* INCLUDE: Returning to 'XS/DataObject.xs' from 'XS/Clipboard.xs' */

#include <wx/dataobj.h>
#include "cpp/dataobject.h"
#ifdef __WXGTK20__
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Wx__DataFormat_newNative); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_newNative)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "dummy, format = wxDF_INVALID");
    {
	SV*	dummy = ST(0)
;
	wxDataFormatId	format;
	wxDataFormat *	RETVAL;

	if (items < 2)
	    format = wxDF_INVALID;
	else {
	    format = (wxDataFormatId)SvIV(ST(1))
;
	}
    RETVAL = new wxDataFormat( format );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#else
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Wx__DataFormat_newNative); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_newNative)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "dummy, format = wxDF_INVALID");
    {
	SV*	dummy = ST(0)
;
	NativeFormat	format;
	wxDataFormat *	RETVAL;

	if (items < 2)
	    format = wxDF_INVALID;
	else {
	    format = (NativeFormat)SvIV(ST(1))
;
	}
    RETVAL = new wxDataFormat( format );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif
#if WXPERL_W_VERSION_GE( 2, 9, 0 )
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_Wx__DataFormat_newUser); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_newUser)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dummy, id");
    {
	SV*	dummy = ST(0)
;
	wxString	id;
	wxDataFormat *	RETVAL;

    WXSTRING_INPUT( id, wxString, ST(1) )
;
    RETVAL = new wxDataFormat( id );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#else
#define XSubPPtmpAAAE 1


XS_EUPXS(XS_Wx__DataFormat_newUser); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_newUser)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dummy, id");
    {
	SV*	dummy = ST(0)
;
	wxChar*	id;
	wxDataFormat *	RETVAL;

    WXCHAR_INPUT( id, wxChar*, ST(1) )
;
    RETVAL = new wxDataFormat( id );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Wx__DataFormat_CLONE); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_CLONE)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
    wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DataFormat_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataFormat *    THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" )
;
    wxPli_thread_sv_unregister( aTHX_ "Wx::DataFormat", THIS, ST(0) );
    delete THIS;
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DataFormat_GetId); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_GetId)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataFormat *    THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" )
;
	wxString	RETVAL;

	RETVAL = THIS->GetId();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    WXSTRING_OUTPUT( RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataFormat_SetId); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_SetId)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, id");
    {
	wxString	id;
	wxDataFormat *    THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" )
;

    WXSTRING_INPUT( id, wxString, ST(1) )
;

	THIS->SetId(id);
    }
    XSRETURN_EMPTY;
}

#if defined( __WXMSW__ )
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_Wx__DataFormat_GetType); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_GetType)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataFormat *    THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" )
;
	NativeFormat	RETVAL;
	dXSTARG;

	RETVAL = THIS->GetType();
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataFormat_SetType); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_SetType)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, type");
    {
	NativeFormat	type = (NativeFormat)SvIV(ST(1))
;
	wxDataFormat *    THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" )
;

	THIS->SetType(type);
    }
    XSRETURN_EMPTY;
}

#else
#define XSubPPtmpAAAG 1


XS_EUPXS(XS_Wx__DataFormat_GetType); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_GetType)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataFormat *    THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" )
;
	wxDataFormatId	RETVAL;
	dXSTARG;

	RETVAL = THIS->GetType();
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#if 0
#define XSubPPtmpAAAH 1


XS_EUPXS(XS_Wx__DataFormat_SetType); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataFormat_SetType)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, type");
    {
	wxDataFormatId	type = (wxDataFormatId)SvIV(ST(1))
;
	wxDataFormat *    THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" )
;

	THIS->SetType(type);
    }
    XSRETURN_EMPTY;
}

#endif
#endif

XS_EUPXS(XS_Wx__DataObject_CLONE); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_CLONE)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
    wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DataObject_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataObject*    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
    wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) );
    if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) )
    {
        delete THIS;
    }
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DataObject_Destroy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_Destroy)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
    wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) );
    delete THIS;
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DataObject_GetAllFormats); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_GetAllFormats)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "THIS, dir = wxDataObjectBase::Get");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	Direction	dir;
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;

	if (items < 2)
	    dir = wxDataObjectBase::Get;
	else {
	    dir = (Direction)SvIV(ST(1))
;
	}
    size_t formats = THIS->GetFormatCount( dir );
    size_t i, wanted = formats;
    wxDataFormat* formats_d = new wxDataFormat[ formats ];

    THIS->GetAllFormats( formats_d, dir );
    if( GIMME_V == G_SCALAR )
        wanted = 1;
    EXTEND( SP, (IV)wanted );
    for( i = 0; i < wanted; ++i )
    {
        PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(),
                new wxDataFormat( formats_d[i] ), "Wx::DataFormat" ) );
    }
    delete [] formats_d;
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Wx__DataObject_GetDataHere); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_GetDataHere)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "THIS, format, buf");
    {
	wxDataFormat*    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	SV*	buf = ST(2)
;
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
	bool	RETVAL;
    size_t size = THIS->GetDataSize( *format );
    void* buffer = SvGROW( buf, size + 1 );

    SvCUR_set( buf, size );
    RETVAL = THIS->GetDataHere( *format, buffer );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObject_GetDataSize); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_GetDataSize)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, format");
    {
	wxDataFormat*    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
	size_t	RETVAL;
	dXSTARG;
    RETVAL = THIS->GetDataSize( *format );
	XSprePUSH; PUSHu((UV)RETVAL );
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObject_GetFormatCount); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_GetFormatCount)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "THIS, dir = wxDataObjectBase::Get");
    {
	Direction	dir;
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
	size_t	RETVAL;
	dXSTARG;

	if (items < 2)
	    dir = wxDataObjectBase::Get;
	else {
	    dir = (Direction)SvIV(ST(1))
;
	}

	RETVAL = THIS->GetFormatCount(dir);
	XSprePUSH; PUSHu((UV)RETVAL );
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObject_GetPreferredFormat); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_GetPreferredFormat)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "THIS, dir = wxDataObjectBase::Get");
    {
	Direction	dir;
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
	wxDataFormat *	RETVAL;

	if (items < 2)
	    dir = wxDataObjectBase::Get;
	else {
	    dir = (Direction)SvIV(ST(1))
;
	}
    RETVAL = new wxDataFormat( THIS->GetPreferredFormat( dir ) );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObject_IsSupported); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_IsSupported)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "THIS, format, dir = wxDataObjectBase::Get");
    {
	wxDataFormat*    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	Direction	dir;
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
	bool	RETVAL;

	if (items < 3)
	    dir = wxDataObjectBase::Get;
	else {
	    dir = (Direction)SvIV(ST(2))
;
	}
    RETVAL = THIS->IsSupported( *format, dir );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObject_SetData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObject_SetData)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "THIS, format, buf");
    {
	wxDataFormat*    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	SV*	buf = ST(2)
;
    char* data;
    STRLEN len;
	wxDataObject *    THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" )
;
	bool	RETVAL;
    data = SvPV( buf, len );
    RETVAL = THIS->SetData( *format, len, data );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObjectSimple_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObjectSimple_new)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "CLASS, format = (wxDataFormat*)&wxFormatInvalid");
    {
	wxDataFormat*	format;
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxDataObjectSimple *	RETVAL;

	if (items < 2)
	    format = (wxDataFormat*)&wxFormatInvalid;
	else {
    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	}
    RETVAL = new wxDataObjectSimple( *format );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataObjectSimple" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataObjectSimple", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObjectSimple_GetFormat); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObjectSimple_GetFormat)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataObjectSimple *    THIS = (wxDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectSimple" )
;
	wxDataFormat *	RETVAL;
    RETVAL = new wxDataFormat( THIS->GetFormat() );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObjectSimple_SetFormat); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObjectSimple_SetFormat)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, format");
    {
	wxDataFormat*    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	wxDataObjectSimple *    THIS = (wxDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectSimple" )
;
    THIS->SetFormat( *format );
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__PlDataObjectSimple_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__PlDataObjectSimple_new)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "CLASS, format = (wxDataFormat*)&wxFormatInvalid");
    {
	wxDataFormat*	format;
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	SV *	RETVAL;

	if (items < 2)
	    format = (wxDataFormat*)&wxFormatInvalid;
	else {
    format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" )
;
	}
    wxPlDataObjectSimple* THIS = new wxPlDataObjectSimple( CLASS, *format );
    RETVAL = newRV_noinc( SvRV( THIS->m_callback.GetSelf() ) );
    wxPli_thread_sv_register( aTHX_ "Wx::PlDataObjectSimple", THIS, RETVAL );
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__PlDataObjectSimple_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__PlDataObjectSimple_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxPlDataObjectSimple *    THIS = (wxPlDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::PlDataObjectSimple" )
;
    wxPli_thread_sv_unregister( aTHX_ "Wx::PlDataObjectSimple", THIS, ST(0) );
    if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) )
    {
        SV* self = THIS->m_callback.GetSelf();
        SvROK_off( self );
        SvRV( self ) = NULL;
        delete THIS;
    }
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObjectComposite_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObjectComposite_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxDataObjectComposite *	RETVAL;

	RETVAL = new wxDataObjectComposite();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataObjectComposite" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataObjectComposite", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DataObjectComposite_Add); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObjectComposite_Add)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 3)
       croak_xs_usage(cv,  "THIS, dataObject, preferred = false");
    {
	wxDataObjectSimple*    dataObject = (wxDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObjectSimple" )
;
	bool	preferred;
	wxDataObjectComposite *    THIS = (wxDataObjectComposite *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectComposite" )
;

	if (items < 3)
	    preferred = false;
	else {
	    preferred = (bool)SvTRUE(ST(2))
;
	}
    // at this point the data object is owned!
    wxPli_object_set_deleteable( aTHX_ ST(1), false );
    SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
    THIS->Add( dataObject, preferred );
    }
    XSRETURN_EMPTY;
}

#if WXPERL_W_VERSION_GE( 2, 7, 0 )
#define XSubPPtmpAAAI 1


XS_EUPXS(XS_Wx__DataObjectComposite_GetReceivedFormat); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DataObjectComposite_GetReceivedFormat)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDataObjectComposite *    THIS = (wxDataObjectComposite *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectComposite" )
;
	wxDataFormat *	RETVAL;
    RETVAL = new wxDataFormat( THIS->GetReceivedFormat() );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Wx__TextDataObject_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__TextDataObject_new)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "CLASS, text = wxEmptyString");
    {
	wxString	text;
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxTextDataObject *	RETVAL;

	if (items < 2)
	    text = wxEmptyString;
	else {
    WXSTRING_INPUT( text, wxString, ST(1) )
;
	}

	RETVAL = new wxTextDataObject(text);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::TextDataObject" );
    wxPli_thread_sv_register( aTHX_ "Wx::TextDataObject", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__TextDataObject_GetTextLength); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__TextDataObject_GetTextLength)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxTextDataObject *    THIS = (wxTextDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::TextDataObject" )
;
	size_t	RETVAL;
	dXSTARG;

	RETVAL = THIS->GetTextLength();
	XSprePUSH; PUSHu((UV)RETVAL );
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__TextDataObject_GetText); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__TextDataObject_GetText)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxTextDataObject *    THIS = (wxTextDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::TextDataObject" )
;
	wxString	RETVAL;

	RETVAL = THIS->GetText();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    WXSTRING_OUTPUT( RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__TextDataObject_SetText); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__TextDataObject_SetText)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, text");
    {
	wxString	text;
	wxTextDataObject *    THIS = (wxTextDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::TextDataObject" )
;

    WXSTRING_INPUT( text, wxString, ST(1) )
;

	THIS->SetText(text);
    }
    XSRETURN_EMPTY;
}

#if WXPERL_W_VERSION_GE( 2, 5, 1 ) || !defined(__WXMOTIF__)
#define XSubPPtmpAAAJ 1


XS_EUPXS(XS_Wx__BitmapDataObject_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__BitmapDataObject_new)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "CLASS, bitmap = (wxBitmap*)&wxNullBitmap");
    {
	wxBitmap*	bitmap;
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxBitmapDataObject *	RETVAL;

	if (items < 2)
	    bitmap = (wxBitmap*)&wxNullBitmap;
	else {
    bitmap = (wxBitmap *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Bitmap" )
;
	}
    RETVAL = new wxBitmapDataObject( *bitmap );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::BitmapDataObject" );
    wxPli_thread_sv_register( aTHX_ "Wx::BitmapDataObject", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__BitmapDataObject_GetBitmap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__BitmapDataObject_GetBitmap)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxBitmapDataObject *    THIS = (wxBitmapDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::BitmapDataObject" )
;
	wxBitmap *	RETVAL;
    RETVAL = new wxBitmap( THIS->GetBitmap() );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_object_2_sv( aTHX_ RETVALSV, RETVAL );
    wxPli_thread_sv_register( aTHX_ "Wx::Bitmap", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__BitmapDataObject_SetBitmap); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__BitmapDataObject_SetBitmap)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, bitmap");
    {
	wxBitmap*    bitmap = (wxBitmap *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Bitmap" )
;
	wxBitmapDataObject *    THIS = (wxBitmapDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::BitmapDataObject" )
;
    THIS->SetBitmap( *bitmap );
    }
    XSRETURN_EMPTY;
}

#endif
#if !defined(__WXMOTIF__)
#define XSubPPtmpAAAK 1


XS_EUPXS(XS_Wx__FileDataObject_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__FileDataObject_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxFileDataObject *	RETVAL;

	RETVAL = new wxFileDataObject();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::FileDataObject" );
    wxPli_thread_sv_register( aTHX_ "Wx::FileDataObject", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__FileDataObject_AddFile); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__FileDataObject_AddFile)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, file");
    {
	wxString	file;
	wxFileDataObject *    THIS = (wxFileDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileDataObject" )
;

    WXSTRING_INPUT( file, wxString, ST(1) )
;

	THIS->AddFile(file);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__FileDataObject_GetFilenames); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__FileDataObject_GetFilenames)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
    int i, max;
	wxFileDataObject *    THIS = (wxFileDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileDataObject" )
;
    const wxArrayString& filenames = THIS->GetFilenames();
    max = filenames.GetCount();
    EXTEND( SP, max );
    for( i = 0; i < max; ++i ) {
#if wxUSE_UNICODE
      SV* tmp = sv_2mortal( newSVpv( filenames[i].mb_str(wxConvUTF8), 0 ) );
      SvUTF8_on( tmp );
      PUSHs( tmp );
#else
      PUSHs( sv_2mortal( newSVpv( CHAR_P filenames[i].c_str(), 0 ) ) );
#endif
    }
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Wx__URLDataObject_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__URLDataObject_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	wxURLDataObject *	RETVAL;

	RETVAL = new wxURLDataObject();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::URLDataObject" );
    wxPli_thread_sv_register( aTHX_ "Wx::URLDataObject", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__URLDataObject_GetURL); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__URLDataObject_GetURL)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxURLDataObject *    THIS = (wxURLDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::URLDataObject" )
;
	wxString	RETVAL;

	RETVAL = THIS->GetURL();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    WXSTRING_OUTPUT( RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__URLDataObject_SetURL); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__URLDataObject_SetURL)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, url");
    {
	wxString	url;
	wxURLDataObject *    THIS = (wxURLDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::URLDataObject" )
;

    WXSTRING_INPUT( url, wxString, ST(1) )
;

	THIS->SetURL(url);
    }
    XSRETURN_EMPTY;
}

#endif

/* INCLUDE: Returning to 'DND.xs' from 'XS/DataObject.xs' */

#if wxPERL_USE_DRAG_AND_DROP
#define XSubPPtmpAAAL 1


/* INCLUDE:  Including 'XS/DropFiles.xs' from 'DND.xs' */


/* INCLUDE:  Including 'XS/DropSource.xs' from 'XS/DropFiles.xs' */


/* INCLUDE:  Including 'XS/DropTarget.xs' from 'XS/DropSource.xs' */

#include <wx/dnd.h>
#include "cpp/droptarget.h"

XS_EUPXS(XS_Wx__DropTarget_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_new)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "CLASS, data = 0");
    {
	wxDataObject*	data;
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	SV *	RETVAL;

	if (items < 2)
	    data = 0;
	else {
    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	}
    wxPliDropTarget* retval = new wxPliDropTarget( CLASS, data );
    RETVAL = newRV_noinc( SvRV( retval->m_callback.GetSelf() ) );
    wxPli_thread_sv_register( aTHX_ "Wx::DropTarget", retval, RETVAL );
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropTarget_CLONE); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_CLONE)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
    wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DropTarget_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDropTarget*    THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" )
;
    wxPli_thread_sv_unregister( aTHX_ "Wx::DropTarget", THIS, ST(0) );
    if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
        delete THIS;
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DropTarget_GetData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_GetData)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDropTarget *    THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" )
;

	THIS->GetData();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DropTarget_SetDataObject); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_SetDataObject)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, data");
    {
	wxDataObject*    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	wxDropTarget *    THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" )
;
    wxPli_object_set_deleteable( aTHX_ ST(1), false );
    SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
    THIS->SetDataObject( data );
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DropTarget_OnEnter); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_OnEnter)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "THIS, x, y, def");
    {
	wxCoord	x = (wxCoord)SvIV(ST(1))
;
	wxCoord	y = (wxCoord)SvIV(ST(2))
;
	wxDragResult	def = (wxDragResult)SvIV(ST(3))
;
	wxDropTarget *    THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" )
;
	wxDragResult	RETVAL;
	dXSTARG;
    RETVAL = THIS->wxDropTarget::OnEnter( x, y, def );
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropTarget_OnDragOver); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_OnDragOver)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "THIS, x, y, def");
    {
	wxCoord	x = (wxCoord)SvIV(ST(1))
;
	wxCoord	y = (wxCoord)SvIV(ST(2))
;
	wxDragResult	def = (wxDragResult)SvIV(ST(3))
;
	wxDropTarget *    THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" )
;
	wxDragResult	RETVAL;
	dXSTARG;
    RETVAL = THIS->wxDropTarget::OnDragOver( x, y, def );
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropTarget_OnDrop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_OnDrop)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "THIS, x, y");
    {
	wxCoord	x = (wxCoord)SvIV(ST(1))
;
	wxCoord	y = (wxCoord)SvIV(ST(2))
;
	wxDropTarget *    THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" )
;
	bool	RETVAL;
    RETVAL = THIS->wxDropTarget::OnDrop( x, y );
	ST(0) = boolSV(RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropTarget_OnLeave); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropTarget_OnLeave)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDropTarget *    THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" )
;
    THIS->wxDropTarget::OnLeave();
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__TextDropTarget_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__TextDropTarget_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	SV *	RETVAL;
    wxPliTextDropTarget* retval = new wxPliTextDropTarget( CLASS );
    RETVAL = retval->m_callback.GetSelf();
    SvREFCNT_inc( RETVAL );
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__FileDropTarget_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__FileDropTarget_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "CLASS");
    {
	char *	CLASS = (char *)SvPV_nolen(ST(0))
;
	SV *	RETVAL;
    wxPliFileDropTarget* retval = new wxPliFileDropTarget( CLASS );
    RETVAL = retval->m_callback.GetSelf();
    SvREFCNT_inc( RETVAL );
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


/* INCLUDE: Returning to 'XS/DropSource.xs' from 'XS/DropTarget.xs' */

#include <wx/dnd.h>
#include "cpp/dropsource.h"
#if defined( __WXMSW__ ) || defined( __WXMAC__ )
#define XSubPPtmpAAAM 1


XS_EUPXS(XS_Wx__DropSource_newCursorEmpty); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_newCursorEmpty)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 5)
       croak_xs_usage(cv,  "CLASS, win = 0, cursorCopy = (wxCursor*)&wxNullCursor, cursorMove = (wxCursor*)&wxNullCursor, cursorStop = (wxCursor*)&wxNullCursor");
    {
	SV*	CLASS = ST(0)
;
	wxWindow*	win;
	wxCursor*	cursorCopy;
	wxCursor*	cursorMove;
	wxCursor*	cursorStop;
	wxDropSource *	RETVAL;

	if (items < 2)
	    win = 0;
	else {
    win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Window" )
;
	}

	if (items < 3)
	    cursorCopy = (wxCursor*)&wxNullCursor;
	else {
    cursorCopy = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Cursor" )
;
	}

	if (items < 4)
	    cursorMove = (wxCursor*)&wxNullCursor;
	else {
    cursorMove = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Cursor" )
;
	}

	if (items < 5)
	    cursorStop = (wxCursor*)&wxNullCursor;
	else {
    cursorStop = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Cursor" )
;
	}
    RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), win,
                                  *cursorCopy, *cursorMove,
        *cursorStop );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DropSource" );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropSource_newCursorData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_newCursorData)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 6)
       croak_xs_usage(cv,  "CLASS, data, win = 0, cursorCopy = (wxCursor*)&wxNullCursor, cursorMove = (wxCursor*)&wxNullCursor, cursorStop = (wxCursor*)&wxNullCursor");
    {
	SV*	CLASS = ST(0)
;
	wxDataObject*    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	wxWindow*	win;
	wxCursor*	cursorCopy;
	wxCursor*	cursorMove;
	wxCursor*	cursorStop;
	wxDropSource *	RETVAL;

	if (items < 3)
	    win = 0;
	else {
    win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Window" )
;
	}

	if (items < 4)
	    cursorCopy = (wxCursor*)&wxNullCursor;
	else {
    cursorCopy = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Cursor" )
;
	}

	if (items < 5)
	    cursorMove = (wxCursor*)&wxNullCursor;
	else {
    cursorMove = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Cursor" )
;
	}

	if (items < 6)
	    cursorStop = (wxCursor*)&wxNullCursor;
	else {
    cursorStop = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(5), "Wx::Cursor" )
;
	}
    RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), *data, win,
                                  *cursorCopy, *cursorMove,
        *cursorStop );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DropSource" );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#else
#define XSubPPtmpAAAN 1


XS_EUPXS(XS_Wx__DropSource_newIconEmpty); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_newIconEmpty)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 5)
       croak_xs_usage(cv,  "CLASS, win = 0, iconCopy = (wxIcon*)&wxNullIcon, iconMove = (wxIcon*)&wxNullIcon, iconStop = (wxIcon*)&wxNullIcon");
    {
	SV*	CLASS = ST(0)
;
	wxWindow*	win;
	wxIcon*	iconCopy;
	wxIcon*	iconMove;
	wxIcon*	iconStop;
	wxDropSource *	RETVAL;

	if (items < 2)
	    win = 0;
	else {
    win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Window" )
;
	}

	if (items < 3)
	    iconCopy = (wxIcon*)&wxNullIcon;
	else {
    iconCopy = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Icon" )
;
	}

	if (items < 4)
	    iconMove = (wxIcon*)&wxNullIcon;
	else {
    iconMove = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Icon" )
;
	}

	if (items < 5)
	    iconStop = (wxIcon*)&wxNullIcon;
	else {
    iconStop = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Icon" )
;
	}
    RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), win,
                                  *iconCopy, *iconMove, *iconStop );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DropSource" );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropSource_newIconData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_newIconData)
{
    dVAR; dXSARGS;
    if (items < 2 || items > 6)
       croak_xs_usage(cv,  "CLASS, data, win = 0, iconCopy = (wxIcon*)&wxNullIcon, iconMove = (wxIcon*)&wxNullIcon, iconStop = (wxIcon*)&wxNullIcon");
    {
	SV*	CLASS = ST(0)
;
	wxDataObject*    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	wxWindow*	win;
	wxIcon*	iconCopy;
	wxIcon*	iconMove;
	wxIcon*	iconStop;
	wxDropSource *	RETVAL;

	if (items < 3)
	    win = 0;
	else {
    win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Window" )
;
	}

	if (items < 4)
	    iconCopy = (wxIcon*)&wxNullIcon;
	else {
    iconCopy = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Icon" )
;
	}

	if (items < 5)
	    iconMove = (wxIcon*)&wxNullIcon;
	else {
    iconMove = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Icon" )
;
	}

	if (items < 6)
	    iconStop = (wxIcon*)&wxNullIcon;
	else {
    iconStop = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(5), "Wx::Icon" )
;
	}
    RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), *data, win,
                                  *iconCopy, *iconMove, *iconStop );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DropSource" );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Wx__DropSource_DoDragDrop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_DoDragDrop)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "THIS, flags = wxDrag_CopyOnly");
    {
	int	flags;
	wxDropSource *    THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" )
;
	wxDragResult	RETVAL;
	dXSTARG;

	if (items < 2)
	    flags = wxDrag_CopyOnly;
	else {
	    flags = (int)SvIV(ST(1))
;
	}

	RETVAL = THIS->DoDragDrop(flags);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropSource_SetData); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_SetData)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "THIS, data");
    {
	wxDataObject*    data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" )
;
	wxDropSource *    THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" )
;
    THIS->SetData( *data );
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Wx__DropSource_GetDataObject); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_GetDataObject)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDropSource *    THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" )
;
	wxDataObject *	RETVAL;
    RETVAL = THIS->GetDataObject();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataObject" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataObject", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    wxPli_object_set_deleteable( aTHX_ ST(0), false );
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropSource_SetCursor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropSource_SetCursor)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "THIS, res, cursor");
    {
	wxDragResult	res = (wxDragResult)SvIV(ST(1))
;
	wxCursor*    cursor = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Cursor" )
;
	wxDropSource *    THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" )
;
    THIS->SetCursor( res, *cursor );
    }
    XSRETURN_EMPTY;
}


/* INCLUDE: Returning to 'XS/DropFiles.xs' from 'XS/DropSource.xs' */

#include <wx/event.h>

XS_EUPXS(XS_Wx__DropFilesEvent_GetFiles); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropFilesEvent_GetFiles)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
	wxDropFilesEvent *    THIS = (wxDropFilesEvent *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropFilesEvent" )
;
    wxString* files = THIS->GetFiles();
    int i, max = THIS->GetNumberOfFiles();
    EXTEND( SP, max );
    for( i = 0; i < max; ++i )
    {
#if wxUSE_UNICODE
      SV* tmp = sv_2mortal( newSVpv( CHAR_P files[i].mb_str(wxConvUTF8), 0 ) );
      SvUTF8_on( tmp );
      PUSHs( tmp );
#else
      PUSHs( sv_2mortal( newSVpv( CHAR_P files[i].c_str(), 0 ) ) );
#endif
    }
	PUTBACK;
	return;
    }
}


XS_EUPXS(XS_Wx__DropFilesEvent_GetNumberOfFiles); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropFilesEvent_GetNumberOfFiles)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDropFilesEvent *    THIS = (wxDropFilesEvent *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropFilesEvent" )
;
	int	RETVAL;
	dXSTARG;

	RETVAL = THIS->GetNumberOfFiles();
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx__DropFilesEvent_GetPosition); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx__DropFilesEvent_GetPosition)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "THIS");
    {
	wxDropFilesEvent *    THIS = (wxDropFilesEvent *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropFilesEvent" )
;
	wxPoint *	RETVAL;
    RETVAL = new wxPoint( THIS->GetPosition() );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::Point" );
    wxPli_thread_sv_register( aTHX_ "Wx::Point", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


/* INCLUDE: Returning to 'DND.xs' from 'XS/DropFiles.xs' */

#endif

XS_EUPXS(XS_Wx_wxDF_TEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx_wxDF_TEXT)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	wxDataFormat *	RETVAL;
    RETVAL = new wxDataFormat( wxDF_TEXT );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx_wxDF_UNICODETEXT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx_wxDF_UNICODETEXT)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	wxDataFormat *	RETVAL;
    RETVAL = new wxDataFormat( wxDF_UNICODETEXT );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Wx_wxDF_BITMAP); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx_wxDF_BITMAP)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	wxDataFormat *	RETVAL;
    RETVAL = new wxDataFormat( wxDF_BITMAP );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#if defined(__WXMSW__)
#define XSubPPtmpAAAO 1


XS_EUPXS(XS_Wx_wxDF_METAFILE); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx_wxDF_METAFILE)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	wxDataFormat *	RETVAL;
    RETVAL = new wxDataFormat( wxDF_METAFILE );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Wx_wxDF_FILENAME); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Wx_wxDF_FILENAME)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	wxDataFormat *	RETVAL;
    RETVAL = new wxDataFormat( wxDF_FILENAME );
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
    wxPli_non_object_2_sv( aTHX_ RETVALSV, RETVAL, "Wx::DataFormat" );
    wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, RETVALSV );
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#if defined(__WXMSW__)
#undef XS
#define XS( name ) WXXS( name )
#endif
#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Wx__DND); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Wx__DND)
{
#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("Wx::Clipboard::AddData", XS_Wx__Clipboard_AddData);
        newXS_deffile("Wx::Clipboard::Clear", XS_Wx__Clipboard_Clear);
        newXS_deffile("Wx::Clipboard::Close", XS_Wx__Clipboard_Close);
        newXS_deffile("Wx::Clipboard::Flush", XS_Wx__Clipboard_Flush);
        newXS_deffile("Wx::Clipboard::GetData", XS_Wx__Clipboard_GetData);
        newXS_deffile("Wx::Clipboard::IsOpened", XS_Wx__Clipboard_IsOpened);
        newXS_deffile("Wx::Clipboard::IsSupported", XS_Wx__Clipboard_IsSupported);
        newXS_deffile("Wx::Clipboard::Open", XS_Wx__Clipboard_Open);
        newXS_deffile("Wx::Clipboard::SetData", XS_Wx__Clipboard_SetData);
        newXS_deffile("Wx::Clipboard::UsePrimarySelection", XS_Wx__Clipboard_UsePrimarySelection);
#if XSubPPtmpAAAA
        newXS_deffile("Wx::Clipboard::IsUsingPrimarySelection", XS_Wx__Clipboard_IsUsingPrimarySelection);
#endif
#if XSubPPtmpAAAB
        newXS_deffile("Wx::DataFormat::newNative", XS_Wx__DataFormat_newNative);
#endif
#if XSubPPtmpAAAC
        newXS_deffile("Wx::DataFormat::newNative", XS_Wx__DataFormat_newNative);
#endif
#if XSubPPtmpAAAD
        newXS_deffile("Wx::DataFormat::newUser", XS_Wx__DataFormat_newUser);
#endif
#if XSubPPtmpAAAE
        newXS_deffile("Wx::DataFormat::newUser", XS_Wx__DataFormat_newUser);
#endif
        newXS_deffile("Wx::DataFormat::CLONE", XS_Wx__DataFormat_CLONE);
        newXS_deffile("Wx::DataFormat::DESTROY", XS_Wx__DataFormat_DESTROY);
        newXS_deffile("Wx::DataFormat::GetId", XS_Wx__DataFormat_GetId);
        newXS_deffile("Wx::DataFormat::SetId", XS_Wx__DataFormat_SetId);
#if XSubPPtmpAAAF
        newXS_deffile("Wx::DataFormat::GetType", XS_Wx__DataFormat_GetType);
        newXS_deffile("Wx::DataFormat::SetType", XS_Wx__DataFormat_SetType);
#endif
#if XSubPPtmpAAAG
        newXS_deffile("Wx::DataFormat::GetType", XS_Wx__DataFormat_GetType);
#if XSubPPtmpAAAH
        newXS_deffile("Wx::DataFormat::SetType", XS_Wx__DataFormat_SetType);
#endif
#endif
        newXS_deffile("Wx::DataObject::CLONE", XS_Wx__DataObject_CLONE);
        newXS_deffile("Wx::DataObject::DESTROY", XS_Wx__DataObject_DESTROY);
        newXS_deffile("Wx::DataObject::Destroy", XS_Wx__DataObject_Destroy);
        newXS_deffile("Wx::DataObject::GetAllFormats", XS_Wx__DataObject_GetAllFormats);
        newXS_deffile("Wx::DataObject::GetDataHere", XS_Wx__DataObject_GetDataHere);
        newXS_deffile("Wx::DataObject::GetDataSize", XS_Wx__DataObject_GetDataSize);
        newXS_deffile("Wx::DataObject::GetFormatCount", XS_Wx__DataObject_GetFormatCount);
        newXS_deffile("Wx::DataObject::GetPreferredFormat", XS_Wx__DataObject_GetPreferredFormat);
        newXS_deffile("Wx::DataObject::IsSupported", XS_Wx__DataObject_IsSupported);
        newXS_deffile("Wx::DataObject::SetData", XS_Wx__DataObject_SetData);
        newXS_deffile("Wx::DataObjectSimple::new", XS_Wx__DataObjectSimple_new);
        newXS_deffile("Wx::DataObjectSimple::GetFormat", XS_Wx__DataObjectSimple_GetFormat);
        newXS_deffile("Wx::DataObjectSimple::SetFormat", XS_Wx__DataObjectSimple_SetFormat);
        newXS_deffile("Wx::PlDataObjectSimple::new", XS_Wx__PlDataObjectSimple_new);
        newXS_deffile("Wx::PlDataObjectSimple::DESTROY", XS_Wx__PlDataObjectSimple_DESTROY);
        newXS_deffile("Wx::DataObjectComposite::new", XS_Wx__DataObjectComposite_new);
        newXS_deffile("Wx::DataObjectComposite::Add", XS_Wx__DataObjectComposite_Add);
#if XSubPPtmpAAAI
        newXS_deffile("Wx::DataObjectComposite::GetReceivedFormat", XS_Wx__DataObjectComposite_GetReceivedFormat);
#endif
        newXS_deffile("Wx::TextDataObject::new", XS_Wx__TextDataObject_new);
        newXS_deffile("Wx::TextDataObject::GetTextLength", XS_Wx__TextDataObject_GetTextLength);
        newXS_deffile("Wx::TextDataObject::GetText", XS_Wx__TextDataObject_GetText);
        newXS_deffile("Wx::TextDataObject::SetText", XS_Wx__TextDataObject_SetText);
#if XSubPPtmpAAAJ
        newXS_deffile("Wx::BitmapDataObject::new", XS_Wx__BitmapDataObject_new);
        newXS_deffile("Wx::BitmapDataObject::GetBitmap", XS_Wx__BitmapDataObject_GetBitmap);
        newXS_deffile("Wx::BitmapDataObject::SetBitmap", XS_Wx__BitmapDataObject_SetBitmap);
#endif
#if XSubPPtmpAAAK
        newXS_deffile("Wx::FileDataObject::new", XS_Wx__FileDataObject_new);
        newXS_deffile("Wx::FileDataObject::AddFile", XS_Wx__FileDataObject_AddFile);
        newXS_deffile("Wx::FileDataObject::GetFilenames", XS_Wx__FileDataObject_GetFilenames);
        newXS_deffile("Wx::URLDataObject::new", XS_Wx__URLDataObject_new);
        newXS_deffile("Wx::URLDataObject::GetURL", XS_Wx__URLDataObject_GetURL);
        newXS_deffile("Wx::URLDataObject::SetURL", XS_Wx__URLDataObject_SetURL);
#endif
#if XSubPPtmpAAAL
        newXS_deffile("Wx::DropTarget::new", XS_Wx__DropTarget_new);
        newXS_deffile("Wx::DropTarget::CLONE", XS_Wx__DropTarget_CLONE);
        newXS_deffile("Wx::DropTarget::DESTROY", XS_Wx__DropTarget_DESTROY);
        newXS_deffile("Wx::DropTarget::GetData", XS_Wx__DropTarget_GetData);
        newXS_deffile("Wx::DropTarget::SetDataObject", XS_Wx__DropTarget_SetDataObject);
        newXS_deffile("Wx::DropTarget::OnEnter", XS_Wx__DropTarget_OnEnter);
        newXS_deffile("Wx::DropTarget::OnDragOver", XS_Wx__DropTarget_OnDragOver);
        newXS_deffile("Wx::DropTarget::OnDrop", XS_Wx__DropTarget_OnDrop);
        newXS_deffile("Wx::DropTarget::OnLeave", XS_Wx__DropTarget_OnLeave);
        newXS_deffile("Wx::TextDropTarget::new", XS_Wx__TextDropTarget_new);
        newXS_deffile("Wx::FileDropTarget::new", XS_Wx__FileDropTarget_new);
#if XSubPPtmpAAAM
        newXS_deffile("Wx::DropSource::newCursorEmpty", XS_Wx__DropSource_newCursorEmpty);
        newXS_deffile("Wx::DropSource::newCursorData", XS_Wx__DropSource_newCursorData);
#endif
#if XSubPPtmpAAAN
        newXS_deffile("Wx::DropSource::newIconEmpty", XS_Wx__DropSource_newIconEmpty);
        newXS_deffile("Wx::DropSource::newIconData", XS_Wx__DropSource_newIconData);
#endif
        newXS_deffile("Wx::DropSource::DoDragDrop", XS_Wx__DropSource_DoDragDrop);
        newXS_deffile("Wx::DropSource::SetData", XS_Wx__DropSource_SetData);
        newXS_deffile("Wx::DropSource::GetDataObject", XS_Wx__DropSource_GetDataObject);
        newXS_deffile("Wx::DropSource::SetCursor", XS_Wx__DropSource_SetCursor);
        newXS_deffile("Wx::DropFilesEvent::GetFiles", XS_Wx__DropFilesEvent_GetFiles);
        newXS_deffile("Wx::DropFilesEvent::GetNumberOfFiles", XS_Wx__DropFilesEvent_GetNumberOfFiles);
        newXS_deffile("Wx::DropFilesEvent::GetPosition", XS_Wx__DropFilesEvent_GetPosition);
#endif
        newXS_deffile("Wx::wxDF_TEXT", XS_Wx_wxDF_TEXT);
        newXS_deffile("Wx::wxDF_UNICODETEXT", XS_Wx_wxDF_UNICODETEXT);
        newXS_deffile("Wx::wxDF_BITMAP", XS_Wx_wxDF_BITMAP);
#if XSubPPtmpAAAO
        newXS_deffile("Wx::wxDF_METAFILE", XS_Wx_wxDF_METAFILE);
#endif
        newXS_deffile("Wx::wxDF_FILENAME", XS_Wx_wxDF_FILENAME);

    /* Initialisation Section */

  INIT_PLI_HELPERS( wx_pli_helpers );

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#if XSubPPtmpAAAE
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#if XSubPPtmpAAAH
#endif
#endif
#if XSubPPtmpAAAI
#endif
#if XSubPPtmpAAAJ
#endif
#if XSubPPtmpAAAK
#endif
#if XSubPPtmpAAAL
#if XSubPPtmpAAAM
#endif
#if XSubPPtmpAAAN
#endif
#endif
#if XSubPPtmpAAAO
#endif

    /* 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
}

