UnityForwardDecls.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206
  1. #pragma once
  2. #include <stdint.h>
  3. #ifdef __OBJC__
  4. @class UIScreen;
  5. @class UIWindow;
  6. @class UIView;
  7. @class UIViewController;
  8. @class UIEvent;
  9. @class UILocalNotification;
  10. @class NSString;
  11. @class NSDictionary;
  12. @class NSSet;
  13. @class NSData;
  14. @class NSError;
  15. @class NSBundle;
  16. @class UnityViewControllerBase;
  17. #else
  18. typedef struct objc_object UIScreen;
  19. typedef struct objc_object UIWindow;
  20. typedef struct objc_object UIView;
  21. typedef struct objc_object UIViewController;
  22. typedef struct objc_object UIEvent;
  23. typedef struct objc_object UILocalNotification;
  24. typedef struct objc_object NSString;
  25. typedef struct objc_object NSDictionary;
  26. typedef struct objc_object NSSet;
  27. typedef struct objc_object NSError;
  28. typedef struct objc_object NSData;
  29. typedef struct objc_object NSBundle;
  30. typedef struct objc_object UnityViewControllerBase;
  31. #endif
  32. // unity internal audio effect definition struct
  33. struct UnityAudioEffectDefinition;
  34. // new unity rendering api
  35. struct IUnityInterfaces;
  36. // be aware that this struct is shared with unity implementation so you should absolutely not change it
  37. struct UnityFrameStats
  38. {
  39. uint64_t fixedBehaviourManagerDt;
  40. uint64_t fixedPhysicsManagerDt;
  41. uint64_t dynamicBehaviourManagerDt;
  42. uint64_t coroutineDt;
  43. uint64_t skinMeshUpdateDt;
  44. uint64_t animationUpdateDt;
  45. uint64_t renderDt;
  46. uint64_t cullingDt;
  47. uint64_t clearDt;
  48. int fixedUpdateCount;
  49. int batchCount;
  50. uint64_t drawCallTime;
  51. int drawCallCount;
  52. int triCount;
  53. int vertCount;
  54. uint64_t dynamicBatchDt;
  55. int dynamicBatchCount;
  56. int dynamicBatchedDrawCallCount;
  57. int dynamicBatchedTris;
  58. int dynamicBatchedVerts;
  59. int staticBatchCount;
  60. int staticBatchedDrawCallCount;
  61. int staticBatchedTris;
  62. int staticBatchedVerts;
  63. };
  64. // be aware that this enum is shared with unity implementation so you should absolutely not change it
  65. typedef enum
  66. LogType
  67. {
  68. logError = 0,
  69. logAssert = 1,
  70. logWarning = 2,
  71. logLog = 3,
  72. logException = 4,
  73. logDebug = 5,
  74. }
  75. LogType;
  76. // be aware that this enum is shared with unity implementation so you should absolutely not change it
  77. typedef enum
  78. DeviceGeneration
  79. {
  80. deviceUnknown = 0,
  81. deviceiPhone3GS = 3,
  82. deviceiPhone4 = 8,
  83. deviceiPodTouch4Gen = 9,
  84. deviceiPad2Gen = 10,
  85. deviceiPhone4S = 11,
  86. deviceiPad3Gen = 12,
  87. deviceiPhone5 = 13,
  88. deviceiPodTouch5Gen = 14,
  89. deviceiPadMini1Gen = 15,
  90. deviceiPad4Gen = 16,
  91. deviceiPhone5C = 17,
  92. deviceiPhone5S = 18,
  93. deviceiPadAir1 = 19,
  94. deviceiPadMini2Gen = 20,
  95. deviceiPhone6 = 21,
  96. deviceiPhone6Plus = 22,
  97. deviceiPadMini3Gen = 23,
  98. deviceiPadAir2 = 24,
  99. deviceiPhone6S = 25,
  100. deviceiPhone6SPlus = 26,
  101. deviceiPadPro1Gen = 27,
  102. deviceiPadMini4Gen = 28,
  103. deviceiPhoneSE1Gen = 29,
  104. deviceiPadPro10Inch1Gen = 30,
  105. deviceiPhone7 = 31,
  106. deviceiPhone7Plus = 32,
  107. deviceiPodTouch6Gen = 33,
  108. deviceiPad5Gen = 34,
  109. deviceiPadPro2Gen = 35,
  110. deviceiPadPro10Inch2Gen = 36,
  111. deviceiPhone8 = 37,
  112. deviceiPhone8Plus = 38,
  113. deviceiPhoneX = 39,
  114. deviceiPhoneXS = 40,
  115. deviceiPhoneXSMax = 41,
  116. deviceiPhoneXR = 42,
  117. deviceiPadPro11Inch = 43,
  118. deviceiPadPro3Gen = 44,
  119. deviceiPhone11 = 48,
  120. deviceiPhone11Pro = 49,
  121. deviceiPhone11ProMax = 50,
  122. deviceiPhoneUnknown = 10001,
  123. deviceiPadUnknown = 10002,
  124. deviceiPodTouchUnknown = 10003,
  125. }
  126. DeviceGeneration;
  127. // be aware that this enum is shared with unity implementation so you should absolutely not change it
  128. typedef enum
  129. ScreenOrientation
  130. {
  131. orientationUnknown,
  132. portrait,
  133. portraitUpsideDown,
  134. landscapeLeft,
  135. landscapeRight,
  136. orientationCount,
  137. }
  138. ScreenOrientation;
  139. // this dictates touches processing on os level: should we transform touches to unity view coords or not.
  140. // N.B. touch.position will always be adjusted to current resolution
  141. // i.e. if you touch right border of view, touch.position.x will be Screen.width, not view.width
  142. // to get coords in view space (os-coords), use touch.rawPosition
  143. typedef enum
  144. ViewTouchProcessing
  145. {
  146. // the touches originated from view will be ignored by unity
  147. touchesIgnored = 0,
  148. // touches would be processed as if they were originated in unity view:
  149. // coords will be transformed from view coords to unity view coords
  150. touchesTransformedToUnityViewCoords = 1,
  151. // touches coords will be kept intact (in originated view coords)
  152. // it is default value
  153. touchesKeptInOriginalViewCoords = 2,
  154. }
  155. ViewTouchProcessing;
  156. // be aware that this enum is shared with unity implementation so you should absolutely not change it
  157. typedef enum
  158. KeyboardStatus
  159. {
  160. Visible = 0,
  161. Done = 1,
  162. Canceled = 2,
  163. LostFocus = 3,
  164. }
  165. KeyboardStatus;
  166. #ifdef __cplusplus
  167. extern bool _ios42orNewer;
  168. extern bool _ios43orNewer;
  169. extern bool _ios50orNewer;
  170. extern bool _ios60orNewer;
  171. extern bool _ios70orNewer;
  172. extern bool _ios80orNewer;
  173. extern bool _ios81orNewer;
  174. extern bool _ios82orNewer;
  175. extern bool _ios90orNewer;
  176. extern bool _ios91orNewer;
  177. extern bool _ios100orNewer;
  178. extern bool _ios101orNewer;
  179. extern bool _ios102orNewer;
  180. extern bool _ios103orNewer;
  181. extern bool _ios110orNewer;
  182. extern bool _ios111orNewer;
  183. extern bool _ios112orNewer;
  184. #endif