1 // IOFunctions.cs created with MonoDevelop
2 // User: alan at 14:43 20/10/2008
4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers
8 using System
.Runtime
.InteropServices
;
12 // this matches a native 'enum', don't modify
20 internal delegate IntPtr
OpenFileFunc (IntPtr opaque
, string filename
, int mode
);
22 internal delegate /* ulong */ IntPtr
ReadFileFunc (IntPtr opaque
, IntPtr stream
, IntPtr buffer
, /* ulong */ IntPtr size
);
23 internal delegate /* ulong */ IntPtr
WriteFileFunc (IntPtr opaque
, IntPtr stream
, IntPtr buffer
, /* ulong */ IntPtr size
);
25 internal delegate /* long */ IntPtr
TellFileFunc (IntPtr opaque
, IntPtr stream
);
26 internal delegate /* long */ IntPtr
SeekFileFunc (IntPtr opaque
, IntPtr stream
, /* ulong */ IntPtr offset
, int origin
);
28 internal delegate int CloseFileFunc (IntPtr opaque
, IntPtr stream
);
29 internal delegate int TestErrorFileFunc (IntPtr opaque
, IntPtr stream
);
31 [StructLayout (LayoutKind
.Sequential
)]
32 internal struct ZlibFileFuncDef
34 [MarshalAs (UnmanagedType
.FunctionPtr
)] public OpenFileFunc zopen_file
;
35 [MarshalAs (UnmanagedType
.FunctionPtr
)] public ReadFileFunc zread_file
;
36 [MarshalAs (UnmanagedType
.FunctionPtr
)] public WriteFileFunc zwrite_file
;
37 [MarshalAs (UnmanagedType
.FunctionPtr
)] public TellFileFunc ztell_file
;
38 [MarshalAs (UnmanagedType
.FunctionPtr
)] public SeekFileFunc zseek_file
;
39 [MarshalAs (UnmanagedType
.FunctionPtr
)] public CloseFileFunc zclose_file
;
40 [MarshalAs (UnmanagedType
.FunctionPtr
)] public TestErrorFileFunc zerror_file
;
41 [MarshalAs (UnmanagedType
.FunctionPtr
)] public IntPtr opaque
;