1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
using System;
using System.Runtime.InteropServices;
namespace MyGUI.Sharp
{
public partial class Platform
{
#region Platform
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr ExportPlatform_Create([MarshalAs(UnmanagedType.LPStr)] string _logFileName);
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr ExportPlatform_Destroy();
public static void CreatePlatform(string _logFileName)
{
ExportPlatform_Create(_logFileName);
}
public static void DestroyPlatform()
{
ExportPlatform_Destroy();
}
#endregion
#region Platform Log
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
private static extern void ExportPlatform_Log(
[MarshalAs(UnmanagedType.I4)] LogLevel _level,
[MarshalAs(UnmanagedType.LPStr)] string _message
);
public static void Log(LogLevel _level, string _message)
{
ExportPlatform_Log(_level, _message);
}
#endregion
#region Gui
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr ExportGui_Create([MarshalAs(UnmanagedType.LPStr)] string _coreFileName);
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr ExportGui_Destroy();
public static void CreateGui(string _coreFileName)
{
ExportGui_Create(_coreFileName);
}
public static void DestroyGui()
{
ExportGui_Destroy();
}
#endregion
#region DataManager
[DllImport(DllName.m_dllName, CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr ExportDataManager_AddResourceLocation([MarshalAs(UnmanagedType.LPStr)] string _logFileName, [MarshalAs(UnmanagedType.U1)] bool _recursive);
public static void AddResourceLocation(string _path, bool _recursive)
{
ExportDataManager_AddResourceLocation(_path, _recursive);
}
#endregion
}
}
|