From: John L. <jr...@us...> - 2006-11-06 06:11:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21901/wxLua/modules/wxbind/src Modified Files: appframe.cpp wx_bind.cpp wxlua.cpp Log Message: code cleanup add %wxchkver_x_y_z as replacement for %wxchkverxyz Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxlua.cpp 9 Jun 2006 22:51:34 -0000 1.20 --- wxlua.cpp 6 Nov 2006 06:11:44 -0000 1.21 *************** *** 115,119 **** // get this wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call GetObject if (self->GetObject()) return 1; --- 115,119 ---- // get this wxLuaObject *self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call GetObject that if successful will push an item onto the stack if (self->GetObject()) return 1; *************** *** 121,125 **** } ! // int GetAllocationFlags() const static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L) { --- 121,125 ---- } ! // int GetAllocationFlags() const static int LUACALL wxLua_wxLuaObject_GetAllocationFlags(lua_State *L) { *************** *** 136,151 **** } ! // void ModifyAllocationFlags(int iValue) ! static int LUACALL wxLua_wxLuaObject_ModifyAllocationFlags(lua_State *L) { wxLuaState wxlState(L); ! // int iValue ! int iValue = (int)wxlState.GetNumberType(2); // get this wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call ModifyAllocationFlags ! self->ModifyAllocationFlags(iValue); ! return 0; } --- 136,173 ---- } ! // bool HasAllocationFlag(wxLuaObject_Type flag) ! static int LUACALL wxLua_wxLuaObject_HasAllocationFlag(lua_State *L) { wxLuaState wxlState(L); ! bool returns; ! // wxLuaObject_Type flag ! wxLuaObject_Type flag = (wxLuaObject_Type)wxlState.GetEnumerationType(2); // get this wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call HasAllocationFlag ! returns = self->HasAllocationFlag(flag); ! // push the result flag ! lua_pushboolean(L, returns); ! return 1; ! } ! ! // int SetAllocationFlag(wxLuaObject_Type flag, bool set) ! static int LUACALL wxLua_wxLuaObject_SetAllocationFlag(lua_State *L) ! { ! wxLuaState wxlState(L); ! int returns; ! // bool set ! bool set = wxlState.GetBooleanType(3); ! // wxLuaObject_Type flag ! wxLuaObject_Type flag = (wxLuaObject_Type)wxlState.GetEnumerationType(2); ! // get this ! wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // call SetAllocationFlag ! returns = self->SetAllocationFlag(flag, set); ! // push the result number ! lua_pushnumber(L, returns); ! ! return 1; } *************** *** 182,189 **** static WXLUAMETHOD s_wxLuaObject_methods[] = { { LuaConstructor, "wxLuaObject", wxLua_wxLuaObject_constructor, 0, 0, { 0 } }, ! { LuaMethod, "SetObject", wxLua_wxLuaObject_SetObject, 0, 0, { 0 } }, { LuaMethod, "GetObject", wxLua_wxLuaObject_GetObject, 0, 0, { 0 } }, { LuaMethod, "GetAllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, { 0 } }, ! { LuaMethod, "ModifyAllocationFlags", wxLua_wxLuaObject_ModifyAllocationFlags, 1, 1, { &s_wxluaarg_Number, 0 } }, { LuaGetProp, "AllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, {0} }, { LuaGetProp, "Object", wxLua_wxLuaObject_GetObject, 0, 0, {0} }, --- 204,212 ---- static WXLUAMETHOD s_wxLuaObject_methods[] = { { LuaConstructor, "wxLuaObject", wxLua_wxLuaObject_constructor, 0, 0, { 0 } }, ! { LuaMethod, "SetObject", wxLua_wxLuaObject_SetObject, 1, 0, { &s_wxluaarg_Number, 0 } }, { LuaMethod, "GetObject", wxLua_wxLuaObject_GetObject, 0, 0, { 0 } }, { LuaMethod, "GetAllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, { 0 } }, ! { LuaMethod, "HasAllocationFlag", wxLua_wxLuaObject_HasAllocationFlag, 1, 1, { &s_wxluaarg_Enumeration, 0 } }, ! { LuaMethod, "SetAllocationFlag", wxLua_wxLuaObject_SetAllocationFlag, 2, 2, { &s_wxluaarg_Enumeration, &s_wxluaarg_Boolean, 0 } }, { LuaGetProp, "AllocationFlags", wxLua_wxLuaObject_GetAllocationFlags, 0, 0, {0} }, { LuaGetProp, "Object", wxLua_wxLuaObject_GetObject, 0, 0, {0} }, Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** wx_bind.cpp 2 Nov 2006 23:38:09 -0000 1.59 --- wx_bind.cpp 6 Nov 2006 06:11:44 -0000 1.60 *************** *** 1638,1641 **** --- 1638,1646 ---- { "wxIMAGE_RESOLUTION_INCHES", wxIMAGE_RESOLUTION_INCHES }, { "wxLEFT", wxLEFT }, + { "wxLUAOBJECT_ARRAYINT", wxLUAOBJECT_ARRAYINT }, + { "wxLUAOBJECT_BOOL", wxLUAOBJECT_BOOL }, + { "wxLUAOBJECT_INT", wxLUAOBJECT_INT }, + { "wxLUAOBJECT_NONE", wxLUAOBJECT_NONE }, + { "wxLUAOBJECT_STRING", wxLUAOBJECT_STRING }, { "wxMOUSE_BTN_ANY", wxMOUSE_BTN_ANY }, { "wxMOUSE_BTN_LEFT", wxMOUSE_BTN_LEFT }, *************** *** 5328,5334 **** ! #if (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxApp) { "wxLog", wxLog_methods, wxLog_methodCount, -1, NULL, &s_wxluatag_wxLog, NULL }, ! #endif // (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxApp) --- 5333,5339 ---- ! #if (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxUSE_LOG) && (wxLUA_USE_wxApp) { "wxLog", wxLog_methods, wxLog_methodCount, -1, NULL, &s_wxluatag_wxLog, NULL }, ! #endif // (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxUSE_LOG) && (wxLUA_USE_wxApp) Index: appframe.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/appframe.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** appframe.cpp 23 Aug 2006 04:57:52 -0000 1.22 --- appframe.cpp 6 Nov 2006 06:11:44 -0000 1.23 *************** *** 27,31 **** ! #if (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxApp) // ------------------------------------------------------------------------------------------------- // Bind class wxLog --- 27,31 ---- ! #if (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxUSE_LOG) && (wxLUA_USE_wxApp) // ------------------------------------------------------------------------------------------------- // Bind class wxLog *************** *** 52,56 **** WXLUAMETHOD* wxLog_methods = s_wxLog_methods; int wxLog_methodCount = sizeof(s_wxLog_methods)/sizeof(s_wxLog_methods[0]); ! #endif // (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxLUA_USE_wxApp) --- 52,56 ---- WXLUAMETHOD* wxLog_methods = s_wxLog_methods; int wxLog_methodCount = sizeof(s_wxLog_methods)/sizeof(s_wxLog_methods[0]); ! #endif // (wxCHECK_VERSION(2,2,0) && !wxCHECK_VERSION(2,5,0) || WXWIN_COMPATIBILITY_2_4) && (wxUSE_LOG) && (wxLUA_USE_wxApp) |