2013-01-25 10:29:39 +08:00
|
|
|
//
|
|
|
|
// GCTestAppDelegate.h
|
|
|
|
// GCTest
|
|
|
|
//
|
|
|
|
// Created by Rohan Kuruvilla on 06/08/2012.
|
|
|
|
// Copyright __MyCompanyName__ 2012. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef _APP_DELEGATE_H_
|
|
|
|
#define _APP_DELEGATE_H_
|
|
|
|
|
|
|
|
#include "CCApplication.h"
|
|
|
|
/**
|
|
|
|
@brief The cocos2d Application.
|
|
|
|
|
|
|
|
The reason for implement as private inheritance is to hide some interface call by CCDirector.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
class AppDelegate : private cocos2d::CCApplication
|
|
|
|
{
|
|
|
|
public:
|
2013-04-18 08:24:59 +08:00
|
|
|
bool isRetina, isIPhone;
|
2013-04-10 06:29:35 +08:00
|
|
|
|
2013-01-25 10:29:39 +08:00
|
|
|
AppDelegate();
|
|
|
|
virtual ~AppDelegate();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief Implement CCDirector and CCScene init code here.
|
|
|
|
@return true Initialize success, app continue.
|
|
|
|
@return false Initialize failed, app terminate.
|
|
|
|
*/
|
|
|
|
virtual bool applicationDidFinishLaunching();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief The function be called when the application enter background
|
|
|
|
@param the pointer of the application
|
|
|
|
*/
|
|
|
|
virtual void applicationDidEnterBackground();
|
|
|
|
|
|
|
|
/**
|
|
|
|
@brief The function be called when the application enter foreground
|
|
|
|
@param the pointer of the application
|
|
|
|
*/
|
|
|
|
virtual void applicationWillEnterForeground();
|
2013-04-26 02:36:25 +08:00
|
|
|
void shit();
|
2013-01-25 10:29:39 +08:00
|
|
|
|
|
|
|
};
|
|
|
|
|
2013-04-18 08:24:59 +08:00
|
|
|
bool runMainScene();
|
2013-01-25 10:29:39 +08:00
|
|
|
void handle_ccb_run();
|
|
|
|
void handle_ccb_stop();
|
|
|
|
void handle_connected();
|
|
|
|
void handle_disconnected();
|
2013-04-10 06:29:35 +08:00
|
|
|
void handle_set_orient(bool isPortrait);
|
2013-04-26 02:36:25 +08:00
|
|
|
void handle_set_orient(float w, float h);
|
2013-04-18 08:24:59 +08:00
|
|
|
void handle_set_message(const char *msg);
|
|
|
|
void handle_set_status(const char *msg);
|
|
|
|
|
2013-01-25 10:29:39 +08:00
|
|
|
#endif // _APP_DELEGATE_H_
|
|
|
|
|