extras/physfs-swig.i
author Ryan C. Gordon <icculus@icculus.org>
Sat, 24 Sep 2011 00:55:15 -0700
changeset 1182 9ba19d71cc4a
parent 1124 6ef3d04af1c4
child 1242 1e6db80d2393
permissions -rw-r--r--
Put some include-once and extern "C" blocks in the extras' headers.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1030
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
/* Metadata to generate the scripting language bindings. Please ignore. */
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
%module physfs
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
%{
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
#include "physfs.h"
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
%}
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
1031
206114270422 Tightened the SWIG warning filter.
Ryan C. Gordon <icculus@icculus.org>
parents: 1030
diff changeset
     8
/* I _think_ this is safe for now. */
206114270422 Tightened the SWIG warning filter.
Ryan C. Gordon <icculus@icculus.org>
parents: 1030
diff changeset
     9
%warnfilter(451) PHYSFS_ArchiveInfo;
206114270422 Tightened the SWIG warning filter.
Ryan C. Gordon <icculus@icculus.org>
parents: 1030
diff changeset
    10
1030
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
%ignore _INCLUDE_PHYSFS_H_;  /* ignore the include-once blocker. */
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    12
%ignore PHYSFS_DECL;  /* ignore the export define. */
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    13
%ignore PHYSFS_CALL;  /* ignore the calling conventions define. */
1103
4e177d0dd61a Updated SWIG bindings.
Ryan C. Gordon <icculus@icculus.org>
parents: 1054
diff changeset
    14
%ignore PHYSFS_DEPRECATED;  /* ignore the deprecation define. */
1030
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    15
%ignore PHYSFS_file;  /* legacy type define. */
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    16
1032
ea6aaadcfa04 Initial work on Ruby bindings, barely started.
Ryan C. Gordon <icculus@icculus.org>
parents: 1031
diff changeset
    17
/* Some bindings put everything in a namespace, so we don't need PHYSFS_ */
ea6aaadcfa04 Initial work on Ruby bindings, barely started.
Ryan C. Gordon <icculus@icculus.org>
parents: 1031
diff changeset
    18
#if defined(SWIGPERL) || defined(SWIGRUBY)
1030
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    19
%rename(File) PHYSFS_File;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    20
%rename(Version) PHYSFS_Version;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    21
%rename(ArchiveInfo) PHYSFS_ArchiveInfo;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    22
%rename(getLinkedVersion) PHYSFS_getLinkedVersion;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    23
%rename(init) PHYSFS_init;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    24
%rename(deinit) PHYSFS_deinit;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
%rename(supportedArchiveTypes) PHYSFS_supportedArchiveTypes;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
%rename(freeList) PHYSFS_freeList;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
%rename(getLastError) PHYSFS_getLastError;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
%rename(getDirSeparator) PHYSFS_getDirSeparator;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
%rename(permitSymbolicLinks) PHYSFS_permitSymbolicLinks;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
%rename(getCdRomDirs) PHYSFS_getCdRomDirs;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    31
%rename(getBaseDir) PHYSFS_getBaseDir;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
%rename(getUserDir) PHYSFS_getUserDir;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
%rename(getWriteDir) PHYSFS_getWriteDir;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
%rename(setWriteDir) PHYSFS_setWriteDir;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    35
%rename(addToSearchPath) PHYSFS_addToSearchPath;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    36
%rename(removeFromSearchPath) PHYSFS_removeFromSearchPath;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    37
%rename(getSearchPath) PHYSFS_getSearchPath;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    38
%rename(setSaneConfig) PHYSFS_setSaneConfig;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    39
%rename(mkdir) PHYSFS_mkdir;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    40
%rename(delete) PHYSFS_delete;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    41
%rename(getRealDir) PHYSFS_getRealDir;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    42
%rename(enumerateFiles) PHYSFS_enumerateFiles;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    43
%rename(exists) PHYSFS_exists;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    44
%rename(isDirectory) PHYSFS_isDirectory;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    45
%rename(isSymbolicLink) PHYSFS_isSymbolicLink;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    46
%rename(getLastModTime) PHYSFS_getLastModTime;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    47
%rename(openWrite) PHYSFS_openWrite;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    48
%rename(openAppend) PHYSFS_openAppend;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    49
%rename(openRead) PHYSFS_openRead;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    50
%rename(close) PHYSFS_close;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
%rename(read) PHYSFS_read;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
%rename(write) PHYSFS_write;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
%rename(eof) PHYSFS_eof;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
%rename(tell) PHYSFS_tell;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
%rename(seek) PHYSFS_seek;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    56
%rename(fileLength) PHYSFS_fileLength;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    57
%rename(setBuffer) PHYSFS_setBuffer;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    58
%rename(flush) PHYSFS_flush;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    59
%rename(readSLE16) PHYSFS_readSLE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    60
%rename(readULE16) PHYSFS_readULE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    61
%rename(readSBE16) PHYSFS_readSBE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    62
%rename(readUBE16) PHYSFS_readUBE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    63
%rename(readSLE32) PHYSFS_readSLE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    64
%rename(readULE32) PHYSFS_readULE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    65
%rename(readSBE32) PHYSFS_readSBE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    66
%rename(readUBE32) PHYSFS_readUBE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    67
%rename(readSLE64) PHYSFS_readSLE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    68
%rename(readULE64) PHYSFS_readULE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    69
%rename(readSBE64) PHYSFS_readSBE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    70
%rename(readUBE64) PHYSFS_readUBE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    71
%rename(writeSLE16) PHYSFS_writeSLE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    72
%rename(writeULE16) PHYSFS_writeULE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    73
%rename(writeSBE16) PHYSFS_writeSBE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    74
%rename(writeUBE16) PHYSFS_writeUBE16;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    75
%rename(writeSLE32) PHYSFS_writeSLE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    76
%rename(writeULE32) PHYSFS_writeULE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    77
%rename(writeSBE32) PHYSFS_writeSBE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    78
%rename(writeUBE32) PHYSFS_writeUBE32;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    79
%rename(writeSLE64) PHYSFS_writeSLE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    80
%rename(writeULE64) PHYSFS_writeULE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    81
%rename(writeSBE64) PHYSFS_writeSBE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    82
%rename(writeUBE64) PHYSFS_writeUBE64;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    83
%rename(isInit) PHYSFS_isInit;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    84
%rename(symbolicLinksPermitted) PHYSFS_symbolicLinksPermitted;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    85
%rename(mount) PHYSFS_mount;
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    86
%rename(getMountPoint) PHYSFS_getMountPoint;
1054
57f4af811ffb THIS is Christoph's PHYSFS_stat() work.
Ryan C. Gordon <icculus@icculus.org>
parents: 1053
diff changeset
    87
%rename(Stat) PHYSFS_Stat;   /* !!! FIXME: case insensitive script languages? */
57f4af811ffb THIS is Christoph's PHYSFS_stat() work.
Ryan C. Gordon <icculus@icculus.org>
parents: 1053
diff changeset
    88
%rename(stat) PHYSFS_stat;
1103
4e177d0dd61a Updated SWIG bindings.
Ryan C. Gordon <icculus@icculus.org>
parents: 1054
diff changeset
    89
%rename(readBytes) PHYSFS_readBytes;
4e177d0dd61a Updated SWIG bindings.
Ryan C. Gordon <icculus@icculus.org>
parents: 1054
diff changeset
    90
%rename(writeBytes) PHYSFS_writeBytes;
1110
803e5e8a0ff8 Added PHYSFS_unmount(), deprecated addToSearchPath and removeFromSearchPath.
Ryan C. Gordon <icculus@icculus.org>
parents: 1103
diff changeset
    91
%rename(unmount) PHYSFS_unmount;
1124
6ef3d04af1c4 SWIG bindings update.
Ryan C. Gordon <icculus@icculus.org>
parents: 1110
diff changeset
    92
%rename(mountMemory) PHYSFS_mountMemory;
6ef3d04af1c4 SWIG bindings update.
Ryan C. Gordon <icculus@icculus.org>
parents: 1110
diff changeset
    93
%rename(mountHandle) PHYSFS_mountHandle;
1103
4e177d0dd61a Updated SWIG bindings.
Ryan C. Gordon <icculus@icculus.org>
parents: 1054
diff changeset
    94
#endif
1030
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
%include "../src/physfs.h"
17c521170ba6 Hooked up Perl bindings, via SWIG.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97