From: John L. <jr...@us...> - 2006-12-17 07:47:47
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv28504/wxLua/apps/wxluacan/src Modified Files: wxluacan.cpp wxluacan.h wxluacan_bind.cpp Log Message: separate out the wxluatag arrays and use pointer in WXLUAMETHOD Index: wxluacan.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxluacan.cpp 13 Dec 2006 00:27:55 -0000 1.16 --- wxluacan.cpp 17 Dec 2006 07:47:14 -0000 1.17 *************** *** 27,30 **** --- 27,31 ---- int s_wxluatag_wxlCanObj = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // wxlCanObj( double x = 0, double y = 0 ) static int LUACALL wxLua_wxlCanObj_constructor(lua_State *L) *************** *** 46,49 **** --- 47,51 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_SetPos[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // void SetPos( double x, double y ) static int LUACALL wxLua_wxlCanObj_SetPos(lua_State *L) *************** *** 62,65 **** --- 64,68 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_GetX[] = { 0 }; // double GetX() static int LUACALL wxLua_wxlCanObj_GetX(lua_State *L) *************** *** 77,80 **** --- 80,84 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_GetY[] = { 0 }; // double GetY() static int LUACALL wxLua_wxlCanObj_GetY(lua_State *L) *************** *** 92,95 **** --- 96,100 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_SetPending[] = { &s_wxluaarg_Boolean, 0 }; // void SetPending( bool pending = true ) static int LUACALL wxLua_wxlCanObj_SetPending(lua_State *L) *************** *** 108,111 **** --- 113,117 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_AddObject[] = { &s_wxluatag_wxlCanObj, 0 }; // void AddObject( wxlCanObj *canobj ) static int LUACALL wxLua_wxlCanObj_AddObject(lua_State *L) *************** *** 129,132 **** --- 135,139 ---- #if wxLUA_USE_wxColourPenBrush + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_SetPen[] = { &s_wxluatag_wxPen, 0 }; // void SetPen( const wxPen& pen ) static int LUACALL wxLua_wxlCanObj_SetPen(lua_State *L) *************** *** 143,146 **** --- 150,154 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObj_SetBrush[] = { &s_wxluatag_wxBrush, 0 }; // void SetBrush( const wxBrush& brush ) static int LUACALL wxLua_wxlCanObj_SetBrush(lua_State *L) *************** *** 165,179 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObj_methods[] = { ! { LuaConstructor, "wxlCanObj", wxLua_wxlCanObj_constructor, 2, 0, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, ! { LuaMethod, "SetPos", wxLua_wxlCanObj_SetPos, 2, 2, { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, ! { LuaMethod, "GetX", wxLua_wxlCanObj_GetX, 0, 0, { 0 } }, ! { LuaMethod, "GetY", wxLua_wxlCanObj_GetY, 0, 0, { 0 } }, ! { LuaMethod, "SetPending", wxLua_wxlCanObj_SetPending, 1, 0, { &s_wxluaarg_Boolean, 0 } }, ! { LuaMethod, "AddObject", wxLua_wxlCanObj_AddObject, 1, 1, { &s_wxluatag_wxlCanObj, 0 } }, ! { LuaDelete, "wxlCanObj", wxLua_wxlCanObj_destructor, 0, 0, {0} }, #if wxLUA_USE_wxColourPenBrush ! { LuaMethod, "SetPen", wxLua_wxlCanObj_SetPen, 1, 1, { &s_wxluatag_wxPen, 0 } }, ! { LuaMethod, "SetBrush", wxLua_wxlCanObj_SetBrush, 1, 1, { &s_wxluatag_wxBrush, 0 } }, #endif // wxLUA_USE_wxColourPenBrush --- 173,187 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObj_methods[] = { ! { LuaConstructor, "wxlCanObj", wxLua_wxlCanObj_constructor, 2, 0, s_wxluatagArray_wxLua_wxlCanObj_constructor }, ! { LuaMethod, "SetPos", wxLua_wxlCanObj_SetPos, 2, 2, s_wxluatagArray_wxLua_wxlCanObj_SetPos }, ! { LuaMethod, "GetX", wxLua_wxlCanObj_GetX, 0, 0, s_wxluatagArray_wxLua_wxlCanObj_GetX }, ! { LuaMethod, "GetY", wxLua_wxlCanObj_GetY, 0, 0, s_wxluatagArray_wxLua_wxlCanObj_GetY }, ! { LuaMethod, "SetPending", wxLua_wxlCanObj_SetPending, 1, 0, s_wxluatagArray_wxLua_wxlCanObj_SetPending }, ! { LuaMethod, "AddObject", wxLua_wxlCanObj_AddObject, 1, 1, s_wxluatagArray_wxLua_wxlCanObj_AddObject }, ! { LuaDelete, "wxlCanObj", wxLua_wxlCanObj_destructor, 0, 0, s_wxluaargArray_None }, #if wxLUA_USE_wxColourPenBrush ! { LuaMethod, "SetPen", wxLua_wxlCanObj_SetPen, 1, 1, s_wxluatagArray_wxLua_wxlCanObj_SetPen }, ! { LuaMethod, "SetBrush", wxLua_wxlCanObj_SetBrush, 1, 1, s_wxluatagArray_wxLua_wxlCanObj_SetBrush }, #endif // wxLUA_USE_wxColourPenBrush *************** *** 189,192 **** --- 197,201 ---- int s_wxluatag_wxlCanObjRect = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObjRect_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // wxlCanObjRect( double x, double y, double w, double h ) static int LUACALL wxLua_wxlCanObjRect_constructor(lua_State *L) *************** *** 221,226 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjRect_methods[] = { ! { LuaConstructor, "wxlCanObjRect", wxLua_wxlCanObjRect_constructor, 4, 4, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, ! { LuaDelete, "wxlCanObjRect", wxLua_wxlCanObjRect_destructor, 0, 0, {0} }, }; --- 230,235 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjRect_methods[] = { ! { LuaConstructor, "wxlCanObjRect", wxLua_wxlCanObjRect_constructor, 4, 4, s_wxluatagArray_wxLua_wxlCanObjRect_constructor }, ! { LuaDelete, "wxlCanObjRect", wxLua_wxlCanObjRect_destructor, 0, 0, s_wxluaargArray_None }, }; *************** *** 234,237 **** --- 243,247 ---- int s_wxluatag_wxlCanObjCircle = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObjCircle_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // wxlCanObjCircle( double x, double y, double r ) static int LUACALL wxLua_wxlCanObjCircle_constructor(lua_State *L) *************** *** 264,269 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjCircle_methods[] = { ! { LuaConstructor, "wxlCanObjCircle", wxLua_wxlCanObjCircle_constructor, 3, 3, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, ! { LuaDelete, "wxlCanObjCircle", wxLua_wxlCanObjCircle_destructor, 0, 0, {0} }, }; --- 274,279 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjCircle_methods[] = { ! { LuaConstructor, "wxlCanObjCircle", wxLua_wxlCanObjCircle_constructor, 3, 3, s_wxluatagArray_wxLua_wxlCanObjCircle_constructor }, ! { LuaDelete, "wxlCanObjCircle", wxLua_wxlCanObjCircle_destructor, 0, 0, s_wxluaargArray_None }, }; *************** *** 277,280 **** --- 287,291 ---- int s_wxluatag_wxlCanObjScript = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObjScript_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_String, 0 }; // wxlCanObjScript( double x, double y, const wxString& name ) static int LUACALL wxLua_wxlCanObjScript_constructor(lua_State *L) *************** *** 307,312 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjScript_methods[] = { ! { LuaConstructor, "wxlCanObjScript", wxLua_wxlCanObjScript_constructor, 3, 3, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, ! { LuaDelete, "wxlCanObjScript", wxLua_wxlCanObjScript_destructor, 0, 0, {0} }, }; --- 318,323 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjScript_methods[] = { ! { LuaConstructor, "wxlCanObjScript", wxLua_wxlCanObjScript_constructor, 3, 3, s_wxluatagArray_wxLua_wxlCanObjScript_constructor }, ! { LuaDelete, "wxlCanObjScript", wxLua_wxlCanObjScript_destructor, 0, 0, s_wxluaargArray_None }, }; *************** *** 320,323 **** --- 331,335 ---- int s_wxluatag_wxlCanObjAddScript = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObjAddScript_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_String, 0 }; // wxlCanObjAddScript( double x, double y, const wxString& script ) static int LUACALL wxLua_wxlCanObjAddScript_constructor(lua_State *L) *************** *** 339,342 **** --- 351,355 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCanObjAddScript_SetScript[] = { &s_wxluaarg_String, 0 }; // void SetScript( const wxString& script ) static int LUACALL wxLua_wxlCanObjAddScript_SetScript(lua_State *L) *************** *** 364,370 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjAddScript_methods[] = { ! { LuaConstructor, "wxlCanObjAddScript", wxLua_wxlCanObjAddScript_constructor, 3, 3, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_String, 0 } }, ! { LuaMethod, "SetScript", wxLua_wxlCanObjAddScript_SetScript, 1, 1, { &s_wxluaarg_String, 0 } }, ! { LuaDelete, "wxlCanObjAddScript", wxLua_wxlCanObjAddScript_destructor, 0, 0, {0} }, }; --- 377,383 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCanObjAddScript_methods[] = { ! { LuaConstructor, "wxlCanObjAddScript", wxLua_wxlCanObjAddScript_constructor, 3, 3, s_wxluatagArray_wxLua_wxlCanObjAddScript_constructor }, ! { LuaMethod, "SetScript", wxLua_wxlCanObjAddScript_SetScript, 1, 1, s_wxluatagArray_wxLua_wxlCanObjAddScript_SetScript }, ! { LuaDelete, "wxlCanObjAddScript", wxLua_wxlCanObjAddScript_destructor, 0, 0, s_wxluaargArray_None }, }; *************** *** 378,381 **** --- 391,395 ---- int s_wxluatag_wxlCan = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCan_AddObject[] = { &s_wxluatag_wxlCanObj, 0 }; // void AddObject( wxlCanObj *canobj ) static int LUACALL wxLua_wxlCan_AddObject(lua_State *L) *************** *** 392,395 **** --- 406,410 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCan_GetYaxis[] = { 0 }; // bool GetYaxis() static int LUACALL wxLua_wxlCan_GetYaxis(lua_State *L) *************** *** 407,410 **** --- 422,426 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCan_GetCmdh[] = { 0 }; // wxlLuaCanCmd* GetCmdh() static int LUACALL wxLua_wxlCan_GetCmdh(lua_State *L) *************** *** 429,432 **** --- 445,449 ---- #if wxLUA_USE_wxPointSizeRect + static wxLuaArgTag s_wxluatagArray_wxLua_wxlCan_constructor[] = { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, 0 }; // wxlCan( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize ) static int LUACALL wxLua_wxlCan_constructor(lua_State *L) *************** *** 460,470 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCan_methods[] = { ! { LuaMethod, "AddObject", wxLua_wxlCan_AddObject, 1, 1, { &s_wxluatag_wxlCanObj, 0 } }, ! { LuaMethod, "GetYaxis", wxLua_wxlCan_GetYaxis, 0, 0, { 0 } }, ! { LuaMethod, "GetCmdh", wxLua_wxlCan_GetCmdh, 0, 0, { 0 } }, ! { LuaDelete, "wxlCan", wxLua_wxlCan_destructor, 0, 0, {0} }, #if wxLUA_USE_wxPointSizeRect ! { LuaConstructor, "wxlCan", wxLua_wxlCan_constructor, 4, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, 0 } }, #endif // wxLUA_USE_wxPointSizeRect --- 477,487 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlCan_methods[] = { ! { LuaMethod, "AddObject", wxLua_wxlCan_AddObject, 1, 1, s_wxluatagArray_wxLua_wxlCan_AddObject }, ! { LuaMethod, "GetYaxis", wxLua_wxlCan_GetYaxis, 0, 0, s_wxluatagArray_wxLua_wxlCan_GetYaxis }, ! { LuaMethod, "GetCmdh", wxLua_wxlCan_GetCmdh, 0, 0, s_wxluatagArray_wxLua_wxlCan_GetCmdh }, ! { LuaDelete, "wxlCan", wxLua_wxlCan_destructor, 0, 0, s_wxluaargArray_None }, #if wxLUA_USE_wxPointSizeRect ! { LuaConstructor, "wxlCan", wxLua_wxlCan_constructor, 4, 1, s_wxluatagArray_wxLua_wxlCan_constructor }, #endif // wxLUA_USE_wxPointSizeRect *************** *** 480,483 **** --- 497,501 ---- int s_wxluatag_wxlLuaCanCmd = -1; + static wxLuaArgTag s_wxluatagArray_wxLua_wxlLuaCanCmd_constructor[] = { &s_wxluatag_wxlCan, &s_wxluaarg_Number, 0 }; // wxlLuaCanCmd( wxlCan* canvas, int maxCommands = -1 ) static int LUACALL wxLua_wxlLuaCanCmd_constructor(lua_State *L) *************** *** 499,502 **** --- 517,521 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxlLuaCanCmd_MoveObject[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // void MoveObject( int index, double x, double y ) static int LUACALL wxLua_wxlLuaCanCmd_MoveObject(lua_State *L) *************** *** 528,534 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlLuaCanCmd_methods[] = { ! { LuaConstructor, "wxlLuaCanCmd", wxLua_wxlLuaCanCmd_constructor, 2, 1, { &s_wxluatag_wxlCan, &s_wxluaarg_Number, 0 } }, ! { LuaMethod, "MoveObject", wxLua_wxlLuaCanCmd_MoveObject, 3, 3, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, ! { LuaDelete, "wxlLuaCanCmd", wxLua_wxlLuaCanCmd_destructor, 0, 0, {0} }, }; --- 547,553 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxlLuaCanCmd_methods[] = { ! { LuaConstructor, "wxlLuaCanCmd", wxLua_wxlLuaCanCmd_constructor, 2, 1, s_wxluatagArray_wxLua_wxlLuaCanCmd_constructor }, ! { LuaMethod, "MoveObject", wxLua_wxlLuaCanCmd_MoveObject, 3, 3, s_wxluatagArray_wxLua_wxlLuaCanCmd_MoveObject }, ! { LuaDelete, "wxlLuaCanCmd", wxLua_wxlLuaCanCmd_destructor, 0, 0, s_wxluaargArray_None }, }; Index: wxluacan_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxluacan_bind.cpp 14 Dec 2006 01:01:22 -0000 1.11 --- wxluacan_bind.cpp 17 Dec 2006 07:47:14 -0000 1.12 *************** *** 94,97 **** --- 94,98 ---- + static wxLuaArgTag s_wxluatagArray_wxLua_function_GetCan[] = { 0 }; // %function wxlCan* GetCan() static int LUACALL wxLua_function_GetCan(lua_State *L) *************** *** 107,110 **** --- 108,112 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_function_GetCmdhMain[] = { 0 }; // %function wxlLuaCanCmd* GetCmdhMain() static int LUACALL wxLua_function_GetCmdhMain(lua_State *L) *************** *** 130,136 **** static WXLUAMETHOD functionList[] = { ! { LuaGlobal, "GetCan", wxLua_function_GetCan, 0, 0, { 0 } }, ! { LuaGlobal, "GetCmdhMain", wxLua_function_GetCmdhMain, 0, 0, { 0 } }, ! { LuaGlobal, 0, 0, 0, 0, {0} }, }; count = (sizeof(functionList)/sizeof(functionList[0])) - 1; --- 132,138 ---- static WXLUAMETHOD functionList[] = { ! { LuaGlobal, "GetCan", wxLua_function_GetCan, 0, 0, s_wxluatagArray_wxLua_function_GetCan }, ! { LuaGlobal, "GetCmdhMain", wxLua_function_GetCmdhMain, 0, 0, s_wxluatagArray_wxLua_function_GetCmdhMain }, ! { LuaGlobal, 0, 0, 0, 0, s_wxluaargArray_None }, }; count = (sizeof(functionList)/sizeof(functionList[0])) - 1; Index: wxluacan.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxluacan.h 14 Dec 2006 01:01:22 -0000 1.18 --- wxluacan.h 17 Dec 2006 07:47:14 -0000 1.19 *************** *** 14,20 **** #include "wxlua/include/wxlbind.h" ! #if WXLUA_BINDING_VERSION > 3 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 3 // binding class --- 14,20 ---- #include "wxlua/include/wxlbind.h" ! #if WXLUA_BINDING_VERSION > 4 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 4 // binding class |