2010-11-13 11:34:49 +08:00
|
|
|
/****************************************************************************
|
2014-01-07 11:25:07 +08:00
|
|
|
Copyright (c) 2010-2012 cocos2d-x.org
|
2017-02-14 14:36:57 +08:00
|
|
|
Copyright (c) 2013-2017 Chukong Technologies Inc.
|
2014-01-07 11:25:07 +08:00
|
|
|
|
2010-11-13 11:34:49 +08:00
|
|
|
http://www.cocos2d-x.org
|
2014-01-07 11:25:07 +08:00
|
|
|
|
2010-11-13 11:34:49 +08:00
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
|
|
in the Software without restriction, including without limitation the rights
|
|
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
|
|
furnished to do so, subject to the following conditions:
|
2014-01-07 11:25:07 +08:00
|
|
|
|
2010-11-13 11:34:49 +08:00
|
|
|
The above copyright notice and this permission notice shall be included in
|
|
|
|
all copies or substantial portions of the Software.
|
2014-01-07 11:25:07 +08:00
|
|
|
|
2010-11-13 11:34:49 +08:00
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
THE SOFTWARE.
|
|
|
|
****************************************************************************/
|
2014-05-17 05:36:00 +08:00
|
|
|
|
2014-09-10 08:17:07 +08:00
|
|
|
#include "platform/CCPlatformConfig.h"
|
2014-05-17 05:36:00 +08:00
|
|
|
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
|
|
|
|
2010-11-12 17:16:15 +08:00
|
|
|
#import <Foundation/Foundation.h>
|
|
|
|
|
2013-06-21 08:46:22 +08:00
|
|
|
@interface CCDirectorCaller : NSObject {
|
2011-01-21 17:33:15 +08:00
|
|
|
id displayLink;
|
|
|
|
int interval;
|
2016-02-13 16:17:55 +08:00
|
|
|
BOOL isAppActive;
|
2017-05-23 08:46:13 +08:00
|
|
|
CFTimeInterval lastDisplayTime;
|
2010-11-12 17:16:15 +08:00
|
|
|
}
|
2011-01-21 17:33:15 +08:00
|
|
|
@property (readwrite) int interval;
|
2010-11-12 17:16:15 +08:00
|
|
|
-(void) startMainLoop;
|
2014-05-28 15:19:07 +08:00
|
|
|
-(void) stopMainLoop;
|
2010-11-12 17:16:15 +08:00
|
|
|
-(void) doCaller: (id) sender;
|
2011-01-10 15:13:30 +08:00
|
|
|
-(void) setAnimationInterval:(double)interval;
|
2010-11-12 17:16:15 +08:00
|
|
|
+(id) sharedDirectorCaller;
|
|
|
|
+(void) destroy;
|
|
|
|
@end
|
2014-05-17 05:36:00 +08:00
|
|
|
|
|
|
|
#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS
|
|
|
|
|