IPlatform.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using CommonUI.Gemo;
  3. using UnityEngine;
  4. using CommonLang.Concurrent;
  5. using MPQ.Updater;
  6. namespace CommonUI_Unity3D.Platform
  7. {
  8. public interface IUnityPlatform
  9. {
  10. void Assert(string msg);
  11. Texture2D SysFontTexture(
  12. string text,
  13. bool readable,
  14. CommonUI.Display.FontStyle style,
  15. int fontSize,
  16. uint fontColor,
  17. int borderTime,
  18. uint borderColor,
  19. Size2D expectSize,
  20. out int boundW,
  21. out int boundH);
  22. bool TestTextLineBreak(string text, float size, CommonUI.Display.FontStyle style,
  23. int borderTime,
  24. float testWidth,
  25. out float realWidth,
  26. out float realHeight);
  27. void CopyPixels(Texture2D src, int sx, int sy, int sw, int sh, Texture2D dst, int dx, int dy);
  28. long GetAvaliableSpace(string path);
  29. long GetTotalSpace(string path);
  30. bool NativeDecompressFile(MPQUpdater updater, MPQUpdater.RemoteFileInfo zip_file, MPQUpdater.RemoteFileInfo mpq_file, AtomicLong current_unzip_bytes);
  31. bool NativeDecompressMemory(ArraySegment<byte> src, ArraySegment<byte> dst);
  32. bool NativeGetFileMD5(string fullname, out string md5);
  33. }
  34. }