DynamicLibEngineAPI-functions.h 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  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. // CrashReporter.mm
  15. UnityExternCall(void, CrashedCheckBelowForHintsWhy);
  16. UnityExternCall(const decltype(_mh_execute_header)*, UnityGetExecuteMachHeader);
  17. // iPhone_Sensors.mm
  18. UnityExternCall(void, UnityInitJoysticks);
  19. UnityExternCall(void, UnityCoreMotionStart);
  20. UnityExternCall(void, UnityCoreMotionStop);
  21. UnityExternCall(void, UnityUpdateAccelerometerData);
  22. UnityExternCall(int, UnityIsGyroEnabled, int);
  23. UnityExternCall(int, UnityIsGyroAvailable);
  24. UnityExternCall(void, UnityUpdateGyroData);
  25. UnityExternCall(void, UnitySetGyroUpdateInterval, int, float);
  26. UnityExternCall(float, UnityGetGyroUpdateInterval, int);
  27. UnityExternCall(void, UnityUpdateJoystickData);
  28. UnityExternCall(NSArray*, UnityGetJoystickNames);
  29. UnityExternCall(void, UnityGetJoystickAxisName, int, int, char*, int);
  30. UnityExternCall(void, UnityGetNiceKeyname, int, char*, int);
  31. UnityExternCall(bool, IsCompensatingSensors);
  32. UnityExternCall(void, SetCompensatingSensors, bool);
  33. UnityExternCall(int, UnityMaxQueuedAccelerationEvents);
  34. // UnityAppController.mm
  35. UnityExternCall(UIViewController*, UnityGetGLViewController);
  36. UnityExternCall(UIView*, UnityGetGLView);
  37. UnityExternCall(UIWindow*, UnityGetMainWindow);
  38. UnityExternCall(void, UnityRequestQuit);
  39. UnityExternCall(void, UnityDestroyDisplayLink);
  40. UnityExternCall(void, UnityCleanupTrampoline);
  41. // UnityAppController+Rendering.mm
  42. UnityExternCall(void, UnityInitMainScreenRenderingCallback);
  43. UnityExternCall(void, UnityGfxInitedCallback);
  44. UnityExternCall(void, UnityPresentContextCallback, UnityFrameStats const*);
  45. UnityExternCall(void, UnityFramerateChangeCallback, int);
  46. UnityExternCall(int, UnitySelectedRenderingAPI);
  47. UnityExternCall(NSBundle*, UnityGetMetalBundle);
  48. UnityExternCall(MTLDeviceRef, UnityGetMetalDevice);
  49. UnityExternCall(MTLCommandQueueRef, UnityGetMetalCommandQueue);
  50. UnityExternCall(MTLCommandQueueRef, UnityGetMetalDrawableCommandQueue);
  51. UnityExternCall(EAGLContext*, UnityGetDataContextEAGL);
  52. UnityExternCall(RenderSurfaceBase*, UnityBackbufferColor);
  53. UnityExternCall(RenderSurfaceBase*, UnityBackbufferDepth);
  54. UnityExternCall(void, DisplayManagerEndFrameRendering);
  55. UnityExternCall(void, UnityPrepareScreenshot);
  56. // Unity/MetalHelper.mm
  57. UnityExternCall(MTLTextureRef, AcquireDrawableMTL, UnityDisplaySurfaceMTL*);
  58. UnityExternCall(int, UnityCommandQueueMaxCommandBufferCountMTL);
  59. // EAGLContextHelper.mm
  60. UnityExternCall(void, UnityMakeCurrentContextEAGL, EAGLContext*);
  61. UnityExternCall(EAGLContext*, UnityGetCurrentContextEAGL);
  62. // UI/ActivityIndicator.mm
  63. UnityExternCall(void, UnityStartActivityIndicator);
  64. UnityExternCall(void, UnityStopActivityIndicator);
  65. // UI/Keyboard.mm
  66. UnityExternCall(void, UnityKeyboard_Create, unsigned, int, int , int , int , const char*, const char*, int);
  67. UnityExternCall(void, UnityKeyboard_Show);
  68. UnityExternCall(void, UnityKeyboard_Hide);
  69. UnityExternCall(void, UnityKeyboard_GetRect, float*, float*, float*, float*);
  70. UnityExternCall(void, UnityKeyboard_SetText, const char*);
  71. UnityExternCall(NSString*, UnityKeyboard_GetText);
  72. UnityExternCall(int, UnityKeyboard_IsActive);
  73. UnityExternCall(int, UnityKeyboard_Status);
  74. UnityExternCall(void, UnityKeyboard_SetInputHidden, int);
  75. UnityExternCall(int, UnityKeyboard_IsInputHidden);
  76. UnityExternCall(void, UnityKeyboard_SetCharacterLimit, unsigned);
  77. UnityExternCall(int, UnityKeyboard_CanGetSelection);
  78. UnityExternCall(void, UnityKeyboard_GetSelection, int*, int*);
  79. UnityExternCall(int, UnityKeyboard_CanSetSelection);
  80. UnityExternCall(void, UnityKeyboard_SetSelection, int, int);
  81. // UI/UnityViewControllerBase.mm
  82. UnityExternCall(void, UnityNotifyHideHomeButtonChange);
  83. UnityExternCall(void, UnityNotifyDeferSystemGesturesChange);
  84. // UI/StoreReview.m
  85. #if PLATFORM_IOS
  86. UnityExternCall(bool, UnityRequestStoreReview);
  87. #endif
  88. // Unity/AVCapture.mm
  89. UnityExternCall(int, UnityGetAVCapturePermission, int);
  90. UnityExternCall(void, UnityRequestAVCapturePermission, int);
  91. // Unity/CameraCapture.mm
  92. typedef void(*UnityEnumVideoCaptureDevicesCallback)(void* udata, const char* name, int frontFacing, int autoFocusPointSupported, int kind, const int* resolutions, int resCount);
  93. UnityExternCall(void, UnityEnumVideoCaptureDevices, void*, UnityEnumVideoCaptureDevicesCallback);
  94. UnityExternCall(void*, UnityInitCameraCapture, int, int, int, int, int, void*);
  95. UnityExternCall(void, UnityStartCameraCapture, void*);
  96. UnityExternCall(void, UnityPauseCameraCapture, void*);
  97. UnityExternCall(void, UnityStopCameraCapture, void*);
  98. UnityExternCall(void, UnityCameraCaptureExtents, void*, int*, int*);
  99. UnityExternCall(void, UnityCameraCaptureReadToMemory, void*, void*, int, int);
  100. UnityExternCall(int, UnityCameraCaptureVideoRotationDeg, void*);
  101. UnityExternCall(int, UnityCameraCaptureVerticallyMirrored, void*);
  102. UnityExternCall(int, UnityCameraCaptureSetAutoFocusPoint, void*, float, float);
  103. // Unity/DeviceSettings.mm
  104. UnityExternCall(const char*, UnityDeviceUniqueIdentifier);
  105. UnityExternCall(const char*, UnityVendorIdentifier);
  106. UnityExternCall(const char*, UnityAdvertisingIdentifier);
  107. UnityExternCall(int, UnityAdvertisingTrackingEnabled);
  108. UnityExternCall(const char*, UnityDeviceName);
  109. UnityExternCall(const char*, UnitySystemName);
  110. UnityExternCall(const char*, UnitySystemVersion);
  111. UnityExternCall(const char*, UnityDeviceModel);
  112. UnityExternCall(int, UnityDeviceCPUCount);
  113. UnityExternCall(int, UnityGetPhysicalMemory);
  114. UnityExternCall(int, UnityDeviceGeneration);
  115. UnityExternCall(int, ParseDeviceGeneration);
  116. UnityExternCall(int, UnityDeviceSupportsUpsideDown);
  117. UnityExternCall(int, UnityDeviceSupportedOrientations);
  118. UnityExternCall(int, UnityDeviceIsStylusTouchSupported);
  119. UnityExternCall(int, UnityDeviceCanShowWideColor);
  120. UnityExternCall(float, UnityDeviceDPI);
  121. UnityExternCall(const char*, UnitySystemLanguage);
  122. UnityExternCall(int, UnityGetLowPowerModeEnabled);
  123. UnityExternCall(int, UnityGetWantsSoftwareDimming);
  124. UnityExternCall(void, UnitySetWantsSoftwareDimming, int);
  125. // Unity/DisplayManager.mm
  126. UnityExternCall(EAGLContext*, UnityGetMainScreenContextGLES);
  127. UnityExternCall(EAGLContext*, UnityGetContextEAGL);
  128. UnityExternCall(void, UnityStartFrameRendering);
  129. UnityExternCall(void, UnityDestroyUnityRenderSurfaces);
  130. UnityExternCall(int, UnityMainScreenRefreshRate);
  131. UnityExternCall(void, UnitySetBrightness, float);
  132. UnityExternCall(float, UnityGetBrightness);
  133. #if SUPPORT_MULTIPLE_DISPLAYS || PLATFORM_IOS
  134. UnityExternCall(int, UnityDisplayManager_DisplayCount);
  135. UnityExternCall(void, UnityDisplayManager_DisplayRenderingResolution, void*, int*, int*);
  136. UnityExternCall(int, UnityDisplayManager_PrimaryDisplayIndex);
  137. UnityExternCall(bool, UnityDisplayManager_DisplayActive, void*);
  138. UnityExternCall(void, UnityDisplayManager_DisplayRenderingBuffers, void*, RenderSurfaceBase**, RenderSurfaceBase**);
  139. UnityExternCall(void, UnityDisplayManager_SetRenderingResolution, void*, int, int);
  140. UnityExternCall(void, UnityDisplayManager_DisplaySystemResolution, void*, int*, int*);
  141. #endif
  142. // Unity/Filesystem.mm
  143. UnityExternCall(const char*, UnityDataBundleDir);
  144. UnityExternCall(void, UnitySetDataBundleDirWithBundleId, const char*);
  145. UnityExternCall(const char*, UnityDocumentsDir);
  146. UnityExternCall(const char*, UnityLibraryDir);
  147. UnityExternCall(const char*, UnityCachesDir);
  148. UnityExternCall(int, UnityUpdateNoBackupFlag, const char*, int);
  149. // iPhoneMisc.mm
  150. UnityExternCall(const char* const*, UnityFontFallbacks);
  151. // Unity/WWWConnection.mm
  152. UnityExternCall(void*, UnityCreateWebRequestBackend, void*, const char*, const void*, const char*);
  153. UnityExternCall(void, UnitySendWebRequest, void*, unsigned, unsigned long, bool);
  154. UnityExternCall(void, UnityDestroyWebRequestBackend, void*);
  155. UnityExternCall(void, UnityCancelWebRequest, const void*);
  156. UnityExternCall(bool, UnityWebRequestIsDone, void*);
  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);
  222. UnityExternCall(void, RegisterStaticallyLinkedModulesGranular);
  223. UnityExternCall(NSArray<NSString*>*, GetLaunchImageNames, UIUserInterfaceIdiom, const OrientationMask&, const CGSize&, ScreenOrientation, float);