UnityFramework.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #import <UIKit/UIKit.h>
  2. #import <Foundation/Foundation.h>
  3. #import "UnityAppController.h"
  4. #include "UndefinePlatforms.h"
  5. #include <mach-o/ldsyms.h>
  6. typedef struct
  7. #ifdef __LP64__
  8. mach_header_64
  9. #else
  10. mach_header
  11. #endif
  12. MachHeader;
  13. #include "RedefinePlatforms.h"
  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