Add libwx-perl
[pkg-perl] / deb-src / libwx-perl / libwx-perl-0.96 / ext / filesys / FS.c
1 /*
2  * This file was generated automatically by ExtUtils::ParseXS version 2.2202 from the
3  * contents of FS.xs. Do not edit this file, edit FS.xs instead.
4  *
5  *      ANY CHANGES MADE HERE WILL BE LOST! 
6  *
7  */
8
9 /////////////////////////////////////////////////////////////////////////////
10 // Name:        ext/filesys/FS.xs
11 // Purpose:     XS for Wx::FileSystem and related classes
12 // Author:      Mattia Barbon
13 // Modified by:
14 // Created:     28/04/2001
15 // RCS-ID:      $Id: FS.xs 2057 2007-06-18 23:03:00Z mbarbon $
16 // Copyright:   (c) 2001-2002, 2004, 2006 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 /////////////////////////////////////////////////////////////////////////////
20
21 #define PERL_NO_GET_CONTEXT
22
23 #include "cpp/wxapi.h"
24 #include "cpp/constants.h"
25
26 #undef THIS
27
28 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
29 #include <wx/filesys.h>
30
31 double fs_constant( const char* name, int arg )
32 {
33     // !package: Wx
34     // !parser: sub { $_[0] =~ m<^\s*r\w*\(\s*(\w+)\s*\);\s*(?://(.*))?$> }
35     // !tag: filesystem
36 #define r( n ) \
37     if( strEQ( name, #n ) ) \
38         return n;
39
40     WX_PL_CONSTANT_INIT();
41
42     switch( fl )
43     {
44     case 'F':
45         r( wxFS_READ );
46         r( wxFS_SEEKABLE );
47         break;
48     }
49 #undef r
50
51     WX_PL_CONSTANT_CLEANUP();
52 }
53
54 wxPlConstants fs_module( &fs_constant );
55 #endif
56
57 #ifndef PERL_UNUSED_VAR
58 #  define PERL_UNUSED_VAR(var) if (0) var = var
59 #endif
60
61 #ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
62 #define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
63
64 /* prototype to pass -Wmissing-prototypes */
65 STATIC void
66 S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
67
68 STATIC void
69 S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
70 {
71     const GV *const gv = CvGV(cv);
72
73     PERL_ARGS_ASSERT_CROAK_XS_USAGE;
74
75     if (gv) {
76         const char *const gvname = GvNAME(gv);
77         const HV *const stash = GvSTASH(gv);
78         const char *const hvname = stash ? HvNAME(stash) : NULL;
79
80         if (hvname)
81             Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
82         else
83             Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
84     } else {
85         /* Pants. I don't think that it should be possible to get here. */
86         Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
87     }
88 }
89 #undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE
90
91 #ifdef PERL_IMPLICIT_CONTEXT
92 #define croak_xs_usage(a,b)     S_croak_xs_usage(aTHX_ a,b)
93 #else
94 #define croak_xs_usage          S_croak_xs_usage
95 #endif
96
97 #endif
98
99 /* NOTE: the prototype of newXSproto() is different in versions of perls,
100  * so we define a portable version of newXSproto()
101  */
102 #ifdef newXS_flags
103 #define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
104 #else
105 #define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
106 #endif /* !defined(newXS_flags) */
107
108
109 /* INCLUDE:  Including 'XS/FileSystem.xs' from 'FS.xs' */
110
111
112 /* INCLUDE:  Including 'XS/FileSystemHandler.xs' from 'XS/FileSystem.xs' */
113
114
115 /* INCLUDE:  Including 'XS/FSFile.xs' from 'XS/FileSystemHandler.xs' */
116
117 #include <wx/filesys.h>
118
119 XS(XS_Wx__FSFile_CLONE); /* prototype to pass -Wmissing-prototypes */
120 XS(XS_Wx__FSFile_CLONE)
121 {
122 #ifdef dVAR
123     dVAR; dXSARGS;
124 #else
125     dXSARGS;
126 #endif
127     if (items != 1)
128        croak_xs_usage(cv,  "CLASS");
129     {
130         char *  CLASS = (char *)SvPV_nolen(ST(0));
131     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
132     }
133     XSRETURN_EMPTY;
134 }
135
136
137 XS(XS_Wx__FSFile_DESTROY); /* prototype to pass -Wmissing-prototypes */
138 XS(XS_Wx__FSFile_DESTROY)
139 {
140 #ifdef dVAR
141     dVAR; dXSARGS;
142 #else
143     dXSARGS;
144 #endif
145     if (items != 1)
146        croak_xs_usage(cv,  "THIS");
147     {
148         wxFSFile *    THIS = (wxFSFile *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FSFile" );
149     wxPli_thread_sv_unregister( aTHX_ wxPli_get_class( aTHX_ ST(0) ), THIS, ST(0) );
150     delete THIS;
151     }
152     XSRETURN_EMPTY;
153 }
154
155
156 XS(XS_Wx__FSFile_GetAnchor); /* prototype to pass -Wmissing-prototypes */
157 XS(XS_Wx__FSFile_GetAnchor)
158 {
159 #ifdef dVAR
160     dVAR; dXSARGS;
161 #else
162     dXSARGS;
163 #endif
164     if (items != 1)
165        croak_xs_usage(cv,  "THIS");
166     {
167         wxFSFile *    THIS = (wxFSFile *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FSFile" );
168         wxString        RETVAL;
169
170         RETVAL = THIS->GetAnchor();
171         ST(0) = sv_newmortal();
172     WXSTRING_OUTPUT( RETVAL, ST(0) );
173
174     }
175     XSRETURN(1);
176 }
177
178
179 XS(XS_Wx__FSFile_GetLocation); /* prototype to pass -Wmissing-prototypes */
180 XS(XS_Wx__FSFile_GetLocation)
181 {
182 #ifdef dVAR
183     dVAR; dXSARGS;
184 #else
185     dXSARGS;
186 #endif
187     if (items != 1)
188        croak_xs_usage(cv,  "THIS");
189     {
190         wxFSFile *    THIS = (wxFSFile *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FSFile" );
191         wxString        RETVAL;
192
193         RETVAL = THIS->GetLocation();
194         ST(0) = sv_newmortal();
195     WXSTRING_OUTPUT( RETVAL, ST(0) );
196
197     }
198     XSRETURN(1);
199 }
200
201
202 XS(XS_Wx__FSFile_GetMimeType); /* prototype to pass -Wmissing-prototypes */
203 XS(XS_Wx__FSFile_GetMimeType)
204 {
205 #ifdef dVAR
206     dVAR; dXSARGS;
207 #else
208     dXSARGS;
209 #endif
210     if (items != 1)
211        croak_xs_usage(cv,  "THIS");
212     {
213         wxFSFile *    THIS = (wxFSFile *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FSFile" );
214         wxString        RETVAL;
215
216         RETVAL = THIS->GetMimeType();
217         ST(0) = sv_newmortal();
218     WXSTRING_OUTPUT( RETVAL, ST(0) );
219
220     }
221     XSRETURN(1);
222 }
223
224
225 XS(XS_Wx__FSFile_GetStream); /* prototype to pass -Wmissing-prototypes */
226 XS(XS_Wx__FSFile_GetStream)
227 {
228 #ifdef dVAR
229     dVAR; dXSARGS;
230 #else
231     dXSARGS;
232 #endif
233     if (items != 1)
234        croak_xs_usage(cv,  "THIS");
235     {
236         wxFSFile *    THIS = (wxFSFile *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FSFile" );
237         wxInputStream * RETVAL;
238
239         RETVAL = THIS->GetStream();
240         ST(0) = sv_newmortal();
241     wxPli_stream_2_sv( aTHX_ ST(0), RETVAL, "Wx::InputStream" );
242
243     }
244     XSRETURN(1);
245 }
246
247 #include "cpp/fshandler.h"
248
249 XS(XS_Wx__FSFile_new); /* prototype to pass -Wmissing-prototypes */
250 XS(XS_Wx__FSFile_new)
251 {
252 #ifdef dVAR
253     dVAR; dXSARGS;
254 #else
255     dXSARGS;
256 #endif
257     if (items != 5)
258        croak_xs_usage(cv,  "CLASS, fh, loc, mimetype, anchor");
259     {
260         SV*     fh = ST(1);
261         wxString        loc;
262         wxString        mimetype;
263         wxString        anchor;
264         char *  CLASS = (char *)SvPV_nolen(ST(0));
265         wxPlFSFile *    RETVAL;
266
267     WXSTRING_INPUT( loc, wxString, ST(2) );
268
269     WXSTRING_INPUT( mimetype, wxString, ST(3) );
270
271     WXSTRING_INPUT( anchor, wxString, ST(4) );
272     RETVAL = new wxPlFSFile( fh, loc, mimetype, anchor );
273         ST(0) = sv_newmortal();
274     wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::PlFSFile" );
275     wxPli_thread_sv_register( aTHX_ "Wx::PlFSFile", RETVAL, ST(0) );
276
277     }
278     XSRETURN(1);
279 }
280
281
282 /* INCLUDE: Returning to 'XS/FileSystemHandler.xs' from 'XS/FSFile.xs' */
283
284 #include <wx/filesys.h>
285 #include <wx/fs_inet.h>
286 #include <wx/fs_zip.h>
287 #include <wx/fs_mem.h>
288 #undef THIS
289 #if 0 // protected!
290 #define XSubPPtmpAAAA 1
291
292
293 XS(XS_Wx__FileSystemHandler_GetAnchor); /* prototype to pass -Wmissing-prototypes */
294 XS(XS_Wx__FileSystemHandler_GetAnchor)
295 {
296 #ifdef dVAR
297     dVAR; dXSARGS;
298 #else
299     dXSARGS;
300 #endif
301     if (items != 2)
302        croak_xs_usage(cv,  "THIS, location");
303     {
304         wxString        location;
305         wxFileSystemHandler *    THIS = (wxFileSystemHandler *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystemHandler" );
306         wxString        RETVAL;
307
308     WXSTRING_INPUT( location, wxString, ST(1) );
309
310         RETVAL = THIS->GetAnchor(location);
311         ST(0) = sv_newmortal();
312     WXSTRING_OUTPUT( RETVAL, ST(0) );
313
314     }
315     XSRETURN(1);
316 }
317
318
319 XS(XS_Wx__FileSystemHandler_GetLeftLocation); /* prototype to pass -Wmissing-prototypes */
320 XS(XS_Wx__FileSystemHandler_GetLeftLocation)
321 {
322 #ifdef dVAR
323     dVAR; dXSARGS;
324 #else
325     dXSARGS;
326 #endif
327     if (items != 2)
328        croak_xs_usage(cv,  "THIS, location");
329     {
330         wxString        location;
331         wxFileSystemHandler *    THIS = (wxFileSystemHandler *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystemHandler" );
332         wxString        RETVAL;
333
334     WXSTRING_INPUT( location, wxString, ST(1) );
335
336         RETVAL = THIS->GetLeftLocation(location);
337         ST(0) = sv_newmortal();
338     WXSTRING_OUTPUT( RETVAL, ST(0) );
339
340     }
341     XSRETURN(1);
342 }
343
344
345 XS(XS_Wx__FileSystemHandler_GetMimeTypeFromExt); /* prototype to pass -Wmissing-prototypes */
346 XS(XS_Wx__FileSystemHandler_GetMimeTypeFromExt)
347 {
348 #ifdef dVAR
349     dVAR; dXSARGS;
350 #else
351     dXSARGS;
352 #endif
353     if (items != 2)
354        croak_xs_usage(cv,  "THIS, location");
355     {
356         wxString        location;
357         wxFileSystemHandler *    THIS = (wxFileSystemHandler *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystemHandler" );
358         wxString        RETVAL;
359
360     WXSTRING_INPUT( location, wxString, ST(1) );
361
362         RETVAL = THIS->GetMimeTypeFromExt(location);
363         ST(0) = sv_newmortal();
364     WXSTRING_OUTPUT( RETVAL, ST(0) );
365
366     }
367     XSRETURN(1);
368 }
369
370
371 XS(XS_Wx__FileSystemHandler_GetProtocol); /* prototype to pass -Wmissing-prototypes */
372 XS(XS_Wx__FileSystemHandler_GetProtocol)
373 {
374 #ifdef dVAR
375     dVAR; dXSARGS;
376 #else
377     dXSARGS;
378 #endif
379     if (items != 2)
380        croak_xs_usage(cv,  "THIS, location");
381     {
382         wxString        location;
383         wxFileSystemHandler *    THIS = (wxFileSystemHandler *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystemHandler" );
384         wxString        RETVAL;
385
386     WXSTRING_INPUT( location, wxString, ST(1) );
387
388         RETVAL = THIS->GetProtocol(location);
389         ST(0) = sv_newmortal();
390     WXSTRING_OUTPUT( RETVAL, ST(0) );
391
392     }
393     XSRETURN(1);
394 }
395
396
397 XS(XS_Wx__FileSystemHandler_GetRightLocation); /* prototype to pass -Wmissing-prototypes */
398 XS(XS_Wx__FileSystemHandler_GetRightLocation)
399 {
400 #ifdef dVAR
401     dVAR; dXSARGS;
402 #else
403     dXSARGS;
404 #endif
405     if (items != 2)
406        croak_xs_usage(cv,  "THIS, location");
407     {
408         wxString        location;
409         wxFileSystemHandler *    THIS = (wxFileSystemHandler *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystemHandler" );
410         wxString        RETVAL;
411
412     WXSTRING_INPUT( location, wxString, ST(1) );
413
414         RETVAL = THIS->GetRightLocation(location);
415         ST(0) = sv_newmortal();
416     WXSTRING_OUTPUT( RETVAL, ST(0) );
417
418     }
419     XSRETURN(1);
420 }
421
422 #endif
423 #if wxUSE_FS_INET
424 #define XSubPPtmpAAAB 1
425
426
427 XS(XS_Wx__InternetFSHandler_new); /* prototype to pass -Wmissing-prototypes */
428 XS(XS_Wx__InternetFSHandler_new)
429 {
430 #ifdef dVAR
431     dVAR; dXSARGS;
432 #else
433     dXSARGS;
434 #endif
435     if (items != 1)
436        croak_xs_usage(cv,  "CLASS");
437     {
438         char *  CLASS = (char *)SvPV_nolen(ST(0));
439         wxInternetFSHandler *   RETVAL;
440
441         RETVAL = new wxInternetFSHandler();
442         ST(0) = sv_newmortal();
443     wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
444
445     }
446     XSRETURN(1);
447 }
448
449 #endif
450
451 XS(XS_Wx__ZipFSHandler_new); /* prototype to pass -Wmissing-prototypes */
452 XS(XS_Wx__ZipFSHandler_new)
453 {
454 #ifdef dVAR
455     dVAR; dXSARGS;
456 #else
457     dXSARGS;
458 #endif
459     if (items != 1)
460        croak_xs_usage(cv,  "CLASS");
461     {
462         char *  CLASS = (char *)SvPV_nolen(ST(0));
463         wxZipFSHandler *        RETVAL;
464
465         RETVAL = new wxZipFSHandler();
466         ST(0) = sv_newmortal();
467     wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
468
469     }
470     XSRETURN(1);
471 }
472
473 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
474 #define XSubPPtmpAAAC 1
475
476
477 XS(XS_Wx__ArchiveFSHandler_new); /* prototype to pass -Wmissing-prototypes */
478 XS(XS_Wx__ArchiveFSHandler_new)
479 {
480 #ifdef dVAR
481     dVAR; dXSARGS;
482 #else
483     dXSARGS;
484 #endif
485     if (items != 1)
486        croak_xs_usage(cv,  "CLASS");
487     {
488         char *  CLASS = (char *)SvPV_nolen(ST(0));
489         wxArchiveFSHandler *    RETVAL;
490
491         RETVAL = new wxArchiveFSHandler();
492         ST(0) = sv_newmortal();
493     wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
494
495     }
496     XSRETURN(1);
497 }
498
499 #endif
500
501 XS(XS_Wx__MemoryFSHandler_new); /* prototype to pass -Wmissing-prototypes */
502 XS(XS_Wx__MemoryFSHandler_new)
503 {
504 #ifdef dVAR
505     dVAR; dXSARGS;
506 #else
507     dXSARGS;
508 #endif
509     if (items != 1)
510        croak_xs_usage(cv,  "CLASS");
511     {
512         char *  CLASS = (char *)SvPV_nolen(ST(0));
513         wxMemoryFSHandler *     RETVAL;
514
515         RETVAL = new wxMemoryFSHandler();
516         ST(0) = sv_newmortal();
517     wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
518
519     }
520     XSRETURN(1);
521 }
522
523
524 XS(XS_Wx__MemoryFSHandler_AddImageFile); /* prototype to pass -Wmissing-prototypes */
525 XS(XS_Wx__MemoryFSHandler_AddImageFile)
526 {
527 #ifdef dVAR
528     dVAR; dXSARGS;
529 #else
530     dXSARGS;
531 #endif
532     if (items != 3)
533        croak_xs_usage(cv,  "name, image, type");
534     {
535         wxString        name;
536         wxImage*    image = (wxImage *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Image" );
537         wxBitmapType    type = (wxBitmapType)SvIV(ST(2));
538
539     WXSTRING_INPUT( name, wxString, ST(0) );
540     wxMemoryFSHandler::AddFile( name, *image, type );
541     }
542     XSRETURN_EMPTY;
543 }
544
545
546 XS(XS_Wx__MemoryFSHandler_AddBitmapFile); /* prototype to pass -Wmissing-prototypes */
547 XS(XS_Wx__MemoryFSHandler_AddBitmapFile)
548 {
549 #ifdef dVAR
550     dVAR; dXSARGS;
551 #else
552     dXSARGS;
553 #endif
554     if (items != 3)
555        croak_xs_usage(cv,  "name, bitmap, type");
556     {
557         wxString        name;
558         wxBitmap*    bitmap = (wxBitmap *) wxPli_sv_2_object( aTHX_ ST(1), "Wx::Bitmap" );
559         wxBitmapType    type = (wxBitmapType)SvIV(ST(2));
560
561     WXSTRING_INPUT( name, wxString, ST(0) );
562     wxMemoryFSHandler::AddFile( name, *bitmap, type );
563     }
564     XSRETURN_EMPTY;
565 }
566
567
568 XS(XS_Wx__MemoryFSHandler_AddTextFile); /* prototype to pass -Wmissing-prototypes */
569 XS(XS_Wx__MemoryFSHandler_AddTextFile)
570 {
571 #ifdef dVAR
572     dVAR; dXSARGS;
573 #else
574     dXSARGS;
575 #endif
576     if (items != 2)
577        croak_xs_usage(cv,  "name, string");
578     {
579         wxString        name;
580         wxString        string;
581
582     WXSTRING_INPUT( name, wxString, ST(0) );
583
584     WXSTRING_INPUT( string, wxString, ST(1) );
585     wxMemoryFSHandler::AddFile( name, string );
586     }
587     XSRETURN_EMPTY;
588 }
589
590
591 XS(XS_Wx__MemoryFSHandler_AddBinaryFile); /* prototype to pass -Wmissing-prototypes */
592 XS(XS_Wx__MemoryFSHandler_AddBinaryFile)
593 {
594 #ifdef dVAR
595     dVAR; dXSARGS;
596 #else
597     dXSARGS;
598 #endif
599     if (items != 2)
600        croak_xs_usage(cv,  "name, scalar");
601     {
602         wxString        name;
603         SV*     scalar = ST(1);
604     STRLEN len;
605     char* data = SvPV( scalar, len );
606
607     WXSTRING_INPUT( name, wxString, ST(0) );
608     wxMemoryFSHandler::AddFile( name, data, len );
609     }
610     XSRETURN_EMPTY;
611 }
612
613 #if WXPERL_W_VERSION_GE( 2, 8, 5 )
614 #define XSubPPtmpAAAD 1
615
616
617 XS(XS_Wx__MemoryFSHandler_AddTextFileWithMimeType); /* prototype to pass -Wmissing-prototypes */
618 XS(XS_Wx__MemoryFSHandler_AddTextFileWithMimeType)
619 {
620 #ifdef dVAR
621     dVAR; dXSARGS;
622 #else
623     dXSARGS;
624 #endif
625     if (items != 3)
626        croak_xs_usage(cv,  "name, string, mimetype");
627     {
628         wxString        name;
629         wxString        string;
630         wxString        mimetype;
631
632     WXSTRING_INPUT( name, wxString, ST(0) );
633
634     WXSTRING_INPUT( string, wxString, ST(1) );
635
636     WXSTRING_INPUT( mimetype, wxString, ST(2) );
637     wxMemoryFSHandler::AddFileWithMimeType( name, string, mimetype );
638     }
639     XSRETURN_EMPTY;
640 }
641
642
643 XS(XS_Wx__MemoryFSHandler_AddBinaryFileWithMimeType); /* prototype to pass -Wmissing-prototypes */
644 XS(XS_Wx__MemoryFSHandler_AddBinaryFileWithMimeType)
645 {
646 #ifdef dVAR
647     dVAR; dXSARGS;
648 #else
649     dXSARGS;
650 #endif
651     if (items != 3)
652        croak_xs_usage(cv,  "name, scalar, mimetype");
653     {
654         wxString        name;
655         SV*     scalar = ST(1);
656         wxString        mimetype;
657     STRLEN len;
658     char* data = SvPV( scalar, len );
659
660     WXSTRING_INPUT( name, wxString, ST(0) );
661
662     WXSTRING_INPUT( mimetype, wxString, ST(2) );
663     wxMemoryFSHandler::AddFileWithMimeType( name, data, len, mimetype );
664     }
665     XSRETURN_EMPTY;
666 }
667
668 #endif
669
670 XS(XS_Wx__MemoryFSHandler_RemoveFile); /* prototype to pass -Wmissing-prototypes */
671 XS(XS_Wx__MemoryFSHandler_RemoveFile)
672 {
673 #ifdef dVAR
674     dVAR; dXSARGS;
675 #else
676     dXSARGS;
677 #endif
678     if (items != 1)
679        croak_xs_usage(cv,  "name");
680     {
681         wxString        name;
682
683     WXSTRING_INPUT( name, wxString, ST(0) );
684     wxMemoryFSHandler::RemoveFile( name );
685     }
686     XSRETURN_EMPTY;
687 }
688
689 #include "cpp/fshandler.h"
690
691 XS(XS_Wx__PlFileSystemHandler_new); /* prototype to pass -Wmissing-prototypes */
692 XS(XS_Wx__PlFileSystemHandler_new)
693 {
694 #ifdef dVAR
695     dVAR; dXSARGS;
696 #else
697     dXSARGS;
698 #endif
699     if (items != 1)
700        croak_xs_usage(cv,  "CLASS");
701     {
702         char *  CLASS = (char *)SvPV_nolen(ST(0));
703         wxPlFileSystemHandler * RETVAL;
704     RETVAL = new wxPlFileSystemHandler( CLASS );
705         ST(0) = sv_newmortal();
706     wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
707
708     }
709     XSRETURN(1);
710 }
711
712
713 /* INCLUDE: Returning to 'XS/FileSystem.xs' from 'XS/FileSystemHandler.xs' */
714
715 #include <wx/filesys.h>
716
717 XS(XS_Wx__FileSystem_new); /* prototype to pass -Wmissing-prototypes */
718 XS(XS_Wx__FileSystem_new)
719 {
720 #ifdef dVAR
721     dVAR; dXSARGS;
722 #else
723     dXSARGS;
724 #endif
725     if (items != 1)
726        croak_xs_usage(cv,  "CLASS");
727     {
728         char *  CLASS = (char *)SvPV_nolen(ST(0));
729         wxFileSystem *  RETVAL;
730
731         RETVAL = new wxFileSystem();
732         ST(0) = sv_newmortal();
733     wxPli_object_2_sv( aTHX_ ST(0), RETVAL );
734     wxPli_thread_sv_register( aTHX_ "Wx::FileSystem", RETVAL, ST(0) );
735
736     }
737     XSRETURN(1);
738 }
739
740
741 XS(XS_Wx__FileSystem_CLONE); /* prototype to pass -Wmissing-prototypes */
742 XS(XS_Wx__FileSystem_CLONE)
743 {
744 #ifdef dVAR
745     dVAR; dXSARGS;
746 #else
747     dXSARGS;
748 #endif
749     if (items != 1)
750        croak_xs_usage(cv,  "CLASS");
751     {
752         char *  CLASS = (char *)SvPV_nolen(ST(0));
753     wxPli_thread_sv_clone( aTHX_ CLASS, (wxPliCloneSV)wxPli_detach_object );
754     }
755     XSRETURN_EMPTY;
756 }
757
758
759 XS(XS_Wx__FileSystem_DESTROY); /* prototype to pass -Wmissing-prototypes */
760 XS(XS_Wx__FileSystem_DESTROY)
761 {
762 #ifdef dVAR
763     dVAR; dXSARGS;
764 #else
765     dXSARGS;
766 #endif
767     if (items != 1)
768        croak_xs_usage(cv,  "THIS");
769     {
770         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
771     wxPli_thread_sv_unregister( aTHX_ "Wx::FileSystem", THIS, ST(0) );
772     if( wxPli_object_is_deleteable( aTHX_ ST(0) ) )
773         delete THIS;
774     }
775     XSRETURN_EMPTY;
776 }
777
778
779 XS(XS_Wx__FileSystem_AddHandler); /* prototype to pass -Wmissing-prototypes */
780 XS(XS_Wx__FileSystem_AddHandler)
781 {
782 #ifdef dVAR
783     dVAR; dXSARGS;
784 #else
785     dXSARGS;
786 #endif
787     if (items != 1)
788        croak_xs_usage(cv,  "handler");
789     {
790         wxFileSystemHandler*    handler = (wxFileSystemHandler *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystemHandler" );
791     wxFileSystem::AddHandler( handler );
792     }
793     XSRETURN_EMPTY;
794 }
795
796 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
797 #define XSubPPtmpAAAE 1
798
799
800 XS(XS_Wx__FileSystem_HasHandlerForPath); /* prototype to pass -Wmissing-prototypes */
801 XS(XS_Wx__FileSystem_HasHandlerForPath)
802 {
803 #ifdef dVAR
804     dVAR; dXSARGS;
805 #else
806     dXSARGS;
807 #endif
808     if (items != 1)
809        croak_xs_usage(cv,  "location");
810     {
811         wxString        location;
812         bool    RETVAL;
813
814     WXSTRING_INPUT( location, wxString, ST(0) );
815     RETVAL = wxFileSystem::HasHandlerForPath( location );
816         ST(0) = boolSV(RETVAL);
817         sv_2mortal(ST(0));
818     }
819     XSRETURN(1);
820 }
821
822 #endif
823
824 XS(XS_Wx__FileSystem_ChangePathTo); /* prototype to pass -Wmissing-prototypes */
825 XS(XS_Wx__FileSystem_ChangePathTo)
826 {
827 #ifdef dVAR
828     dVAR; dXSARGS;
829 #else
830     dXSARGS;
831 #endif
832     if (items < 2 || items > 3)
833        croak_xs_usage(cv,  "THIS, location, is_dir = false");
834     {
835         wxString        location;
836         bool    is_dir;
837         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
838
839     WXSTRING_INPUT( location, wxString, ST(1) );
840
841         if (items < 3)
842             is_dir = false;
843         else {
844             is_dir = (bool)SvTRUE(ST(2));
845         }
846
847         THIS->ChangePathTo(location, is_dir);
848     }
849     XSRETURN_EMPTY;
850 }
851
852
853 XS(XS_Wx__FileSystem_GetPath); /* prototype to pass -Wmissing-prototypes */
854 XS(XS_Wx__FileSystem_GetPath)
855 {
856 #ifdef dVAR
857     dVAR; dXSARGS;
858 #else
859     dXSARGS;
860 #endif
861     if (items != 1)
862        croak_xs_usage(cv,  "THIS");
863     {
864         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
865         wxString        RETVAL;
866
867         RETVAL = THIS->GetPath();
868         ST(0) = sv_newmortal();
869     WXSTRING_OUTPUT( RETVAL, ST(0) );
870
871     }
872     XSRETURN(1);
873 }
874
875
876 XS(XS_Wx__FileSystem_FindFirst); /* prototype to pass -Wmissing-prototypes */
877 XS(XS_Wx__FileSystem_FindFirst)
878 {
879 #ifdef dVAR
880     dVAR; dXSARGS;
881 #else
882     dXSARGS;
883 #endif
884     if (items < 2 || items > 3)
885        croak_xs_usage(cv,  "THIS, wildcard, flags = 0");
886     {
887         wxString        wildcard;
888         int     flags;
889         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
890         wxString        RETVAL;
891
892     WXSTRING_INPUT( wildcard, wxString, ST(1) );
893
894         if (items < 3)
895             flags = 0;
896         else {
897             flags = (int)SvIV(ST(2));
898         }
899
900         RETVAL = THIS->FindFirst(wildcard, flags);
901         ST(0) = sv_newmortal();
902     WXSTRING_OUTPUT( RETVAL, ST(0) );
903
904     }
905     XSRETURN(1);
906 }
907
908
909 XS(XS_Wx__FileSystem_FindNext); /* prototype to pass -Wmissing-prototypes */
910 XS(XS_Wx__FileSystem_FindNext)
911 {
912 #ifdef dVAR
913     dVAR; dXSARGS;
914 #else
915     dXSARGS;
916 #endif
917     if (items != 1)
918        croak_xs_usage(cv,  "THIS");
919     {
920         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
921         wxString        RETVAL;
922
923         RETVAL = THIS->FindNext();
924         ST(0) = sv_newmortal();
925     WXSTRING_OUTPUT( RETVAL, ST(0) );
926
927     }
928     XSRETURN(1);
929 }
930
931 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
932 #define XSubPPtmpAAAF 1
933
934
935 XS(XS_Wx__FileSystem_FindFileInPath); /* prototype to pass -Wmissing-prototypes */
936 XS(XS_Wx__FileSystem_FindFileInPath)
937 {
938 #ifdef dVAR
939     dVAR; dXSARGS;
940 #else
941     dXSARGS;
942 #endif
943     if (items != 3)
944        croak_xs_usage(cv,  "THIS, path, file");
945     {
946         wxString        path;
947         wxString        file;
948         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
949         wxString        RETVAL;
950
951     WXSTRING_INPUT( path, wxString, ST(1) );
952
953     WXSTRING_INPUT( file, wxString, ST(2) );
954     bool ret = THIS->FindFileInPath( &RETVAL, path, file );
955     if( !ret )
956         XSRETURN_UNDEF;
957         ST(0) = sv_newmortal();
958     WXSTRING_OUTPUT( RETVAL, ST(0) );
959
960     }
961     XSRETURN(1);
962 }
963
964 #endif
965 #if WXPERL_W_VERSION_GE( 2, 7, 2 )
966 #define XSubPPtmpAAAG 1
967
968
969 XS(XS_Wx__FileSystem_OpenFile); /* prototype to pass -Wmissing-prototypes */
970 XS(XS_Wx__FileSystem_OpenFile)
971 {
972 #ifdef dVAR
973     dVAR; dXSARGS;
974 #else
975     dXSARGS;
976 #endif
977     if (items < 2 || items > 3)
978        croak_xs_usage(cv,  "THIS, location, flags = wxFS_READ");
979     {
980         wxString        location;
981         int     flags;
982         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
983         wxFSFile *      RETVAL;
984
985     WXSTRING_INPUT( location, wxString, ST(1) );
986
987         if (items < 3)
988             flags = wxFS_READ;
989         else {
990             flags = (int)SvIV(ST(2));
991         }
992
993         RETVAL = THIS->OpenFile(location, flags);
994         ST(0) = sv_newmortal();
995     wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::FSFile" );
996     wxPli_thread_sv_register( aTHX_ "Wx::FSFile", RETVAL, ST(0) );
997
998     }
999     XSRETURN(1);
1000 }
1001
1002 #else
1003 #define XSubPPtmpAAAH 1
1004
1005
1006 XS(XS_Wx__FileSystem_OpenFile); /* prototype to pass -Wmissing-prototypes */
1007 XS(XS_Wx__FileSystem_OpenFile)
1008 {
1009 #ifdef dVAR
1010     dVAR; dXSARGS;
1011 #else
1012     dXSARGS;
1013 #endif
1014     if (items != 2)
1015        croak_xs_usage(cv,  "THIS, location");
1016     {
1017         wxString        location;
1018         wxFileSystem *    THIS = (wxFileSystem *) wxPli_sv_2_object( aTHX_ ST(0), "Wx::FileSystem" );
1019         wxFSFile *      RETVAL;
1020
1021     WXSTRING_INPUT( location, wxString, ST(1) );
1022
1023         RETVAL = THIS->OpenFile(location);
1024         ST(0) = sv_newmortal();
1025     wxPli_non_object_2_sv( aTHX_ ST(0), RETVAL, "Wx::FSFile" );
1026     wxPli_thread_sv_register( aTHX_ "Wx::FSFile", RETVAL, ST(0) );
1027
1028     }
1029     XSRETURN(1);
1030 }
1031
1032 #endif
1033
1034 /* INCLUDE: Returning to 'FS.xs' from 'XS/FileSystem.xs' */
1035
1036 #if defined(__WXMSW__)
1037 #undef XS
1038 #define XS( name ) WXXS( name )
1039 #endif
1040 #ifdef __cplusplus
1041 extern "C"
1042 #endif
1043 XS(boot_Wx__FS); /* prototype to pass -Wmissing-prototypes */
1044 XS(boot_Wx__FS)
1045 {
1046 #ifdef dVAR
1047     dVAR; dXSARGS;
1048 #else
1049     dXSARGS;
1050 #endif
1051 #if (PERL_REVISION == 5 && PERL_VERSION < 9)
1052     char* file = __FILE__;
1053 #else
1054     const char* file = __FILE__;
1055 #endif
1056
1057     PERL_UNUSED_VAR(cv); /* -W */
1058     PERL_UNUSED_VAR(items); /* -W */
1059     XS_VERSION_BOOTCHECK ;
1060
1061         newXS("Wx::FSFile::CLONE", XS_Wx__FSFile_CLONE, file);
1062         newXS("Wx::FSFile::DESTROY", XS_Wx__FSFile_DESTROY, file);
1063         newXS("Wx::FSFile::GetAnchor", XS_Wx__FSFile_GetAnchor, file);
1064         newXS("Wx::FSFile::GetLocation", XS_Wx__FSFile_GetLocation, file);
1065         newXS("Wx::FSFile::GetMimeType", XS_Wx__FSFile_GetMimeType, file);
1066         newXS("Wx::FSFile::GetStream", XS_Wx__FSFile_GetStream, file);
1067         newXS("Wx::FSFile::new", XS_Wx__FSFile_new, file);
1068 #if XSubPPtmpAAAA
1069         newXS("Wx::FileSystemHandler::GetAnchor", XS_Wx__FileSystemHandler_GetAnchor, file);
1070         newXS("Wx::FileSystemHandler::GetLeftLocation", XS_Wx__FileSystemHandler_GetLeftLocation, file);
1071         newXS("Wx::FileSystemHandler::GetMimeTypeFromExt", XS_Wx__FileSystemHandler_GetMimeTypeFromExt, file);
1072         newXS("Wx::FileSystemHandler::GetProtocol", XS_Wx__FileSystemHandler_GetProtocol, file);
1073         newXS("Wx::FileSystemHandler::GetRightLocation", XS_Wx__FileSystemHandler_GetRightLocation, file);
1074 #endif
1075 #if XSubPPtmpAAAB
1076         newXS("Wx::InternetFSHandler::new", XS_Wx__InternetFSHandler_new, file);
1077 #endif
1078         newXS("Wx::ZipFSHandler::new", XS_Wx__ZipFSHandler_new, file);
1079 #if XSubPPtmpAAAC
1080         newXS("Wx::ArchiveFSHandler::new", XS_Wx__ArchiveFSHandler_new, file);
1081 #endif
1082         newXS("Wx::MemoryFSHandler::new", XS_Wx__MemoryFSHandler_new, file);
1083         newXS("Wx::MemoryFSHandler::AddImageFile", XS_Wx__MemoryFSHandler_AddImageFile, file);
1084         newXS("Wx::MemoryFSHandler::AddBitmapFile", XS_Wx__MemoryFSHandler_AddBitmapFile, file);
1085         newXS("Wx::MemoryFSHandler::AddTextFile", XS_Wx__MemoryFSHandler_AddTextFile, file);
1086         newXS("Wx::MemoryFSHandler::AddBinaryFile", XS_Wx__MemoryFSHandler_AddBinaryFile, file);
1087 #if XSubPPtmpAAAD
1088         newXS("Wx::MemoryFSHandler::AddTextFileWithMimeType", XS_Wx__MemoryFSHandler_AddTextFileWithMimeType, file);
1089         newXS("Wx::MemoryFSHandler::AddBinaryFileWithMimeType", XS_Wx__MemoryFSHandler_AddBinaryFileWithMimeType, file);
1090 #endif
1091         newXS("Wx::MemoryFSHandler::RemoveFile", XS_Wx__MemoryFSHandler_RemoveFile, file);
1092         newXS("Wx::PlFileSystemHandler::new", XS_Wx__PlFileSystemHandler_new, file);
1093         newXS("Wx::FileSystem::new", XS_Wx__FileSystem_new, file);
1094         newXS("Wx::FileSystem::CLONE", XS_Wx__FileSystem_CLONE, file);
1095         newXS("Wx::FileSystem::DESTROY", XS_Wx__FileSystem_DESTROY, file);
1096         newXS("Wx::FileSystem::AddHandler", XS_Wx__FileSystem_AddHandler, file);
1097 #if XSubPPtmpAAAE
1098         newXS("Wx::FileSystem::HasHandlerForPath", XS_Wx__FileSystem_HasHandlerForPath, file);
1099 #endif
1100         newXS("Wx::FileSystem::ChangePathTo", XS_Wx__FileSystem_ChangePathTo, file);
1101         newXS("Wx::FileSystem::GetPath", XS_Wx__FileSystem_GetPath, file);
1102         newXS("Wx::FileSystem::FindFirst", XS_Wx__FileSystem_FindFirst, file);
1103         newXS("Wx::FileSystem::FindNext", XS_Wx__FileSystem_FindNext, file);
1104 #if XSubPPtmpAAAF
1105         newXS("Wx::FileSystem::FindFileInPath", XS_Wx__FileSystem_FindFileInPath, file);
1106 #endif
1107 #if XSubPPtmpAAAG
1108         newXS("Wx::FileSystem::OpenFile", XS_Wx__FileSystem_OpenFile, file);
1109 #endif
1110 #if XSubPPtmpAAAH
1111         newXS("Wx::FileSystem::OpenFile", XS_Wx__FileSystem_OpenFile, file);
1112 #endif
1113
1114     /* Initialisation Section */
1115
1116   INIT_PLI_HELPERS( wx_pli_helpers );
1117
1118 #if XSubPPtmpAAAA
1119 #endif
1120 #if XSubPPtmpAAAB
1121 #endif
1122 #if XSubPPtmpAAAC
1123 #endif
1124 #if XSubPPtmpAAAD
1125 #endif
1126 #if XSubPPtmpAAAE
1127 #endif
1128 #if XSubPPtmpAAAF
1129 #endif
1130 #if XSubPPtmpAAAG
1131 #endif
1132 #if XSubPPtmpAAAH
1133 #endif
1134
1135     /* End of Initialisation Section */
1136
1137 #if (PERL_REVISION == 5 && PERL_VERSION >= 9)
1138   if (PL_unitcheckav)
1139        call_list(PL_scopestack_ix, PL_unitcheckav);
1140 #endif
1141     XSRETURN_YES;
1142 }
1143