2013-08-09 10:07:10 +08:00
|
|
|
#ifndef COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_GENERATED_LUA_COCOS2DX_MANUAL_H
|
|
|
|
#define COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_GENERATED_LUA_COCOS2DX_MANUAL_H
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
#include "tolua++.h"
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2013-12-22 22:10:21 +08:00
|
|
|
#include "cocos2d.h"
|
2013-12-23 11:19:55 +08:00
|
|
|
#include "LuaScriptHandlerMgr.h"
|
2013-12-22 22:10:21 +08:00
|
|
|
|
|
|
|
NS_CC_BEGIN
|
|
|
|
class LuaEventListenerCustom
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static EventListenerCustom* create(const std::string& eventName);
|
|
|
|
};
|
|
|
|
|
|
|
|
class LuaEventListenerAcceleration
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static EventListenerAcceleration* create();
|
|
|
|
};
|
|
|
|
NS_CC_END
|
|
|
|
|
|
|
|
USING_NS_CC;
|
|
|
|
|
|
|
|
TOLUA_API int register_all_cocos2dx_manual(lua_State* tolua_S);
|
|
|
|
|
|
|
|
TOLUA_API int register_cocos2dx_event_releated(lua_State* tolua_S);
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
struct LuaEventAccelerationData
|
2013-12-22 22:10:21 +08:00
|
|
|
{
|
|
|
|
void* acc;
|
|
|
|
Event* event;
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
LuaEventAccelerationData(void* inAcc,Event* inEvent)
|
2013-12-22 22:10:21 +08:00
|
|
|
:acc(inAcc),event(inEvent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
struct LuaEventKeyboarData
|
2013-12-22 22:10:21 +08:00
|
|
|
{
|
|
|
|
int keyCode;
|
|
|
|
Event* event;
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
LuaEventKeyboarData(int inKeyCode,Event* inEvent)
|
|
|
|
:keyCode(inKeyCode),event(inEvent)
|
2013-12-22 22:10:21 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
struct LuaEventTouchData
|
2013-12-22 22:10:21 +08:00
|
|
|
{
|
|
|
|
Touch* touch;
|
|
|
|
Event* event;
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
LuaEventTouchData(Touch* inTouch, Event* inEvent)
|
|
|
|
:touch(inTouch),
|
2013-12-22 22:10:21 +08:00
|
|
|
event(inEvent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
struct LuaEventTouchesData
|
2013-12-22 22:10:21 +08:00
|
|
|
{
|
|
|
|
std::vector<Touch*> touches;
|
|
|
|
Event* event;
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
LuaEventTouchesData(std::vector<Touch*> inTouches, Event* inEvent)
|
|
|
|
:touches(inTouches),
|
2013-12-22 22:10:21 +08:00
|
|
|
event(inEvent)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
struct LuaEventMouseData
|
2013-12-22 22:10:21 +08:00
|
|
|
{
|
|
|
|
Event* event;
|
|
|
|
|
2013-12-27 10:35:44 +08:00
|
|
|
LuaEventMouseData(Event* inEvent)
|
|
|
|
:event(inEvent)
|
2013-12-22 22:10:21 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
};
|
2013-08-09 10:07:10 +08:00
|
|
|
|
|
|
|
#endif // #ifndef COCOS2DX_SCRIPT_LUA_COCOS2DX_SUPPORT_GENERATED_LUA_COCOS2DX_MANUAL_H
|