Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / filesys / FS.xs
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        ext/filesys/FS.xs
3 // Purpose:     XS for Wx::FileSystem and related classes
4 // Author:      Mattia Barbon
5 // Modified by:
6 // Created:     28/04/2001
7 // RCS-ID:      $Id: FS.xs 2057 2007-06-18 23:03:00Z mbarbon $
8 // Copyright:   (c) 2001-2002, 2004, 2006 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 #include "cpp/constants.h"
17
18 #undef THIS
19
20 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
21 #include <wx/filesys.h>
22
23 double fs_constant( const char* name, int arg )
24 {
25     // !package: Wx
26     // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> }
27     // !tag: filesystem
28 #define r( n ) \
29     if( strEQ( name, #n ) ) \
30         return n;
31
32     WX_PL_CONSTANT_INIT();
33
34     switch( fl )
35     {
36     case 'F':
37         r( wxFS_READ );
38         r( wxFS_SEEKABLE );
39         break;
40     }
41 #undef r
42
43     WX_PL_CONSTANT_CLEANUP();
44 }
45
46 wxPlConstants fs_module( &fs_constant );
47 #endif
48
49 MODULE=Wx__FS
50
51 BOOT:
52   INIT_PLI_HELPERS( wx_pli_helpers );
53
54 INCLUDE: XS/FileSystem.xs
55 INCLUDE: XS/FileSystemHandler.xs
56 INCLUDE: XS/FSFile.xs
57
58 #  //FIXME//tricky
59 #if defined(__WXMSW__)
60 #undef XS
61 #define XS( name ) WXXS( name )
62 #endif
63
64 MODULE=Wx__FS