2 * This file was generated automatically by ExtUtils::ParseXS version 2.2202 from the
3 * contents of DND.xs. Do not edit this file, edit DND.xs instead.
5 * ANY CHANGES MADE HERE WILL BE LOST!
9 /////////////////////////////////////////////////////////////////////////////
10 // Name: ext/dnd/DND.xs
11 // Purpose: XS for Drag'n'Drop and Clipboard
12 // Author: Mattia Barbon
14 // Created: 12/08/2001
15 // RCS-ID: $Id: DND.xs 2057 2007-06-18 23:03:00Z mbarbon $
16 // Copyright: (c) 2001-2004 Mattia Barbon
17 // Licence: This program is free software; you can redistribute it and/or
18 // modify it under the same terms as Perl itself
19 /////////////////////////////////////////////////////////////////////////////
21 #define PERL_NO_GET_CONTEXT
23 #include "cpp/wxapi.h"
27 #include <wx/dataobj.h>
28 #include "cpp/dn_constants.cpp"
30 typedef wxDataObjectBase::Direction Direction;
31 typedef wxDataFormat::NativeFormat NativeFormat;
33 #include <wx/dataobj.h>
35 #ifndef PERL_UNUSED_VAR
36 # define PERL_UNUSED_VAR(var) if (0) var = var
39 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
40 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
42 /* prototype to pass -Wmissing-prototypes */
44 S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
47 S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
49 const GV *const gv = CvGV(cv);
51 PERL_ARGS_ASSERT_CROAK_XS_USAGE;
54 const char *const gvname = GvNAME(gv);
55 const HV *const stash = GvSTASH(gv);
56 const char *const hvname = stash ? HvNAME(stash) : NULL;
59 Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
61 Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
63 /* Pants. I don't think that it should be possible to get here. */
64 Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
67 #undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
69 #ifdef PERL_IMPLICIT_CONTEXT
70 #define croak_xs_usage(a,b) S_croak_xs_usage(aTHX_ a,b)
72 #define croak_xs_usage S_croak_xs_usage
77 /* NOTE: the prototype of newXSproto() is different in versions of perls,
78 * so we define a portable version of newXSproto()
81 #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
83 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
84 #endif /* !defined(newXS_flags) */
87 /* INCLUDE: Including 'XS/DataObject.xs' from 'DND.xs' */
90 /* INCLUDE: Including 'XS/Clipboard.xs' from 'XS/DataObject.xs' */
92 #include <wx/clipbrd.h>
94 XS(XS_Wx__Clipboard_AddData); /* prototype to pass -Wmissing-prototypes */
95 XS(XS_Wx__Clipboard_AddData)
103 croak_xs_usage(cv, "THIS, data");
105 wxDataObject* data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
106 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
108 wxPli_object_set_deleteable( aTHX_ ST(1), false );
109 SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
110 RETVAL = THIS->AddData( data );
111 ST(0) = boolSV(RETVAL);
118 XS(XS_Wx__Clipboard_Clear); /* prototype to pass -Wmissing-prototypes */
119 XS(XS_Wx__Clipboard_Clear)
127 croak_xs_usage(cv, "THIS");
129 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
137 XS(XS_Wx__Clipboard_Close); /* prototype to pass -Wmissing-prototypes */
138 XS(XS_Wx__Clipboard_Close)
146 croak_xs_usage(cv, "THIS");
148 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
156 XS(XS_Wx__Clipboard_Flush); /* prototype to pass -Wmissing-prototypes */
157 XS(XS_Wx__Clipboard_Flush)
165 croak_xs_usage(cv, "THIS");
167 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
170 RETVAL = THIS->Flush();
171 ST(0) = boolSV(RETVAL);
178 XS(XS_Wx__Clipboard_GetData); /* prototype to pass -Wmissing-prototypes */
179 XS(XS_Wx__Clipboard_GetData)
187 croak_xs_usage(cv, "THIS, data");
189 wxDataObject* data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
190 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
192 RETVAL = THIS->GetData( *data );
193 ST(0) = boolSV(RETVAL);
200 XS(XS_Wx__Clipboard_IsOpened); /* prototype to pass -Wmissing-prototypes */
201 XS(XS_Wx__Clipboard_IsOpened)
209 croak_xs_usage(cv, "THIS");
211 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
214 RETVAL = THIS->IsOpened();
215 ST(0) = boolSV(RETVAL);
222 XS(XS_Wx__Clipboard_IsSupported); /* prototype to pass -Wmissing-prototypes */
223 XS(XS_Wx__Clipboard_IsSupported)
231 croak_xs_usage(cv, "THIS, format");
233 wxDataFormat* format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
234 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
236 RETVAL = THIS->IsSupported( *format );
237 ST(0) = boolSV(RETVAL);
244 XS(XS_Wx__Clipboard_Open); /* prototype to pass -Wmissing-prototypes */
245 XS(XS_Wx__Clipboard_Open)
253 croak_xs_usage(cv, "THIS");
255 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
258 RETVAL = THIS->Open();
259 ST(0) = boolSV(RETVAL);
266 XS(XS_Wx__Clipboard_SetData); /* prototype to pass -Wmissing-prototypes */
267 XS(XS_Wx__Clipboard_SetData)
275 croak_xs_usage(cv, "THIS, data");
277 wxDataObject* data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
278 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
280 wxPli_object_set_deleteable( aTHX_ ST(1), false );
281 SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
282 RETVAL = THIS->SetData( data );
283 ST(0) = boolSV(RETVAL);
290 XS(XS_Wx__Clipboard_UsePrimarySelection); /* prototype to pass -Wmissing-prototypes */
291 XS(XS_Wx__Clipboard_UsePrimarySelection)
298 if (items < 1 || items > 2)
299 croak_xs_usage(cv, "THIS, primary = true");
302 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
307 primary = (bool)SvTRUE(ST(1));
310 THIS->UsePrimarySelection(primary);
315 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
316 #define XSubPPtmpAAAA 1
319 XS(XS_Wx__Clipboard_IsUsingPrimarySelection); /* prototype to pass -Wmissing-prototypes */
320 XS(XS_Wx__Clipboard_IsUsingPrimarySelection)
328 croak_xs_usage(cv, "THIS");
330 wxClipboard * THIS = (wxClipboard *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::Clipboard" );
333 RETVAL = THIS->IsUsingPrimarySelection();
334 ST(0) = boolSV(RETVAL);
342 /* INCLUDE: Returning to 'XS/DataObject.xs' from 'XS/Clipboard.xs' */
344 #include <wx/dataobj.h>
345 #include "cpp/dataobject.h"
347 #define XSubPPtmpAAAB 1
350 XS(XS_Wx__DataFormat_newNative); /* prototype to pass -Wmissing-prototypes */
351 XS(XS_Wx__DataFormat_newNative)
358 if (items < 1 || items > 2)
359 croak_xs_usage(cv, "dummy, format = wxDF_INVALID");
362 wxDataFormatId format;
363 wxDataFormat * RETVAL;
366 format = wxDF_INVALID;
368 format = (wxDataFormatId)SvIV(ST(1));
370 RETVAL = new wxDataFormat( format );
371 ST(0) = sv_newmortal();
372 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
373 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
380 #define XSubPPtmpAAAC 1
383 XS(XS_Wx__DataFormat_newNative); /* prototype to pass -Wmissing-prototypes */
384 XS(XS_Wx__DataFormat_newNative)
391 if (items < 1 || items > 2)
392 croak_xs_usage(cv, "dummy, format = wxDF_INVALID");
396 wxDataFormat * RETVAL;
399 format = wxDF_INVALID;
401 format = (NativeFormat)SvIV(ST(1));
403 RETVAL = new wxDataFormat( format );
404 ST(0) = sv_newmortal();
405 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
406 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
413 #if WXPERL_W_VERSION_GE( 2, 9, 0 )
414 #define XSubPPtmpAAAD 1
417 XS(XS_Wx__DataFormat_newUser); /* prototype to pass -Wmissing-prototypes */
418 XS(XS_Wx__DataFormat_newUser)
426 croak_xs_usage(cv, "dummy, id");
430 wxDataFormat * RETVAL;
432 WXSTRING_INPUT( id, wxString, ST(1) );
433 RETVAL = new wxDataFormat( id );
434 ST(0) = sv_newmortal();
435 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
436 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
443 #define XSubPPtmpAAAE 1
446 XS(XS_Wx__DataFormat_newUser); /* prototype to pass -Wmissing-prototypes */
447 XS(XS_Wx__DataFormat_newUser)
455 croak_xs_usage(cv, "dummy, id");
459 wxDataFormat * RETVAL;
461 WXCHAR_INPUT( id, wxChar*, ST(1) );
462 RETVAL = new wxDataFormat( id );
463 ST(0) = sv_newmortal();
464 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
465 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
473 XS(XS_Wx__DataFormat_CLONE); /* prototype to pass -Wmissing-prototypes */
474 XS(XS_Wx__DataFormat_CLONE)
482 croak_xs_usage(cv, "CLASS");
484 char * CLASS = (char *)SvPV_nolen(ST(0));
485 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
491 XS(XS_Wx__DataFormat_DESTROY); /* prototype to pass -Wmissing-prototypes */
492 XS(XS_Wx__DataFormat_DESTROY)
500 croak_xs_usage(cv, "THIS");
502 wxDataFormat * THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" );
503 wxPli_thread_sv_unregister( aTHX_ "Wx::DataFormat", THIS, ST(0) );
510 XS(XS_Wx__DataFormat_GetId); /* prototype to pass -Wmissing-prototypes */
511 XS(XS_Wx__DataFormat_GetId)
519 croak_xs_usage(cv, "THIS");
521 wxDataFormat * THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" );
524 RETVAL = THIS->GetId();
525 ST(0) = sv_newmortal();
526 WXSTRING_OUTPUT( RETVAL, ST(0) );
533 XS(XS_Wx__DataFormat_SetId); /* prototype to pass -Wmissing-prototypes */
534 XS(XS_Wx__DataFormat_SetId)
542 croak_xs_usage(cv, "THIS, id");
545 wxDataFormat * THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" );
547 WXSTRING_INPUT( id, wxString, ST(1) );
554 #if defined( __WXMSW__ )
555 #define XSubPPtmpAAAF 1
558 XS(XS_Wx__DataFormat_GetType); /* prototype to pass -Wmissing-prototypes */
559 XS(XS_Wx__DataFormat_GetType)
567 croak_xs_usage(cv, "THIS");
569 wxDataFormat * THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" );
573 RETVAL = THIS->GetType();
574 XSprePUSH; PUSHi((IV)RETVAL);
580 XS(XS_Wx__DataFormat_SetType); /* prototype to pass -Wmissing-prototypes */
581 XS(XS_Wx__DataFormat_SetType)
589 croak_xs_usage(cv, "THIS, type");
591 NativeFormat type = (NativeFormat)SvIV(ST(1));
592 wxDataFormat * THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" );
600 #define XSubPPtmpAAAG 1
603 XS(XS_Wx__DataFormat_GetType); /* prototype to pass -Wmissing-prototypes */
604 XS(XS_Wx__DataFormat_GetType)
612 croak_xs_usage(cv, "THIS");
614 wxDataFormat * THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" );
615 wxDataFormatId RETVAL;
618 RETVAL = THIS->GetType();
619 XSprePUSH; PUSHi((IV)RETVAL);
625 #define XSubPPtmpAAAH 1
628 XS(XS_Wx__DataFormat_SetType); /* prototype to pass -Wmissing-prototypes */
629 XS(XS_Wx__DataFormat_SetType)
637 croak_xs_usage(cv, "THIS, type");
639 wxDataFormatId type = (wxDataFormatId)SvIV(ST(1));
640 wxDataFormat * THIS = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataFormat" );
650 XS(XS_Wx__DataObject_CLONE); /* prototype to pass -Wmissing-prototypes */
651 XS(XS_Wx__DataObject_CLONE)
659 croak_xs_usage(cv, "CLASS");
661 char * CLASS = (char *)SvPV_nolen(ST(0));
662 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
668 XS(XS_Wx__DataObject_DESTROY); /* prototype to pass -Wmissing-prototypes */
669 XS(XS_Wx__DataObject_DESTROY)
677 croak_xs_usage(cv, "THIS");
679 wxDataObject* THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
680 wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) );
681 if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) )
690 XS(XS_Wx__DataObject_Destroy); /* prototype to pass -Wmissing-prototypes */
691 XS(XS_Wx__DataObject_Destroy)
699 croak_xs_usage(cv, "THIS");
701 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
702 wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) );
709 XS(XS_Wx__DataObject_GetAllFormats); /* prototype to pass -Wmissing-prototypes */
710 XS(XS_Wx__DataObject_GetAllFormats)
717 if (items < 1 || items > 2)
718 croak_xs_usage(cv, "THIS, dir = wxDataObjectBase::Get");
719 PERL_UNUSED_VAR(ax); /* -Wall */
723 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
726 dir = wxDataObjectBase::Get;
728 dir = (Direction)SvIV(ST(1));
730 size_t formats = THIS->GetFormatCount( dir );
731 size_t i, wanted = formats;
732 wxDataFormat* formats_d = new wxDataFormat[ formats ];
734 THIS->GetAllFormats( formats_d, dir );
735 if( GIMME_V == G_SCALAR )
737 EXTEND( SP, (IV)wanted );
738 for( i = 0; i < wanted; ++i )
740 PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(),
741 new wxDataFormat( formats_d[i] ), "Wx::DataFormat" ) );
750 XS(XS_Wx__DataObject_GetDataHere); /* prototype to pass -Wmissing-prototypes */
751 XS(XS_Wx__DataObject_GetDataHere)
759 croak_xs_usage(cv, "THIS, format, buf");
761 wxDataFormat* format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
763 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
765 size_t size = THIS->GetDataSize( *format );
766 void* buffer = SvGROW( buf, size + 1 );
768 SvCUR_set( buf, size );
769 RETVAL = THIS->GetDataHere( *format, buffer );
770 ST(0) = boolSV(RETVAL);
777 XS(XS_Wx__DataObject_GetDataSize); /* prototype to pass -Wmissing-prototypes */
778 XS(XS_Wx__DataObject_GetDataSize)
786 croak_xs_usage(cv, "THIS, format");
788 wxDataFormat* format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
789 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
792 RETVAL = THIS->GetDataSize( *format );
793 XSprePUSH; PUSHu((UV)RETVAL );
799 XS(XS_Wx__DataObject_GetFormatCount); /* prototype to pass -Wmissing-prototypes */
800 XS(XS_Wx__DataObject_GetFormatCount)
807 if (items < 1 || items > 2)
808 croak_xs_usage(cv, "THIS, dir = wxDataObjectBase::Get");
811 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
816 dir = wxDataObjectBase::Get;
818 dir = (Direction)SvIV(ST(1));
821 RETVAL = THIS->GetFormatCount(dir);
822 XSprePUSH; PUSHu((UV)RETVAL );
828 XS(XS_Wx__DataObject_GetPreferredFormat); /* prototype to pass -Wmissing-prototypes */
829 XS(XS_Wx__DataObject_GetPreferredFormat)
836 if (items < 1 || items > 2)
837 croak_xs_usage(cv, "THIS, dir = wxDataObjectBase::Get");
840 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
841 wxDataFormat * RETVAL;
844 dir = wxDataObjectBase::Get;
846 dir = (Direction)SvIV(ST(1));
848 RETVAL = new wxDataFormat( THIS->GetPreferredFormat( dir ) );
849 ST(0) = sv_newmortal();
850 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
851 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
858 XS(XS_Wx__DataObject_IsSupported); /* prototype to pass -Wmissing-prototypes */
859 XS(XS_Wx__DataObject_IsSupported)
866 if (items < 2 || items > 3)
867 croak_xs_usage(cv, "THIS, format, dir = wxDataObjectBase::Get");
869 wxDataFormat* format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
871 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
875 dir = wxDataObjectBase::Get;
877 dir = (Direction)SvIV(ST(2));
879 RETVAL = THIS->IsSupported( *format, dir );
880 ST(0) = boolSV(RETVAL);
887 XS(XS_Wx__DataObject_SetData); /* prototype to pass -Wmissing-prototypes */
888 XS(XS_Wx__DataObject_SetData)
896 croak_xs_usage(cv, "THIS, format, buf");
898 wxDataFormat* format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
902 wxDataObject * THIS = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObject" );
904 data = SvPV( buf, len );
905 RETVAL = THIS->SetData( *format, len, data );
906 ST(0) = boolSV(RETVAL);
913 XS(XS_Wx__DataObjectSimple_new); /* prototype to pass -Wmissing-prototypes */
914 XS(XS_Wx__DataObjectSimple_new)
921 if (items < 1 || items > 2)
922 croak_xs_usage(cv, "CLASS, format = (wxDataFormat*)&wxFormatInvalid");
924 wxDataFormat* format;
925 char * CLASS = (char *)SvPV_nolen(ST(0));
926 wxDataObjectSimple * RETVAL;
929 format = (wxDataFormat*)&wxFormatInvalid;
931 format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
933 RETVAL = new wxDataObjectSimple( *format );
934 ST(0) = sv_newmortal();
935 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataObjectSimple" );
936 wxPli_thread_sv_register( aTHX_ "Wx::DataObjectSimple", RETVAL, ST(0) );
943 XS(XS_Wx__DataObjectSimple_GetFormat); /* prototype to pass -Wmissing-prototypes */
944 XS(XS_Wx__DataObjectSimple_GetFormat)
952 croak_xs_usage(cv, "THIS");
954 wxDataObjectSimple * THIS = (wxDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectSimple" );
955 wxDataFormat * RETVAL;
956 RETVAL = new wxDataFormat( THIS->GetFormat() );
957 ST(0) = sv_newmortal();
958 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
959 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
966 XS(XS_Wx__DataObjectSimple_SetFormat); /* prototype to pass -Wmissing-prototypes */
967 XS(XS_Wx__DataObjectSimple_SetFormat)
975 croak_xs_usage(cv, "THIS, format");
977 wxDataFormat* format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
978 wxDataObjectSimple * THIS = (wxDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectSimple" );
979 THIS->SetFormat( *format );
985 XS(XS_Wx__PlDataObjectSimple_new); /* prototype to pass -Wmissing-prototypes */
986 XS(XS_Wx__PlDataObjectSimple_new)
993 if (items < 1 || items > 2)
994 croak_xs_usage(cv, "CLASS, format = (wxDataFormat*)&wxFormatInvalid");
996 wxDataFormat* format;
997 char * CLASS = (char *)SvPV_nolen(ST(0));
1001 format = (wxDataFormat*)&wxFormatInvalid;
1003 format = (wxDataFormat *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataFormat" );
1005 wxPlDataObjectSimple* THIS = new wxPlDataObjectSimple( CLASS, *format );
1006 RETVAL = newRV_noinc( SvRV( THIS->m_callback.GetSelf() ) );
1007 wxPli_thread_sv_register( aTHX_ "Wx::PlDataObjectSimple", THIS, RETVAL );
1015 XS(XS_Wx__PlDataObjectSimple_DESTROY); /* prototype to pass -Wmissing-prototypes */
1016 XS(XS_Wx__PlDataObjectSimple_DESTROY)
1024 croak_xs_usage(cv, "THIS");
1026 wxPlDataObjectSimple * THIS = (wxPlDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::PlDataObjectSimple" );
1027 wxPli_thread_sv_unregister( aTHX_ "Wx::PlDataObjectSimple", THIS, ST(0) );
1028 if( THIS && wxPli_object_is_deleteable( aTHX_ ST(0) ) )
1030 SV* self = THIS->m_callback.GetSelf();
1032 SvRV( self ) = NULL;
1040 XS(XS_Wx__DataObjectComposite_new); /* prototype to pass -Wmissing-prototypes */
1041 XS(XS_Wx__DataObjectComposite_new)
1049 croak_xs_usage(cv, "CLASS");
1051 char * CLASS = (char *)SvPV_nolen(ST(0));
1052 wxDataObjectComposite * RETVAL;
1054 RETVAL = new wxDataObjectComposite();
1055 ST(0) = sv_newmortal();
1056 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataObjectComposite" );
1057 wxPli_thread_sv_register( aTHX_ "Wx::DataObjectComposite", RETVAL, ST(0) );
1064 XS(XS_Wx__DataObjectComposite_Add); /* prototype to pass -Wmissing-prototypes */
1065 XS(XS_Wx__DataObjectComposite_Add)
1072 if (items < 2 || items > 3)
1073 croak_xs_usage(cv, "THIS, dataObject, preferred = false");
1075 wxDataObjectSimple* dataObject = (wxDataObjectSimple *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObjectSimple" );
1077 wxDataObjectComposite * THIS = (wxDataObjectComposite *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectComposite" );
1082 preferred = (bool)SvTRUE(ST(2));
1084 // at this point the data object is owned!
1085 wxPli_object_set_deleteable( aTHX_ ST(1), false );
1086 SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
1087 THIS->Add( dataObject, preferred );
1092 #if WXPERL_W_VERSION_GE( 2, 7, 0 )
1093 #define XSubPPtmpAAAI 1
1096 XS(XS_Wx__DataObjectComposite_GetReceivedFormat); /* prototype to pass -Wmissing-prototypes */
1097 XS(XS_Wx__DataObjectComposite_GetReceivedFormat)
1105 croak_xs_usage(cv, "THIS");
1107 wxDataObjectComposite * THIS = (wxDataObjectComposite *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DataObjectComposite" );
1108 wxDataFormat * RETVAL;
1109 RETVAL = new wxDataFormat( THIS->GetReceivedFormat() );
1110 ST(0) = sv_newmortal();
1111 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
1112 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
1120 XS(XS_Wx__TextDataObject_new); /* prototype to pass -Wmissing-prototypes */
1121 XS(XS_Wx__TextDataObject_new)
1128 if (items < 1 || items > 2)
1129 croak_xs_usage(cv, "CLASS, text = wxEmptyString");
1132 char * CLASS = (char *)SvPV_nolen(ST(0));
1133 wxTextDataObject * RETVAL;
1136 text = wxEmptyString;
1138 WXSTRING_INPUT( text, wxString, ST(1) );
1141 RETVAL = new wxTextDataObject(text);
1142 ST(0) = sv_newmortal();
1143 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::TextDataObject" );
1144 wxPli_thread_sv_register( aTHX_ "Wx::TextDataObject", RETVAL, ST(0) );
1151 XS(XS_Wx__TextDataObject_GetTextLength); /* prototype to pass -Wmissing-prototypes */
1152 XS(XS_Wx__TextDataObject_GetTextLength)
1160 croak_xs_usage(cv, "THIS");
1162 wxTextDataObject * THIS = (wxTextDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::TextDataObject" );
1166 RETVAL = THIS->GetTextLength();
1167 XSprePUSH; PUSHu((UV)RETVAL );
1173 XS(XS_Wx__TextDataObject_GetText); /* prototype to pass -Wmissing-prototypes */
1174 XS(XS_Wx__TextDataObject_GetText)
1182 croak_xs_usage(cv, "THIS");
1184 wxTextDataObject * THIS = (wxTextDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::TextDataObject" );
1187 RETVAL = THIS->GetText();
1188 ST(0) = sv_newmortal();
1189 WXSTRING_OUTPUT( RETVAL, ST(0) );
1196 XS(XS_Wx__TextDataObject_SetText); /* prototype to pass -Wmissing-prototypes */
1197 XS(XS_Wx__TextDataObject_SetText)
1205 croak_xs_usage(cv, "THIS, text");
1208 wxTextDataObject * THIS = (wxTextDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::TextDataObject" );
1210 WXSTRING_INPUT( text, wxString, ST(1) );
1212 THIS->SetText(text);
1217 #if WXPERL_W_VERSION_GE( 2, 5, 1 ) || !defined(__WXMOTIF__)
1218 #define XSubPPtmpAAAJ 1
1221 XS(XS_Wx__BitmapDataObject_new); /* prototype to pass -Wmissing-prototypes */
1222 XS(XS_Wx__BitmapDataObject_new)
1229 if (items < 1 || items > 2)
1230 croak_xs_usage(cv, "CLASS, bitmap = (wxBitmap*)&wxNullBitmap");
1233 char * CLASS = (char *)SvPV_nolen(ST(0));
1234 wxBitmapDataObject * RETVAL;
1237 bitmap = (wxBitmap*)&wxNullBitmap;
1239 bitmap = (wxBitmap *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Bitmap" );
1241 RETVAL = new wxBitmapDataObject( *bitmap );
1242 ST(0) = sv_newmortal();
1243 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::BitmapDataObject" );
1244 wxPli_thread_sv_register( aTHX_ "Wx::BitmapDataObject", RETVAL, ST(0) );
1251 XS(XS_Wx__BitmapDataObject_GetBitmap); /* prototype to pass -Wmissing-prototypes */
1252 XS(XS_Wx__BitmapDataObject_GetBitmap)
1260 croak_xs_usage(cv, "THIS");
1262 wxBitmapDataObject * THIS = (wxBitmapDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::BitmapDataObject" );
1264 RETVAL = new wxBitmap( THIS->GetBitmap() );
1265 ST(0) = sv_newmortal();
1266 wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
1267 wxPli_thread_sv_register( aTHX_ "Wx::Bitmap", RETVAL, ST(0) );
1274 XS(XS_Wx__BitmapDataObject_SetBitmap); /* prototype to pass -Wmissing-prototypes */
1275 XS(XS_Wx__BitmapDataObject_SetBitmap)
1283 croak_xs_usage(cv, "THIS, bitmap");
1285 wxBitmap* bitmap = (wxBitmap *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Bitmap" );
1286 wxBitmapDataObject * THIS = (wxBitmapDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::BitmapDataObject" );
1287 THIS->SetBitmap( *bitmap );
1293 #if !defined(__WXMOTIF__)
1294 #define XSubPPtmpAAAK 1
1297 XS(XS_Wx__FileDataObject_new); /* prototype to pass -Wmissing-prototypes */
1298 XS(XS_Wx__FileDataObject_new)
1306 croak_xs_usage(cv, "CLASS");
1308 char * CLASS = (char *)SvPV_nolen(ST(0));
1309 wxFileDataObject * RETVAL;
1311 RETVAL = new wxFileDataObject();
1312 ST(0) = sv_newmortal();
1313 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::FileDataObject" );
1314 wxPli_thread_sv_register( aTHX_ "Wx::FileDataObject", RETVAL, ST(0) );
1321 XS(XS_Wx__FileDataObject_AddFile); /* prototype to pass -Wmissing-prototypes */
1322 XS(XS_Wx__FileDataObject_AddFile)
1330 croak_xs_usage(cv, "THIS, file");
1333 wxFileDataObject * THIS = (wxFileDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileDataObject" );
1335 WXSTRING_INPUT( file, wxString, ST(1) );
1337 THIS->AddFile(file);
1343 XS(XS_Wx__FileDataObject_GetFilenames); /* prototype to pass -Wmissing-prototypes */
1344 XS(XS_Wx__FileDataObject_GetFilenames)
1352 croak_xs_usage(cv, "THIS");
1353 PERL_UNUSED_VAR(ax); /* -Wall */
1357 wxFileDataObject * THIS = (wxFileDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileDataObject" );
1358 const wxArrayString& filenames = THIS->GetFilenames();
1359 max = filenames.GetCount();
1361 for( i = 0; i < max; ++i ) {
1363 SV* tmp = sv_2mortal( newSVpv( filenames[i].mb_str(wxConvUTF8), 0 ) );
1367 PUSHs( sv_2mortal( newSVpv( CHAR_P filenames[i].c_str(), 0 ) ) );
1376 XS(XS_Wx__URLDataObject_new); /* prototype to pass -Wmissing-prototypes */
1377 XS(XS_Wx__URLDataObject_new)
1385 croak_xs_usage(cv, "CLASS");
1387 char * CLASS = (char *)SvPV_nolen(ST(0));
1388 wxURLDataObject * RETVAL;
1390 RETVAL = new wxURLDataObject();
1391 ST(0) = sv_newmortal();
1392 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::URLDataObject" );
1393 wxPli_thread_sv_register( aTHX_ "Wx::URLDataObject", RETVAL, ST(0) );
1400 XS(XS_Wx__URLDataObject_GetURL); /* prototype to pass -Wmissing-prototypes */
1401 XS(XS_Wx__URLDataObject_GetURL)
1409 croak_xs_usage(cv, "THIS");
1411 wxURLDataObject * THIS = (wxURLDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::URLDataObject" );
1414 RETVAL = THIS->GetURL();
1415 ST(0) = sv_newmortal();
1416 WXSTRING_OUTPUT( RETVAL, ST(0) );
1423 XS(XS_Wx__URLDataObject_SetURL); /* prototype to pass -Wmissing-prototypes */
1424 XS(XS_Wx__URLDataObject_SetURL)
1432 croak_xs_usage(cv, "THIS, url");
1435 wxURLDataObject * THIS = (wxURLDataObject *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::URLDataObject" );
1437 WXSTRING_INPUT( url, wxString, ST(1) );
1446 /* INCLUDE: Returning to 'DND.xs' from 'XS/DataObject.xs' */
1448 #if wxPERL_USE_DRAG_AND_DROP
1449 #define XSubPPtmpAAAL 1
1452 /* INCLUDE: Including 'XS/DropFiles.xs' from 'DND.xs' */
1455 /* INCLUDE: Including 'XS/DropSource.xs' from 'XS/DropFiles.xs' */
1458 /* INCLUDE: Including 'XS/DropTarget.xs' from 'XS/DropSource.xs' */
1461 #include "cpp/droptarget.h"
1463 XS(XS_Wx__DropTarget_new); /* prototype to pass -Wmissing-prototypes */
1464 XS(XS_Wx__DropTarget_new)
1471 if (items < 1 || items > 2)
1472 croak_xs_usage(cv, "CLASS, data = 0");
1475 char * CLASS = (char *)SvPV_nolen(ST(0));
1481 data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
1483 wxPliDropTarget* retval = new wxPliDropTarget( CLASS, data );
1484 RETVAL = newRV_noinc( SvRV( retval->m_callback.GetSelf() ) );
1485 wxPli_thread_sv_register( aTHX_ "Wx::DropTarget", retval, RETVAL );
1493 XS(XS_Wx__DropTarget_CLONE); /* prototype to pass -Wmissing-prototypes */
1494 XS(XS_Wx__DropTarget_CLONE)
1502 croak_xs_usage(cv, "CLASS");
1504 char * CLASS = (char *)SvPV_nolen(ST(0));
1505 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
1511 XS(XS_Wx__DropTarget_DESTROY); /* prototype to pass -Wmissing-prototypes */
1512 XS(XS_Wx__DropTarget_DESTROY)
1520 croak_xs_usage(cv, "THIS");
1522 wxDropTarget* THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" );
1523 wxPli_thread_sv_unregister( aTHX_ "Wx::DropTarget", THIS, ST(0) );
1524 if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
1531 XS(XS_Wx__DropTarget_GetData); /* prototype to pass -Wmissing-prototypes */
1532 XS(XS_Wx__DropTarget_GetData)
1540 croak_xs_usage(cv, "THIS");
1542 wxDropTarget * THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" );
1550 XS(XS_Wx__DropTarget_SetDataObject); /* prototype to pass -Wmissing-prototypes */
1551 XS(XS_Wx__DropTarget_SetDataObject)
1559 croak_xs_usage(cv, "THIS, data");
1561 wxDataObject* data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
1562 wxDropTarget * THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" );
1563 wxPli_object_set_deleteable( aTHX_ ST(1), false );
1564 SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
1565 THIS->SetDataObject( data );
1571 XS(XS_Wx__DropTarget_OnEnter); /* prototype to pass -Wmissing-prototypes */
1572 XS(XS_Wx__DropTarget_OnEnter)
1580 croak_xs_usage(cv, "THIS, x, y, def");
1582 wxCoord x = (wxCoord)SvIV(ST(1));
1583 wxCoord y = (wxCoord)SvIV(ST(2));
1584 wxDragResult def = (wxDragResult)SvIV(ST(3));
1585 wxDropTarget * THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" );
1586 wxDragResult RETVAL;
1588 RETVAL = THIS->wxDropTarget::OnEnter( x, y, def );
1589 XSprePUSH; PUSHi((IV)RETVAL);
1595 XS(XS_Wx__DropTarget_OnDragOver); /* prototype to pass -Wmissing-prototypes */
1596 XS(XS_Wx__DropTarget_OnDragOver)
1604 croak_xs_usage(cv, "THIS, x, y, def");
1606 wxCoord x = (wxCoord)SvIV(ST(1));
1607 wxCoord y = (wxCoord)SvIV(ST(2));
1608 wxDragResult def = (wxDragResult)SvIV(ST(3));
1609 wxDropTarget * THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" );
1610 wxDragResult RETVAL;
1612 RETVAL = THIS->wxDropTarget::OnDragOver( x, y, def );
1613 XSprePUSH; PUSHi((IV)RETVAL);
1619 XS(XS_Wx__DropTarget_OnDrop); /* prototype to pass -Wmissing-prototypes */
1620 XS(XS_Wx__DropTarget_OnDrop)
1628 croak_xs_usage(cv, "THIS, x, y");
1630 wxCoord x = (wxCoord)SvIV(ST(1));
1631 wxCoord y = (wxCoord)SvIV(ST(2));
1632 wxDropTarget * THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" );
1634 RETVAL = THIS->wxDropTarget::OnDrop( x, y );
1635 ST(0) = boolSV(RETVAL);
1642 XS(XS_Wx__DropTarget_OnLeave); /* prototype to pass -Wmissing-prototypes */
1643 XS(XS_Wx__DropTarget_OnLeave)
1651 croak_xs_usage(cv, "THIS");
1653 wxDropTarget * THIS = (wxDropTarget *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropTarget" );
1654 THIS->wxDropTarget::OnLeave();
1660 XS(XS_Wx__TextDropTarget_new); /* prototype to pass -Wmissing-prototypes */
1661 XS(XS_Wx__TextDropTarget_new)
1669 croak_xs_usage(cv, "CLASS");
1671 char * CLASS = (char *)SvPV_nolen(ST(0));
1673 wxPliTextDropTarget* retval = new wxPliTextDropTarget( CLASS );
1674 RETVAL = retval->m_callback.GetSelf();
1675 SvREFCNT_inc( RETVAL );
1683 XS(XS_Wx__FileDropTarget_new); /* prototype to pass -Wmissing-prototypes */
1684 XS(XS_Wx__FileDropTarget_new)
1692 croak_xs_usage(cv, "CLASS");
1694 char * CLASS = (char *)SvPV_nolen(ST(0));
1696 wxPliFileDropTarget* retval = new wxPliFileDropTarget( CLASS );
1697 RETVAL = retval->m_callback.GetSelf();
1698 SvREFCNT_inc( RETVAL );
1706 /* INCLUDE: Returning to 'XS/DropSource.xs' from 'XS/DropTarget.xs' */
1709 #include "cpp/dropsource.h"
1710 #if defined( __WXMSW__ ) || defined( __WXMAC__ )
1711 #define XSubPPtmpAAAM 1
1714 XS(XS_Wx__DropSource_newCursorEmpty); /* prototype to pass -Wmissing-prototypes */
1715 XS(XS_Wx__DropSource_newCursorEmpty)
1722 if (items < 1 || items > 5)
1723 croak_xs_usage(cv, "CLASS, win = 0, cursorCopy = (wxCursor*)&wxNullCursor, cursorMove = (wxCursor*)&wxNullCursor, cursorStop = (wxCursor*)&wxNullCursor");
1727 wxCursor* cursorCopy;
1728 wxCursor* cursorMove;
1729 wxCursor* cursorStop;
1730 wxDropSource * RETVAL;
1735 win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Window" );
1739 cursorCopy = (wxCursor*)&wxNullCursor;
1741 cursorCopy = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Cursor" );
1745 cursorMove = (wxCursor*)&wxNullCursor;
1747 cursorMove = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Cursor" );
1751 cursorStop = (wxCursor*)&wxNullCursor;
1753 cursorStop = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Cursor" );
1755 RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), win,
1756 *cursorCopy, *cursorMove,
1758 ST(0) = sv_newmortal();
1759 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DropSource" );
1766 XS(XS_Wx__DropSource_newCursorData); /* prototype to pass -Wmissing-prototypes */
1767 XS(XS_Wx__DropSource_newCursorData)
1774 if (items < 2 || items > 6)
1775 croak_xs_usage(cv, "CLASS, data, win = 0, cursorCopy = (wxCursor*)&wxNullCursor, cursorMove = (wxCursor*)&wxNullCursor, cursorStop = (wxCursor*)&wxNullCursor");
1778 wxDataObject* data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
1780 wxCursor* cursorCopy;
1781 wxCursor* cursorMove;
1782 wxCursor* cursorStop;
1783 wxDropSource * RETVAL;
1788 win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Window" );
1792 cursorCopy = (wxCursor*)&wxNullCursor;
1794 cursorCopy = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Cursor" );
1798 cursorMove = (wxCursor*)&wxNullCursor;
1800 cursorMove = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Cursor" );
1804 cursorStop = (wxCursor*)&wxNullCursor;
1806 cursorStop = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(5), "Wx::Cursor" );
1808 RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), *data, win,
1809 *cursorCopy, *cursorMove,
1811 ST(0) = sv_newmortal();
1812 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DropSource" );
1819 #define XSubPPtmpAAAN 1
1822 XS(XS_Wx__DropSource_newIconEmpty); /* prototype to pass -Wmissing-prototypes */
1823 XS(XS_Wx__DropSource_newIconEmpty)
1830 if (items < 1 || items > 5)
1831 croak_xs_usage(cv, "CLASS, win = 0, iconCopy = (wxIcon*)&wxNullIcon, iconMove = (wxIcon*)&wxNullIcon, iconStop = (wxIcon*)&wxNullIcon");
1838 wxDropSource * RETVAL;
1843 win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Window" );
1847 iconCopy = (wxIcon*)&wxNullIcon;
1849 iconCopy = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Icon" );
1853 iconMove = (wxIcon*)&wxNullIcon;
1855 iconMove = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Icon" );
1859 iconStop = (wxIcon*)&wxNullIcon;
1861 iconStop = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Icon" );
1863 RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), win,
1864 *iconCopy, *iconMove, *iconStop );
1865 ST(0) = sv_newmortal();
1866 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DropSource" );
1873 XS(XS_Wx__DropSource_newIconData); /* prototype to pass -Wmissing-prototypes */
1874 XS(XS_Wx__DropSource_newIconData)
1881 if (items < 2 || items > 6)
1882 croak_xs_usage(cv, "CLASS, data, win = 0, iconCopy = (wxIcon*)&wxNullIcon, iconMove = (wxIcon*)&wxNullIcon, iconStop = (wxIcon*)&wxNullIcon");
1885 wxDataObject* data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
1890 wxDropSource * RETVAL;
1895 win = (wxWindow *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Window" );
1899 iconCopy = (wxIcon*)&wxNullIcon;
1901 iconCopy = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(3), "Wx::Icon" );
1905 iconMove = (wxIcon*)&wxNullIcon;
1907 iconMove = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(4), "Wx::Icon" );
1911 iconStop = (wxIcon*)&wxNullIcon;
1913 iconStop = (wxIcon *) wxPli_sv_2_object( aTHX_ ST(5), "Wx::Icon" );
1915 RETVAL = new wxPliDropSource( wxPli_get_class( aTHX_ CLASS ), *data, win,
1916 *iconCopy, *iconMove, *iconStop );
1917 ST(0) = sv_newmortal();
1918 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DropSource" );
1926 XS(XS_Wx__DropSource_DoDragDrop); /* prototype to pass -Wmissing-prototypes */
1927 XS(XS_Wx__DropSource_DoDragDrop)
1934 if (items < 1 || items > 2)
1935 croak_xs_usage(cv, "THIS, flags = wxDrag_CopyOnly");
1938 wxDropSource * THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" );
1939 wxDragResult RETVAL;
1943 flags = wxDrag_CopyOnly;
1945 flags = (int)SvIV(ST(1));
1948 RETVAL = THIS->DoDragDrop(flags);
1949 XSprePUSH; PUSHi((IV)RETVAL);
1955 XS(XS_Wx__DropSource_SetData); /* prototype to pass -Wmissing-prototypes */
1956 XS(XS_Wx__DropSource_SetData)
1964 croak_xs_usage(cv, "THIS, data");
1966 wxDataObject* data = (wxDataObject *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::DataObject" );
1967 wxDropSource * THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" );
1968 THIS->SetData( *data );
1974 XS(XS_Wx__DropSource_GetDataObject); /* prototype to pass -Wmissing-prototypes */
1975 XS(XS_Wx__DropSource_GetDataObject)
1983 croak_xs_usage(cv, "THIS");
1985 wxDropSource * THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" );
1986 wxDataObject * RETVAL;
1987 RETVAL = THIS->GetDataObject();
1988 ST(0) = sv_newmortal();
1989 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataObject" );
1990 wxPli_thread_sv_register( aTHX_ "Wx::DataObject", RETVAL, ST(0) );
1992 wxPli_object_set_deleteable( aTHX_ ST(0), false );
1998 XS(XS_Wx__DropSource_SetCursor); /* prototype to pass -Wmissing-prototypes */
1999 XS(XS_Wx__DropSource_SetCursor)
2007 croak_xs_usage(cv, "THIS, res, cursor");
2009 wxDragResult res = (wxDragResult)SvIV(ST(1));
2010 wxCursor* cursor = (wxCursor *) wxPli_sv_2_object( aTHX_ ST(2), "Wx::Cursor" );
2011 wxDropSource * THIS = (wxDropSource *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropSource" );
2012 THIS->SetCursor( res, *cursor );
2018 /* INCLUDE: Returning to 'XS/DropFiles.xs' from 'XS/DropSource.xs' */
2020 #include <wx/event.h>
2022 XS(XS_Wx__DropFilesEvent_GetFiles); /* prototype to pass -Wmissing-prototypes */
2023 XS(XS_Wx__DropFilesEvent_GetFiles)
2031 croak_xs_usage(cv, "THIS");
2032 PERL_UNUSED_VAR(ax); /* -Wall */
2035 wxDropFilesEvent * THIS = (wxDropFilesEvent *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropFilesEvent" );
2036 wxString* files = THIS->GetFiles();
2037 int i, max = THIS->GetNumberOfFiles();
2039 for( i = 0; i < max; ++i )
2042 SV* tmp = sv_2mortal( newSVpv( CHAR_P files[i].mb_str(wxConvUTF8), 0 ) );
2046 PUSHs( sv_2mortal( newSVpv( CHAR_P files[i].c_str(), 0 ) ) );
2055 XS(XS_Wx__DropFilesEvent_GetNumberOfFiles); /* prototype to pass -Wmissing-prototypes */
2056 XS(XS_Wx__DropFilesEvent_GetNumberOfFiles)
2064 croak_xs_usage(cv, "THIS");
2066 wxDropFilesEvent * THIS = (wxDropFilesEvent *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropFilesEvent" );
2070 RETVAL = THIS->GetNumberOfFiles();
2071 XSprePUSH; PUSHi((IV)RETVAL);
2077 XS(XS_Wx__DropFilesEvent_GetPosition); /* prototype to pass -Wmissing-prototypes */
2078 XS(XS_Wx__DropFilesEvent_GetPosition)
2086 croak_xs_usage(cv, "THIS");
2088 wxDropFilesEvent * THIS = (wxDropFilesEvent *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::DropFilesEvent" );
2090 RETVAL = new wxPoint( THIS->GetPosition() );
2091 ST(0) = sv_newmortal();
2092 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::Point" );
2093 wxPli_thread_sv_register( aTHX_ "Wx::Point", RETVAL, ST(0) );
2100 /* INCLUDE: Returning to 'DND.xs' from 'XS/DropFiles.xs' */
2104 XS(XS_Wx_wxDF_TEXT); /* prototype to pass -Wmissing-prototypes */
2113 croak_xs_usage(cv, "");
2115 wxDataFormat * RETVAL;
2116 RETVAL = new wxDataFormat( wxDF_TEXT );
2117 ST(0) = sv_newmortal();
2118 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
2119 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
2126 XS(XS_Wx_wxDF_BITMAP); /* prototype to pass -Wmissing-prototypes */
2127 XS(XS_Wx_wxDF_BITMAP)
2135 croak_xs_usage(cv, "");
2137 wxDataFormat * RETVAL;
2138 RETVAL = new wxDataFormat( wxDF_BITMAP );
2139 ST(0) = sv_newmortal();
2140 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
2141 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
2147 #if defined(__WXMSW__)
2148 #define XSubPPtmpAAAO 1
2151 XS(XS_Wx_wxDF_METAFILE); /* prototype to pass -Wmissing-prototypes */
2152 XS(XS_Wx_wxDF_METAFILE)
2160 croak_xs_usage(cv, "");
2162 wxDataFormat * RETVAL;
2163 RETVAL = new wxDataFormat( wxDF_METAFILE );
2164 ST(0) = sv_newmortal();
2165 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
2166 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
2174 XS(XS_Wx_wxDF_FILENAME); /* prototype to pass -Wmissing-prototypes */
2175 XS(XS_Wx_wxDF_FILENAME)
2183 croak_xs_usage(cv, "");
2185 wxDataFormat * RETVAL;
2186 RETVAL = new wxDataFormat( wxDF_FILENAME );
2187 ST(0) = sv_newmortal();
2188 wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::DataFormat" );
2189 wxPli_thread_sv_register( aTHX_ "Wx::DataFormat", RETVAL, ST(0) );
2195 #if defined(__WXMSW__)
2197 #define XS( name ) WXXS( name )
2202 XS(boot_Wx__DND); /* prototype to pass -Wmissing-prototypes */
2210 #if (PERL_REVISION == 5 && PERL_VERSION < 9)
2211 char* file = __FILE__;
2213 const char* file = __FILE__;
2216 PERL_UNUSED_VAR(cv); /* -W */
2217 PERL_UNUSED_VAR(items); /* -W */
2218 XS_VERSION_BOOTCHECK ;
2220 newXS("Wx::Clipboard::AddData", XS_Wx__Clipboard_AddData, file);
2221 newXS("Wx::Clipboard::Clear", XS_Wx__Clipboard_Clear, file);
2222 newXS("Wx::Clipboard::Close", XS_Wx__Clipboard_Close, file);
2223 newXS("Wx::Clipboard::Flush", XS_Wx__Clipboard_Flush, file);
2224 newXS("Wx::Clipboard::GetData", XS_Wx__Clipboard_GetData, file);
2225 newXS("Wx::Clipboard::IsOpened", XS_Wx__Clipboard_IsOpened, file);
2226 newXS("Wx::Clipboard::IsSupported", XS_Wx__Clipboard_IsSupported, file);
2227 newXS("Wx::Clipboard::Open", XS_Wx__Clipboard_Open, file);
2228 newXS("Wx::Clipboard::SetData", XS_Wx__Clipboard_SetData, file);
2229 newXS("Wx::Clipboard::UsePrimarySelection", XS_Wx__Clipboard_UsePrimarySelection, file);
2231 newXS("Wx::Clipboard::IsUsingPrimarySelection", XS_Wx__Clipboard_IsUsingPrimarySelection, file);
2234 newXS("Wx::DataFormat::newNative", XS_Wx__DataFormat_newNative, file);
2237 newXS("Wx::DataFormat::newNative", XS_Wx__DataFormat_newNative, file);
2240 newXS("Wx::DataFormat::newUser", XS_Wx__DataFormat_newUser, file);
2243 newXS("Wx::DataFormat::newUser", XS_Wx__DataFormat_newUser, file);
2245 newXS("Wx::DataFormat::CLONE", XS_Wx__DataFormat_CLONE, file);
2246 newXS("Wx::DataFormat::DESTROY", XS_Wx__DataFormat_DESTROY, file);
2247 newXS("Wx::DataFormat::GetId", XS_Wx__DataFormat_GetId, file);
2248 newXS("Wx::DataFormat::SetId", XS_Wx__DataFormat_SetId, file);
2250 newXS("Wx::DataFormat::GetType", XS_Wx__DataFormat_GetType, file);
2251 newXS("Wx::DataFormat::SetType", XS_Wx__DataFormat_SetType, file);
2254 newXS("Wx::DataFormat::GetType", XS_Wx__DataFormat_GetType, file);
2256 newXS("Wx::DataFormat::SetType", XS_Wx__DataFormat_SetType, file);
2259 newXS("Wx::DataObject::CLONE", XS_Wx__DataObject_CLONE, file);
2260 newXS("Wx::DataObject::DESTROY", XS_Wx__DataObject_DESTROY, file);
2261 newXS("Wx::DataObject::Destroy", XS_Wx__DataObject_Destroy, file);
2262 newXS("Wx::DataObject::GetAllFormats", XS_Wx__DataObject_GetAllFormats, file);
2263 newXS("Wx::DataObject::GetDataHere", XS_Wx__DataObject_GetDataHere, file);
2264 newXS("Wx::DataObject::GetDataSize", XS_Wx__DataObject_GetDataSize, file);
2265 newXS("Wx::DataObject::GetFormatCount", XS_Wx__DataObject_GetFormatCount, file);
2266 newXS("Wx::DataObject::GetPreferredFormat", XS_Wx__DataObject_GetPreferredFormat, file);
2267 newXS("Wx::DataObject::IsSupported", XS_Wx__DataObject_IsSupported, file);
2268 newXS("Wx::DataObject::SetData", XS_Wx__DataObject_SetData, file);
2269 newXS("Wx::DataObjectSimple::new", XS_Wx__DataObjectSimple_new, file);
2270 newXS("Wx::DataObjectSimple::GetFormat", XS_Wx__DataObjectSimple_GetFormat, file);
2271 newXS("Wx::DataObjectSimple::SetFormat", XS_Wx__DataObjectSimple_SetFormat, file);
2272 newXS("Wx::PlDataObjectSimple::new", XS_Wx__PlDataObjectSimple_new, file);
2273 newXS("Wx::PlDataObjectSimple::DESTROY", XS_Wx__PlDataObjectSimple_DESTROY, file);
2274 newXS("Wx::DataObjectComposite::new", XS_Wx__DataObjectComposite_new, file);
2275 newXS("Wx::DataObjectComposite::Add", XS_Wx__DataObjectComposite_Add, file);
2277 newXS("Wx::DataObjectComposite::GetReceivedFormat", XS_Wx__DataObjectComposite_GetReceivedFormat, file);
2279 newXS("Wx::TextDataObject::new", XS_Wx__TextDataObject_new, file);
2280 newXS("Wx::TextDataObject::GetTextLength", XS_Wx__TextDataObject_GetTextLength, file);
2281 newXS("Wx::TextDataObject::GetText", XS_Wx__TextDataObject_GetText, file);
2282 newXS("Wx::TextDataObject::SetText", XS_Wx__TextDataObject_SetText, file);
2284 newXS("Wx::BitmapDataObject::new", XS_Wx__BitmapDataObject_new, file);
2285 newXS("Wx::BitmapDataObject::GetBitmap", XS_Wx__BitmapDataObject_GetBitmap, file);
2286 newXS("Wx::BitmapDataObject::SetBitmap", XS_Wx__BitmapDataObject_SetBitmap, file);
2289 newXS("Wx::FileDataObject::new", XS_Wx__FileDataObject_new, file);
2290 newXS("Wx::FileDataObject::AddFile", XS_Wx__FileDataObject_AddFile, file);
2291 newXS("Wx::FileDataObject::GetFilenames", XS_Wx__FileDataObject_GetFilenames, file);
2292 newXS("Wx::URLDataObject::new", XS_Wx__URLDataObject_new, file);
2293 newXS("Wx::URLDataObject::GetURL", XS_Wx__URLDataObject_GetURL, file);
2294 newXS("Wx::URLDataObject::SetURL", XS_Wx__URLDataObject_SetURL, file);
2297 newXS("Wx::DropTarget::new", XS_Wx__DropTarget_new, file);
2298 newXS("Wx::DropTarget::CLONE", XS_Wx__DropTarget_CLONE, file);
2299 newXS("Wx::DropTarget::DESTROY", XS_Wx__DropTarget_DESTROY, file);
2300 newXS("Wx::DropTarget::GetData", XS_Wx__DropTarget_GetData, file);
2301 newXS("Wx::DropTarget::SetDataObject", XS_Wx__DropTarget_SetDataObject, file);
2302 newXS("Wx::DropTarget::OnEnter", XS_Wx__DropTarget_OnEnter, file);
2303 newXS("Wx::DropTarget::OnDragOver", XS_Wx__DropTarget_OnDragOver, file);
2304 newXS("Wx::DropTarget::OnDrop", XS_Wx__DropTarget_OnDrop, file);
2305 newXS("Wx::DropTarget::OnLeave", XS_Wx__DropTarget_OnLeave, file);
2306 newXS("Wx::TextDropTarget::new", XS_Wx__TextDropTarget_new, file);
2307 newXS("Wx::FileDropTarget::new", XS_Wx__FileDropTarget_new, file);
2309 newXS("Wx::DropSource::newCursorEmpty", XS_Wx__DropSource_newCursorEmpty, file);
2310 newXS("Wx::DropSource::newCursorData", XS_Wx__DropSource_newCursorData, file);
2313 newXS("Wx::DropSource::newIconEmpty", XS_Wx__DropSource_newIconEmpty, file);
2314 newXS("Wx::DropSource::newIconData", XS_Wx__DropSource_newIconData, file);
2316 newXS("Wx::DropSource::DoDragDrop", XS_Wx__DropSource_DoDragDrop, file);
2317 newXS("Wx::DropSource::SetData", XS_Wx__DropSource_SetData, file);
2318 newXS("Wx::DropSource::GetDataObject", XS_Wx__DropSource_GetDataObject, file);
2319 newXS("Wx::DropSource::SetCursor", XS_Wx__DropSource_SetCursor, file);
2320 newXS("Wx::DropFilesEvent::GetFiles", XS_Wx__DropFilesEvent_GetFiles, file);
2321 newXS("Wx::DropFilesEvent::GetNumberOfFiles", XS_Wx__DropFilesEvent_GetNumberOfFiles, file);
2322 newXS("Wx::DropFilesEvent::GetPosition", XS_Wx__DropFilesEvent_GetPosition, file);
2324 newXS("Wx::wxDF_TEXT", XS_Wx_wxDF_TEXT, file);
2325 newXS("Wx::wxDF_BITMAP", XS_Wx_wxDF_BITMAP, file);
2327 newXS("Wx::wxDF_METAFILE", XS_Wx_wxDF_METAFILE, file);
2329 newXS("Wx::wxDF_FILENAME", XS_Wx_wxDF_FILENAME, file);
2331 /* Initialisation Section */
2333 INIT_PLI_HELPERS( wx_pli_helpers );
2366 /* End of Initialisation Section */
2368 #if (PERL_REVISION == 5 && PERL_VERSION >= 9)
2370 call_list(PL_scopestack_ix, PL_unitcheckav);