From: John L. <jr...@us...> - 2007-06-12 00:09:09
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4216/wxLua/bindings Modified Files: genwxbind.lua Log Message: Change wxLuaState::AddTrackedWindow to take a wxObject and figure out inside if it's a window Change the nomenclature "enum" to "integer" as the integer data type Change "base_"XXX to "_"XXX for base class function calls Add a test function to wxLuaPrintout to really check if virtual functions work More fixes to samples for binding changes Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.117 retrieving revision 1.118 diff -C2 -d -r1.117 -r1.118 *** genwxbind.lua 11 Jun 2007 03:57:57 -0000 1.117 --- genwxbind.lua 12 Jun 2007 00:08:35 -0000 1.118 *************** *** 264,273 **** -- "fake" data types that we handle in some more complicated way ! AllocDataType("LuaFunction", "special", true) ! AllocDataType("LuaTable", "special", true) ! AllocDataType("wxString", "special", true) ! AllocDataType("wxArrayString_FromLuaTable", "special", true) ! AllocDataType("wxArrayInt_FromLuaTable", "special", true) ! AllocDataType("IntArray_FromLuaTable", "special", true) -- attributes that can precede a data type (must set equal to true) --- 264,274 ---- -- "fake" data types that we handle in some more complicated way ! AllocDataType("LuaFunction", "special", true) ! AllocDataType("LuaTable", "special", true) ! AllocDataType("wxString", "special", true) ! --AllocDataType("wxArrayString", "special", true) -- special, but we only convert input, not output ! --AllocDataType("wxSortedArrayString", "special", true) -- special, but we only convert input, not output ! --AllocDataType("wxArrayInt", "special", true) -- special, but we only convert input, not output ! AllocDataType("IntArray_FromLuaTable", "special", true) -- attributes that can precede a data type (must set equal to true) *************** *** 2826,2832 **** table.insert(codeList, " bool val = wxlua_getbooleantype(L, 2);\n") elseif IsDataTypeEnum(memberType) then ! overload_argList = overload_argList.."&s_wxluaarg_Enum, " CommentBindingTable(codeList, " // get the number value\n") ! table.insert(codeList, " "..memberType.." val = ("..memberType..")wxlua_getenumerationtype(L, 2);\n") else overload_argList = overload_argList.."&s_wxluaarg_Number, " --- 2827,2833 ---- table.insert(codeList, " bool val = wxlua_getbooleantype(L, 2);\n") elseif IsDataTypeEnum(memberType) then ! overload_argList = overload_argList.."&s_wxluaarg_Integer, " CommentBindingTable(codeList, " // get the number value\n") ! table.insert(codeList, " "..memberType.." val = ("..memberType..")wxlua_getintegertype(L, 2);\n") else overload_argList = overload_argList.."&s_wxluaarg_Number, " *************** *** 3086,3089 **** --- 3087,3096 ---- argItem = "wxArrayString(); wxlState.GetwxArrayString("..argNum..", "..argName..")" declare = "wxArrayString " + elseif ((argType == "wxSortedArrayString") and + ((indirectionCount == 0) or + ((indirectionCount == 1) and (argPtr == "&") and string.find(argTypeWithAttrib, "const", 1, 1)))) then + overload_argList = overload_argList.."&s_wxluatag_wxSortedArrayString, " + argItem = "wxArrayString(); wxlState.GetwxArrayString("..argNum..", "..argName..")" + declare = "wxSortedArrayString " elseif ((argType == "wxArrayInt") and ((indirectionCount == 0) or *************** *** 3231,3236 **** argItem = "wxlua_getbooleantype(L, "..argNum..")" elseif IsDataTypeEnum(argType) then ! overload_argList = overload_argList.."&s_wxluaarg_Enum, " ! argItem = "("..argType..")wxlua_getenumerationtype(L, "..argNum..")" else overload_argList = overload_argList.."&s_wxluaarg_Number, " --- 3238,3243 ---- argItem = "wxlua_getbooleantype(L, "..argNum..")" elseif IsDataTypeEnum(argType) then ! overload_argList = overload_argList.."&s_wxluaarg_Integer, " ! argItem = "("..argType..")wxlua_getintegertype(L, "..argNum..")" else overload_argList = overload_argList.."&s_wxluaarg_Number, " *************** *** 3459,3468 **** table.insert(codeList, " wxlState.AddTrackedObject((long)returns, new wxObject_"..MakeVar(parseObject.Name).."(("..returnCast..")returns));\n") else ! table.insert(codeList, " wxlState.AddTrackedObject(("..returnCast..")returns);\n") end elseif parseObject.HasClassInfo then ! CommentBindingTable(codeList, " // add to tracked window list\n") ! table.insert(codeList, " if (returns && returns->IsKindOf(CLASSINFO(wxWindow)))\n") ! table.insert(codeList, " wxlState.AddTrackedWindow((wxWindow*)returns);\n") end --- 3466,3474 ---- table.insert(codeList, " wxlState.AddTrackedObject((long)returns, new wxObject_"..MakeVar(parseObject.Name).."(("..returnCast..")returns));\n") else ! table.insert(codeList, " wxlState.AddTrackedObject(returns);\n") end elseif parseObject.HasClassInfo then ! CommentBindingTable(codeList, " // add to tracked window list, it will check validity\n") ! table.insert(codeList, " wxlState.AddTrackedWindow(returns);\n") end |