暂无描述
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

UnityFramework.h 2.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #import <UIKit/UIKit.h>
  2. #import <Foundation/Foundation.h>
  3. #import <UnityFramework/UnityAppController.h>
  4. // this is coming from mach-o/ldsyms.h
  5. // we were including this header header here directly
  6. // alas we were including <mach-o/ldsyms.h> directly in UnityFramework.h (for mach_header definition)
  7. // instead of doing forward declaration and using, say, void pointers in unity c-interface
  8. // and this resulted in code in the wild that uses _mh_execute_header directly without this include
  9. // now, with C++/ObjC++ modules support we end up in a funny situation,
  10. // where we need to include UndefinePlatforms/RedefinePlatforms quoted which gives a warning
  11. // thankfully, we can easily provide the definition of _mh_execute_header ourselves
  12. typedef struct mach_header_64 MachHeader;
  13. extern const struct mach_header_64 _mh_execute_header;
  14. //! Project version number for UnityFramework.
  15. FOUNDATION_EXPORT double UnityFrameworkVersionNumber;
  16. //! Project version string for UnityFramework.
  17. FOUNDATION_EXPORT const unsigned char UnityFrameworkVersionString[];
  18. // In this header, you should import all the public headers of your framework using statements like #import <UnityFramework/PublicHeader.h>
  19. #pragma once
  20. // important app life-cycle events
  21. __attribute__ ((visibility("default")))
  22. @protocol UnityFrameworkListener<NSObject>
  23. @optional
  24. - (void)unityDidUnload:(NSNotification*)notification;
  25. - (void)unityDidQuit:(NSNotification*)notification;
  26. @end
  27. __attribute__ ((visibility("default")))
  28. @interface UnityFramework : NSObject
  29. {
  30. }
  31. - (UnityAppController*)appController;
  32. + (UnityFramework*)getInstance;
  33. - (void)setDataBundleId:(const char*)bundleId;
  34. - (void)runUIApplicationMainWithArgc:(int)argc argv:(char*[])argv;
  35. - (void)runEmbeddedWithArgc:(int)argc argv:(char*[])argv appLaunchOpts:(NSDictionary*)appLaunchOpts;
  36. - (void)unloadApplication;
  37. - (void)quitApplication:(int)exitCode;
  38. - (void)registerFrameworkListener:(id<UnityFrameworkListener>)obj;
  39. - (void)unregisterFrameworkListener:(id<UnityFrameworkListener>)obj;
  40. - (void)showUnityWindow;
  41. - (void)pause:(bool)pause;
  42. - (void)setExecuteHeader:(const MachHeader*)header;
  43. - (void)sendMessageToGOWithName:(const char*)goName functionName:(const char*)name message:(const char*)msg;
  44. @end