DynamicLibEngineAPI-functions.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252
  1. // ? TODO: Pavell merge with TrampolineInterface.h to have singe source of truth for a function definitions
  2. UnityExternCall(bool, UnityiOS81orNewer);
  3. UnityExternCall(bool, UnityiOS82orNewer);
  4. UnityExternCall(bool, UnityiOS90orNewer);
  5. UnityExternCall(bool, UnityiOS91orNewer);
  6. UnityExternCall(bool, UnityiOS100orNewer);
  7. UnityExternCall(bool, UnityiOS101orNewer);
  8. UnityExternCall(bool, UnityiOS102orNewer);
  9. UnityExternCall(bool, UnityiOS103orNewer);
  10. UnityExternCall(bool, UnityiOS110orNewer);
  11. UnityExternCall(bool, UnityiOS111orNewer);
  12. UnityExternCall(bool, UnityiOS112orNewer);
  13. UnityExternCall(bool, UnityiOS130orNewer);
  14. UnityExternCall(bool, UnityiOS140orNewer);
  15. // CrashReporter.mm
  16. UnityExternCall(void, CrashedCheckBelowForHintsWhy);
  17. UnityExternCall(const decltype(_mh_execute_header)*, UnityGetExecuteMachHeader);
  18. // iPhone_Sensors.mm
  19. UnityExternCall(void, UnityInitJoysticks);
  20. UnityExternCall(void, UnityCoreMotionStart);
  21. UnityExternCall(void, UnityCoreMotionStop);
  22. UnityExternCall(void, UnityUpdateAccelerometerData);
  23. UnityExternCall(int, UnityIsGyroEnabled, int);
  24. UnityExternCall(int, UnityIsGyroAvailable);
  25. UnityExternCall(void, UnityUpdateGyroData);
  26. UnityExternCall(void, UnitySetGyroUpdateInterval, int, float);
  27. UnityExternCall(float, UnityGetGyroUpdateInterval, int);
  28. UnityExternCall(void, UnityUpdateJoystickData);
  29. UnityExternCall(NSArray*, UnityGetJoystickNames);
  30. UnityExternCall(void, UnityGetJoystickAxisName, int, int, char*, int);
  31. UnityExternCall(void, UnityGetNiceKeyname, int, char*, int);
  32. UnityExternCall(bool, IsCompensatingSensors);
  33. UnityExternCall(void, SetCompensatingSensors, bool);
  34. UnityExternCall(int, UnityMaxQueuedAccelerationEvents);
  35. // UnityAppController.mm
  36. UnityExternCall(UIViewController*, UnityGetGLViewController);
  37. UnityExternCall(UnityView*, UnityGetUnityView);
  38. UnityExternCall(UIView*, UnityGetGLView);
  39. UnityExternCall(UIWindow*, UnityGetMainWindow);
  40. UnityExternCall(void, UnityRequestQuit);
  41. UnityExternCall(void, UnityDestroyDisplayLink);
  42. UnityExternCall(void, UnityCleanupTrampoline);
  43. // UnityAppController+Rendering.mm
  44. UnityExternCall(void, UnityGfxInitedCallback);
  45. UnityExternCall(void, UnityPresentContextCallback, UnityFrameStats const*);
  46. UnityExternCall(void, UnityFramerateChangeCallback, int);
  47. UnityExternCall(int, UnitySelectedRenderingAPI);
  48. UnityExternCall(NSBundle*, UnityGetMetalBundle);
  49. UnityExternCall(MTLDeviceRef, UnityGetMetalDevice);
  50. UnityExternCall(MTLCommandQueueRef, UnityGetMetalCommandQueue);
  51. UnityExternCall(RenderSurfaceBase*, UnityBackbufferColor);
  52. UnityExternCall(RenderSurfaceBase*, UnityBackbufferDepth);
  53. UnityExternCall(void, DisplayManagerEndFrameRendering);
  54. UnityExternCall(void, UnityPrepareScreenshot);
  55. // Unity/MetalHelper.mm
  56. UnityExternCall(MTLTextureRef, AcquireDrawableMTL, UnityDisplaySurfaceMTL*);
  57. UnityExternCall(int, UnityCommandQueueMaxCommandBufferCountMTL);
  58. UnityExternCall(void, SetDrawableSizeMTL, UnityDisplaySurfaceMTL*, int, int);
  59. // UI/ActivityIndicator.mm
  60. UnityExternCall(void, UnityStartActivityIndicator);
  61. UnityExternCall(void, UnityStopActivityIndicator);
  62. // UI/Keyboard.mm
  63. UnityExternCall(void, UnityKeyboard_Create, unsigned, int, int , int , int , const char*, const char*, int);
  64. UnityExternCall(void, UnityKeyboard_Show);
  65. UnityExternCall(void, UnityKeyboard_Hide);
  66. UnityExternCall(void, UnityKeyboard_GetRect, float*, float*, float*, float*);
  67. UnityExternCall(void, UnityKeyboard_SetText, const char*);
  68. UnityExternCall(NSString*, UnityKeyboard_GetText);
  69. UnityExternCall(int, UnityKeyboard_IsActive);
  70. UnityExternCall(int, UnityKeyboard_Status);
  71. UnityExternCall(void, UnityKeyboard_SetInputHidden, int);
  72. UnityExternCall(int, UnityKeyboard_IsInputHidden);
  73. UnityExternCall(void, UnityKeyboard_SetCharacterLimit, unsigned);
  74. UnityExternCall(int, UnityKeyboard_CanGetSelection);
  75. UnityExternCall(void, UnityKeyboard_GetSelection, int*, int*);
  76. UnityExternCall(int, UnityKeyboard_CanSetSelection);
  77. UnityExternCall(void, UnityKeyboard_SetSelection, int, int);
  78. // UI/UnityViewControllerBase.mm
  79. UnityExternCall(void, UnityNotifyHideHomeButtonChange);
  80. UnityExternCall(void, UnityNotifyDeferSystemGesturesChange);
  81. // UI/StoreReview.m
  82. #if PLATFORM_IOS || PLATFORM_VISIONOS
  83. UnityExternCall(bool, UnityRequestStoreReview);
  84. #endif
  85. // Unity/AVCapture.mm
  86. UnityExternCall(int, UnityGetAVCapturePermission, int);
  87. UnityExternCall(void, UnityRequestAVCapturePermission, int, void*);
  88. // Unity/CameraCapture.mm
  89. typedef void(*UnityEnumVideoCaptureDevicesCallback)(void* udata, const char* name, int frontFacing, int autoFocusPointSupported, int kind, const int* resolutions, int resCount);
  90. UnityExternCall(void, UnityEnumVideoCaptureDevices, void*, UnityEnumVideoCaptureDevicesCallback);
  91. UnityExternCall(void*, UnityInitCameraCapture, int, int, int, int, int, void*);
  92. UnityExternCall(void, UnityStartCameraCapture, void*);
  93. UnityExternCall(void, UnityPauseCameraCapture, void*);
  94. UnityExternCall(void, UnityStopCameraCapture, void*);
  95. UnityExternCall(void, UnityCameraCaptureExtents, void*, int*, int*);
  96. UnityExternCall(void, UnityCameraCaptureReadToMemory, void*, void*, int, int);
  97. UnityExternCall(int, UnityCameraCaptureVideoRotationDeg, void*);
  98. UnityExternCall(int, UnityCameraCaptureVerticallyMirrored, void*);
  99. UnityExternCall(int, UnityCameraCaptureSetAutoFocusPoint, void*, float, float);
  100. // Unity/DeviceSettings.mm
  101. UnityExternCall(const char*, UnityDeviceUniqueIdentifier);
  102. UnityExternCall(const char*, UnityVendorIdentifier);
  103. UnityExternCall(const char*, UnityAdIdentifier);
  104. UnityExternCall(int, UnityAdTrackingEnabled);
  105. UnityExternCall(const char*, UnityDeviceName);
  106. UnityExternCall(const char*, UnitySystemName);
  107. UnityExternCall(const char*, UnitySystemVersion);
  108. UnityExternCall(const char*, UnityDeviceModel);
  109. UnityExternCall(int, UnityDeviceCPUCount);
  110. UnityExternCall(int, UnityGetPhysicalMemory);
  111. UnityExternCall(int, UnityDeviceGeneration);
  112. UnityExternCall(int, ParseDeviceGeneration);
  113. UnityExternCall(int, UnityDeviceSupportsUpsideDown);
  114. UnityExternCall(int, UnityDeviceSupportedOrientations);
  115. UnityExternCall(int, UnityDeviceIsForceTouchSupported);
  116. UnityExternCall(int, UnityDeviceIsStylusTouchSupported);
  117. UnityExternCall(int, UnityDeviceCanShowWideColor);
  118. UnityExternCall(float, UnityDeviceDPI);
  119. UnityExternCall(const char*, UnitySystemLanguage);
  120. UnityExternCall(int, UnityGetLowPowerModeEnabled);
  121. UnityExternCall(int, UnityGetWantsSoftwareDimming);
  122. UnityExternCall(void, UnitySetWantsSoftwareDimming, int);
  123. UnityExternCall(int, UnityGetIosAppOnMac);
  124. // Unity/DisplayManager.mm
  125. UnityExternCall(void, UnityActivateScreenForRendering, void*);
  126. UnityExternCall(void, UnityStartFrameRendering);
  127. UnityExternCall(void, UnityDestroyUnityRenderSurfaces);
  128. UnityExternCall(int, UnityMainScreenRefreshRate);
  129. UnityExternCall(void, UnitySetBrightness, float);
  130. UnityExternCall(float, UnityGetBrightness);
  131. UnityExternCall(bool, UnityIsFullscreen);
  132. #if SUPPORT_MULTIPLE_DISPLAYS || PLATFORM_IOS || PLATFORM_VISIONOS
  133. UnityExternCall(int, UnityDisplayManager_DisplayCount);
  134. UnityExternCall(void, UnityDisplayManager_DisplayRenderingResolution, void*, int*, int*);
  135. UnityExternCall(int, UnityDisplayManager_PrimaryDisplayIndex);
  136. UnityExternCall(bool, UnityDisplayManager_DisplayActive, void*);
  137. UnityExternCall(void, UnityDisplayManager_DisplayRenderingBuffers, void*, RenderSurfaceBase**, RenderSurfaceBase**);
  138. UnityExternCall(void, UnityDisplayManager_SetRenderingResolution, void*, int, int);
  139. UnityExternCall(void, UnityDisplayManager_DisplaySystemResolution, void*, int*, int*);
  140. #endif
  141. // Unity/Filesystem.mm
  142. UnityExternCall(const char*, UnityDataBundleDir);
  143. UnityExternCall(void, UnitySetDataBundleDirWithBundleId, const char*);
  144. UnityExternCall(const char*, UnityDocumentsDir);
  145. UnityExternCall(const char*, UnityLibraryDir);
  146. UnityExternCall(const char*, UnityCachesDir);
  147. UnityExternCall(int, UnityUpdateNoBackupFlag, const char*, int);
  148. // iPhoneMisc.mm
  149. UnityExternCall(const char* const*, UnityFontFallbacks);
  150. // Unity/WWWConnection.mm
  151. UnityExternCall(void, UnityCreateWebRequestBackend, void**, void*, const char*, const void*, const char*);
  152. UnityExternCall(void, UnitySendWebRequest, void* const*, unsigned, unsigned long, bool);
  153. UnityExternCall(void, UnityDestroyWebRequestBackend, void**);
  154. UnityExternCall(void, UnityCancelWebRequest, void* const*);
  155. UnityExternCall(void, UnityWebRequestCleanupSession);
  156. UnityExternCall(bool, UnityWebRequestIsDone, void* const*);
  157. UnityExternCall(void, UnityWebRequestClearCookieCache, const char*);
  158. // Unity/FullScreenVideoPlayer.mm
  159. UnityExternCall(void, UnityPlayFullScreenVideo, const char*, const float*, unsigned, unsigned);
  160. UnityExternCall(int, UnityIsFullScreenPlaying);
  161. // Unity/OnDemandResources.mm
  162. struct OnDemandResourcesRequestData;
  163. typedef void (*OnDemandResourcesRequestCompleteHandler)(void* handlerData, const char* error);
  164. UnityExternCall(OnDemandResourcesRequestData*, UnityOnDemandResourcesCreateRequest, NSSet*, OnDemandResourcesRequestCompleteHandler, void*);
  165. UnityExternCall(void, UnityOnDemandResourcesRelease, OnDemandResourcesRequestData*);
  166. UnityExternCall(float, UnityOnDemandResourcesGetProgress, OnDemandResourcesRequestData*);
  167. UnityExternCall(float, UnityOnDemandResourcesGetLoadingPriority, OnDemandResourcesRequestData*);
  168. UnityExternCall(void, UnityOnDemandResourcesSetLoadingPriority, OnDemandResourcesRequestData*, float);
  169. UnityExternCall(NSString*, UnityOnDemandResourcesGetResourcePath, OnDemandResourcesRequestData*, const char*);
  170. // Unity/UnityReplayKit.mm
  171. UnityExternCall(int, UnityReplayKitAPIAvailable);
  172. UnityExternCall(int, UnityReplayKitRecordingAvailable);
  173. UnityExternCall(const char*, UnityReplayKitLastError);
  174. UnityExternCall(int, UnityReplayKitStartRecording);
  175. UnityExternCall(int, UnityReplayKitIsRecording);
  176. UnityExternCall(int, UnityReplayKitStopRecording);
  177. UnityExternCall(int, UnityReplayKitDiscard);
  178. UnityExternCall(int, UnityReplayKitPreview);
  179. UnityExternCall(int, UnityReplayKitIsPreviewControllerActive);
  180. UnityExternCall(int, UnityReplayKitBroadcastingAPIAvailable);
  181. UnityExternCall(void, UnityReplayKitStartBroadcasting, void*);
  182. UnityExternCall(void, UnityReplayKitStopBroadcasting);
  183. UnityExternCall(void, UnityReplayKitPauseBroadcasting);
  184. UnityExternCall(void, UnityReplayKitResumeBroadcasting);
  185. UnityExternCall(int, UnityReplayKitIsBroadcasting);
  186. UnityExternCall(int, UnityReplayKitIsBroadcastingPaused);
  187. UnityExternCall(const char*, UnityReplayKitGetBroadcastURL);
  188. UnityExternCall(int, UnityReplayKitIsCameraEnabled);
  189. UnityExternCall(int, UnityReplayKitSetCameraEnabled, bool);
  190. UnityExternCall(int, UnityReplayKitIsMicrophoneEnabled);
  191. UnityExternCall(int, UnityReplayKitSetMicrophoneEnabled, bool);
  192. UnityExternCall(int, UnityReplayKitShowCameraPreviewAt, float, float, float, float);
  193. UnityExternCall(void, UnityReplayKitHideCameraPreview);
  194. UnityExternCall(void, UnityReplayKitCreateOverlayWindow);
  195. // LocationService static members to extern c
  196. //UnityExternCall4StaticMember(void, LocationService, SetDistanceFilter,float);
  197. UnityExternCall4StaticMember(void, LocationService, SetDesiredAccuracy, float);
  198. UnityExternCall4StaticMember(float, LocationService, GetDesiredAccuracy);
  199. UnityExternCall4StaticMember(void, LocationService, SetDistanceFilter, float);
  200. UnityExternCall4StaticMember(float, LocationService, GetDistanceFilter);
  201. UnityExternCall4StaticMember(bool, LocationService, IsServiceEnabledByUser);
  202. UnityExternCall4StaticMember(void, LocationService, StartUpdatingLocation);
  203. UnityExternCall4StaticMember(void, LocationService, StopUpdatingLocation);
  204. UnityExternCall4StaticMember(void, LocationService, SetHeadingUpdatesEnabled, bool);
  205. UnityExternCall4StaticMember(bool, LocationService, IsHeadingUpdatesEnabled);
  206. UnityExternCall4StaticMember(LocationServiceStatus, LocationService, GetLocationStatus);
  207. UnityExternCall4StaticMember(LocationServiceStatus, LocationService, GetHeadingStatus);
  208. UnityExternCall4StaticMember(bool, LocationService, IsHeadingAvailable);
  209. //Apple TV Remote
  210. #if PLATFORM_TVOS
  211. UnityExternCall(int, UnityGetAppleTVRemoteAllowExitToMenu);
  212. UnityExternCall(void, UnitySetAppleTVRemoteAllowExitToMenu, int);
  213. UnityExternCall(int, UnityGetAppleTVRemoteAllowRotation);
  214. UnityExternCall(void, UnitySetAppleTVRemoteAllowRotation, int);
  215. UnityExternCall(int, UnityGetAppleTVRemoteReportAbsoluteDpadValues);
  216. UnityExternCall(void, UnitySetAppleTVRemoteReportAbsoluteDpadValues, int);
  217. UnityExternCall(int, UnityGetAppleTVRemoteTouchesEnabled);
  218. UnityExternCall(void, UnitySetAppleTVRemoteTouchesEnabled, int);
  219. #endif
  220. // misc not in trampoline
  221. UnityExternCall(bool, Unity_il2cppNoExceptions);