|
|
@ -48,112 +48,112 @@ public partial class SystemModule: CallbackHandler<SystemModule> |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
private delegate void SysPrintCallback(IntPtr target, |
|
|
|
|
|
|
|
|
private delegate void SysPrintCallback(IntPtr context, |
|
|
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(QuakeTextMarshaler))] string message); |
|
|
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(QuakeTextMarshaler))] string message); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysPrintCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysPrintCallback))] |
|
|
private static void Callback_SysPrint(IntPtr target, string message) |
|
|
|
|
|
|
|
|
private static void Callback_SysPrint(IntPtr context, string message) |
|
|
{ |
|
|
{ |
|
|
GetSelf(target).Print(message); |
|
|
|
|
|
|
|
|
GetSelf(context).Print(message); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
private delegate void SysErrorCallback(IntPtr target, |
|
|
|
|
|
|
|
|
private delegate void SysErrorCallback(IntPtr context, |
|
|
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(QuakeTextMarshaler))] string message); |
|
|
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(QuakeTextMarshaler))] string message); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysErrorCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysErrorCallback))] |
|
|
private static void Callback_SysError(IntPtr target, string message) |
|
|
|
|
|
|
|
|
private static void Callback_SysError(IntPtr context, string message) |
|
|
{ |
|
|
{ |
|
|
GetSelf(target).Error(message); |
|
|
|
|
|
|
|
|
GetSelf(context).Error(message); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
private delegate void SysQuitCallback(IntPtr target); |
|
|
|
|
|
|
|
|
private delegate void SysQuitCallback(IntPtr context); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysQuitCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysQuitCallback))] |
|
|
private static void Callback_SysQuit(IntPtr target) |
|
|
|
|
|
|
|
|
private static void Callback_SysQuit(IntPtr context) |
|
|
{ |
|
|
{ |
|
|
GetSelf(target).Quit(); |
|
|
|
|
|
|
|
|
GetSelf(context).Quit(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
private delegate double SysDoubleTimeCallback(IntPtr target); |
|
|
|
|
|
|
|
|
private delegate double SysDoubleTimeCallback(IntPtr context); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysDoubleTimeCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysDoubleTimeCallback))] |
|
|
private static double Callback_SysDoubleTime(IntPtr target) |
|
|
|
|
|
|
|
|
private static double Callback_SysDoubleTime(IntPtr context) |
|
|
{ |
|
|
{ |
|
|
return GetSelf(target).DoubleTime(); |
|
|
|
|
|
|
|
|
return GetSelf(context).DoubleTime(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
private delegate int SysFileOpenReadCallback(IntPtr target, [MarshalAs(UnmanagedType.LPStr)] string path, out int handle); |
|
|
|
|
|
|
|
|
private delegate int SysFileOpenReadCallback(IntPtr context, [MarshalAs(UnmanagedType.LPStr)] string path, out int handle); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysFileOpenReadCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysFileOpenReadCallback))] |
|
|
private static int Callback_SysFileOpenRead(IntPtr target, string path, out int handle) |
|
|
|
|
|
|
|
|
private static int Callback_SysFileOpenRead(IntPtr context, string path, out int handle) |
|
|
{ |
|
|
{ |
|
|
return GetSelf(target).FileOpenRead(path, out handle); |
|
|
|
|
|
|
|
|
return GetSelf(context).FileOpenRead(path, out handle); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
private delegate int SysFileOpenWriteCallback(IntPtr target, [MarshalAs(UnmanagedType.LPStr)] string path); |
|
|
|
|
|
|
|
|
private delegate int SysFileOpenWriteCallback(IntPtr context, [MarshalAs(UnmanagedType.LPStr)] string path); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysFileOpenWriteCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysFileOpenWriteCallback))] |
|
|
private static int Callback_SysFileOpenWrite(IntPtr target, string path) |
|
|
|
|
|
|
|
|
private static int Callback_SysFileOpenWrite(IntPtr context, string path) |
|
|
{ |
|
|
{ |
|
|
return GetSelf(target).FileOpenWrite(path); |
|
|
|
|
|
|
|
|
return GetSelf(context).FileOpenWrite(path); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
private delegate void SysFileCloseCallback(IntPtr target, int handle); |
|
|
|
|
|
|
|
|
private delegate void SysFileCloseCallback(IntPtr context, int handle); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysFileCloseCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysFileCloseCallback))] |
|
|
private static void Callback_SysFileClose(IntPtr target, int handle) |
|
|
|
|
|
|
|
|
private static void Callback_SysFileClose(IntPtr context, int handle) |
|
|
{ |
|
|
{ |
|
|
GetSelf(target).FileClose(handle); |
|
|
|
|
|
|
|
|
GetSelf(context).FileClose(handle); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
private delegate void SysFileSeekCallback(IntPtr target, int handle, int position); |
|
|
|
|
|
|
|
|
private delegate void SysFileSeekCallback(IntPtr context, int handle, int position); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysFileSeekCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysFileSeekCallback))] |
|
|
private static void Callback_SysFileSeek(IntPtr target, int handle, int position) |
|
|
|
|
|
|
|
|
private static void Callback_SysFileSeek(IntPtr context, int handle, int position) |
|
|
{ |
|
|
{ |
|
|
GetSelf(target).FileSeek(handle, position); |
|
|
|
|
|
|
|
|
GetSelf(context).FileSeek(handle, position); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
private delegate int SysFileReadCallback(IntPtr target, int handle, IntPtr dest, int count); |
|
|
|
|
|
|
|
|
private delegate int SysFileReadCallback(IntPtr context, int handle, IntPtr dest, int count); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysFileReadCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysFileReadCallback))] |
|
|
private static int Callback_SysFileRead(IntPtr target, int handle, IntPtr dest, int count) |
|
|
|
|
|
|
|
|
private static int Callback_SysFileRead(IntPtr context, int handle, IntPtr dest, int count) |
|
|
{ |
|
|
{ |
|
|
return GetSelf(target).FileRead(handle, dest, count); |
|
|
|
|
|
|
|
|
return GetSelf(context).FileRead(handle, dest, count); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl)] |
|
|
private delegate int SysFileWriteCallback(IntPtr target, int handle, IntPtr data, int count); |
|
|
|
|
|
|
|
|
private delegate int SysFileWriteCallback(IntPtr context, int handle, IntPtr data, int count); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysFileWriteCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysFileWriteCallback))] |
|
|
private static int Callback_SysFileWrite(IntPtr target, int handle, IntPtr data, int count) |
|
|
|
|
|
|
|
|
private static int Callback_SysFileWrite(IntPtr context, int handle, IntPtr data, int count) |
|
|
{ |
|
|
{ |
|
|
return GetSelf(target).FileWrite(handle, data, count); |
|
|
|
|
|
|
|
|
return GetSelf(context).FileWrite(handle, data, count); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
private delegate int SysFileTimeCallback(IntPtr target, [MarshalAs(UnmanagedType.LPStr)] string path); |
|
|
|
|
|
|
|
|
private delegate int SysFileTimeCallback(IntPtr context, [MarshalAs(UnmanagedType.LPStr)] string path); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysFileTimeCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysFileTimeCallback))] |
|
|
private static int Callback_SysFileTime(IntPtr target, string path) |
|
|
|
|
|
|
|
|
private static int Callback_SysFileTime(IntPtr context, string path) |
|
|
{ |
|
|
{ |
|
|
return GetSelf(target).FileTime(path); |
|
|
|
|
|
|
|
|
return GetSelf(context).FileTime(path); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
[UnmanagedFunctionPointer(CallingConvention.Cdecl, CharSet = CharSet.Ansi)] |
|
|
private delegate bool SysMkDirCallback(IntPtr target, [MarshalAs(UnmanagedType.LPStr)] string path); |
|
|
|
|
|
|
|
|
private delegate bool SysMkDirCallback(IntPtr context, [MarshalAs(UnmanagedType.LPStr)] string path); |
|
|
|
|
|
|
|
|
[MonoPInvokeCallback(typeof(SysMkDirCallback))] |
|
|
[MonoPInvokeCallback(typeof(SysMkDirCallback))] |
|
|
private static bool Callback_SysMkDir(IntPtr target, string path) |
|
|
|
|
|
|
|
|
private static bool Callback_SysMkDir(IntPtr context, string path) |
|
|
{ |
|
|
{ |
|
|
return GetSelf(target).MkDir(path); |
|
|
|
|
|
|
|
|
return GetSelf(context).MkDir(path); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |