Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / filesys / XS / FileSystemHandler.xs
1 #############################################################################
2 ## Name:        ext/filesys/XS/FileSystemHandler.xs
3 ## Purpose:     XS for Wx::FileSystemhandler
4 ## Author:      Mattia Barbon
5 ## Modified by:
6 ## Created:     28/04/2001
7 ## RCS-ID:      $Id: FileSystemHandler.xs 2393 2008-05-14 20:54:52Z mbarbon $
8 ## Copyright:   (c) 2001-2008 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 #include <wx/filesys.h>
14 #include <wx/fs_inet.h>
15 #include <wx/fs_zip.h>
16 #include <wx/fs_mem.h>
17
18 #undef THIS
19
20 MODULE=Wx PACKAGE=Wx::FileSystemHandler
21
22 #if 0 // protected!
23
24 wxString
25 wxFileSystemHandler::GetAnchor( location )
26     wxString location
27
28 wxString
29 wxFileSystemHandler::GetLeftLocation( location )
30     wxString location
31
32 wxString
33 wxFileSystemHandler::GetMimeTypeFromExt( location )
34     wxString location
35
36 wxString
37 wxFileSystemHandler::GetProtocol( location )
38     wxString location
39
40 wxString
41 wxFileSystemHandler::GetRightLocation( location )
42     wxString location
43
44 #endif
45
46 MODULE=Wx PACKAGE=Wx::InternetFSHandler
47
48 #if wxUSE_FS_INET
49
50 wxInternetFSHandler*
51 wxInternetFSHandler::new()
52
53 #endif
54
55 MODULE=Wx PACKAGE=Wx::ZipFSHandler
56
57 wxZipFSHandler*
58 wxZipFSHandler::new()
59
60 MODULE=Wx PACKAGE=Wx::ArchiveFSHandler
61
62 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
63
64 wxArchiveFSHandler*
65 wxArchiveFSHandler::new()
66
67 #endif
68
69 MODULE=Wx PACKAGE=Wx::MemoryFSHandler
70
71 wxMemoryFSHandler*
72 wxMemoryFSHandler::new()
73
74 void
75 AddImageFile( name, image, type )
76     wxString name
77     wxImage* image
78     wxBitmapType type
79   CODE:
80     wxMemoryFSHandler::AddFile( name, *image, type );
81
82 void
83 AddBitmapFile( name, bitmap, type )
84     wxString name
85     wxBitmap* bitmap
86     wxBitmapType type
87   CODE:
88     wxMemoryFSHandler::AddFile( name, *bitmap, type );
89
90 void
91 AddTextFile( name, string )
92     wxString name
93     wxString string
94   CODE:
95     wxMemoryFSHandler::AddFile( name, string );
96
97 void
98 AddBinaryFile( name, scalar )
99     wxString name
100     SV* scalar
101   PREINIT:
102     STRLEN len;
103     char* data = SvPV( scalar, len );
104   CODE:
105     wxMemoryFSHandler::AddFile( name, data, len );
106
107 #if WXPERL_W_VERSION_GE( 2, 8, 5 )
108
109 void
110 AddTextFileWithMimeType( name, string, mimetype )
111     wxString name
112     wxString string
113     wxString mimetype
114   CODE:
115     wxMemoryFSHandler::AddFileWithMimeType( name, string, mimetype );
116
117 void
118 AddBinaryFileWithMimeType( name, scalar, mimetype )
119     wxString name
120     SV* scalar
121     wxString mimetype
122   PREINIT:
123     STRLEN len;
124     char* data = SvPV( scalar, len );
125   CODE:
126     wxMemoryFSHandler::AddFileWithMimeType( name, data, len, mimetype );
127
128 #endif
129
130 void
131 RemoveFile( name )
132     wxString name
133   CODE:
134     wxMemoryFSHandler::RemoveFile( name );
135
136 MODULE=Wx PACKAGE=Wx::PlFileSystemHandler
137
138 #include "cpp/fshandler.h"
139
140 wxPlFileSystemHandler*
141 wxPlFileSystemhandler::new()
142   CODE:
143     RETVAL = new wxPlFileSystemHandler( CLASS );
144   OUTPUT:
145     RETVAL
146