Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / dnd / DND.xs
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/dnd/DND.xs
3 // Purpose:     XS for Drag'n'Drop and Clipboard
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     12/08/2001
7 // RCS-ID:      $Id: DND.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 // Copyright:   (c) 2001-2004 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 /////////////////////////////////////////////////////////////////////////////
12
13 #define PERL_NO_GET_CONTEXT
14
15 #include "cpp/wxapi.h"
16
17 #undef THIS
18
19 #include <wx/dataobj.h>
20 #include "cpp/dn_constants.cpp"
21
22 typedef wxDataObjectBase::Direction Direction;
23 typedef wxDataFormat::NativeFormat  NativeFormat;
24
25 #include <wx/dataobj.h>
26
27 MODULE=Wx__DND
28
29 BOOT:
30   INIT_PLI_HELPERS( wx_pli_helpers );
31
32 INCLUDE: XS/DataObject.xs
33 INCLUDE: XS/Clipboard.xs
34
35 #if wxPERL_USE_DRAG_AND_DROP
36
37 INCLUDE: XS/DropFiles.xs
38 INCLUDE: XS/DropSource.xs
39 INCLUDE: XS/DropTarget.xs
40
41 #endif
42
43 MODULE=Wx__DND PACKAGE=Wx
44
45 wxDataFormat*
46 wxDF_TEXT()
47   CODE:
48     RETVAL = new wxDataFormat( wxDF_TEXT );
49   OUTPUT: RETVAL
50
51 wxDataFormat*
52 wxDF_BITMAP()
53   CODE:
54     RETVAL = new wxDataFormat( wxDF_BITMAP );
55   OUTPUT: RETVAL
56
57 #if defined(__WXMSW__)
58
59 wxDataFormat*
60 wxDF_METAFILE()
61   CODE:
62     RETVAL = new wxDataFormat( wxDF_METAFILE );
63   OUTPUT: RETVAL
64
65 #endif
66
67 wxDataFormat*
68 wxDF_FILENAME()
69   CODE:
70     RETVAL = new wxDataFormat( wxDF_FILENAME );
71   OUTPUT: RETVAL
72
73 #  //FIXME//tricky
74 #if defined(__WXMSW__)
75 #undef XS
76 #define XS( name ) WXXS( name )
77 #endif
78
79 MODULE=Wx__DND