CCEventType.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /****************************************************************************
  2. Copyright (c) 2013-2016 Chukong Technologies Inc.
  3. Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
  4. http://www.cocos2d-x.org
  5. Permission is hereby granted, free of charge, to any person obtaining a copy
  6. of this software and associated documentation files (the "Software"), to deal
  7. in the Software without restriction, including without limitation the rights
  8. to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  9. copies of the Software, and to permit persons to whom the Software is
  10. furnished to do so, subject to the following conditions:
  11. The above copyright notice and this permission notice shall be included in
  12. all copies or substantial portions of the Software.
  13. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  14. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  15. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  16. AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  17. LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  18. OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  19. THE SOFTWARE.
  20. ****************************************************************************/
  21. #ifndef __CCEVENT_TYPE_H__
  22. #define __CCEVENT_TYPE_H__
  23. /// @cond DO_NOT_SHOW
  24. /**
  25. * This header is used for defining event types using in NotificationCenter
  26. */
  27. // The application will come to foreground.
  28. // This message is posted in cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp.
  29. #define EVENT_COME_TO_FOREGROUND "event_come_to_foreground"
  30. // The renderer[android:GLSurfaceView.Renderer WP8:Cocos2dRenderer] was recreated.
  31. // This message is used for reloading resources before renderer is recreated on Android/WP8.
  32. // This message is posted in cocos/platform/android/javaactivity.cpp and cocos\platform\wp8-xaml\cpp\Cocos2dRenderer.cpp.
  33. #define EVENT_RENDERER_RECREATED "event_renderer_recreated"
  34. // The application will come to background.
  35. // This message is used for doing something before coming to background, such as save RenderTexture.
  36. // This message is posted in cocos/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp and cocos\platform\wp8-xaml\cpp\Cocos2dRenderer.cpp.
  37. #define EVENT_COME_TO_BACKGROUND "event_come_to_background"
  38. /// @endcond
  39. #endif // __CCEVENT_TYPE_H__