]> gitweb @ CieloNegro.org - bindings-audiofile.git/blob - Bindings/AudioFile/VFS.hsc
af_vfs.h
[bindings-audiofile.git] / Bindings / AudioFile / VFS.hsc
1 #include <bindings.dsl.h>
2 #include <audiofile.h>
3 #include <af_vfs.h>
4
5 module Bindings.AudioFile.VFS where
6 #strict_import
7 import System.Posix.Types
8
9 #starttype struct _AFvirtualfile
10 #  field read   , FunPtr (<AFvirtualfile> -> Ptr () -> CSize -> IO CSsize)
11 #  field length , FunPtr (<AFvirtualfile> -> IO CLong)
12 #  field write  , FunPtr (<AFvirtualfile> -> Ptr () -> CSize -> IO CSsize)
13 #  field destroy, FunPtr (<AFvirtualfile> -> IO ())
14 #  field seek   , FunPtr (<AFvirtualfile> -> CLong -> CInt -> IO CLong)
15 #  field tell   , FunPtr (<AFvirtualfile> -> IO CLong)
16 #  field closure, Ptr ()
17 #stoptype
18 #synonym_t AFvirtualfile, <_AFvirtualfile>
19
20 #ccall af_virtual_file_new         , IO (Ptr <AFvirtualfile>)
21 #ccall af_virtual_file_new_for_file, Ptr CFile -> IO (Ptr <AFvirtualfile>)
22 #ccall af_virtual_file_destroy     , Ptr <AFvirtualfile> -> IO ()
23
24 #ccall af_fread  , Ptr () -> CSize -> CSize -> Ptr <AFvirtualfile> -> IO CSize
25 #ccall af_fwrite , Ptr () -> CSize -> CSize -> Ptr <AFvirtualfile> -> IO CSize
26 #ccall af_fclose , Ptr <AFvirtualfile> -> IO CInt
27 #ccall af_flength, Ptr <AFvirtualfile> -> IO CLong
28 #ccall af_fseek  , Ptr <AFvirtualfile> -> CLong -> CInt -> IO CInt
29 #ccall af_ftell  , Ptr <AFvirtualfile> -> IO CLong