UnityViewControllerListener.h 1.7 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _TRAMPOLINE_PLUGINBASE_MAIN_VIEW_CONTROLLER_LISTENER_H_
  2. #define _TRAMPOLINE_PLUGINBASE_MAIN_VIEW_CONTROLLER_LISTENER_H_
  3. #import <Foundation/NSNotification.h>
  4. // view changes on the main view controller
  5. @protocol UnityViewControllerListener<NSObject>
  6. @optional
  7. - (void)viewWillLayoutSubviews:(NSNotification*)notification;
  8. - (void)viewDidLayoutSubviews:(NSNotification*)notification;
  9. - (void)viewWillDisappear:(NSNotification*)notification;
  10. - (void)viewDidDisappear:(NSNotification*)notification;
  11. - (void)viewWillAppear:(NSNotification*)notification;
  12. - (void)viewDidAppear:(NSNotification*)notification;
  13. - (void)interfaceWillChangeOrientation:(NSNotification*)notification;
  14. - (void)interfaceDidChangeOrientation:(NSNotification*)notification;
  15. @end
  16. void UnityRegisterViewControllerListener(id<UnityViewControllerListener> obj);
  17. void UnityUnregisterViewControllerListener(id<UnityViewControllerListener> obj);
  18. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewWillLayoutSubviews;
  19. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewDidLayoutSubviews;
  20. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewWillDisappear;
  21. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewDidDisappear;
  22. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewWillAppear;
  23. extern "C" __attribute__((visibility("default"))) NSString* const kUnityViewDidAppear;
  24. extern "C" __attribute__((visibility("default"))) NSString* const kUnityInterfaceWillChangeOrientation;
  25. extern "C" __attribute__((visibility("default"))) NSString* const kUnityInterfaceDidChangeOrientation;
  26. #endif // _TRAMPOLINE_PLUGINBASE_LIFECYCLELISTENER_H_