1 #############################################################################
2 ## Name: ext/dnd/XS/DropTarget.xs
3 ## Purpose: XS for Wx::*DropTarget
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: DropTarget.xs 2285 2007-11-11 21:31:54Z mbarbon $
8 ## Copyright: (c) 2001-2002, 2004, 2006-2007 Mattia Barbon
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
14 #include "cpp/droptarget.h"
16 MODULE=Wx PACKAGE=Wx::DropTarget
21 wxDropTarget::new( data = 0 )
24 wxPliDropTarget* retval = new wxPliDropTarget( CLASS, data );
25 RETVAL = newRV_noinc( SvRV( retval->m_callback.GetSelf() ) );
26 wxPli_thread_sv_register( aTHX_ "Wx::DropTarget", retval, RETVAL );
33 wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
40 wxPli_thread_sv_unregister( aTHX_ "Wx::DropTarget", THIS, ST(0) );
41 if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
45 wxDropTarget::GetData()
48 wxDropTarget::SetDataObject( data )
51 wxPli_object_set_deleteable( aTHX_ ST(1), false );
52 SvREFCNT_inc( SvRV( ST(1) ) ); // at this point the scalar must not go away
53 THIS->SetDataObject( data );
58 # wxDropTarget::OnData( x, y, def )
63 # RETVAL = THIS->wxDropTarget::OnData( x, y, def );
68 wxDropTarget::OnEnter( x, y, def )
73 RETVAL = THIS->wxDropTarget::OnEnter( x, y, def );
78 wxDropTarget::OnDragOver( x, y, def )
83 RETVAL = THIS->wxDropTarget::OnDragOver( x, y, def );
88 wxDropTarget::OnDrop( x, y )
92 RETVAL = THIS->wxDropTarget::OnDrop( x, y );
97 wxDropTarget::OnLeave()
99 THIS->wxDropTarget::OnLeave();
101 MODULE=Wx PACKAGE=Wx::TextDropTarget
104 wxTextDropTarget::new()
106 wxPliTextDropTarget* retval = new wxPliTextDropTarget( CLASS );
107 RETVAL = retval->m_callback.GetSelf();
108 SvREFCNT_inc( RETVAL );
114 MODULE=Wx PACKAGE=Wx::FileDropTarget
117 wxFileDropTarget::new()
119 wxPliFileDropTarget* retval = new wxPliFileDropTarget( CLASS );
120 RETVAL = retval->m_callback.GetSelf();
121 SvREFCNT_inc( RETVAL );