Merge pull request #3523 from samuele3hu/iss2433-lua-bindings-generator-new

Iss2433: Remoe some functions and files in cocos2dx-support
This commit is contained in:
minggo 2013-09-01 20:51:35 -07:00
commit bc01e44f06
15 changed files with 5 additions and 3898 deletions

View File

@ -1 +1 @@
dcaf07070ad651b671d721564b6d1aa99ea03d0b 133d6126f47c6e45740811d2f948de79ddb945fe

View File

@ -28,9 +28,6 @@
CCBReader* CCBProxy::createCCBReader() CCBReader* CCBProxy::createCCBReader()
{ {
NodeLoaderLibrary *ccNodeLoaderLibrary = NodeLoaderLibrary::getInstance(); NodeLoaderLibrary *ccNodeLoaderLibrary = NodeLoaderLibrary::getInstance();
ccNodeLoaderLibrary->registerNodeLoader("", CCBLayerLoader::loader());
CCBReader * pCCBReader = new CCBReader(ccNodeLoaderLibrary); CCBReader * pCCBReader = new CCBReader(ccNodeLoaderLibrary);
pCCBReader->autorelease(); pCCBReader->autorelease();

View File

@ -38,12 +38,10 @@ extern "C" {
#include "platform/ios/CCLuaObjcBridge.h" #include "platform/ios/CCLuaObjcBridge.h"
#endif #endif
#include "Lua_extensions_CCB.h"
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#include "Lua_web_socket.h" #include "Lua_web_socket.h"
#endif #endif
#include "LuaOpengl.h" #include "LuaOpengl.h"
#include "LuaScrollView.h"
#include "LuaScriptHandlerMgr.h" #include "LuaScriptHandlerMgr.h"
#include "lua_cocos2dx_auto.hpp" #include "lua_cocos2dx_auto.hpp"
#include "lua_cocos2dx_extension_auto.hpp" #include "lua_cocos2dx_extension_auto.hpp"
@ -118,7 +116,6 @@ bool LuaStack::init(void)
{ {
_state = lua_open(); _state = lua_open();
luaL_openlibs(_state); luaL_openlibs(_state);
// tolua_Cocos2d_open(_state);
toluafix_open(_state); toluafix_open(_state);
// Register our version of the global "print" function // Register our version of the global "print" function
@ -139,11 +136,10 @@ bool LuaStack::init(void)
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
LuaObjcBridge::luaopen_luaoc(_state); LuaObjcBridge::luaopen_luaoc(_state);
#endif #endif
// tolua_extensions_ccb_open(_state);
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
tolua_web_socket_open(_state); tolua_web_socket_open(_state);
#endif #endif
// tolua_scroll_view_open(_state);
tolua_script_handler_mgr_open(_state); tolua_script_handler_mgr_open(_state);
// add cocos2dx loader // add cocos2dx loader

View File

@ -16,7 +16,6 @@ extern "C" {
#include "CCLuaEngine.h" #include "CCLuaEngine.h"
#include "Lua_web_socket.h" #include "Lua_web_socket.h"
#include "LuaOpengl.h" #include "LuaOpengl.h"
#include "LuaScrollView.h"
using namespace cocos2d; using namespace cocos2d;
using namespace cocos2d::extension; using namespace cocos2d::extension;
@ -626,58 +625,6 @@ tolua_lerror:
#endif #endif
} }
int tolua_Cocos2d_ScrollView_registerScriptHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CCScrollView",0,&tolua_err) ||
!toluafix_isfunction(tolua_S,2,"LUA_FUNCTION",0,&tolua_err) ||
!tolua_isnumber(tolua_S,3,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,4,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
LuaScrollView* self = (LuaScrollView*) tolua_tousertype(tolua_S,1,0);
LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,2,0));
ScriptHandlerMgr::HandlerEventType handlerType = (ScriptHandlerMgr::HandlerEventType) ((int)tolua_tonumber(tolua_S,3,0) + ScriptHandlerMgr::kScrollViewScrollHandler);
ScriptHandlerMgr::getInstance()->addObjectHandler((void*)self, handler, handlerType);
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'registerScriptHandler'.",&tolua_err);
return 0;
#endif
}
int tolua_Cocos2d_ScrollView_unregisterScriptHandler00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertype(tolua_S,1,"CCScrollView",0,&tolua_err) ||
!tolua_isnumber(tolua_S,2,0,&tolua_err) ||
!tolua_isnoobj(tolua_S,3,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
LuaScrollView* self = (LuaScrollView*) tolua_tousertype(tolua_S,1,0);
ScriptHandlerMgr::HandlerEventType handlerType = (ScriptHandlerMgr::HandlerEventType) ((int)tolua_tonumber(tolua_S,2,0) + ScriptHandlerMgr::kScrollViewScrollHandler);
ScriptHandlerMgr::getInstance()->removeObjectHandler((void*)self, handlerType);
}
return 0;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'unregisterScriptHandler'.",&tolua_err);
return 0;
#endif
}
static void tolua_reg_script_handler_mgr_type(lua_State* tolua_S) static void tolua_reg_script_handler_mgr_type(lua_State* tolua_S)
{ {

File diff suppressed because it is too large Load Diff

View File

@ -1,29 +0,0 @@
#ifndef __LUA_SCROLLVIEW_H__
#define __LUA_SCROLLVIEW_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
#include "GUI/CCScrollView/CCScrollView.h"
class LuaScrollView:public cocos2d::extension::ScrollView,public cocos2d::extension::ScrollViewDelegate
{
public:
virtual ~LuaScrollView();
virtual void scrollViewDidScroll(ScrollView* view);
virtual void scrollViewDidZoom(ScrollView* view);
enum ScrollViewScriptHandlerType
{
kScrollViewScriptScroll = 0,
kScrollViewScriptZoom,
};
};
TOLUA_API int tolua_scroll_view_open(lua_State* tolua_S);
#endif //__LUA_SCROLLVIEW_H__

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
#ifndef __LUA_EXTENSIONS_CCB_H__
#define __LUA_EXTENSIONS_CCB_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "tolua++.h"
#ifdef __cplusplus
}
#endif
TOLUA_API int tolua_extensions_ccb_open(lua_State* tolua_S);
#endif //__LUA_CCB_H__

View File

@ -1 +1 @@
9b2a5b3fafa8e400f433eb3cd1875a43374df67e e70a68a07977b12b3f233641ac8d558e48c5517c

View File

@ -827,6 +827,8 @@ static int tolua_cocos2d_CCBAnimationManager_setCallFuncForLuaCallbackNamed(lua_
strKey = keyframeCallback; strKey = keyframeCallback;
} }
self->setCallFunc(pCallFunc, strKey); self->setCallFunc(pCallFunc, strKey);
return 0;
} }
CCLOG("'setCallFuncForLuaCallbackNamed' function of CCBAnimationManager has wrong number of arguments: %d, was expecting %d\n", argc, 1); CCLOG("'setCallFuncForLuaCallbackNamed' function of CCBAnimationManager has wrong number of arguments: %d, was expecting %d\n", argc, 1);

View File

@ -11,10 +11,8 @@ LOCAL_SRC_FILES := ../cocos2dx_support/CCLuaBridge.cpp \
../cocos2dx_support/CCLuaValue.cpp \ ../cocos2dx_support/CCLuaValue.cpp \
../cocos2dx_support/Cocos2dxLuaLoader.cpp \ ../cocos2dx_support/Cocos2dxLuaLoader.cpp \
../cocos2dx_support/CCBProxy.cpp \ ../cocos2dx_support/CCBProxy.cpp \
../cocos2dx_support/Lua_extensions_CCB.cpp \
../cocos2dx_support/Lua_web_socket.cpp \ ../cocos2dx_support/Lua_web_socket.cpp \
../cocos2dx_support/LuaOpengl.cpp \ ../cocos2dx_support/LuaOpengl.cpp \
../cocos2dx_support/LuaScrollView.cpp \
../cocos2dx_support/LuaScriptHandlerMgr.cpp \ ../cocos2dx_support/LuaScriptHandlerMgr.cpp \
../cocos2dx_support/LuaBasicConversions.cpp \ ../cocos2dx_support/LuaBasicConversions.cpp \
../../auto-generated/lua-bindings/lua_cocos2dx_auto.cpp \ ../../auto-generated/lua-bindings/lua_cocos2dx_auto.cpp \

View File

@ -47,9 +47,7 @@ SOURCES = ../lua/lapi.c \
../cocos2dx_support/CCLuaValue.cpp \ ../cocos2dx_support/CCLuaValue.cpp \
../cocos2dx_support/Cocos2dxLuaLoader.cpp \ ../cocos2dx_support/Cocos2dxLuaLoader.cpp \
../cocos2dx_support/CCBProxy.cpp \ ../cocos2dx_support/CCBProxy.cpp \
../cocos2dx_support/Lua_extensions_CCB.cpp \
../cocos2dx_support/LuaOpengl.cpp \ ../cocos2dx_support/LuaOpengl.cpp \
../cocos2dx_support/LuaScrollView.cpp \
../cocos2dx_support/LuaScriptHandlerMgr.cpp \ ../cocos2dx_support/LuaScriptHandlerMgr.cpp \
../cocos2dx_support/LuaBasicConversions.cpp \ ../cocos2dx_support/LuaBasicConversions.cpp \
../cocos2dx_support/lua_cocos2dx_manual.cpp \ ../cocos2dx_support/lua_cocos2dx_manual.cpp \

View File

@ -47,9 +47,7 @@ SOURCES = ../lua/lapi.c \
../cocos2dx_support/CCLuaValue.cpp \ ../cocos2dx_support/CCLuaValue.cpp \
../cocos2dx_support/Cocos2dxLuaLoader.cpp \ ../cocos2dx_support/Cocos2dxLuaLoader.cpp \
../cocos2dx_support/CCBProxy.cpp \ ../cocos2dx_support/CCBProxy.cpp \
../cocos2dx_support/Lua_extensions_CCB.cpp \
../cocos2dx_support/LuaOpengl.cpp \ ../cocos2dx_support/LuaOpengl.cpp \
../cocos2dx_support/LuaScrollView.cpp \
../cocos2dx_support/LuaScriptHandlerMgr.cpp \ ../cocos2dx_support/LuaScriptHandlerMgr.cpp \
../cocos2dx_support/LuaBasicConversions.cpp \ ../cocos2dx_support/LuaBasicConversions.cpp \
../cocos2dx_support/lua_cocos2dx_manual.cpp \ ../cocos2dx_support/lua_cocos2dx_manual.cpp \

View File

@ -133,11 +133,9 @@ xcopy /Y /Q "$(ProjectDir)..\luajit\win32\*.*" "$(OutDir)"</Command>
<ClCompile Include="..\cocos2dx_support\LuaBasicConversions.cpp" /> <ClCompile Include="..\cocos2dx_support\LuaBasicConversions.cpp" />
<ClCompile Include="..\cocos2dx_support\LuaOpengl.cpp" /> <ClCompile Include="..\cocos2dx_support\LuaOpengl.cpp" />
<ClCompile Include="..\cocos2dx_support\LuaScriptHandlerMgr.cpp" /> <ClCompile Include="..\cocos2dx_support\LuaScriptHandlerMgr.cpp" />
<ClCompile Include="..\cocos2dx_support\LuaScrollView.cpp" />
<ClCompile Include="..\cocos2dx_support\lua_cocos2dx_deprecated.cpp" /> <ClCompile Include="..\cocos2dx_support\lua_cocos2dx_deprecated.cpp" />
<ClCompile Include="..\cocos2dx_support\lua_cocos2dx_extension_manual.cpp" /> <ClCompile Include="..\cocos2dx_support\lua_cocos2dx_extension_manual.cpp" />
<ClCompile Include="..\cocos2dx_support\lua_cocos2dx_manual.cpp" /> <ClCompile Include="..\cocos2dx_support\lua_cocos2dx_manual.cpp" />
<ClCompile Include="..\cocos2dx_support\Lua_extensions_CCB.cpp" />
<ClCompile Include="..\cocos2dx_support\Lua_web_socket.cpp" /> <ClCompile Include="..\cocos2dx_support\Lua_web_socket.cpp" />
<ClCompile Include="..\cocos2dx_support\tolua_fix.c" /> <ClCompile Include="..\cocos2dx_support\tolua_fix.c" />
<ClCompile Include="..\tolua\tolua_event.c" /> <ClCompile Include="..\tolua\tolua_event.c" />
@ -158,11 +156,9 @@ xcopy /Y /Q "$(ProjectDir)..\luajit\win32\*.*" "$(OutDir)"</Command>
<ClInclude Include="..\cocos2dx_support\LuaBasicConversions.h" /> <ClInclude Include="..\cocos2dx_support\LuaBasicConversions.h" />
<ClInclude Include="..\cocos2dx_support\LuaOpengl.h" /> <ClInclude Include="..\cocos2dx_support\LuaOpengl.h" />
<ClInclude Include="..\cocos2dx_support\LuaScriptHandlerMgr.h" /> <ClInclude Include="..\cocos2dx_support\LuaScriptHandlerMgr.h" />
<ClInclude Include="..\cocos2dx_support\LuaScrollView.h" />
<ClInclude Include="..\cocos2dx_support\lua_cocos2dx_deprecated.h" /> <ClInclude Include="..\cocos2dx_support\lua_cocos2dx_deprecated.h" />
<ClInclude Include="..\cocos2dx_support\lua_cocos2dx_extension_manual.h" /> <ClInclude Include="..\cocos2dx_support\lua_cocos2dx_extension_manual.h" />
<ClInclude Include="..\cocos2dx_support\lua_cocos2dx_manual.hpp" /> <ClInclude Include="..\cocos2dx_support\lua_cocos2dx_manual.hpp" />
<ClInclude Include="..\cocos2dx_support\Lua_extensions_CCB.h" />
<ClInclude Include="..\cocos2dx_support\Lua_web_socket.h" /> <ClInclude Include="..\cocos2dx_support\Lua_web_socket.h" />
<ClInclude Include="..\cocos2dx_support\tolua_fix.h" /> <ClInclude Include="..\cocos2dx_support\tolua_fix.h" />
<ClInclude Include="..\luajit\include\lauxlib.h" /> <ClInclude Include="..\luajit\include\lauxlib.h" />

View File

@ -51,9 +51,6 @@
<ClCompile Include="..\cocos2dx_support\CCLuaValue.cpp"> <ClCompile Include="..\cocos2dx_support\CCLuaValue.cpp">
<Filter>cocos2dx_support</Filter> <Filter>cocos2dx_support</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\cocos2dx_support\Lua_extensions_CCB.cpp">
<Filter>cocos2dx_support</Filter>
</ClCompile>
<ClCompile Include="..\cocos2dx_support\CCBProxy.cpp"> <ClCompile Include="..\cocos2dx_support\CCBProxy.cpp">
<Filter>cocos2dx_support</Filter> <Filter>cocos2dx_support</Filter>
</ClCompile> </ClCompile>
@ -63,9 +60,6 @@
<ClCompile Include="..\cocos2dx_support\LuaOpengl.cpp"> <ClCompile Include="..\cocos2dx_support\LuaOpengl.cpp">
<Filter>cocos2dx_support</Filter> <Filter>cocos2dx_support</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\cocos2dx_support\LuaScrollView.cpp">
<Filter>cocos2dx_support</Filter>
</ClCompile>
<ClCompile Include="..\cocos2dx_support\LuaScriptHandlerMgr.cpp"> <ClCompile Include="..\cocos2dx_support\LuaScriptHandlerMgr.cpp">
<Filter>cocos2dx_support</Filter> <Filter>cocos2dx_support</Filter>
</ClCompile> </ClCompile>
@ -125,9 +119,6 @@
<ClInclude Include="..\luajit\include\lualib.h"> <ClInclude Include="..\luajit\include\lualib.h">
<Filter>luajit\include</Filter> <Filter>luajit\include</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\cocos2dx_support\Lua_extensions_CCB.h">
<Filter>cocos2dx_support</Filter>
</ClInclude>
<ClInclude Include="..\cocos2dx_support\CCBProxy.h"> <ClInclude Include="..\cocos2dx_support\CCBProxy.h">
<Filter>cocos2dx_support</Filter> <Filter>cocos2dx_support</Filter>
</ClInclude> </ClInclude>
@ -137,9 +128,6 @@
<ClInclude Include="..\cocos2dx_support\LuaOpengl.h"> <ClInclude Include="..\cocos2dx_support\LuaOpengl.h">
<Filter>cocos2dx_support</Filter> <Filter>cocos2dx_support</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\cocos2dx_support\LuaScrollView.h">
<Filter>cocos2dx_support</Filter>
</ClInclude>
<ClInclude Include="..\cocos2dx_support\LuaScriptHandlerMgr.h"> <ClInclude Include="..\cocos2dx_support\LuaScriptHandlerMgr.h">
<Filter>cocos2dx_support</Filter> <Filter>cocos2dx_support</Filter>
</ClInclude> </ClInclude>