You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(191) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
(238) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(104) |
Feb
(518) |
Mar
(302) |
Apr
(211) |
May
(311) |
Jun
(55) |
Jul
(6) |
Aug
(35) |
Sep
(76) |
Oct
(50) |
Nov
(37) |
Dec
(340) |
2007 |
Jan
(23) |
Feb
(107) |
Mar
(98) |
Apr
(60) |
May
(136) |
Jun
(371) |
Jul
(175) |
Aug
(74) |
Sep
(3) |
Oct
(2) |
Nov
(53) |
Dec
(129) |
2008 |
Jan
(337) |
Feb
(23) |
Mar
(18) |
Apr
(4) |
May
(3) |
Jun
|
Jul
|
Aug
(4) |
Sep
|
Oct
(33) |
Nov
|
Dec
(26) |
2009 |
Jan
(4) |
Feb
(1) |
Mar
(15) |
Apr
|
May
(35) |
Jun
(11) |
Jul
|
Aug
|
Sep
(19) |
Oct
(26) |
Nov
(11) |
Dec
(11) |
2010 |
Jan
(4) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(8) |
Sep
|
Oct
|
Nov
(8) |
Dec
(7) |
2011 |
Jan
|
Feb
|
Mar
(4) |
Apr
(8) |
May
(5) |
Jun
(8) |
Jul
(1) |
Aug
|
Sep
|
Oct
(5) |
Nov
(13) |
Dec
|
From: John L. <jr...@us...> - 2009-10-05 02:51:41
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/bindings/wxwidgets Modified Files: wxbase_datetime.i wxcore_rules.lua Log Message: Add a few more wxDateTime member functions. Speedup check for wxSpinEvent vs wxScrollEvent in wxLuaEventCallback::OnEvent() Reorder list of lightuserdata keys for LUA_REGISTRYINDEX in wxlstate.h Cleanup in wxLuaStackDialog, remove EnumerateGlobalData() and just treat is as a regular table. Fix ignoring events for controls in controls.wx.lua Index: wxcore_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_rules.lua,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxcore_rules.lua 1 Oct 2009 04:21:01 -0000 1.7 --- wxcore_rules.lua 5 Oct 2009 02:51:28 -0000 1.8 *************** *** 271,276 **** int ret = wxLuaBinding::RegisterBinding(wxlState); ! p_wxluatype_wxEvent = &wxluatype_wxEvent; ! p_wxluatype_wxWindow = &wxluatype_wxWindow; return ret; --- 271,278 ---- int ret = wxLuaBinding::RegisterBinding(wxlState); ! p_wxluatype_wxEvent = &wxluatype_wxEvent; ! p_wxluatype_wxWindow = &wxluatype_wxWindow; ! p_wxluatype_wxScrollEvent = &wxluatype_wxScrollEvent; ! p_wxluatype_wxSpinEvent = &wxluatype_wxSpinEvent; return ret; Index: wxbase_datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_datetime.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxbase_datetime.i 1 Oct 2009 04:21:00 -0000 1.4 --- wxbase_datetime.i 5 Oct 2009 02:51:28 -0000 1.5 *************** *** 143,146 **** --- 143,151 ---- %rename wxDateTimeFromDMY wxDateTime(int day, wxDateTime::Month month = wxDateTime::Inv_Month, int year = wxDateTime::Inv_Year, int hour = 0, int minute = 0, int second = 0, int millisec = 0) + static wxDateTime Now() + static wxDateTime UNow() + static wxDateTime Today() + static void SetCountry(wxDateTime::Country country) + wxDateTime& SetToCurrent() wxDateTime& Set(time_t time) // use with Lua's os.time() on MSW, Linux, others? |
From: John L. <jr...@us...> - 2009-10-05 02:51:38
|
Update of /cvsroot/wxlua/wxLua/samples In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/samples Modified Files: controls.wx.lua Log Message: Add a few more wxDateTime member functions. Speedup check for wxSpinEvent vs wxScrollEvent in wxLuaEventCallback::OnEvent() Reorder list of lightuserdata keys for LUA_REGISTRYINDEX in wxlstate.h Cleanup in wxLuaStackDialog, remove EnumerateGlobalData() and just treat is as a regular table. Fix ignoring events for controls in controls.wx.lua Index: controls.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/controls.wx.lua,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** controls.wx.lua 25 Sep 2009 18:47:58 -0000 1.19 --- controls.wx.lua 5 Oct 2009 02:51:29 -0000 1.20 *************** *** 18,21 **** --- 18,23 ---- taskbarIcon = nil -- The wxTaskBarIcon that we install + wxwindowClassInfo = wx.wxClassInfo("wxWindow") + -- wxBitmap to use for controls that need one bmp = wx.wxArtProvider.GetBitmap(wx.wxART_INFORMATION, wx.wxART_TOOLBAR, wx.wxSize(16, 16)) *************** *** 40,47 **** ignoreControls = {} -- Table of { win_id = "win name" } of controls to ignore events from -- IDs for the windows that we show ID_PARENT_SCROLLEDWINDOW = 1000 - ID_EVENT_LISTCTRL = 5000 - ID_CONTROL_LISTCTRL = 5001 ID_ANIMATIONCTRL = 1001 --- 42,52 ---- ignoreControls = {} -- Table of { win_id = "win name" } of controls to ignore events from + -- IDs for controls used by this program + ID_EVENT_LISTCTRL = 5000 + ID_CONTROL_LISTCTRL = 5001 + ID_CLEAR_LOG = 5002 + -- IDs for the windows that we show ID_PARENT_SCROLLEDWINDOW = 1000 ID_ANIMATIONCTRL = 1001 *************** *** 311,314 **** --- 316,325 ---- elseif typ_name == "wxWindow" then s = s..typ_name.."(GetName="..v:GetName()..")" + elseif typ_name == "wxObject" then + local obj_name = "nil" + if v then + obj_name = v:GetClassInfo():GetClassName() + end + s = s..obj_name else s = s..tostring(v) *************** *** 341,355 **** end - -- during shutdown, we nil textCtrl since events are sent and we don't want them anymore - if (not textCtrl) or ignoreEVTs[evtTypeStr] or ignoreControls[event:GetId()] then - event:Skip(skip) - return - end - - --print(evtClassName, wxEVT_TableByType[event:GetEventType()].name) - -- try to figure out where this came from using the GetEventObject() local obj_str = "nil" if event:GetEventObject() then local classInfo = event:GetEventObject():GetClassInfo() if classInfo then --- 352,372 ---- end -- try to figure out where this came from using the GetEventObject() local obj_str = "nil" + local win_id = -100000000 if event:GetEventObject() then + + -- get the window id from the object since some events don't properly set the id. + if event:GetEventObject():IsKindOf(wxwindowClassInfo) then + local win = event:GetEventObject():DynamicCast("wxWindow") + if win then + win_id = win:GetId(); + end + end + + --if win_id ~= event:GetId() then + -- print(string.format("WARNING : wxEvent ID=%d does not match wxWindow ID=%d", event:GetId(), win_id)) + --end + local classInfo = event:GetEventObject():GetClassInfo() if classInfo then *************** *** 360,363 **** --- 377,388 ---- end + -- during shutdown, we nil textCtrl since events are sent and we don't want them anymore + if (not textCtrl) or ignoreEVTs[evtTypeStr] or ignoreControls[event:GetId()] or ignoreControls[win_id] then + event:Skip(skip) + return + end + + --print(evtClassName, wxEVT_TableByType[event:GetEventType()].name) + local s = string.format("%s %s(%s) GetEventObject=%s", wx.wxNow(), evtClassName, evtTypeStr, obj_str) *************** *** 686,690 **** control = wx.wxNotebook(p, ID_NOTEBOOK, ! wx.wxDefaultPosition, wx.wxSize(200,200)) SetupBook(control) --- 711,715 ---- control = wx.wxNotebook(p, ID_NOTEBOOK, ! wx.wxDefaultPosition, wx.wxSize(200,200)) SetupBook(control) *************** *** 912,915 **** --- 937,942 ---- local fileMenu = wx.wxMenu() + fileMenu:Append(ID_CLEAR_LOG, "&Clear log\tCtrl-C", "Clear text in the log window") + fileMenu:AppendSeparator() fileMenu:Append(wx.wxID_EXIT, "E&xit", "Quit the program") *************** *** 925,928 **** --- 952,959 ---- frame:SetStatusText("Welcome to wxLua.") + + frame:Connect(ID_CLEAR_LOG, wx.wxEVT_COMMAND_MENU_SELECTED, + function (event) textCtrl:Clear() end ) + -- connect the selection event of the exit menu item to an -- event handler that closes the window *************** *** 933,938 **** frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) ! wx.wxMessageBox('This is the "About" dialog of the Controls wxLua sample.\n'.. ! 'Check or uncheck events you want shown.\n'.. wxlua.wxLUA_VERSION_STRING.." built with "..wx.wxVERSION_STRING, "About wxLua", --- 964,969 ---- frame:Connect(wx.wxID_ABOUT, wx.wxEVT_COMMAND_MENU_SELECTED, function (event) ! wx.wxMessageBox('This is the "About" dialog of the Controls wxLua sample.\n\n'.. ! 'Check or uncheck events and windows you want logged.\n'.. wxlua.wxLUA_VERSION_STRING.." built with "..wx.wxVERSION_STRING, "About wxLua", *************** *** 1024,1028 **** end elseif win_id == ID_CONTROL_LISTCTRL then - print(sel[n][2], type(sel[n][2])) if img == 0 then ignoreControls[tonumber(sel[n][2])] = true --- 1055,1058 ---- |
From: John L. <jr...@us...> - 2009-10-05 02:51:38
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxluasocket/include Modified Files: wxldserv.h Log Message: Add a few more wxDateTime member functions. Speedup check for wxSpinEvent vs wxScrollEvent in wxLuaEventCallback::OnEvent() Reorder list of lightuserdata keys for LUA_REGISTRYINDEX in wxlstate.h Cleanup in wxLuaStackDialog, remove EnumerateGlobalData() and just treat is as a regular table. Fix ignoring events for controls in controls.wx.lua Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** wxldserv.h 29 Nov 2007 23:35:54 -0000 1.40 --- wxldserv.h 5 Oct 2009 02:51:29 -0000 1.41 *************** *** 113,117 **** virtual void EnumerateStackEntry(int nEntry); virtual void EnumerateTable(int nRef, int nEntry, long lc_item); - virtual void EnumerateGlobalData(long lc_item); // implementation --- 113,116 ---- |
From: John L. <jr...@us...> - 2009-10-05 02:51:38
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxbind/src Modified Files: wxbase_datetime.cpp wxcore_bind.cpp Log Message: Add a few more wxDateTime member functions. Speedup check for wxSpinEvent vs wxScrollEvent in wxLuaEventCallback::OnEvent() Reorder list of lightuserdata keys for LUA_REGISTRYINDEX in wxlstate.h Cleanup in wxLuaStackDialog, remove EnumerateGlobalData() and just treat is as a regular table. Fix ignoring events for controls in controls.wx.lua Index: wxcore_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_bind.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** wxcore_bind.cpp 1 Oct 2009 04:21:01 -0000 1.27 --- wxcore_bind.cpp 5 Oct 2009 02:51:29 -0000 1.28 *************** *** 7261,7266 **** int ret = wxLuaBinding::RegisterBinding(wxlState); ! p_wxluatype_wxEvent = &wxluatype_wxEvent; ! p_wxluatype_wxWindow = &wxluatype_wxWindow; return ret; --- 7261,7268 ---- int ret = wxLuaBinding::RegisterBinding(wxlState); ! p_wxluatype_wxEvent = &wxluatype_wxEvent; ! p_wxluatype_wxWindow = &wxluatype_wxWindow; ! p_wxluatype_wxScrollEvent = &wxluatype_wxScrollEvent; ! p_wxluatype_wxSpinEvent = &wxluatype_wxSpinEvent; return ret; Index: wxbase_datetime.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxbase_datetime.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxbase_datetime.cpp 1 Oct 2009 04:21:01 -0000 1.16 --- wxbase_datetime.cpp 5 Oct 2009 02:51:29 -0000 1.17 *************** *** 683,686 **** --- 683,702 ---- } + static int LUACALL wxLua_wxDateTime_Now(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxDateTime_Now[1] = {{ wxLua_wxDateTime_Now, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 0, g_wxluaargtypeArray_None }}; + // static wxDateTime Now() + static int LUACALL wxLua_wxDateTime_Now(lua_State *L) + { + // call Now + // allocate a new object using the copy constructor + wxDateTime* returns = new wxDateTime(wxDateTime::Now()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, returns, wxluatype_wxDateTime); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxDateTime); + + return 1; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxDateTime_ParseDate[] = { &wxluatype_wxDateTime, &wxluatype_TSTRING, NULL }; static int LUACALL wxLua_wxDateTime_ParseDate(lua_State *L); *************** *** 813,816 **** --- 829,846 ---- } + static wxLuaArgType s_wxluatypeArray_wxLua_wxDateTime_SetCountry[] = { &wxluatype_TINTEGER, NULL }; + static int LUACALL wxLua_wxDateTime_SetCountry(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxDateTime_SetCountry[1] = {{ wxLua_wxDateTime_SetCountry, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 1, 1, s_wxluatypeArray_wxLua_wxDateTime_SetCountry }}; + // static void SetCountry(wxDateTime::Country country) + static int LUACALL wxLua_wxDateTime_SetCountry(lua_State *L) + { + // wxDateTime::Country country + wxDateTime::Country country = (wxDateTime::Country)wxlua_getenumtype(L, 1); + // call SetCountry + wxDateTime::SetCountry(country); + + return 0; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxDateTime_SetDay[] = { &wxluatype_wxDateTime, &wxluatype_TNUMBER, NULL }; static int LUACALL wxLua_wxDateTime_SetDay(lua_State *L); *************** *** 1294,1297 **** --- 1324,1359 ---- } + static int LUACALL wxLua_wxDateTime_Today(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxDateTime_Today[1] = {{ wxLua_wxDateTime_Today, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 0, g_wxluaargtypeArray_None }}; + // static wxDateTime Today() + static int LUACALL wxLua_wxDateTime_Today(lua_State *L) + { + // call Today + // allocate a new object using the copy constructor + wxDateTime* returns = new wxDateTime(wxDateTime::Today()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, returns, wxluatype_wxDateTime); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxDateTime); + + return 1; + } + + static int LUACALL wxLua_wxDateTime_UNow(lua_State *L); + static wxLuaBindCFunc s_wxluafunc_wxLua_wxDateTime_UNow[1] = {{ wxLua_wxDateTime_UNow, WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, 0, 0, g_wxluaargtypeArray_None }}; + // static wxDateTime UNow() + static int LUACALL wxLua_wxDateTime_UNow(lua_State *L) + { + // call UNow + // allocate a new object using the copy constructor + wxDateTime* returns = new wxDateTime(wxDateTime::UNow()); + // add the new object to the tracked memory list + wxluaO_addgcobject(L, returns, wxluatype_wxDateTime); + // push the result datatype + wxluaT_pushuserdatatype(L, returns, wxluatype_wxDateTime); + + return 1; + } + static wxLuaArgType s_wxluatypeArray_wxLua_wxDateTime_delete[] = { &wxluatype_wxDateTime, NULL }; static wxLuaBindCFunc s_wxluafunc_wxLua_wxDateTime_delete[1] = {{ wxlua_userdata_delete, WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, 1, 1, s_wxluatypeArray_wxLua_wxDateTime_delete }}; *************** *** 1500,1503 **** --- 1562,1566 ---- { "IsWorkDay", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_IsWorkDay, 1, NULL }, { "MakeGMT", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_MakeGMT, 1, NULL }, + { "Now", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxDateTime_Now, 1, NULL }, { "ParseDate", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_ParseDate, 1, NULL }, { "ParseDateTime", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_ParseDateTime, 1, NULL }, *************** *** 1507,1510 **** --- 1570,1574 ---- { "ResetTime", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_ResetTime, 1, NULL }, { "Set", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_Set, 1, NULL }, + { "SetCountry", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxDateTime_SetCountry, 1, NULL }, { "SetDay", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_SetDay, 1, NULL }, { "SetHour", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_SetHour, 1, NULL }, *************** *** 1541,1544 **** --- 1605,1610 ---- { "ToGMT", WXLUAMETHOD_METHOD, s_wxluafunc_wxLua_wxDateTime_ToGMT, 1, NULL }, + { "Today", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxDateTime_Today, 1, NULL }, + { "UNow", WXLUAMETHOD_METHOD|WXLUAMETHOD_STATIC, s_wxluafunc_wxLua_wxDateTime_UNow, 1, NULL }, { "delete", WXLUAMETHOD_METHOD|WXLUAMETHOD_DELETE, s_wxluafunc_wxLua_wxDateTime_delete, 1, NULL }, |
From: John L. <jr...@us...> - 2009-10-05 02:51:38
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv10796/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp Log Message: Add a few more wxDateTime member functions. Speedup check for wxSpinEvent vs wxScrollEvent in wxLuaEventCallback::OnEvent() Reorder list of lightuserdata keys for LUA_REGISTRYINDEX in wxlstate.h Cleanup in wxLuaStackDialog, remove EnumerateGlobalData() and just treat is as a regular table. Fix ignoring events for controls in controls.wx.lua Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** wxldserv.cpp 24 Jun 2009 19:57:41 -0000 1.50 --- wxldserv.cpp 5 Oct 2009 02:51:29 -0000 1.51 *************** *** 52,59 **** m_has_message(event.m_has_message), m_lua_ref(event.m_lua_ref), ! m_debugData(wxNullLuaDebugData), m_enabled_flag(event.m_enabled_flag) { - SetDebugData(event.GetReference(), event.GetDebugData()); } --- 52,58 ---- m_has_message(event.m_has_message), m_lua_ref(event.m_lua_ref), ! m_debugData(event.m_debugData), m_enabled_flag(event.m_enabled_flag) { } *************** *** 128,138 **** } - void wxLuaDebuggerStackDialog::EnumerateGlobalData(long lc_item) - { - wxCHECK_RET(m_luaDebugger, wxT("Invalid wxLuaDebuggerServer")); - wxBeginBusyCursor(); // ended in wxLuaDebuggerBase::OnDebugXXX - m_luaDebugger->EnumerateTable(-1, -1, lc_item); - } - // ---------------------------------------------------------------------------- // wxLuaDebuggerProcess --- 127,130 ---- |
From: John L. <jr...@us...> - 2009-10-01 04:21:34
|
Update of /cvsroot/wxlua/wxLua/bindings/wxluasocket In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/bindings/wxluasocket Modified Files: wxluasocket.i Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxluasocket.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxluasocket/wxluasocket.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxluasocket.i 26 Mar 2008 05:23:47 -0000 1.15 --- wxluasocket.i 1 Oct 2009 04:21:00 -0000 1.16 *************** *** 57,61 **** // wxLuaDebugData ! //%class %noclassinfo wxLuaDebugData //%endclass --- 57,61 ---- // wxLuaDebugData ! //%class wxLuaDebugData //%endclass |
From: John L. <jr...@us...> - 2009-10-01 04:21:32
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/bindings Modified Files: genwxbind.lua Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** genwxbind.lua 27 Sep 2009 03:13:51 -0000 1.183 --- genwxbind.lua 1 Oct 2009 04:21:00 -0000 1.184 *************** *** 18,22 **** -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 28 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h -- otherwise a compile time error will be generated. --- 18,22 ---- -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 29 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h -- otherwise a compile time error will be generated. *************** *** 51,55 **** classTypeBindingTable = {} classIncludeBindingTable = {} - encapsulationBindingTable = {} overrideTable = {} -- binding code from override file as a table indexed by C function name --- 51,54 ---- *************** *** 204,208 **** Abstract = abstract, Condition = nil, -- conditions for this data type, eg. wxLUA_USE_xxx - ["%encapsulate"] = nil, -- Non wxObject derived class } end --- 203,206 ---- *************** *** 1211,1216 **** -- keywords that come after %class tag bindingKeywordTable["%delete"] = true - bindingKeywordTable["%noclassinfo"] = true - bindingKeywordTable["%encapsulate"] = true -- keywords that can only be used within %class tag bindingKeywordTable["%constructor"] = true --- 1209,1212 ---- *************** *** 1639,1644 **** Members = {}, ["%delete"] = false, - ["%noclassinfo"] = false, - ["%encapsulate"] = false, Condition = nil, } --- 1635,1638 ---- *************** *** 1963,1969 **** lineState.ActionMandatory = true lineState.ActionAttributes["%delete"] = true - lineState.ActionAttributes["%noclassinfo"] = true lineState.ActionAttributes["%abstract"] = true - lineState.ActionAttributes["%encapsulate"] = true elseif tag == "%endclass" then --- 1957,1961 ---- *************** *** 1990,2000 **** end - elseif tag == "%noclassinfo" then -- tag for %class - parseState.ObjectStack[1]["%noclassinfo"] = true - - if (parseState.ObjectStack[1].ObjType ~= "objtype_%class") and (parseState.ObjectStack[1].ObjType ~= "objtype_%struct") then - print("ERROR: %noclassinfo is not used for a %class. "..LineTableErrString(lineTable)) - end - elseif tag == "%abstract" then -- tag for %class parseState.ObjectStack[1]["%abstract"] = true --- 1982,1985 ---- *************** *** 2004,2014 **** end - elseif tag == "%encapsulate" then -- tag for %class - parseState.ObjectStack[1]["%encapsulate"] = true - - if (parseState.ObjectStack[1].ObjType ~= "objtype_%class") and (parseState.ObjectStack[1].ObjType ~= "objtype_%struct") then - print("ERROR: %encapsulate is not used for a %class. "..LineTableErrString(lineTable)) - end - -- ------------------------------------------------------- elseif tag == "%protected" then -- skip %protected functions --- 1989,1992 ---- *************** *** 2062,2067 **** table.insert(parseState.ObjectStack, 1, parseObject) lineState.ParseObjectDeclaration = true - parseState.ObjectStack[1]["%noclassinfo"] = true - parseState.ObjectStack[1]["%encapsulate"] = true lineState.DefType = "deftype_%struct" --- 2040,2043 ---- *************** *** 2069,2075 **** lineState.ActionMandatory = true lineState.ActionAttributes["%delete"] = true - lineState.ActionAttributes["%noclassinfo"] = true lineState.ActionAttributes["%abstract"] = true - lineState.ActionAttributes["%encapsulate"] = true elseif tag == "%endstruct" then --- 2045,2049 ---- *************** *** 2738,2746 **** end - -- Set if this data type should be Encapsulated - if dataTypeTable[parseState.ObjectStack[1].Name] and parseState.ObjectStack[1]["%encapsulate"] then - dataTypeTable[parseState.ObjectStack[1].Name]["%encapsulate"] = parseState.ObjectStack[1]["%encapsulate"] - end - -- pop inline condition onto condition stack if not lineState.IsBlockCondition and lineState.Condition then --- 2712,2715 ---- *************** *** 2864,2893 **** end - -- ------------------------------------------------------------------- - -- encapsulate non-wxObject objects with a tracked wxObject - if parseObject["%encapsulate"] then - - local encapcondition = FixCondition(parseObject.Condition) - local encapsulationBinding = - { - Declaration = "wxLUA_DECLARE_ENCAPSULATION("..output_cpp_impexpsymbol..", "..parseObject.Name..", "..MakeVar(parseObject.Name)..")\n", - Implementation = "wxLUA_IMPLEMENT_ENCAPSULATION("..parseObject.Name..", "..MakeVar(parseObject.Name)..")\n", - Condition = encapcondition - } - - if IsDerivedClass(parseObject.Name, "wxGridCellWorker") or - IsDerivedClass(parseObject.Name, "wxGridCellAttr") then - encapsulationBinding.Implementation = "wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION("..parseObject.Name..", "..MakeVar(parseObject.Name)..")\n" - end - - if not encapsulationBindingTable[encapcondition] then - encapsulationBindingTable[encapcondition] = {} - end - - if parseObject["%encapsulate"] then - encapsulationBindingTable[encapcondition][parseObject.Name] = encapsulationBinding - end - end - -- parseObject member binding for m = 1, #parseObject.Members do --- 2833,2836 ---- *************** *** 2915,2922 **** end - if parseObject["%encapsulate"] then - --funcType = AddOredValue(funcType, "WXLUAMETHOD_ENCAPSULATE") FIXME - end - local memberPtr = member.DataTypePointer[1] local indirectionCount = #member.DataTypePointer --- 2858,2861 ---- *************** *** 3479,3487 **** if param.GC then ! if dataTypeTable[argType]["%encapsulate"] then ! table.insert(gcList, " if (!wxluaO_isgcobject(L, "..argName..")) wxluaO_addgcobject(L, (void*)"..argName..", new wxLua_wxObject_"..MakeVar(argType).."("..argName.."));\n") ! else ! table.insert(gcList, " if (!wxluaO_isgcobject(L, "..argName..")) wxluaO_addgcobject(L, "..argName..");\n") ! end elseif param.UnGC then table.insert(gcList, " if (wxluaO_isgcobject(L, "..argName..")) wxluaO_undeletegcobject(L, "..argName..");\n") --- 3418,3422 ---- if param.GC then ! table.insert(gcList, " if (!wxluaO_isgcobject(L, "..argName..")) wxluaO_addgcobject(L, "..argName..", wxluatype_"..MakeVar(argType)..");\n") elseif param.UnGC then table.insert(gcList, " if (wxluaO_isgcobject(L, "..argName..")) wxluaO_undeletegcobject(L, "..argName..");\n") *************** *** 3655,3662 **** if not funcNameBase then funcNameBase = funcName end - if parseObject["%encapsulate"] then - --funcType = AddOredValue(funcType, "WXLUAMETHOD_ENCAPSULATE") FIXME - end - -- if they declared this, the conditions must be exclusive -- since the functions will have the same names --- 3590,3593 ---- *************** *** 3807,3816 **** end ! if parseObject["%encapsulate"] then ! table.insert(codeList, " wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_"..MakeVar(parseObject.Name).."(("..returnCast..")returns));\n") ! else ! table.insert(codeList, " wxluaO_addgcobject(L, returns);\n") ! end ! elseif not parseObject["%noclassinfo"] then CommentBindingTable(codeList, " // add to tracked window list, it will check validity\n") table.insert(codeList, " wxluaW_addtrackedwindow(L, returns);\n") --- 3738,3743 ---- end ! table.insert(codeList, " wxluaO_addgcobject(L, returns, wxluatype_"..MakeVar(parseObject.Name)..");\n") ! elseif IsDerivedClass(parseObject.Name, "wxWindow") then CommentBindingTable(codeList, " // add to tracked window list, it will check validity\n") table.insert(codeList, " wxluaW_addtrackedwindow(L, returns);\n") *************** *** 3837,3845 **** table.insert(codeList, " wxluaO_undeletegcobject(L, self);\n") elseif parseObject["%gc_this"] then ! if parseObject["%encapsulate"] then ! table.insert(codeList, " if (!wxluaO_isgcobject(L, self)) wxluaO_addgcobject(L, (void*)self, new wxLua_wxObject_"..MakeClassVar(parseObject.Name).."(self));\n") ! else ! table.insert(codeList, " wxluaO_addgcobject(L, self);\n") ! end end --- 3764,3768 ---- table.insert(codeList, " wxluaO_undeletegcobject(L, self);\n") elseif parseObject["%gc_this"] then ! table.insert(codeList, " wxluaO_addgcobject(L, self, wxluatype_"..MakeClassVar(parseObject.Name)..");\n") end *************** *** 3924,3932 **** local member_DataType = GetDataTypedefBase(memberType) ! if member_DataType["%encapsulate"] then ! table.insert(codeList, " wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_"..MakeVar(member_DataType.Name).."(("..returnCast..")returns));\n") ! else ! table.insert(codeList, " wxluaO_addgcobject(L, ("..returnCast..")returns);\n") ! end elseif (not member["%operator"]) and (memberPtr == "&") and string.find(memberTypeWithAttrib, "*") and (memberType ~= "wxString") then --- 3847,3851 ---- local member_DataType = GetDataTypedefBase(memberType) ! table.insert(codeList, " wxluaO_addgcobject(L, returns, wxluatype_"..MakeVar(member_DataType.Name)..");\n") elseif (not member["%operator"]) and (memberPtr == "&") and string.find(memberTypeWithAttrib, "*") and (memberType ~= "wxString") then *************** *** 3936,3944 **** if member.GC then ! if dataTypeTable[memberType]["%encapsulate"] then ! table.insert(codeList, " if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_"..MakeVar(memberType).."(returns));\n") ! else ! table.insert(codeList, " if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, returns);\n") ! end elseif member.UnGC then table.insert(codeList, " if (wxluaO_isgcobject(L, returns)) wxluaO_undeletegcobject(L, returns);\n") --- 3855,3859 ---- if member.GC then ! table.insert(codeList, " if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, returns, wxluatype_"..MakeVar(memberType)..");\n") elseif member.UnGC then table.insert(codeList, " if (wxluaO_isgcobject(L, returns)) wxluaO_undeletegcobject(L, returns);\n") *************** *** 4058,4079 **** end - - -- Extern Class Tag Declaration - local tagcondition = FixCondition(parseObject.Condition) - local classTypeBinding = - { - ExternDeclaration = "extern "..MakeImpExpData("int").." wxluatype_"..MakeClassVar(parseObject.Name)..";\n", - --ExternMethodDeclaration = "extern "..output_cpp_impexpsymbol.." wxLuaBindMethod "..MakeVar(parseObject.Name).."_methods[];\n", - --ExternMethodCountDeclaration = "extern "..MakeImpExpData("int").." "..MakeVar(parseObject.Name).."_methodCount;\n", - ExternMethodDeclaration = "extern wxLuaBindMethod "..MakeVar(parseObject.Name).."_methods[];\n", - ExternMethodCountDeclaration = "extern int "..MakeVar(parseObject.Name).."_methodCount;\n", - ExternEnumDeclaration = ExternEnumDeclaration, - ExternEnumCountDeclaration = ExternEnumCountDeclaration, - Condition = tagcondition - } - - if not classTypeBindingTable[tagcondition] then classTypeBindingTable[tagcondition] = {} end - classTypeBindingTable[tagcondition][parseObject.Name] = classTypeBinding - -- Class Tag Declaration local decl = ""; --- 3973,3976 ---- *************** *** 4135,4141 **** end local classinfo = "NULL" ! if not parseObject["%noclassinfo"] then classinfo = "CLASSINFO("..parseObject.Name..")" end --- 4032,4062 ---- end + local wxlua_delete_function_name = "wxLua_"..MakeVar(parseObject.Name).."_delete_function" + + -- Extern Class Tag Declaration + local tagcondition = FixCondition(parseObject.Condition) + local classTypeBinding = + { + LuaName = MakeVar(parseObject.Name), + ExternDeclaration = "extern "..MakeImpExpData("int").." wxluatype_"..MakeClassVar(parseObject.Name)..";\n", + --ExternMethodDeclaration = "extern "..output_cpp_impexpsymbol.." wxLuaBindMethod "..MakeVar(parseObject.Name).."_methods[];\n", + --ExternMethodCountDeclaration = "extern "..MakeImpExpData("int").." "..MakeVar(parseObject.Name).."_methodCount;\n", + ExternMethodDeclaration = "extern wxLuaBindMethod "..MakeVar(parseObject.Name).."_methods[];\n", + ExternMethodCountDeclaration = "extern int "..MakeVar(parseObject.Name).."_methodCount;\n", + ExternEnumDeclaration = ExternEnumDeclaration, + ExternEnumCountDeclaration = ExternEnumCountDeclaration, + BaseClassTypes = baseclassTypes, + BaseClassVtableOffsets = baseclassVtableOffsets, + ExternDeleteFunction = "extern void "..wxlua_delete_function_name.."(void** p);\n", + Condition = tagcondition + } + + if not classTypeBindingTable[tagcondition] then classTypeBindingTable[tagcondition] = {} end + classTypeBindingTable[tagcondition][parseObject.Name] = classTypeBinding local classinfo = "NULL" ! local is_wxObject = IsDerivedClass(parseObject.Name, "wxObject") ! ! if is_wxObject then classinfo = "CLASSINFO("..parseObject.Name..")" end *************** *** 4163,4170 **** local funcType = "WXLUAMETHOD_METHOD" - if parseObject["%encapsulate"] then - --funcType = AddOredValue(funcType, "WXLUAMETHOD_ENCAPSULATE") FIXME - end - local delMethodBinding = { --- 4084,4087 ---- *************** *** 4191,4194 **** --- 4108,4112 ---- table.insert(interface.objectData[o].BindTable, delMethodBinding) end + local classcondition = FixCondition(parseObject.Condition) *************** *** 4207,4214 **** ..enumArrayName..", " ..enumArrayCountName..", " .."}, \n", BaseClasses = dataTypeTable[parseObject.Name].BaseClasses, - BaseClassTypes = baseclassTypes, - BaseClassVtableOffsets = baseclassVtableOffsets, Condition = classcondition } --- 4125,4131 ---- ..enumArrayName..", " ..enumArrayCountName..", " + .."&"..wxlua_delete_function_name..", " .."}, \n", BaseClasses = dataTypeTable[parseObject.Name].BaseClasses, Condition = classcondition } *************** *** 4421,4453 **** table.insert(fileData, "\n") - -- ------------------------------------------------------------------------ - -- Encapsulation Declarations - sorted by condition for the C++ compiler - -- ------------------------------------------------------------------------ - - table.insert(fileData, "// ---------------------------------------------------------------------------\n") - table.insert(fileData, "// Encapsulation Declarations - need to be public for other bindings.\n") - table.insert(fileData, "// ---------------------------------------------------------------------------\n\n") - - for condition, encapsulationBindingList in pairs_sort(encapsulationBindingTable) do - local indent = "" - - if HasCondition(condition) then - indent = " " - table.insert(fileData, "#if "..condition.."\n") - end - - for idx, encapsulationBinding in pairs_sort(encapsulationBindingList) do - if encapsulationBinding and encapsulationBinding.Declaration then - table.insert(fileData, indent..encapsulationBinding.Declaration) - end - end - - if HasCondition(condition) then - table.insert(fileData, "#endif // "..condition.."\n\n") - else - table.insert(fileData, "\n") - end - end - table.insert(fileData, "\n") table.insert(fileData, "#endif // __HOOK_WXLUA_"..hook_cpp_namespace.."_H__\n\n") --- 4338,4341 ---- *************** *** 4541,4549 **** table.insert(fileData, s.." NULL };\n") table.insert(fileData, "static wxLuaBindClass* wxluabaseclassbinds_"..sortedBindings[n][i].LuaName.."[] = { "..string.sub(string.rep("NULL, ", bc_n), 1, -3).." };\n") - - if sortedBindings[n][i].BaseClassVtableOffsets then - table.insert(fileData, "static wxLuaArgType wxluabaseclass_wxluatypes_"..sortedBindings[n][i].LuaName.."[] = "..sortedBindings[n][i].BaseClassTypes.."\n") - table.insert(fileData, "static int wxluabaseclass_vtable_offsets_"..sortedBindings[n][i].LuaName.."[] = "..sortedBindings[n][i].BaseClassVtableOffsets.."\n") - end end end --- 4429,4432 ---- *************** *** 4575,4578 **** --- 4458,4468 ---- table.insert(fileData, indent..classTypeBinding.ExternEnumCountDeclaration) end + + if classTypeBinding.BaseClassVtableOffsets then + table.insert(fileData, indent.."static wxLuaArgType wxluabaseclass_wxluatypes_"..classTypeBinding.LuaName.."[] = "..classTypeBinding.BaseClassTypes.."\n") + table.insert(fileData, indent.."static int wxluabaseclass_vtable_offsets_"..classTypeBinding.LuaName.."[] = "..classTypeBinding.BaseClassVtableOffsets.."\n") + end + + table.insert(fileData, indent..classTypeBinding.ExternDeleteFunction) end *************** *** 4640,4662 **** end - -- ------------------------------------------------------------------------ - -- Encapsulation Implementation - -- ------------------------------------------------------------------------ - for condition, encapsulationBindingList in pairs_sort(encapsulationBindingTable) do - if HasCondition(condition) then - table.insert(fileData, "\n#if "..condition.."\n") - end - - for idx, encapsulationBinding in pairs_sort(encapsulationBindingList) do - if encapsulationBinding and encapsulationBinding.Declaration then - table.insert(fileData, encapsulationBinding.Implementation) - end - end - - if HasCondition(condition) then - table.insert(fileData, "#endif // "..condition.."\n\n") - end - end - table.insert(fileData, "\n") --- 4530,4533 ---- *************** *** 5036,5039 **** --- 4907,4927 ---- GenerateMap(fileData, overloadBindings, " ", writeFunc, true, object.Condition) + -- Generate the C++ delete function + + local wxlua_delete_function_name = "wxLua_"..MakeClassVar(ObjectName).."_delete_function" + local wxlua_delete_function_code = "" + + if overrideTable[wxlua_delete_function_name] then + overrideTableUsed[wxlua_delete_function_name] = true + wxlua_delete_function_code = table.concat(overrideTable[wxlua_delete_function_name]) + else + wxlua_delete_function_code = + "void "..wxlua_delete_function_name.."(void** p)\n{\n".. + " "..ObjectName.."* o = ("..ObjectName.."*)(*p);\n".. + " delete o;\n}\n\n" + end + + table.insert(fileData, wxlua_delete_function_code); + -- Output Method Map Table |
From: John L. <jr...@us...> - 2009-10-01 04:21:30
|
Update of /cvsroot/wxlua/wxLua/samples In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/samples Modified Files: bindings.wx.lua Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: bindings.wx.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/samples/bindings.wx.lua,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** bindings.wx.lua 20 May 2009 04:43:41 -0000 1.25 --- bindings.wx.lua 1 Oct 2009 04:21:02 -0000 1.26 *************** *** 339,348 **** local t = { {"..", ["icon"] = list_images.folder}, ! ["col_labels"] = { "Class Name", "# Methods", "wxClassInfo", "Class Tag", "Base Class Names", "# Enums" }, ["object_type"] = "wxLuaBindClass" } -- items in table from binding.GetClassArray are these ! -- { "name", "wxluamethods", "wxluamethods_n", "classInfo", "wxluatype", "baseclassNames", "baseBindClasses", "enums", "enums_n" } local function GetClassInfoStr(classInfo) --- 339,348 ---- local t = { {"..", ["icon"] = list_images.folder}, ! ["col_labels"] = { "Class Name", "# Methods", "wxClassInfo", "Class Tag", "Base Class Names", "# Enums", "VTable Offsets" }, ["object_type"] = "wxLuaBindClass" } -- items in table from binding.GetClassArray are these ! -- { "name", "wxluamethods", "wxluamethods_n", "classInfo", "wxluatype", "baseclassNames", "baseBindClasses", "baseclass_wxluatypes", "baseclass_vtable_offsets", "enums", "enums_n" } local function GetClassInfoStr(classInfo) *************** *** 365,368 **** --- 365,384 ---- end + local function GetVTableOffsets(cbind_tbl) + local s = "" + + local baseclass_wxluatypes = cbind_tbl.baseclass_wxluatypes + local baseclass_vtable_offsets = cbind_tbl.baseclass_vtable_offsets + + if baseclass_wxluatypes then + for i = 1, #baseclass_wxluatypes do + s = s..string.format("%s(+%d),", wxlua.typename(baseclass_wxluatypes[i]), baseclass_vtable_offsets[i]) + end + s = string.sub(s, 1, -2) + end + + return s + end + t.col_numbers = {} t.col_numbers[2] = true *************** *** 379,382 **** --- 395,399 ---- table.concat(tbl[i].baseclassNames or {}, ","), tbl[i].enums_n, + GetVTableOffsets(tbl[i]), ["col_icons"] = {}, ["data"] = {} *************** *** 1101,1132 **** -- now do wxWidgets base class info if c.classInfo then local ci = c.classInfo ! local c_table2 = {a.."wx"} ! while ci do ! -- we don't bind some classes since we wouldn't need them ! if unwrappedBaseClasses[ci:GetClassName()] then ! c_table2[#c_table2] = c_table2[#c_table2].."("..ci:GetClassName()..")" ! elseif c_table[#c_table2+1] and (wxwidgetsNoClassInfo[c_table[#c_table2+1]] == ci:GetClassName()) then ! table.insert(c_table2, c_table[#c_table2+1].." - No wxClassInfo") ! table.insert(c_table2, ci:GetClassName()) ! elseif c_table[#c_table2+1] and classinfoNotes[c_table[#c_table2+1]] then ! c_table[#c_table2+1] = c_table[#c_table2+1]..classinfoNotes[c_table[#c_table2+1]] ! table.insert(c_table2, ci:GetClassName()) ! c_table2.color = list_colors.purple ! else ! table.insert(c_table2, ci:GetClassName()) ! if ((c_table[#c_table2] ~= c_table2[#c_table2])) and ! (c_table2.color == nil) then ! c_table2.color = wx.wxRED end end ! ! if ci:GetBaseClass2() then print(ci:GetClassName(), "Has two bases!") end ! ci = ci:GetBaseClass1() -- FIXME handle two base classes, maybe? end - if max_cols < #c_table2 then max_cols = #c_table2 end - table.insert(t, c_table2) end --- 1118,1154 ---- -- now do wxWidgets base class info if c.classInfo then + local ci = c.classInfo ! local ci_table = GetwxClassInfoBases(ci) ! for ci_i = 1, #ci_table do ! ! local ci_table_i = ci_table[ci_i]; ! ! local c_table2 = {a.."wx"..tostring(ci_i)} ! for ci_ij = 1, #ci_table_i do ! ! if unwrappedBaseClasses[ci_table_i[ci_ij]] then ! c_table2[#c_table2] = c_table2[#c_table2].."("..ci_table_i[ci_ij]..")" ! elseif c_table[#c_table2+1] and (wxwidgetsNoClassInfo[c_table[#c_table2+1]] == ci_table_i[ci_ij]) then ! table.insert(c_table2, c_table[#c_table2+1].." - No wxClassInfo") ! table.insert(c_table2, ci_table_i[ci_ij]) ! elseif c_table[#c_table2+1] and classinfoNotes[c_table[#c_table2+1]] then ! c_table[#c_table2+1] = c_table[#c_table2+1]..classinfoNotes[c_table[#c_table2+1]] ! table.insert(c_table2, ci_table_i[ci_ij]) ! c_table2.color = list_colors.purple ! else ! table.insert(c_table2, ci_table_i[ci_ij]) ! if ((c_table[1][#c_table2] ~= c_table2[#c_table2])) and ! (c_table2.color == nil) then ! c_table2.color = wx.wxRED ! end end end ! ! if max_cols < #c_table2 then max_cols = #c_table2 end ! table.insert(t, c_table2) end end *************** *** 1150,1153 **** --- 1172,1208 ---- -- ---------------------------------------------------------------------------- + -- Create a table of baseclasses from a class wxWidgets wxClassInfo + -- ---------------------------------------------------------------------------- + + -- create a table of tables of cols of the classname and baseclass names + -- if there is a baseclass2 then the returned table will have > 1 tables + function GetwxClassInfoBases(ci) + local c = ci + local t = {{}} + + while c do + table.insert(t[1], c:GetClassName()) + + if c:GetBaseClass2() then + --print(c:GetClassName(), "Has Base2", c:GetBaseClass2()) + + local baseTable2 = GetwxClassInfoBases(c:GetBaseClass2()) + for i = 1, #baseTable2 do + -- insert back in the original info + for j = 1, #t do + table.insert(baseTable2[i], j, t[1][j]) + end + baseTable2[i][1] = baseTable2[i][1].." (base class #"..tostring(i)..")" -- count # of base2s + table.insert(t, baseTable2[i]) + end + end + + c = c:GetBaseClass1() + end + + return t + end + + -- ---------------------------------------------------------------------------- -- Load all the wxWidgets wxClassInfo -- ---------------------------------------------------------------------------- *************** *** 1167,1202 **** end - -- create a table of tables of cols of the classname and baseclass names - -- if there is a baseclass2 then the returned table will have > 1 tables - local function GetBases(ci) - local c = ci - local t = {{}} - - while c do - table.insert(t[1], c:GetClassName()) - - if c:GetBaseClass2() then - --print(c:GetClassName(), "Has Base2", c:GetBaseClass2()) - - local baseTable2 = GetBases(c:GetBaseClass2()) - for i = 1, #baseTable2 do - -- insert back in the original info - for j = 1, #t do - table.insert(baseTable2[i], j, t[1][j]) - end - baseTable2[i][1] = baseTable2[i][1].." (Multiple base classes "..tostring(i)..")" -- count # of base2s - table.insert(t, baseTable2[i]) - end - end - - c = c:GetBaseClass1() - end - - return t - end - local t = { {"..", ["icon"] = list_images.folder}, ! ["col_labels"] = {"wxClassInfo::GetClassName() (wxLua wraps blue)"}, ["object_type"] = "All wxWidgets wxClassInfo" } --- 1222,1228 ---- end local t = { {"..", ["icon"] = list_images.folder}, ! ["col_labels"] = {"wxClassInfo::GetClassName() (wxLua wraps blue)"}, ["object_type"] = "All wxWidgets wxClassInfo" } *************** *** 1206,1210 **** while ci do ! local baseTable = GetBases(ci) for i = 1, #baseTable do if wxluaClasses[baseTable[i][1]] then --- 1232,1236 ---- while ci do ! local baseTable = GetwxClassInfoBases(ci) for i = 1, #baseTable do if wxluaClasses[baseTable[i][1]] then *************** *** 1385,1388 **** --- 1411,1416 ---- --bmp:delete() + toolbar:Realize() + -- ----------------------------------------------------------------------- |
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxbind/src Modified Files: wxadv_bind.cpp wxaui_bind.cpp wxbase_base.cpp wxbase_bind.cpp wxbase_config.cpp wxbase_data.cpp wxbase_datetime.cpp wxbase_file.cpp wxcore_appframe.cpp wxcore_bind.cpp wxcore_clipdrag.cpp wxcore_controls.cpp wxcore_core.cpp wxcore_defsutils.cpp wxcore_dialogs.cpp wxcore_event.cpp wxcore_gdi.cpp wxcore_geometry.cpp wxcore_help.cpp wxcore_image.cpp wxcore_mdi.cpp wxcore_menutool.cpp wxcore_picker.cpp wxcore_print.cpp wxcore_sizer.cpp wxcore_windows.cpp wxcore_wxlcore.cpp wxgl_bind.cpp wxhtml_bind.cpp wxmedia_bind.cpp wxnet_bind.cpp wxstc_bind.cpp wxxml_bind.cpp wxxrc_bind.cpp Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxcore_core.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_core.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxcore_core.cpp 27 Sep 2009 03:13:53 -0000 1.14 --- wxcore_core.cpp 1 Oct 2009 04:21:01 -0000 1.15 *************** *** 46,50 **** wxLogGui* returns = new wxLogGui(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxLogGui((wxLogGui*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLogGui); --- 46,50 ---- wxLogGui* returns = new wxLogGui(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLogGui); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLogGui); *************** *** 56,59 **** --- 56,65 ---- + void wxLua_wxLogGui_delete_function(void** p) + { + wxLogGui* o = (wxLogGui*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLogGui_methods[] = { *************** *** 93,97 **** wxLogTextCtrl* returns = new wxLogTextCtrl(textCtrl); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxLogTextCtrl((wxLogTextCtrl*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLogTextCtrl); --- 99,103 ---- wxLogTextCtrl* returns = new wxLogTextCtrl(textCtrl); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLogTextCtrl); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLogTextCtrl); *************** *** 104,107 **** --- 110,119 ---- + void wxLua_wxLogTextCtrl_delete_function(void** p) + { + wxLogTextCtrl* o = (wxLogTextCtrl*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLogTextCtrl_methods[] = { *************** *** 187,191 **** wxLogWindow* returns = new wxLogWindow(pParent, szTitle, bShow, bPassToOld); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxLogWindow((wxLogWindow*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLogWindow); --- 199,203 ---- wxLogWindow* returns = new wxLogWindow(pParent, szTitle, bShow, bPassToOld); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLogWindow); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLogWindow); *************** *** 197,200 **** --- 209,218 ---- + void wxLua_wxLogWindow_delete_function(void** p) + { + wxLogWindow* o = (wxLogWindow*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLogWindow_methods[] = { *************** *** 236,240 **** wxColour* returns = new wxColour(wxSystemSettings::GetColour(index)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (wxColour*)returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); --- 254,258 ---- wxColour* returns = new wxColour(wxSystemSettings::GetColour(index)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxColour); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); *************** *** 258,262 **** wxFont* returns = new wxFont(wxSystemSettings::GetFont(index)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (wxFont*)returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFont); --- 276,280 ---- wxFont* returns = new wxFont(wxSystemSettings::GetFont(index)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxFont); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFont); *************** *** 333,336 **** --- 351,360 ---- + void wxLua_wxSystemSettings_delete_function(void** p) + { + wxSystemSettings* o = (wxSystemSettings*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxSystemSettings_methods[] = { *************** *** 478,481 **** --- 502,511 ---- + void wxLua_wxValidator_delete_function(void** p) + { + wxValidator* o = (wxValidator*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxValidator_methods[] = { *************** *** 642,645 **** --- 672,681 ---- + void wxLua_wxTextValidator_delete_function(void** p) + { + wxTextValidator* o = (wxTextValidator*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTextValidator_methods[] = { *************** *** 691,695 **** wxGenericValidator *returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 727,731 ---- wxGenericValidator *returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 711,715 **** wxGenericValidator *returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 747,751 ---- wxGenericValidator *returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 731,735 **** wxGenericValidator *returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 767,771 ---- wxGenericValidator *returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 751,755 **** wxGenericValidator *returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 787,791 ---- wxGenericValidator *returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 762,765 **** --- 798,807 ---- + void wxLua_wxGenericValidator_delete_function(void** p) + { + wxGenericValidator* o = (wxGenericValidator*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxGenericValidator_methods[] = { *************** *** 891,895 **** wxMemoryFSHandler* returns = new wxMemoryFSHandler(); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMemoryFSHandler); --- 933,937 ---- wxMemoryFSHandler* returns = new wxMemoryFSHandler(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxMemoryFSHandler); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMemoryFSHandler); *************** *** 919,922 **** --- 961,970 ---- #endif // ((wxLUA_USE_wxBitmap) && ((wxUSE_STREAMS && wxUSE_FILESYSTEM) && (wxUSE_IMAGE)))||((wxLUA_USE_wxImage && wxUSE_IMAGE) && ((wxUSE_STREAMS && wxUSE_FILESYSTEM) && (wxUSE_IMAGE)))||(wxUSE_STREAMS && wxUSE_FILESYSTEM) + void wxLua_wxMemoryFSHandler_delete_function(void** p) + { + wxMemoryFSHandler* o = (wxMemoryFSHandler*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxMemoryFSHandler_methods[] = { Index: wxcore_clipdrag.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_clipdrag.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxcore_clipdrag.cpp 27 Sep 2009 03:13:53 -0000 1.16 --- wxcore_clipdrag.cpp 1 Oct 2009 04:21:01 -0000 1.17 *************** *** 237,240 **** --- 237,246 ---- + void wxLua_wxClipboard_delete_function(void** p) + { + wxClipboard* o = (wxClipboard*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxClipboard_methods[] = { *************** *** 317,321 **** wxClipboardLocker* returns = new wxClipboardLocker(clipboard); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxClipboardLocker((wxClipboardLocker*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxClipboardLocker); --- 323,327 ---- wxClipboardLocker* returns = new wxClipboardLocker(clipboard); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxClipboardLocker); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxClipboardLocker); *************** *** 327,330 **** --- 333,342 ---- + void wxLua_wxClipboardLocker_delete_function(void** p) + { + wxClipboardLocker* o = (wxClipboardLocker*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxClipboardLocker_methods[] = { *************** *** 367,371 **** wxClipboardTextEvent* returns = new wxClipboardTextEvent(type, winid); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxClipboardTextEvent); --- 379,383 ---- wxClipboardTextEvent* returns = new wxClipboardTextEvent(type, winid); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxClipboardTextEvent); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxClipboardTextEvent); *************** *** 377,380 **** --- 389,398 ---- + void wxLua_wxClipboardTextEvent_delete_function(void** p) + { + wxClipboardTextEvent* o = (wxClipboardTextEvent*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxClipboardTextEvent_methods[] = { *************** *** 494,498 **** wxDataFormat* returns = new wxDataFormat(format); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDataFormat((wxDataFormat*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); --- 512,516 ---- wxDataFormat* returns = new wxDataFormat(format); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDataFormat); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); *************** *** 514,518 **** wxDataFormat* returns = new wxDataFormat(format); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDataFormat((wxDataFormat*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); --- 532,536 ---- wxDataFormat* returns = new wxDataFormat(format); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDataFormat); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); *************** *** 535,538 **** --- 553,562 ---- #endif // (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ) + void wxLua_wxDataFormat_delete_function(void** p) + { + wxDataFormat* o = (wxDataFormat*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDataFormat_methods[] = { *************** *** 693,697 **** wxDataFormat* returns = new wxDataFormat(self->GetPreferredFormat(dir)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDataFormat((wxDataFormat*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); --- 717,721 ---- wxDataFormat* returns = new wxDataFormat(self->GetPreferredFormat(dir)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDataFormat); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); *************** *** 727,730 **** --- 751,760 ---- + void wxLua_wxDataObject_delete_function(void** p) + { + wxDataObject* o = (wxDataObject*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDataObject_methods[] = { *************** *** 879,883 **** wxDataObjectSimple* returns = new wxDataObjectSimple(*format); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDataObjectSimple((wxDataObjectSimple*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataObjectSimple); --- 909,913 ---- wxDataObjectSimple* returns = new wxDataObjectSimple(*format); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDataObjectSimple); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataObjectSimple); *************** *** 889,892 **** --- 919,928 ---- + void wxLua_wxDataObjectSimple_delete_function(void** p) + { + wxDataObjectSimple* o = (wxDataObjectSimple*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDataObjectSimple_methods[] = { *************** *** 950,954 **** wxDataFormat* returns = new wxDataFormat(self->GetReceivedFormat()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDataFormat((wxDataFormat*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); --- 986,990 ---- wxDataFormat* returns = new wxDataFormat(self->GetReceivedFormat()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDataFormat); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataFormat); *************** *** 970,974 **** wxDataObjectComposite* returns = new wxDataObjectComposite(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDataObjectComposite((wxDataObjectComposite*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataObjectComposite); --- 1006,1010 ---- wxDataObjectComposite* returns = new wxDataObjectComposite(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDataObjectComposite); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDataObjectComposite); *************** *** 980,983 **** --- 1016,1025 ---- + void wxLua_wxDataObjectComposite_delete_function(void** p) + { + wxDataObjectComposite* o = (wxDataObjectComposite*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDataObjectComposite_methods[] = { *************** *** 1037,1041 **** wxArrayString* returns = new wxArrayString(self->GetFilenames()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxArrayString((wxArrayString*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxArrayString); --- 1079,1083 ---- wxArrayString* returns = new wxArrayString(self->GetFilenames()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxArrayString); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxArrayString); *************** *** 1057,1061 **** wxFileDataObject* returns = new wxFileDataObject(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxFileDataObject((wxFileDataObject*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxFileDataObject); --- 1099,1103 ---- wxFileDataObject* returns = new wxFileDataObject(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxFileDataObject); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxFileDataObject); *************** *** 1067,1070 **** --- 1109,1118 ---- + void wxLua_wxFileDataObject_delete_function(void** p) + { + wxFileDataObject* o = (wxFileDataObject*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxFileDataObject_methods[] = { *************** *** 1158,1162 **** wxTextDataObject* returns = new wxTextDataObject(text); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxTextDataObject((wxTextDataObject*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxTextDataObject); --- 1206,1210 ---- wxTextDataObject* returns = new wxTextDataObject(text); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxTextDataObject); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxTextDataObject); *************** *** 1168,1171 **** --- 1216,1225 ---- + void wxLua_wxTextDataObject_delete_function(void** p) + { + wxTextDataObject* o = (wxTextDataObject*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxTextDataObject_methods[] = { *************** *** 1205,1209 **** wxBitmap* returns = new wxBitmap(self->GetBitmap()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (wxBitmap*)returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); --- 1259,1263 ---- wxBitmap* returns = new wxBitmap(self->GetBitmap()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBitmap); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); *************** *** 1248,1252 **** wxBitmapDataObject* returns = new wxBitmapDataObject(*bitmap); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxBitmapDataObject((wxBitmapDataObject*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmapDataObject); --- 1302,1306 ---- wxBitmapDataObject* returns = new wxBitmapDataObject(*bitmap); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBitmapDataObject); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmapDataObject); *************** *** 1259,1262 **** --- 1313,1322 ---- + void wxLua_wxBitmapDataObject_delete_function(void** p) + { + wxBitmapDataObject* o = (wxBitmapDataObject*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxBitmapDataObject_methods[] = { *************** *** 1336,1340 **** wxURLDataObject* returns = new wxURLDataObject(url); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxURLDataObject((wxURLDataObject*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxURLDataObject); --- 1396,1400 ---- wxURLDataObject* returns = new wxURLDataObject(url); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxURLDataObject); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxURLDataObject); *************** *** 1346,1349 **** --- 1406,1415 ---- + void wxLua_wxURLDataObject_delete_function(void** p) + { + wxURLDataObject* o = (wxURLDataObject*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxURLDataObject_methods[] = { *************** *** 1388,1391 **** --- 1454,1463 ---- + void wxLua_wxDropTarget_delete_function(void** p) + { + wxDropTarget* o = (wxDropTarget*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDropTarget_methods[] = { *************** *** 1512,1516 **** wxDropSource* returns = new wxDropSource(*data, win, *iconCopy, *iconMove, *iconStop); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDropSource((wxDropSource*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); --- 1584,1588 ---- wxDropSource* returns = new wxDropSource(*data, win, *iconCopy, *iconMove, *iconStop); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDropSource); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); *************** *** 1543,1547 **** wxDropSource* returns = new wxDropSource(*data, win, *cursorCopy, *cursorMove, *cursorStop); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDropSource((wxDropSource*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); --- 1615,1619 ---- wxDropSource* returns = new wxDropSource(*data, win, *cursorCopy, *cursorMove, *cursorStop); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDropSource); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); *************** *** 1572,1576 **** wxDropSource* returns = new wxDropSource(win, *iconCopy, *iconMove, *iconStop); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDropSource((wxDropSource*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); --- 1644,1648 ---- wxDropSource* returns = new wxDropSource(win, *iconCopy, *iconMove, *iconStop); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDropSource); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); *************** *** 1601,1605 **** wxDropSource* returns = new wxDropSource(win, *cursorCopy, *cursorMove, *cursorStop); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxDropSource((wxDropSource*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); --- 1673,1677 ---- wxDropSource* returns = new wxDropSource(win, *cursorCopy, *cursorMove, *cursorStop); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxDropSource); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxDropSource); *************** *** 1637,1640 **** --- 1709,1718 ---- #endif // ((((wxLUA_USE_wxIcon) && (wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP)) && ((defined(__WXGTK__)) && (wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP))) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ))||(((((defined(__WXMSW__)) && (wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP)) && (wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP)) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ)) && (wxLUA_USE_wxCursor))||(((wxLUA_USE_wxIcon) && (wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP)) && ((defined(__WXGTK__)) && (wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP)))||(((wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP) && (wxLUA_USE_wxCursor)) && ((defined(__WXMSW__) || defined(__WXMAC__)) && (wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP))) + void wxLua_wxDropSource_delete_function(void** p) + { + wxDropSource* o = (wxDropSource*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDropSource_methods[] = { *************** *** 1731,1735 **** wxPoint* returns = new wxPoint(self->GetPosition()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxPoint((wxPoint*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); --- 1809,1813 ---- wxPoint* returns = new wxPoint(self->GetPosition()); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxPoint); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxPoint); *************** *** 1746,1749 **** --- 1824,1833 ---- + void wxLua_wxDropFilesEvent_delete_function(void** p) + { + wxDropFilesEvent* o = (wxDropFilesEvent*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxDropFilesEvent_methods[] = { *************** *** 1849,1853 **** wxMetafile* returns = new wxMetafile(filename); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMetafile); --- 1933,1937 ---- wxMetafile* returns = new wxMetafile(filename); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxMetafile); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMetafile); *************** *** 1859,1862 **** --- 1943,1952 ---- + void wxLua_wxMetafile_delete_function(void** p) + { + wxMetafile* o = (wxMetafile*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxMetafile_methods[] = { *************** *** 1898,1902 **** // call Close wxMetafile* returns = (wxMetafile*)self->Close(); ! if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxMetafile); --- 1988,1992 ---- // call Close wxMetafile* returns = (wxMetafile*)self->Close(); ! if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, returns, wxluatype_wxMetafile); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxMetafile); *************** *** 1923,1927 **** wxMetafileDC* returns = new wxMetafileDC(filename); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMetafileDC); --- 2013,2017 ---- wxMetafileDC* returns = new wxMetafileDC(filename); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxMetafileDC); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMetafileDC); *************** *** 1933,1936 **** --- 2023,2032 ---- + void wxLua_wxMetafileDC_delete_function(void** p) + { + wxMetafileDC* o = (wxMetafileDC*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxMetafileDC_methods[] = { Index: wxcore_event.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxcore_event.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxcore_event.cpp 27 Sep 2009 03:13:53 -0000 1.17 --- wxcore_event.cpp 1 Oct 2009 04:21:01 -0000 1.18 *************** *** 463,467 **** wxEvtHandler* returns = new wxEvtHandler(); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxEvtHandler); --- 463,467 ---- wxEvtHandler* returns = new wxEvtHandler(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxEvtHandler); // push the constructed class pointer [...1073 lines suppressed...] wxluaT_pushuserdatatype(L, returns, wxluatype_wxHelpEvent); --- 5129,5133 ---- wxHelpEvent* returns = new wxHelpEvent(type, id, *pt); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxHelpEvent); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxHelpEvent); *************** *** 4935,4938 **** --- 5157,5166 ---- #endif // ((wxLUA_USE_wxPointSizeRect) && (wxCHECK_VERSION(2,8,0)))||((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxPointSizeRect)) + void wxLua_wxHelpEvent_delete_function(void** p) + { + wxHelpEvent* o = (wxHelpEvent*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxHelpEvent_methods[] = { Index: wxaui_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxaui_bind.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxaui_bind.cpp 27 Sep 2009 03:13:51 -0000 1.20 --- wxaui_bind.cpp 1 Oct 2009 04:21:01 -0000 1.21 *************** *** 139,143 **** wxAuiNotebookEvent* returns = new wxAuiNotebookEvent(*c); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookEvent); --- 139,143 ---- wxAuiNotebookEvent* returns = new wxAuiNotebookEvent(*c); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiNotebookEvent); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookEvent); *************** *** 161,165 **** wxAuiNotebookEvent* returns = new wxAuiNotebookEvent(command_type, win_id); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookEvent); --- 161,165 ---- wxAuiNotebookEvent* returns = new wxAuiNotebookEvent(command_type, win_id); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiNotebookEvent); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookEvent); *************** *** 182,185 **** --- 182,191 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiNotebookEvent_delete_function(void** p) + { + wxAuiNotebookEvent* o = (wxAuiNotebookEvent*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiNotebookEvent_methods[] = { *************** *** 387,390 **** --- 393,402 ---- + void wxLua_wxAuiNotebookPage_delete_function(void** p) + { + wxAuiNotebookPage* o = (wxAuiNotebookPage*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiNotebookPage_methods[] = { *************** *** 545,549 **** wxAuiNotebookPage* returns = new wxAuiNotebookPage(self->Item(nIndex)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiNotebookPage((wxAuiNotebookPage*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookPage); --- 557,561 ---- wxAuiNotebookPage* returns = new wxAuiNotebookPage(self->Item(nIndex)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiNotebookPage); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookPage); *************** *** 582,586 **** wxAuiNotebookPageArray* returns = new wxAuiNotebookPageArray(*array); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiNotebookPageArray((wxAuiNotebookPageArray*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookPageArray); --- 594,598 ---- wxAuiNotebookPageArray* returns = new wxAuiNotebookPageArray(*array); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiNotebookPageArray); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookPageArray); *************** *** 597,601 **** wxAuiNotebookPageArray* returns = new wxAuiNotebookPageArray(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiNotebookPageArray((wxAuiNotebookPageArray*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookPageArray); --- 609,613 ---- wxAuiNotebookPageArray* returns = new wxAuiNotebookPageArray(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiNotebookPageArray); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiNotebookPageArray); *************** *** 618,621 **** --- 630,639 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiNotebookPageArray_delete_function(void** p) + { + wxAuiNotebookPageArray* o = (wxAuiNotebookPageArray*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiNotebookPageArray_methods[] = { *************** *** 861,864 **** --- 879,888 ---- + void wxLua_wxAuiTabContainerButton_delete_function(void** p) + { + wxAuiTabContainerButton* o = (wxAuiTabContainerButton*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiTabContainerButton_methods[] = { *************** *** 947,951 **** // call Clone wxAuiTabArt* returns = (wxAuiTabArt*)self->Clone(); ! if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiTabArt(returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiTabArt); --- 971,975 ---- // call Clone wxAuiTabArt* returns = (wxAuiTabArt*)self->Clone(); ! if (!wxluaO_isgcobject(L, returns)) wxluaO_addgcobject(L, returns, wxluatype_wxAuiTabArt); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiTabArt); *************** *** 1105,1109 **** wxSize* returns = new wxSize(self->GetTabSize(*dc, wnd, caption, *bitmap, active, close_button_state, x_extent)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxSize((wxSize*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); --- 1129,1133 ---- wxSize* returns = new wxSize(self->GetTabSize(*dc, wnd, caption, *bitmap, active, close_button_state, x_extent)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxSize); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxSize); *************** *** 1231,1234 **** --- 1255,1264 ---- + void wxLua_wxAuiTabArt_delete_function(void** p) + { + wxAuiTabArt* o = (wxAuiTabArt*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiTabArt_methods[] = { *************** *** 1293,1297 **** wxAuiDefaultTabArt* returns = new wxAuiDefaultTabArt(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiDefaultTabArt((wxAuiDefaultTabArt*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDefaultTabArt); --- 1323,1327 ---- wxAuiDefaultTabArt* returns = new wxAuiDefaultTabArt(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiDefaultTabArt); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDefaultTabArt); *************** *** 1303,1306 **** --- 1333,1342 ---- + void wxLua_wxAuiDefaultTabArt_delete_function(void** p) + { + wxAuiDefaultTabArt* o = (wxAuiDefaultTabArt*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiDefaultTabArt_methods[] = { *************** *** 1335,1339 **** wxAuiSimpleTabArt* returns = new wxAuiSimpleTabArt(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiSimpleTabArt((wxAuiSimpleTabArt*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiSimpleTabArt); --- 1371,1375 ---- wxAuiSimpleTabArt* returns = new wxAuiSimpleTabArt(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiSimpleTabArt); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiSimpleTabArt); *************** *** 1345,1348 **** --- 1381,1390 ---- + void wxLua_wxAuiSimpleTabArt_delete_function(void** p) + { + wxAuiSimpleTabArt* o = (wxAuiSimpleTabArt*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiSimpleTabArt_methods[] = { *************** *** 2012,2015 **** --- 2054,2063 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiTabCtrl_delete_function(void** p) + { + wxAuiTabCtrl* o = (wxAuiTabCtrl*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiTabCtrl_methods[] = { *************** *** 2290,2294 **** wxBitmap* returns = new wxBitmap(self->GetPageBitmap(page_idx)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (wxBitmap*)returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); --- 2338,2342 ---- wxBitmap* returns = new wxBitmap(self->GetPageBitmap(page_idx)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBitmap); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); *************** *** 2741,2744 **** --- 2789,2798 ---- #endif // ((wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) && (wxLUA_USE_wxPointSizeRect))||(wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiNotebook_delete_function(void** p) + { + wxAuiNotebook* o = (wxAuiNotebook*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiNotebook_methods[] = { *************** *** 2995,2999 **** wxColour* returns = new wxColour(self->GetColor(id)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (wxColour*)returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); --- 3049,3053 ---- wxColour* returns = new wxColour(self->GetColor(id)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxColour); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); *************** *** 3016,3020 **** wxColour* returns = new wxColour(self->GetColour(id)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (wxColour*)returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); --- 3070,3074 ---- wxColour* returns = new wxColour(self->GetColour(id)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxColour); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxColour); *************** *** 3040,3044 **** wxFont* returns = new wxFont(self->GetFont(id)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (wxFont*)returns); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFont); --- 3094,3098 ---- wxFont* returns = new wxFont(self->GetFont(id)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxFont); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxFont); *************** *** 3152,3155 **** --- 3206,3215 ---- + void wxLua_wxAuiDockArt_delete_function(void** p) + { + wxAuiDockArt* o = (wxAuiDockArt*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiDockArt_methods[] = { *************** *** 3213,3217 **** wxAuiDefaultDockArt* returns = new wxAuiDefaultDockArt(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiDefaultDockArt((wxAuiDefaultDockArt*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDefaultDockArt); --- 3273,3277 ---- wxAuiDefaultDockArt* returns = new wxAuiDefaultDockArt(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiDefaultDockArt); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDefaultDockArt); *************** *** 3223,3226 **** --- 3283,3292 ---- + void wxLua_wxAuiDefaultDockArt_delete_function(void** p) + { + wxAuiDefaultDockArt* o = (wxAuiDefaultDockArt*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiDefaultDockArt_methods[] = { *************** *** 3307,3310 **** --- 3373,3382 ---- + void wxLua_wxAuiFloatingFrame_delete_function(void** p) + { + wxAuiFloatingFrame* o = (wxAuiFloatingFrame*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiFloatingFrame_methods[] = { *************** *** 5250,5254 **** wxAuiPaneInfo* returns = new wxAuiPaneInfo(*c); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiPaneInfo((wxAuiPaneInfo*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); --- 5322,5326 ---- wxAuiPaneInfo* returns = new wxAuiPaneInfo(*c); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiPaneInfo); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); *************** *** 5265,5269 **** wxAuiPaneInfo* returns = new wxAuiPaneInfo(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiPaneInfo((wxAuiPaneInfo*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); --- 5337,5341 ---- wxAuiPaneInfo* returns = new wxAuiPaneInfo(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiPaneInfo); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); *************** *** 5344,5347 **** --- 5416,5425 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiPaneInfo_delete_function(void** p) + { + wxAuiPaneInfo* o = (wxAuiPaneInfo*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiPaneInfo_methods[] = { *************** *** 5700,5704 **** wxAuiPaneInfo* returns = new wxAuiPaneInfo(self->Item(nIndex)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiPaneInfo((wxAuiPaneInfo*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); --- 5778,5782 ---- wxAuiPaneInfo* returns = new wxAuiPaneInfo(self->Item(nIndex)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiPaneInfo); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfo); *************** *** 5737,5741 **** wxAuiPaneInfoArray* returns = new wxAuiPaneInfoArray(*array); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiPaneInfoArray((wxAuiPaneInfoArray*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfoArray); --- 5815,5819 ---- wxAuiPaneInfoArray* returns = new wxAuiPaneInfoArray(*array); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiPaneInfoArray); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfoArray); *************** *** 5752,5756 **** wxAuiPaneInfoArray* returns = new wxAuiPaneInfoArray(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiPaneInfoArray((wxAuiPaneInfoArray*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfoArray); --- 5830,5834 ---- wxAuiPaneInfoArray* returns = new wxAuiPaneInfoArray(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiPaneInfoArray); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiPaneInfoArray); *************** *** 5773,5776 **** --- 5851,5860 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiPaneInfoArray_delete_function(void** p) + { + wxAuiPaneInfoArray* o = (wxAuiPaneInfoArray*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiPaneInfoArray_methods[] = { *************** *** 5894,5898 **** wxRect* returns = new wxRect(self->CalculateHintRect(pane_window, *pt, *offset)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxRect((wxRect*)returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRect); --- 5978,5982 ---- wxRect* returns = new wxRect(self->CalculateHintRect(pane_window, *pt, *offset)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxRect); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxRect); *************** *** 6452,6457 **** // call constructor wxAuiManager* returns = new wxAuiManager(managed_wnd, flags); - // add to tracked window list, it will check validity - wxluaW_addtrackedwindow(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiManager); --- 6536,6539 ---- *************** *** 6489,6492 **** --- 6571,6580 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiManager_delete_function(void** p) + { + wxAuiManager* o = (wxAuiManager*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiManager_methods[] = { *************** *** 6775,6779 **** wxAuiManagerEvent* returns = new wxAuiManagerEvent(*c); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiManagerEvent); --- 6863,6867 ---- wxAuiManagerEvent* returns = new wxAuiManagerEvent(*c); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiManagerEvent); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiManagerEvent); *************** *** 6795,6799 **** wxAuiManagerEvent* returns = new wxAuiManagerEvent(type); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiManagerEvent); --- 6883,6887 ---- wxAuiManagerEvent* returns = new wxAuiManagerEvent(type); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiManagerEvent); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiManagerEvent); *************** *** 6816,6819 **** --- 6904,6913 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiManagerEvent_delete_function(void** p) + { + wxAuiManagerEvent* o = (wxAuiManagerEvent*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiManagerEvent_methods[] = { *************** *** 7243,7247 **** wxAuiDockInfo* returns = new wxAuiDockInfo(*c); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiDockInfo((wxAuiDockInfo*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDockInfo); --- 7337,7341 ---- wxAuiDockInfo* returns = new wxAuiDockInfo(*c); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiDockInfo); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDockInfo); *************** *** 7258,7262 **** wxAuiDockInfo* returns = new wxAuiDockInfo(); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxAuiDockInfo((wxAuiDockInfo*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDockInfo); --- 7352,7356 ---- wxAuiDockInfo* returns = new wxAuiDockInfo(); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxAuiDockInfo); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAuiDockInfo); *************** *** 7279,7282 **** --- 7373,7382 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiDockInfo_delete_function(void** p) + { + wxAuiDockInfo* o = (wxAuiDockInfo*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiDockInfo_methods[] = { *************** *** 7630,7633 **** --- 7730,7739 ---- + void wxLua_wxAuiDockUIPart_delete_function(void** p) + { + wxAuiDockUIPart* o = (wxAuiDockUIPart*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiDockUIPart_methods[] = { *************** *** 7766,7769 **** --- 7872,7881 ---- + void wxLua_wxAuiPaneButton_delete_function(void** p) + { + wxAuiPaneButton* o = (wxAuiPaneButton*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiPaneButton_methods[] = { *************** *** 8171,8174 **** --- 8283,8292 ---- #endif // ((wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) && (wxLUA_USE_wxPointSizeRect))||(wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiMDIParentFrame_delete_function(void** p) + { + wxAuiMDIParentFrame* o = (wxAuiMDIParentFrame*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiMDIParentFrame_methods[] = { *************** *** 8564,8567 **** --- 8682,8691 ---- #endif // ((wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) && (wxLUA_USE_wxPointSizeRect))||(wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiMDIChildFrame_delete_function(void** p) + { + wxAuiMDIChildFrame* o = (wxAuiMDIChildFrame*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiMDIChildFrame_methods[] = { *************** *** 8713,8716 **** --- 8837,8846 ---- #endif // (wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI) + void wxLua_wxAuiMDIClientWindow_delete_function(void** p) + { + wxAuiMDIClientWindow* o = (wxAuiMDIClientWindow*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxAuiMDIClientWindow_methods[] = { *************** *** 9010,9059 **** --- 9140,9211 ---- extern wxLuaBindMethod wxAuiDefaultDockArt_methods[]; extern int wxAuiDefaultDockArt_methodCount; + extern void wxLua_wxAuiDefaultDockArt_delete_function(void** p); extern wxLuaBindMethod wxAuiDefaultTabArt_methods[]; extern int wxAuiDefaultTabArt_methodCount; + extern void wxLua_wxAuiDefaultTabArt_delete_function(void** p); extern wxLuaBindMethod wxAuiDockArt_methods[]; extern int wxAuiDockArt_methodCount; + extern void wxLua_wxAuiDockArt_delete_function(void** p); extern wxLuaBindMethod wxAuiDockInfo_methods[]; extern int wxAuiDockInfo_methodCount; + extern void wxLua_wxAuiDockInfo_delete_function(void** p); extern wxLuaBindMethod wxAuiDockUIPart_methods[]; extern int wxAuiDockUIPart_methodCount; extern wxLuaBindNumber wxAuiDockUIPart_enums[]; extern int wxAuiDockUIPart_enumCount; + extern void wxLua_wxAuiDockUIPart_delete_function(void** p); extern wxLuaBindMethod wxAuiFloatingFrame_methods[]; extern int wxAuiFloatingFrame_methodCount; + extern void wxLua_wxAuiFloatingFrame_delete_function(void** p); extern wxLuaBindMethod wxAuiMDIChildFrame_methods[]; extern int wxAuiMDIChildFrame_methodCount; + extern void wxLua_wxAuiMDIChildFrame_delete_function(void** p); extern wxLuaBindMethod wxAuiMDIClientWindow_methods[]; extern int wxAuiMDIClientWindow_methodCount; + extern void wxLua_wxAuiMDIClientWindow_delete_function(void** p); extern wxLuaBindMethod wxAuiMDIParentFrame_methods[]; extern int wxAuiMDIParentFrame_methodCount; + extern void wxLua_wxAuiMDIParentFrame_delete_function(void** p); extern wxLuaBindMethod wxAuiManager_methods[]; extern int wxAuiManager_methodCount; + extern void wxLua_wxAuiManager_delete_function(void** p); extern wxLuaBindMethod wxAuiManagerEvent_methods[]; extern int wxAuiManagerEvent_methodCount; + extern void wxLua_wxAuiManagerEvent_delete_function(void** p); extern wxLuaBindMethod wxAuiNotebook_methods[]; extern int wxAuiNotebook_methodCount; + extern void wxLua_wxAuiNotebook_delete_function(void** p); extern wxLuaBindMethod wxAuiNotebookEvent_methods[]; extern int wxAuiNotebookEvent_methodCount; + extern void wxLua_wxAuiNotebookEvent_delete_function(void** p); extern wxLuaBindMethod wxAuiNotebookPage_methods[]; extern int wxAuiNotebookPage_methodCount; + extern void wxLua_wxAuiNotebookPage_delete_function(void** p); extern wxLuaBindMethod wxAuiNotebookPageArray_methods[]; extern int wxAuiNotebookPageArray_methodCount; + extern void wxLua_wxAuiNotebookPageArray_delete_function(void** p); extern wxLuaBindMethod wxAuiPaneButton_methods[]; extern int wxAuiPaneButton_methodCount; + extern void wxLua_wxAuiPaneButton_delete_function(void** p); extern wxLuaBindMethod wxAuiPaneInfo_methods[]; extern int wxAuiPaneInfo_methodCount; extern wxLuaBindNumber wxAuiPaneInfo_enums[]; extern int wxAuiPaneInfo_enumCount; + extern void wxLua_wxAuiPaneInfo_delete_function(void** p); extern wxLuaBindMethod wxAuiPaneInfoArray_methods[]; extern int wxAuiPaneInfoArray_methodCount; + extern void wxLua_wxAuiPaneInfoArray_delete_function(void** p); extern wxLuaBindMethod wxAuiSimpleTabArt_methods[]; extern int wxAuiSimpleTabArt_methodCount; + extern void wxLua_wxAuiSimpleTabArt_delete_function(void** p); extern wxLuaBindMethod wxAuiTabArt_methods[]; extern int wxAuiTabArt_methodCount; + extern void wxLua_wxAuiTabArt_delete_function(void** p); extern wxLuaBindMethod wxAuiTabContainerButton_methods[]; extern int wxAuiTabContainerButton_methodCount; + extern void wxLua_wxAuiTabContainerButton_delete_function(void** p); extern wxLuaBindMethod wxAuiTabCtrl_methods[]; extern int wxAuiTabCtrl_methodCount; + extern void wxLua_wxAuiTabCtrl_delete_function(void** p); #endif // wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI *************** *** 9066,9091 **** { #if wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI ! { wxluaclassname_wxAuiDefaultDockArt, wxAuiDefaultDockArt_methods, wxAuiDefaultDockArt_methodCount, NULL, &wxluatype_wxAuiDefaultDockArt, wxluabaseclassnames_wxAuiDefaultDockArt, wxluabaseclassbinds_wxAuiDefaultDockArt, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxAuiDefaultTabArt, wxAuiDefaultTabArt_methods, wxAuiDefaultTabArt_methodCount, NULL, &wxluatype_wxAuiDefaultTabArt, wxluabaseclassnames_wxAuiDefaultTabArt, wxluabaseclassbinds_wxAuiDefaultTabArt, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxAuiDockArt, wxAuiDockArt_methods, wxAuiDockArt_methodCount, NULL, &wxluatype_wxAuiDockArt, NULL, NULL, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxAuiDockInfo, wxAuiDockInfo_methods, wxAuiDockInfo_methodCount, NULL, &wxluatype_wxAuiDockInfo, NULL, NULL, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxAuiDockUIPart, wxAuiDockUIPart_methods, wxAuiDockUIPart_methodCount, NULL, &wxluatype_wxAuiDockUIPart, NULL, NULL, NULL, NULL, wxAuiDockUIPart_enums, wxAuiDockUIPart_enumCount, }, ! { wxluaclassname_wxAuiFloatingFrame, wxAuiFloatingFrame_methods, wxAuiFloatingFrame_methodCount, CLASSINFO(wxAuiFloatingFrame), &wxluatype_wxAuiFloatingFrame, wxluabasec... [truncated message content] |
From: John L. <jr...@us...> - 2009-10-01 04:21:16
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/bindings/wxlua Modified Files: override.hpp Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** override.hpp 14 May 2009 05:06:21 -0000 1.23 --- override.hpp 1 Oct 2009 04:21:00 -0000 1.24 *************** *** 156,160 **** if (!wxluaO_isgcobject(L, 1)) { ! FIXME we need to implement a generic way to use the wxObject encapsulation classes ret = true; } --- 156,160 ---- if (!wxluaO_isgcobject(L, 1)) { ! FIXME do we need to implement this function for anybody ret = true; } *************** *** 571,574 **** --- 571,608 ---- return 0; } + else if (strcmp(idx_str, "baseclass_wxluatypes") == 0) + { + if (wxlClass->baseclass_wxluatypes) + { + lua_newtable(L); + size_t i = 0; + while (wxlClass->baseclass_wxluatypes[i]) + { + lua_pushnumber(L, *wxlClass->baseclass_wxluatypes[i]); + lua_rawseti(L, -2, i + 1); + ++i; + } + return 1; + } + + return 0; + } + else if (strcmp(idx_str, "baseclass_vtable_offsets") == 0) + { + if (wxlClass->baseclass_wxluatypes) // check this for NULL not baseclass_vtable_offsets + { + lua_newtable(L); + size_t i = 0; + while (wxlClass->baseclass_wxluatypes[i]) // see above + { + lua_pushnumber(L, wxlClass->baseclass_vtable_offsets[i]); + lua_rawseti(L, -2, i + 1); + ++i; + } + return 1; + } + + return 0; + } else if (strcmp(idx_str, "enums") == 0) { *************** *** 871,875 **** returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaObject); --- 905,909 ---- returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLuaObject); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaObject); |
From: John L. <jr...@us...> - 2009-10-01 04:21:12
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxbind/include Modified Files: wxadv_bind.h wxaui_bind.h wxbase_bind.h wxcore_bind.h wxgl_bind.h wxhtml_bind.h wxmedia_bind.h wxnet_bind.h wxrichtext_bind.h wxstc_bind.h wxxml_bind.h wxxrc_bind.h Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxadv_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxadv_bind.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxadv_bind.h 25 Sep 2009 18:47:57 -0000 1.20 --- wxadv_bind.h 1 Oct 2009 04:21:01 -0000 1.21 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 205,245 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - - #if wxCHECK_VERSION(2,8,0) && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxAboutDialogInfo, wxAboutDialogInfo) - #endif // wxCHECK_VERSION(2,8,0) && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog - - #if wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxCalendarDateAttr, wxCalendarDateAttr) - #endif // wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL - - #if wxLUA_USE_wxGrid && wxUSE_GRID - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellAttr, wxGridCellAttr) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellAttrProvider, wxGridCellAttrProvider) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellAutoWrapStringEditor, wxGridCellAutoWrapStringEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellAutoWrapStringRenderer, wxGridCellAutoWrapStringRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellBoolEditor, wxGridCellBoolEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellBoolRenderer, wxGridCellBoolRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellChoiceEditor, wxGridCellChoiceEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellCoords, wxGridCellCoords) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellCoordsArray, wxGridCellCoordsArray) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellDateTimeRenderer, wxGridCellDateTimeRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellEditor, wxGridCellEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellEnumEditor, wxGridCellEnumEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellEnumRenderer, wxGridCellEnumRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellFloatEditor, wxGridCellFloatEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellFloatRenderer, wxGridCellFloatRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellNumberEditor, wxGridCellNumberEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellNumberRenderer, wxGridCellNumberRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellRenderer, wxGridCellRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellStringRenderer, wxGridCellStringRenderer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellTextEditor, wxGridCellTextEditor) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridCellWorker, wxGridCellWorker) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXADV, wxGridTableMessage, wxGridTableMessage) - #endif // wxLUA_USE_wxGrid && wxUSE_GRID - #endif // __HOOK_WXLUA_wxadv_H__ --- 205,208 ---- Index: wxcore_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxcore_bind.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** wxcore_bind.h 25 Sep 2009 18:47:57 -0000 1.21 --- wxcore_bind.h 1 Oct 2009 04:21:01 -0000 1.22 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 1145,1149 **** extern WXDLLIMPEXP_DATA_BINDWXCORE(int) wxluatype_wxToolBar; extern WXDLLIMPEXP_DATA_BINDWXCORE(int) wxluatype_wxToolBarBase; - extern WXDLLIMPEXP_DATA_BINDWXCORE(int) wxluatype_wxToolBarTool; extern WXDLLIMPEXP_DATA_BINDWXCORE(int) wxluatype_wxToolBarToolBase; #endif // wxLUA_USE_wxToolbar --- 1145,1148 ---- *************** *** 1202,1349 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - - #if (wxLUA_USE_wxColourPenBrush) && (wxCHECK_VERSION(2,8,0)) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxStockGDI, wxStockGDI) - #endif // (wxLUA_USE_wxColourPenBrush) && (wxCHECK_VERSION(2,8,0)) - - #if (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ) && (wxCHECK_VERSION(2,8,0)) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxURLDataObject, wxURLDataObject) - #endif // (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ) && (wxCHECK_VERSION(2,8,0)) - - #if (wxLUA_USE_wxLog && wxUSE_LOG) && (wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxLogWindow, wxLogWindow) - #endif // (wxLUA_USE_wxLog && wxUSE_LOG) && (wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW) - - #if (wxLUA_USE_wxLog && wxUSE_LOG) && (wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxLogTextCtrl, wxLogTextCtrl) - #endif // (wxLUA_USE_wxLog && wxUSE_LOG) && (wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL) - - #if (wxLUA_USE_wxLog && wxUSE_LOG) && (wxUSE_LOGGUI) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxLogGui, wxLogGui) - #endif // (wxLUA_USE_wxLog && wxUSE_LOG) && (wxUSE_LOGGUI) - - #if (wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0)) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxGBPosition, wxGBPosition) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxGBSpan, wxGBSpan) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxSizerFlags, wxSizerFlags) - #endif // (wxLUA_USE_wxSizer) && (wxCHECK_VERSION(2,8,0)) - - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxPropagateOnce, wxPropagateOnce) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxPropagationDisabler, wxPropagationDisabler) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxVisualAttributes, wxVisualAttributes) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxWindowDisabler, wxWindowDisabler) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxWindowUpdateLocker, wxWindowUpdateLocker) - - #if wxCHECK_VERSION(2,8,0) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxMouseState, wxMouseState) - #endif // wxCHECK_VERSION(2,8,0) - - #if wxLUA_USE_Geometry && wxUSE_GEOMETRY - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxPoint2DDouble, wxPoint2DDouble) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxPoint2DInt, wxPoint2DInt) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxRect2DDouble, wxRect2DDouble) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxRect2DInt, wxRect2DInt) - #endif // wxLUA_USE_Geometry && wxUSE_GEOMETRY - - #if wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxAcceleratorEntry, wxAcceleratorEntry) - #endif // wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL - - #if wxLUA_USE_wxBusyCursor - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxBusyCursor, wxBusyCursor) - #endif // wxLUA_USE_wxBusyCursor - - #if wxLUA_USE_wxCaret && wxUSE_CARET - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxCaret, wxCaret) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxCaretSuspend, wxCaretSuspend) - #endif // wxLUA_USE_wxCaret && wxUSE_CARET - - #if wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxClipboardLocker, wxClipboardLocker) - #endif // wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD - - #if wxLUA_USE_wxColourPenBrush - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxColourDatabase, wxColourDatabase) - #endif // wxLUA_USE_wxColourPenBrush - - #if wxLUA_USE_wxDC - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxDCClipper, wxDCClipper) - #endif // wxLUA_USE_wxDC - - #if wxLUA_USE_wxDataObject && wxUSE_DATAOBJ - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxBitmapDataObject, wxBitmapDataObject) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxDataFormat, wxDataFormat) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxDataObjectComposite, wxDataObjectComposite) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxDataObjectSimple, wxDataObjectSimple) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxFileDataObject, wxFileDataObject) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxTextDataObject, wxTextDataObject) - #endif // wxLUA_USE_wxDataObject && wxUSE_DATAOBJ - - #if wxLUA_USE_wxDisplay && wxUSE_DISPLAY - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxArrayVideoModes, wxArrayVideoModes) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxDisplay, wxDisplay) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxVideoMode, wxVideoMode) - #endif // wxLUA_USE_wxDisplay && wxUSE_DISPLAY - - #if wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxDropSource, wxDropSource) - #endif // wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP - - #if wxLUA_USE_wxFont - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxNativeFontInfo, wxNativeFontInfo) - #endif // wxLUA_USE_wxFont - - #if wxLUA_USE_wxFontEnumerator - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxFontEnumerator, wxFontEnumerator) - #endif // wxLUA_USE_wxFontEnumerator - - #if wxLUA_USE_wxHelpController && wxUSE_HELP - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxHelpControllerHelpProvider, wxHelpControllerHelpProvider) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxHelpProvider, wxHelpProvider) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxSimpleHelpProvider, wxSimpleHelpProvider) - #endif // wxLUA_USE_wxHelpController && wxUSE_HELP - - #if wxLUA_USE_wxIcon - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxIconBundle, wxIconBundle) - #endif // wxLUA_USE_wxIcon - - #if wxLUA_USE_wxImage && wxUSE_IMAGE - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxImageHistogram, wxImageHistogram) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxImageHistogram::iterator, wxImageHistogram_iterator) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxImageHistogramEntry, wxImageHistogramEntry) - #endif // wxLUA_USE_wxImage && wxUSE_IMAGE - - #if wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxListItemAttr, wxListItemAttr) - #endif // wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL - - #if wxLUA_USE_wxPointSizeRect - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxPoint, wxPoint) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxRect, wxRect) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxSize, wxSize) - #endif // wxLUA_USE_wxPointSizeRect - - #if wxLUA_USE_wxProcess - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxProcess, wxProcess) - #endif // wxLUA_USE_wxProcess - - #if wxLUA_USE_wxRenderer - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxHeaderButtonParams, wxHeaderButtonParams) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxRendererNative, wxRendererNative) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxRendererVersion, wxRendererVersion) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxSplitterRenderParams, wxSplitterRenderParams) - #endif // wxLUA_USE_wxRenderer - - #if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxTextAttr, wxTextAttr) - #endif // wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL - - #if wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXCORE, wxTreeItemId, wxTreeItemId) - #endif // wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL - #endif // __HOOK_WXLUA_wxcore_H__ --- 1201,1204 ---- Index: wxrichtext_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxrichtext_bind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxrichtext_bind.h 25 Sep 2009 18:47:57 -0000 1.18 --- wxrichtext_bind.h 1 Oct 2009 04:21:01 -0000 1.19 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 49,56 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxrichtext_H__ --- 49,52 ---- Index: wxxrc_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxxrc_bind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxxrc_bind.h 25 Sep 2009 18:47:57 -0000 1.18 --- wxxrc_bind.h 1 Oct 2009 04:21:01 -0000 1.19 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 57,64 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxxrc_H__ --- 57,60 ---- Index: wxnet_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxnet_bind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxnet_bind.h 25 Sep 2009 18:47:57 -0000 1.18 --- wxnet_bind.h 1 Oct 2009 04:21:01 -0000 1.19 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 97,104 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxnet_H__ --- 97,100 ---- Index: wxbase_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbase_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxbase_bind.h 25 Sep 2009 18:47:57 -0000 1.19 --- wxbase_bind.h 1 Oct 2009 04:21:01 -0000 1.20 *************** *** 11,14 **** --- 11,28 ---- #include "wxbind/include/wxbinddefs.h" #include "wxluasetup.h" + + // ---------------------------------------------------------------------------- + // Convert from wxWidgets wxT('') to wxT(""), a string. Copied from wx/filefn.h + + // platform independent versions + #if defined(__UNIX__) && !defined(__OS2__) + // CYGWIN also uses UNIX settings + #define wxLua_FILE_SEP_PATH wxT("/") + #elif defined(__MAC__) + #define wxLua_FILE_SEP_PATH wxT(":") + #else // Windows and OS/2 + #define wxLua_FILE_SEP_PATH wxT("\\") + #endif // Unix/Windows + #include "wxlua/include/wxlstate.h" *************** *** 19,25 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 33,39 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 312,426 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDynamicLibrary, wxDynamicLibrary) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDynamicLibraryDetails, wxDynamicLibraryDetails) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDynamicLibraryDetailsArray, wxDynamicLibraryDetailsArray) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFileType, wxFileType) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFileType::MessageParameters, wxFileType_MessageParameters) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFileTypeInfo, wxFileTypeInfo) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxIconLocation, wxIconLocation) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxMimeTypesManager, wxMimeTypesManager) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxPathList, wxPathList) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxString, wxString) - - #if wxLUA_USE_wxArrayInt - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxArrayInt, wxArrayInt) - #endif // wxLUA_USE_wxArrayInt - - #if wxLUA_USE_wxArrayString - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxArrayString, wxArrayString) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxSortedArrayString, wxSortedArrayString) - #endif // wxLUA_USE_wxArrayString - - #if wxLUA_USE_wxConfig && wxUSE_CONFIG - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxConfig, wxConfig) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxConfigBase, wxConfigBase) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxConfigPathChanger, wxConfigPathChanger) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFileConfig, wxFileConfig) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxMemoryConfig, wxMemoryConfig) - #endif // wxLUA_USE_wxConfig && wxUSE_CONFIG - - #if wxLUA_USE_wxCriticalSection && wxUSE_THREADS - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxCriticalSection, wxCriticalSection) - #endif // wxLUA_USE_wxCriticalSection && wxUSE_THREADS - - #if wxLUA_USE_wxCriticalSectionLocker - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxCriticalSectionLocker, wxCriticalSectionLocker) - #endif // wxLUA_USE_wxCriticalSectionLocker - - #if wxLUA_USE_wxDateSpan && wxUSE_DATETIME - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDateSpan, wxDateSpan) - #endif // wxLUA_USE_wxDateSpan && wxUSE_DATETIME - - #if wxLUA_USE_wxDateTime && wxUSE_DATETIME - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDateTime, wxDateTime) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDateTimeArray, wxDateTimeArray) - #endif // wxLUA_USE_wxDateTime && wxUSE_DATETIME - - #if wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDateTimeHolidayAuthority, wxDateTimeHolidayAuthority) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDateTimeWorkDays, wxDateTimeWorkDays) - #endif // wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME - - #if wxLUA_USE_wxDir - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDir, wxDir) - #endif // wxLUA_USE_wxDir - - #if wxLUA_USE_wxFile && wxUSE_FILE - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFile, wxFile) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxTempFile, wxTempFile) - #endif // wxLUA_USE_wxFile && wxUSE_FILE - - #if wxLUA_USE_wxFileName - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFileName, wxFileName) - #endif // wxLUA_USE_wxFileName - - #if wxLUA_USE_wxLog && wxUSE_LOG - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLog, wxLog) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLogBuffer, wxLogBuffer) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLogChain, wxLogChain) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLogNull, wxLogNull) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLogPassThrough, wxLogPassThrough) - #endif // wxLUA_USE_wxLog && wxUSE_LOG - - #if wxLUA_USE_wxRegEx && wxUSE_REGEX - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxRegEx, wxRegEx) - #endif // wxLUA_USE_wxRegEx && wxUSE_REGEX - - #if wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxStopWatch, wxStopWatch) - #endif // wxLUA_USE_wxStopWatch && wxUSE_STOPWATCH - - #if wxLUA_USE_wxTimeSpan && wxUSE_DATETIME - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxTimeSpan, wxTimeSpan) - #endif // wxLUA_USE_wxTimeSpan && wxUSE_DATETIME - - #if wxUSE_INTL - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLanguageInfo, wxLanguageInfo) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLocale, wxLocale) - #endif // wxUSE_INTL - - #if wxUSE_LONGLONG - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxLongLong, wxLongLong) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxULongLong, wxULongLong) - #endif // wxUSE_LONGLONG - - #if wxUSE_SNGLINST_CHECKER - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxSingleInstanceChecker, wxSingleInstanceChecker) - #endif // wxUSE_SNGLINST_CHECKER - - #if wxUSE_STREAMS - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDataInputStream, wxDataInputStream) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxDataOutputStream, wxDataOutputStream) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFileInputStream, wxFileInputStream) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxFileOutputStream, wxFileOutputStream) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxInputStream, wxInputStream) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxMemoryInputStream, wxMemoryInputStream) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXBASE, wxOutputStream, wxOutputStream) - #endif // wxUSE_STREAMS - #endif // __HOOK_WXLUA_wxbase_H__ --- 326,329 ---- Index: wxmedia_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxmedia_bind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxmedia_bind.h 25 Sep 2009 18:47:57 -0000 1.18 --- wxmedia_bind.h 1 Oct 2009 04:21:01 -0000 1.19 *************** *** 21,27 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 21,27 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 59,66 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxmedia_H__ --- 59,62 ---- Index: wxgl_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxgl_bind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxgl_bind.h 25 Sep 2009 18:47:57 -0000 1.18 --- wxgl_bind.h 1 Oct 2009 04:21:01 -0000 1.19 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 58,65 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxgl_H__ --- 58,61 ---- Index: wxstc_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxstc_bind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxstc_bind.h 25 Sep 2009 18:47:57 -0000 1.18 --- wxstc_bind.h 1 Oct 2009 04:21:01 -0000 1.19 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 54,61 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxstc_H__ --- 54,57 ---- Index: wxaui_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxaui_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxaui_bind.h 25 Sep 2009 18:47:57 -0000 1.19 --- wxaui_bind.h 1 Oct 2009 04:21:01 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 78,101 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - - #if wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiDefaultDockArt, wxAuiDefaultDockArt) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiDefaultTabArt, wxAuiDefaultTabArt) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiDockArt, wxAuiDockArt) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiDockInfo, wxAuiDockInfo) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiDockUIPart, wxAuiDockUIPart) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiNotebookPage, wxAuiNotebookPage) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiNotebookPageArray, wxAuiNotebookPageArray) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiPaneButton, wxAuiPaneButton) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiPaneInfo, wxAuiPaneInfo) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiPaneInfoArray, wxAuiPaneInfoArray) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiSimpleTabArt, wxAuiSimpleTabArt) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiTabArt, wxAuiTabArt) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXAUI, wxAuiTabContainerButton, wxAuiTabContainerButton) - #endif // wxLUA_USE_wxAUI && wxCHECK_VERSION(2,8,0) && wxUSE_AUI - #endif // __HOOK_WXLUA_wxaui_H__ --- 78,81 ---- Index: wxhtml_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxhtml_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxhtml_bind.h 25 Sep 2009 18:47:57 -0000 1.19 --- wxhtml_bind.h 1 Oct 2009 04:21:01 -0000 1.20 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 103,110 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxhtml_H__ --- 103,106 ---- Index: wxxml_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxxml_bind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxxml_bind.h 25 Sep 2009 18:47:57 -0000 1.18 --- wxxml_bind.h 1 Oct 2009 04:21:01 -0000 1.19 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 59,71 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - - #if wxLUA_USE_wxXML && wxUSE_XML - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXXML, wxXmlNode, wxXmlNode) - wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_BINDWXXML, wxXmlProperty, wxXmlProperty) - #endif // wxLUA_USE_wxXML && wxUSE_XML - #endif // __HOOK_WXLUA_wxxml_H__ --- 59,62 ---- |
From: John L. <jr...@us...> - 2009-10-01 04:21:12
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxluasocket/include Modified Files: wxluasocket_bind.h Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** wxluasocket_bind.h 25 Sep 2009 18:47:58 -0000 1.40 --- wxluasocket_bind.h 1 Oct 2009 04:21:02 -0000 1.41 *************** *** 20,26 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 20,26 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 58,65 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxluasocket_H__ --- 58,61 ---- |
From: John L. <jr...@us...> - 2009-10-01 04:21:12
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxluasocket/src Modified Files: wxluasocket_bind.cpp Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** wxluasocket_bind.cpp 27 Sep 2009 03:13:55 -0000 1.36 --- wxluasocket_bind.cpp 1 Oct 2009 04:21:02 -0000 1.37 *************** *** 359,363 **** wxLuaDebuggerServer* returns = new wxLuaDebuggerServer(portNumber); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaDebuggerServer); --- 359,363 ---- wxLuaDebuggerServer* returns = new wxLuaDebuggerServer(portNumber); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLuaDebuggerServer); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaDebuggerServer); *************** *** 368,371 **** --- 368,377 ---- + void wxLua_wxLuaDebuggerServer_delete_function(void** p) + { + wxLuaDebuggerServer* o = (wxLuaDebuggerServer*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaDebuggerServer_methods[] = { *************** *** 473,476 **** --- 479,488 ---- + void wxLua_wxLuaDebuggerEvent_delete_function(void** p) + { + wxLuaDebuggerEvent* o = (wxLuaDebuggerEvent*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaDebuggerEvent_methods[] = { *************** *** 621,626 **** --- 633,640 ---- extern wxLuaBindMethod wxLuaDebuggerEvent_methods[]; extern int wxLuaDebuggerEvent_methodCount; + extern void wxLua_wxLuaDebuggerEvent_delete_function(void** p); extern wxLuaBindMethod wxLuaDebuggerServer_methods[]; extern int wxLuaDebuggerServer_methodCount; + extern void wxLua_wxLuaDebuggerServer_delete_function(void** p); *************** *** 631,636 **** static wxLuaBindClass classList[] = { ! { wxluaclassname_wxLuaDebuggerEvent, wxLuaDebuggerEvent_methods, wxLuaDebuggerEvent_methodCount, CLASSINFO(wxLuaDebuggerEvent), &wxluatype_wxLuaDebuggerEvent, wxluabaseclassnames_wxLuaDebuggerEvent, wxluabaseclassbinds_wxLuaDebuggerEvent, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxLuaDebuggerServer, wxLuaDebuggerServer_methods, wxLuaDebuggerServer_methodCount, CLASSINFO(wxLuaDebuggerServer), &wxluatype_wxLuaDebuggerServer, wxluabaseclassnames_wxLuaDebuggerServer, wxluabaseclassbinds_wxLuaDebuggerServer, NULL, NULL, NULL, 0, }, { 0, 0, 0, 0, 0, 0, 0 }, --- 645,650 ---- static wxLuaBindClass classList[] = { ! { wxluaclassname_wxLuaDebuggerEvent, wxLuaDebuggerEvent_methods, wxLuaDebuggerEvent_methodCount, CLASSINFO(wxLuaDebuggerEvent), &wxluatype_wxLuaDebuggerEvent, wxluabaseclassnames_wxLuaDebuggerEvent, wxluabaseclassbinds_wxLuaDebuggerEvent, NULL, NULL, NULL, 0, &wxLua_wxLuaDebuggerEvent_delete_function, }, ! { wxluaclassname_wxLuaDebuggerServer, wxLuaDebuggerServer_methods, wxLuaDebuggerServer_methodCount, CLASSINFO(wxLuaDebuggerServer), &wxluatype_wxLuaDebuggerServer, wxluabaseclassnames_wxLuaDebuggerServer, wxluabaseclassbinds_wxLuaDebuggerServer, NULL, NULL, NULL, 0, &wxLua_wxLuaDebuggerServer_delete_function, }, { 0, 0, 0, 0, 0, 0, 0 }, |
From: John L. <jr...@us...> - 2009-10-01 04:21:12
|
Update of /cvsroot/wxlua/wxLua/docs In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/docs Modified Files: binding.html changelog.txt wxlua.html wxluaref.html Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** wxluaref.html 24 May 2009 05:36:50 -0000 1.52 --- wxluaref.html 1 Oct 2009 04:21:01 -0000 1.53 *************** *** 1774,1777 **** --- 1774,1787 ---- <td> <tr> + <td><a href="#wxItemContainer">wxItemContainer</a> + <td bgcolor=FFAAAA> + <td align="center" bgcolor=AAFFAA>X + <td> + <tr> + <td><a href="#wxItemContainerImmutable">wxItemContainerImmutable</a> + <td bgcolor=FFAAAA> [...2980 lines suppressed...] <font color=#009900>//</font><br> --- 21599,21603 ---- <font color=#009900>//<i>%endclass</i></font><br> <font color=#009900>//</font><br> ! <font color=#009900>//<i>%class</i> <i>%delete</i> wxHtmlBookRecArray</font><br> <font color=#009900>// wxHtmlBookRecArray()</font><br> <font color=#009900>//</font><br> *************** *** 25262,25266 **** <font color=#009900>// wxLuaDebugData</font><br> <br> ! <font color=#009900>//<i>%class</i> <i>%noclassinfo</i> wxLuaDebugData</font><br> <font color=#009900>//<i>%endclass</i></font><br> <br> --- 25325,25329 ---- <font color=#009900>// wxLuaDebugData</font><br> <br> ! <font color=#009900>//<i>%class</i> wxLuaDebugData</font><br> <font color=#009900>//<i>%endclass</i></font><br> <br> Index: wxlua.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxlua.html,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** wxlua.html 1 Jun 2009 22:28:30 -0000 1.45 --- wxlua.html 1 Oct 2009 04:21:01 -0000 1.46 *************** *** 2,5 **** --- 2,6 ---- <html><head> + <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Documentation</title> *************** *** 2405,2411 **** considerable amount of the total time of a function call.<br> ! <br> ! ! <pre>// ----------------------------------------------------------------------------<br>// Special keys used by wxLua in the LUA_REGISTRYINDEX table.<br>//<br>// Note: We do not push a human readable string for these because Lua always<br>// makes a copy and hashes the string, this takes a considerable amount of<br>// time when benchmarked using valgrind.<br>// ----------------------------------------------------------------------------<br><br>// Light userdata used as keys in the Lua LUA_REGISTRYINDEX table for wxLua.<br>// Note that even though these keys have values, they're not used, just the memory address.<br><br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table indexed<br>// on the wxLua types where each item is a userdata metatable for a C++ class.<br>// Note: The wxLua types WXLUA_TXXX that correspond to the Lua LUA_TXXX types<br>// are not stored in this table since they do not use our metatables.<br>// The keys in this table are all > 1. They values are either tables or 0<br>// if the wxLuaBinding containing the wxLua type was not registered.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to Lua objects we want to keep a handle to. The object could be<br>// anything, a table, function, number, string, userdata...<br>// LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to objects the wxLuaDebugData wants to keep a handle to by<br>// storing their value for lookup. It is used only for the wxLuaDebugData.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key;<br>// The key that in the LUA_REGISTRYINDEX table that is a lookup table of string<br>// C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table<br>// of Lua objects/functions assigned to wxLua userdata programatically in Lua.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] =<br>// {["derived func/value name"] = wxLuaObject(Lua function/value), ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key;<br>// The key in the LUA_REGISTRYINDEX table who's value is a lightuserdata<br>// of the wxLuaState for this lua_State.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata<br>// wxLuaBindings and the ref to the Lua table they were installed into.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects that we've pushed into Lua using wxluaT_pushuserdatatype().<br>// Note: A single object like a wxWindow may be pushed with multiple wxLua types.<br>// e.g. wxWindow* w = wx.wxWindow() retrieve the window later from wxObject* wxEvent:GetEventObject()<br>// LUA_REGISTRYINDEX[&wxlua_lreg_weakobjects_key][lightuserdata(obj_ptr)] =<br>// { wxLua type1 = weak fulluserdata, wxLua type2 = weak fulluserdata... }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_weakobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects to delete that were added using wxluaO_addgcobject().<br>// Note that non wxObject classes use wxLUA_DECLARE_ENCAPSULATION so<br>// the key is the object pointer and the value is the wxObject encapsulation.<br>// Both the key and the value are the same if not encapsulated.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_gcobjects_key][lightuserdata(obj_ptr)] =<br>// lightuserdata(wxObject derived class)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// wxLuaEventCallbacks that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_evtcallbacks_key][lightuserdata(&wxLuaEventCallback)] =<br>// lightuserdata(&wxEvtHandler)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_evtcallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of wxWindow keys and<br>// wxLuaWinDestroyCallback values that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_windestroycallbacks_key][lightuserdata(&wxWindow)] =<br>// lightuserdata(wxLuaWinDestroyCallback)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_windestroycallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// top level wxWindows that we've created and need to destroy when closed.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_topwindows_key][lightuserdata(&wxWindow)] = 1<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_topwindows_key;<br>// The key in the LUA_REGISTRYINDEX table that has a boolean value<br>// of whether the Lua code has prepended a '_' to function name to indicate<br>// that they want the base class function called.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_callbaseclassfunc_key] = true/false<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_callbaseclassfunc_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxEventType (integer) value<br>// of the current wxEvent is that is being run or wxEVT_NULL if not in an event.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class<br>// lightuserdata value for the wxLuaState.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key;<br>// The key in the LUA_REGISTRYINDEX table that is a weak keyed table of<br>// the tables wxLua pushed into the registry with their keys as values.<br>// This is used by the wxLuaDebugData to know if the table is one of the wxLua<br>// registry tables for better wxLuaStackDialog performance.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] =<br>// lightuserdata(&wxlua_lreg_XXX_key)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key;<br><br>// Light userdata used as keys in the metatables created for the class userdata objects.<br>// Note that even though these keys have values, they're not used, just the memory address.<br><br>// wxLua userdata metatable structure:<br>// {<br>// lightuserdata(&wxlua_metatable_type_key) = wxLua type number in wxlua_lreg_types_key table<br>// lightuserdata(&wxlua_metatable_wxluabindclass_key) = lightuserdata(&wxLuaBindClass)<br>// __gc = function(wxlua_wxLuaBindClass__gc)<br>// __index = function(wxlua_wxLuaBindClass__index)<br>// __newindex = function(wxlua_wxLuaBindClass__newindex)<br>// __tostring = function(wxlua_wxLuaBindClass__tostring)<br>// }<br><br>// The key of a metatable used for wxLua userdata that is the wxLua type number in the<br>// wxlua_lreg_types_key table this metatable is for.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_type_key;<br>// The key of a metatable used for wxLua userdata that stores a lightuserdata<br>// of the wxLuaBindClass struct for this class.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_wxluabindclass_key;<br><br></pre> <h3><a name="Functions_to_Create_a_wxLuaState"></a>Functions --- 2406,2410 ---- considerable amount of the total time of a function call.<br> ! <pre>// ----------------------------------------------------------------------------<br>// Special keys used by wxLua in the LUA_REGISTRYINDEX table.<br>//<br>// Note: We do not push a human readable string for these because Lua always<br>// makes a copy and hashes the string, this takes a considerable amount of<br>// time when benchmarked using valgrind.<br>// ----------------------------------------------------------------------------<br><br>// Light userdata used as keys in the Lua LUA_REGISTRYINDEX table for wxLua.<br>// Note that even though these keys have human readable names as values,<br>// they're not used, just the memory address.<br><br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table indexed<br>// on the wxLua types where each item is a userdata metatable for a C++ class.<br>// Note: The wxLua types WXLUA_TXXX that correspond to the Lua LUA_TXXX types<br>// are not stored in this table since they do not use our metatables.<br>// The keys in this table are all > 1. They values are either tables or 0<br>// if the wxLuaBinding containing the wxLua type was not registered.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_types_key][wxLua type number] = { metatable for a C++ class }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_types_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to Lua objects we want to keep a handle to. The object could be<br>// anything, a table, function, number, string, userdata...<br>// LUA_REGISTRYINDEX[&wxlua_lreg_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_refs_key;<br>// The key in the LUA_REGISTRYINDEX table that is a numerically keyed table<br>// with references to objects the wxLuaDebugData wants to keep a handle to by<br>// storing their value for lookup. It is used only for the wxLuaDebugData.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][ref number] = Lua object<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_debug_refs_key;<br>// The key that in the LUA_REGISTRYINDEX table that is a lookup table of string<br>// C++ classname keys and lightuserdata pointers to the associated wxLuaBindClass struct.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_debug_refs_key][wxLuaBindClass.name] = lightuserdata(&wxLuaBindClass)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_classes_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table<br>// of Lua objects/functions assigned to wxLua userdata programatically in Lua.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_derivedmethods_key][lightuserdata(obj_ptr)] =<br>// {["derived func/value name"] = wxLuaObject(Lua function/value), ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_derivedmethods_key;<br>// The key in the LUA_REGISTRYINDEX table who's value is a lightuserdata<br>// of the wxLuaState for this lua_State.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastate_key] = lightuserdata(&wxLuaState)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastate_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of lightuserdata<br>// wxLuaBindings and the ref to the Lua table they were installed into.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluabindings_key] = {lightuserdata(&wxLuaBinding) = wxlua_lreg_refs_key ref#, ...}<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluabindings_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects that we've pushed into Lua using wxluaT_pushuserdatatype().<br>// Note: A single object like a wxWindow may be pushed with multiple wxLua types.<br>// e.g. wxWindow* w = wx.wxWindow() retrieve the window later from wxObject* wxEvent:GetEventObject()<br>// LUA_REGISTRYINDEX[&wxlua_lreg_weakobjects_key][lightuserdata(obj_ptr)] =<br>// { wxLua type1 = weak fulluserdata, wxLua type2 = weak fulluserdata... }<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_weakobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// objects to delete that were added using wxluaO_addgcobject().<br>// LUA_REGISTRYINDEX[&wxlua_lreg_gcobjects_key][lightuserdata(obj_ptr)] =<br>// integer wxLua type<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// wxLuaEventCallbacks that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_evtcallbacks_key][lightuserdata(&wxLuaEventCallback)] =<br>// lightuserdata(&wxEvtHandler)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_evtcallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of wxWindow keys and<br>// wxLuaWinDestroyCallback values that we've created.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_windestroycallbacks_key][lightuserdata(&wxWindow)] =<br>// lightuserdata(wxLuaWinDestroyCallback)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_windestroycallbacks_key;<br>// The key in the LUA_REGISTRYINDEX table that is a table of all<br>// top level wxWindows that we've created and need to destroy when closed.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_topwindows_key][lightuserdata(&wxWindow)] = 1<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_topwindows_key;<br>// The key in the LUA_REGISTRYINDEX table that has a boolean value<br>// of whether the Lua code has prepended a '_' to function name to indicate<br>// that they want the base class function called.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_callbaseclassfunc_key] = true/false<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_callbaseclassfunc_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxEventType (integer) value<br>// of the current wxEvent is that is being run or wxEVT_NULL if not in an event.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxeventtype_key] = wxEventType (wxEVT_NULL)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxeventtype_key;<br>// The key in the LUA_REGISTRYINDEX table that has a wxLuaStateData class<br>// lightuserdata value for the wxLuaState.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_wxluastatedata_key] = lightuserdata(&wxLuaStateData)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_wxluastatedata_key;<br>// The key in the LUA_REGISTRYINDEX table that is a weak keyed table of<br>// the tables wxLua pushed into the registry with their keys as values.<br>// This is used by the wxLuaDebugData to know if the table is one of the wxLua<br>// registry tables for better wxLuaStackDialog performance.<br>// LUA_REGISTRYINDEX[&wxlua_lreg_regtable_key][weak {wxlua_lreg_XXX_key table}] =<br>// lightuserdata(&wxlua_lreg_XXX_key)<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_regtable_key;<br><br>// Light userdata used as keys in the metatables created for the class userdata objects.<br>// Note that even though these keys have values, they're not used, just the memory address.<br><br>// wxLua userdata metatable structure:<br>// {<br>// lightuserdata(&wxlua_metatable_type_key) = wxLua type number in wxlua_lreg_types_key table<br>// lightuserdata(&wxlua_metatable_wxluabindclass_key) = lightuserdata(&wxLuaBindClass)<br>// __gc = function(wxlua_wxLuaBindClass__gc)<br>// __index = function(wxlua_wxLuaBindClass__index)<br>// __newindex = function(wxlua_wxLuaBindClass__newindex)<br>// __tostring = function(wxlua_wxLuaBindClass__tostring)<br>// }<br><br>// The key of a metatable used for wxLua userdata that is the wxLua type number in the<br>// wxlua_lreg_types_key table this metatable is for.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_type_key;<br>// The key of a metatable used for wxLua userdata that stores a lightuserdata<br>// of the wxLuaBindClass struct for this class.<br>extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_metatable_wxluabindclass_key;<br><br></pre> <h3><a name="Functions_to_Create_a_wxLuaState"></a>Functions Index: binding.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/binding.html,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** binding.html 24 May 2009 22:37:53 -0000 1.33 --- binding.html 1 Oct 2009 04:21:01 -0000 1.34 *************** *** 3,6 **** --- 3,8 ---- + + <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>wxLua Binding HowTo</title> <meta content="John Labenski" name="author"></head><body><h2><u>wxLuaBinding 2.8.10 - Writing and Generating Binding Files</u></h2> *************** *** 419,424 **** </b>Reference a class by another name (currently unused). <br><br> ! <i><b>%class [%delete] [%noclassinfo] ! [%encapsulate] ClassName [, BaseClassName] <br> </b>ClassName(...)<br> member functions<b><br> --- 421,425 ---- </b>Reference a class by another name (currently unused). <br><br> ! <i><b>%class [%delete] ClassName [, BaseClassName] <br> </b>ClassName(...)<br> member functions<b><br> *************** *** 452,471 **** parameter, but may not start off that way can use the <i>%delete</i> tag, but the function that takes ownership should use the <i>%ungc</i> ! tag before the parameter.</li> </ul> <li><i><b>%noclassinfo</b></i> ! is for all classes that ! do ! not have ! DECLARE_XXX_CLASS in their declaration, e.g. wxPoint and any non ! wxObject ! derived classes.</li> <ul> <li>You can use the ! samples/bindings.wx.lua program to test if the assigned classinfo is ! correct.</li> </ul> <li> <i><b>%encapsulate</b></i> ! is for <b>all</b> ! classes ! that are not ! wxObject derived to aid in deleting them. The macros ! wxLUA_DECLARE_ENCAPSULATION and wxLUA_IMPLEMENT_ENCAPSULATION are used ! to wrap the object in a wxObject derived class so that a single list of ! tracked objects can be maintained.<br> </li> </ul><b><i>%define NUMBER [Value]</i><br> --- 453,457 ---- parameter, but may not start off that way can use the <i>%delete</i> tag, but the function that takes ownership should use the <i>%ungc</i> ! tag before the parameter.</li> </ul> </ul><b><i>%define NUMBER [Value]</i><br> Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** changelog.txt 25 Sep 2009 18:47:57 -0000 1.73 --- changelog.txt 1 Oct 2009 04:21:01 -0000 1.74 *************** *** 9,12 **** --- 9,23 ---- of second or higher base classes. It has been tested in GCC and MSVC. See note in wxlstate.cpp above wxluaT_getuserdatatype(). + * Removed %encapsulate from the %class declarations in the bindings. + Instead of wrapping non wxObject classes in a wxObject for deletion + we now call a newly added delete function added to the wxLuaBindClass + structs that properly cast the void* to the actual class type. + The upshot is that wxLua is about 5% faster when creating thousands of + wxPoints and just slightly smaller, 50Kb. + Please remove this tag from your bindings. + * Removed %noclassinfo from the %class declarations in the bindings. + It is no longer used or needed since we can verify if a class is derived + from a wxObject by inheritance. + Please remove this tag from your bindings. version 2.8.10.0 (released 05/25/2009) |
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/bindings/wxwidgets Modified Files: wx_datatypes.lua wxadv_adv.i wxadv_grid.i wxadv_override.hpp wxadv_rules.lua wxaui_aui.i wxbase_base.i wxbase_config.i wxbase_data.i wxbase_datetime.i wxbase_file.i wxbase_override.hpp wxbase_rules.lua wxcore_clipdrag.i wxcore_controls.i wxcore_core.i wxcore_defsutils.i wxcore_dialogs.i wxcore_event.i wxcore_gdi.i wxcore_geometry.i wxcore_help.i wxcore_image.i wxcore_menutool.i wxcore_override.hpp wxcore_rules.lua wxcore_sizer.i wxcore_windows.i wxhtml_html.i wxrichtext_richtext.i wxxml_override.hpp wxxml_xml.i wxxrc_xrc.i Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxcore_event.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_event.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxcore_event.i 4 Dec 2008 05:12:38 -0000 1.4 --- wxcore_event.i 1 Oct 2009 04:21:00 -0000 1.5 *************** *** 84,88 **** %include "wx/event.h" ! %class %delete %noclassinfo %encapsulate wxPropagationDisabler // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxPropagationDisabler(wxEvent& event) --- 84,88 ---- %include "wx/event.h" ! %class %delete wxPropagationDisabler // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxPropagationDisabler(wxEvent& event) *************** *** 95,99 **** %include "wx/event.h" ! %class %delete %noclassinfo %encapsulate wxPropagateOnce // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxPropagateOnce(wxEvent& event) --- 95,99 ---- %include "wx/event.h" ! %class %delete wxPropagateOnce // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxPropagateOnce(wxEvent& event) *************** *** 215,219 **** //%include "wx/dialup.h" ! //%class %delete %noclassinfo wxDialUpEvent, wxCommandEvent // %define_event wxEVT_DIALUP_CONNECTED // EVT_DIALUP_CONNECTED(func) // %define_event wxEVT_DIALUP_DISCONNECTED // EVT_DIALUP_DISCONNECTED(func) --- 215,219 ---- //%include "wx/dialup.h" ! //%class %delete wxDialUpEvent, wxCommandEvent // %define_event wxEVT_DIALUP_CONNECTED // EVT_DIALUP_CONNECTED(func) // %define_event wxEVT_DIALUP_DISCONNECTED // EVT_DIALUP_DISCONNECTED(func) Index: wxcore_gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_gdi.i,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxcore_gdi.i 25 Sep 2009 18:47:57 -0000 1.8 --- wxcore_gdi.i 1 Oct 2009 04:21:01 -0000 1.9 *************** *** 17,21 **** %define wxDefaultCoord ! %class %delete %noclassinfo %encapsulate wxPoint %define_object wxDefaultPosition --- 17,21 ---- %define wxDefaultCoord ! %class %delete wxPoint %define_object wxDefaultPosition *************** *** 58,62 **** // wxRealPoint - Used nowhere in wxWidgets ! //%class %delete %noclassinfo %encapsulate wxRealPoint // wxRealPoint(double xx = 0, double yy = 0) // --- 58,62 ---- // wxRealPoint - Used nowhere in wxWidgets ! //%class %delete wxRealPoint // wxRealPoint(double xx = 0, double yy = 0) // *************** *** 68,72 **** // wxSize ! %class %delete %noclassinfo %encapsulate wxSize %define_object wxDefaultSize --- 68,72 ---- // wxSize ! %class %delete wxSize %define_object wxDefaultSize *************** *** 110,114 **** // wxRect ! %class %delete %noclassinfo %encapsulate wxRect wxRect(int x = 0, int y = 0, int w = 0, int h = 0) wxRect(const wxRect& rect) --- 110,114 ---- // wxRect ! %class %delete wxRect wxRect(int x = 0, int y = 0, int w = 0, int h = 0) wxRect(const wxRect& rect) *************** *** 388,392 **** %include "wx/fontutil.h" ! %class %delete %noclassinfo %encapsulate wxNativeFontInfo wxNativeFontInfo() wxNativeFontInfo(const wxNativeFontInfo& info) --- 388,392 ---- %include "wx/fontutil.h" ! %class %delete wxNativeFontInfo wxNativeFontInfo() wxNativeFontInfo(const wxNativeFontInfo& info) *************** *** 439,443 **** %include "wx/fontenum.h" ! %class %delete %noclassinfo %encapsulate wxFontEnumerator wxFontEnumerator() --- 439,443 ---- %include "wx/fontenum.h" ! %class %delete wxFontEnumerator wxFontEnumerator() *************** *** 462,466 **** %if wxLUA_USE_wxFontList ! %class %noclassinfo wxFontList %define_pointer wxTheFontList --- 462,466 ---- %if wxLUA_USE_wxFontList ! %class wxFontList %define_pointer wxTheFontList *************** *** 484,488 **** %include "wx/fontmap.h" ! %class %noclassinfo wxFontMapper // No constructor, use static Get() function --- 484,488 ---- %include "wx/fontmap.h" ! %class wxFontMapper // No constructor, use static Get() function *************** *** 568,572 **** // wxColourDatabase ! %class %delete %noclassinfo %encapsulate wxColourDatabase wxColourDatabase() --- 568,572 ---- // wxColourDatabase ! %class %delete wxColourDatabase wxColourDatabase() *************** *** 658,662 **** %if wxLUA_USE_wxPenList ! %class %noclassinfo wxPenList //, wxList - it's not really derived from a wxList %define_pointer wxThePenList --- 658,662 ---- %if wxLUA_USE_wxPenList ! %class wxPenList //, wxList - it's not really derived from a wxList %define_pointer wxThePenList *************** *** 714,718 **** %if wxLUA_USE_wxBrushList ! %class %noclassinfo wxBrushList //, wxList - it's not really derived from it %define_pointer wxTheBrushList --- 714,718 ---- %if wxLUA_USE_wxBrushList ! %class wxBrushList //, wxList - it's not really derived from it %define_pointer wxTheBrushList *************** *** 776,780 **** %endenum ! %class %noclassinfo %encapsulate wxStockGDI //wxStockGDI() use instance to get the implemented wxStockGDI --- 776,780 ---- %endenum ! %class wxStockGDI //wxStockGDI() use instance to get the implemented wxStockGDI *************** *** 855,859 **** %include "wx/iconbndl.h" ! %class %delete %noclassinfo %encapsulate wxIconBundle wxIconBundle() wxIconBundle( const wxString& file, long type ) --- 855,859 ---- %include "wx/iconbndl.h" ! %class %delete wxIconBundle wxIconBundle() wxIconBundle( const wxString& file, long type ) *************** *** 878,886 **** %include "wx/bitmap.h" ! //%win %class %delete %noclassinfo wxBitmapHandler // are these even necessary? //%endclass ! //%win %class %delete %noclassinfo wxGDIImageHandler //%endclass ! //%wxchkver_2_6&%win %class %noclassinfo wxGDIImageHandlerList, wxList //%endclass --- 878,886 ---- %include "wx/bitmap.h" ! //%win %class %delete wxBitmapHandler // are these even necessary? //%endclass ! //%win %class %delete wxGDIImageHandler //%endclass ! //%wxchkver_2_6&%win %class wxGDIImageHandlerList, wxList //%endclass *************** *** 1394,1398 **** %include "wx/dc.h" ! %class %delete %noclassinfo %encapsulate wxDCClipper wxDCClipper(wxDC& dc, const wxRect& r) //wxDCClipper(wxDC& dc, const wxRegion& r) --- 1394,1398 ---- %include "wx/dc.h" ! %class %delete wxDCClipper wxDCClipper(wxDC& dc, const wxRect& r) //wxDCClipper(wxDC& dc, const wxRegion& r) *************** *** 1409,1413 **** %include "wx/caret.h" ! %class %delete %noclassinfo %encapsulate wxCaret wxCaret() wxCaret(wxWindow* window, const wxSize& size) --- 1409,1413 ---- %include "wx/caret.h" ! %class %delete wxCaret wxCaret() wxCaret(wxWindow* window, const wxSize& size) *************** *** 1446,1450 **** %include "wx/caret.h" ! %class %delete %noclassinfo %encapsulate wxCaretSuspend // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxCaretSuspend(wxWindow *win = NULL) --- 1446,1450 ---- %include "wx/caret.h" ! %class %delete wxCaretSuspend // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxCaretSuspend(wxWindow *win = NULL) *************** *** 1460,1464 **** %include "wx/display.h" ! %class %delete %noclassinfo %encapsulate wxVideoMode %define_object wxDefaultVideoMode --- 1460,1464 ---- %include "wx/display.h" ! %class %delete wxVideoMode %define_object wxDefaultVideoMode *************** *** 1477,1481 **** // wxArrayVideoModes ! %class %delete %noclassinfo %encapsulate wxArrayVideoModes wxArrayVideoModes() wxArrayVideoModes(const wxArrayVideoModes& array) --- 1477,1481 ---- // wxArrayVideoModes ! %class %delete wxArrayVideoModes wxArrayVideoModes() wxArrayVideoModes(const wxArrayVideoModes& array) *************** *** 1500,1504 **** // wxDisplay ! %class %delete %noclassinfo %encapsulate wxDisplay wxDisplay(size_t index = 0) --- 1500,1504 ---- // wxDisplay ! %class %delete wxDisplay wxDisplay(size_t index = 0) *************** *** 1578,1582 **** %endenum ! %struct %delete %encapsulate wxSplitterRenderParams // the only way to initialize this struct is by using this ctor wxSplitterRenderParams(wxCoord widthSash_, wxCoord border_, bool isSens_) --- 1578,1582 ---- %endenum ! %struct %delete wxSplitterRenderParams // the only way to initialize this struct is by using this ctor wxSplitterRenderParams(wxCoord widthSash_, wxCoord border_, bool isSens_) *************** *** 1589,1593 **** // extra optional parameters for DrawHeaderButton ! %struct %delete %encapsulate wxHeaderButtonParams wxHeaderButtonParams() --- 1589,1593 ---- // extra optional parameters for DrawHeaderButton ! %struct %delete wxHeaderButtonParams wxHeaderButtonParams() *************** *** 1618,1622 **** // wxRendererNative interface version ! %struct %delete %encapsulate wxRendererVersion wxRendererVersion(int version_, int age_) --- 1618,1622 ---- // wxRendererNative interface version ! %struct %delete wxRendererVersion wxRendererVersion(int version_, int age_) *************** *** 1629,1633 **** ! %class %delete %noclassinfo %encapsulate wxRendererNative // pseudo constructors // ------------------- --- 1629,1633 ---- ! %class %delete wxRendererNative // pseudo constructors // ------------------- Index: wxcore_help.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_help.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxcore_help.i 16 Jul 2007 19:34:25 -0000 1.1 --- wxcore_help.i 1 Oct 2009 04:21:01 -0000 1.2 *************** *** 47,51 **** // wxHelpProvider ! %class %delete %noclassinfo %encapsulate wxHelpProvider // No constructor see wxSimpleHelpProvider --- 47,51 ---- // wxHelpProvider ! %class %delete wxHelpProvider // No constructor see wxSimpleHelpProvider *************** *** 66,70 **** // wxSimpleHelpProvider ! %class %delete %noclassinfo %encapsulate wxSimpleHelpProvider, wxHelpProvider wxSimpleHelpProvider() --- 66,70 ---- // wxSimpleHelpProvider ! %class %delete wxSimpleHelpProvider, wxHelpProvider wxSimpleHelpProvider() *************** *** 74,78 **** // wxHelpControllerHelpProvider ! %class %delete %noclassinfo %encapsulate wxHelpControllerHelpProvider, wxSimpleHelpProvider wxHelpControllerHelpProvider(wxHelpController* hc = NULL) --- 74,78 ---- // wxHelpControllerHelpProvider ! %class %delete wxHelpControllerHelpProvider, wxSimpleHelpProvider wxHelpControllerHelpProvider(wxHelpController* hc = NULL) Index: wxbase_file.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_file.i,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxbase_file.i 20 May 2009 04:43:41 -0000 1.6 --- wxbase_file.i 1 Oct 2009 04:21:00 -0000 1.7 *************** *** 92,96 **** ! %class %noclassinfo wxStandardPaths // we ignore wxStandardPathsBase // No constructor - use static Get() function --- 92,96 ---- ! %class wxStandardPaths // we ignore wxStandardPathsBase // No constructor - use static Get() function *************** *** 127,131 **** %include "wx/filefn.h" ! %class %delete %encapsulate %noclassinfo wxPathList, wxArrayString wxPathList() //wxPathList(const wxArrayString &arr) --- 127,131 ---- %include "wx/filefn.h" ! %class %delete wxPathList, wxArrayString wxPathList() //wxPathList(const wxArrayString &arr) *************** *** 184,188 **** %endenum ! %class %delete %noclassinfo %encapsulate wxFileName wxFileName() wxFileName(const wxFileName& filename) --- 184,188 ---- %endenum ! %class %delete wxFileName wxFileName() wxFileName(const wxFileName& filename) *************** *** 369,373 **** %define wxS_DEFAULT ! %class %delete %noclassinfo %encapsulate wxFile wxFile() wxFile(const wxString& filename, wxFile::OpenMode mode = wxFile::read) --- 369,373 ---- %define wxS_DEFAULT ! %class %delete wxFile wxFile() wxFile(const wxString& filename, wxFile::OpenMode mode = wxFile::read) *************** *** 407,411 **** %include "wx/file.h" ! %class %delete %noclassinfo %encapsulate wxTempFile wxTempFile() // associates the temp file with the file to be replaced and opens it --- 407,411 ---- %include "wx/file.h" ! %class %delete wxTempFile wxTempFile() // associates the temp file with the file to be replaced and opens it *************** *** 450,454 **** %define wxDIR_DEFAULT ! %class %delete %noclassinfo %encapsulate wxDir wxDir() wxDir(const wxString& dir) --- 450,454 ---- %define wxDIR_DEFAULT ! %class %delete wxDir wxDir() wxDir(const wxString& dir) *************** *** 491,495 **** %include "wx/mimetype.h" ! %class %delete %noclassinfo %encapsulate wxFileTypeInfo // the ... parameters form a NULL terminated list of extensions //wxFileTypeInfo(const wxChar *mimeType, const wxChar *openCmd, const wxChar *printCmd, const wxChar *desc, ...) --- 491,495 ---- %include "wx/mimetype.h" ! %class %delete wxFileTypeInfo // the ... parameters form a NULL terminated list of extensions //wxFileTypeInfo(const wxChar *mimeType, const wxChar *openCmd, const wxChar *printCmd, const wxChar *desc, ...) *************** *** 521,525 **** %include "wx/iconloc.h" ! %class %delete %noclassinfo %encapsulate wxIconLocation // ctor takes the name of the file where the icon is !%msw wxIconLocation(const wxString& filename = "") --- 521,525 ---- %include "wx/iconloc.h" ! %class %delete wxIconLocation // ctor takes the name of the file where the icon is !%msw wxIconLocation(const wxString& filename = "") *************** *** 541,545 **** // wxFileType::MessageParameters ! %class %delete %noclassinfo %encapsulate wxFileType::MessageParameters //wxFileType::MessageParameters() wxFileType::MessageParameters(const wxString& filename, const wxString& mimetype = "") --- 541,545 ---- // wxFileType::MessageParameters ! %class %delete wxFileType::MessageParameters //wxFileType::MessageParameters() wxFileType::MessageParameters(const wxString& filename, const wxString& mimetype = "") *************** *** 556,560 **** // wxFileType ! %class %delete %noclassinfo %encapsulate wxFileType wxFileType(const wxFileTypeInfo& ftInfo) --- 556,560 ---- // wxFileType ! %class %delete wxFileType wxFileType(const wxFileTypeInfo& ftInfo) *************** *** 610,614 **** // wxMimeTypesManager ! %class %noclassinfo %encapsulate wxMimeTypesManager %define_pointer wxTheMimeTypesManager --- 610,614 ---- // wxMimeTypesManager ! %class wxMimeTypesManager %define_pointer wxTheMimeTypesManager *************** *** 687,691 **** // wxStreamBase ! %class %noclassinfo wxStreamBase // wxStreamBase() this is only a base class --- 687,691 ---- // wxStreamBase ! %class wxStreamBase // wxStreamBase() this is only a base class *************** *** 701,705 **** // wxInputStream ! %class %noclassinfo %encapsulate wxInputStream, wxStreamBase // wxInputStream() this is only a base class --- 701,705 ---- // wxInputStream ! %class wxInputStream, wxStreamBase // wxInputStream() this is only a base class *************** *** 728,732 **** // wxOutputStream ! %class %noclassinfo %encapsulate wxOutputStream, wxStreamBase // wxOutputStream() this is only a base class --- 728,732 ---- // wxOutputStream ! %class wxOutputStream, wxStreamBase // wxOutputStream() this is only a base class *************** *** 749,753 **** %include "wx/wfstream.h" ! %class %delete %noclassinfo %encapsulate wxFileInputStream, wxInputStream wxFileInputStream(const wxString& fileName) wxFileInputStream(wxFile& file) --- 749,753 ---- %include "wx/wfstream.h" ! %class %delete wxFileInputStream, wxInputStream wxFileInputStream(const wxString& fileName) wxFileInputStream(wxFile& file) *************** *** 760,764 **** // wxFileOutputStream ! %class %delete %noclassinfo %encapsulate wxFileOutputStream, wxOutputStream wxFileOutputStream(const wxString& fileName) wxFileOutputStream(wxFile& file) --- 760,764 ---- // wxFileOutputStream ! %class %delete wxFileOutputStream, wxOutputStream wxFileOutputStream(const wxString& fileName) wxFileOutputStream(wxFile& file) *************** *** 773,777 **** %include "wx/mstream.h" ! %class %delete %noclassinfo %encapsulate wxMemoryInputStream, wxInputStream wxMemoryInputStream(const char *data, size_t length) //wxMemoryInputStream(const wxMemoryOutputStream& stream) --- 773,777 ---- %include "wx/mstream.h" ! %class %delete wxMemoryInputStream, wxInputStream wxMemoryInputStream(const char *data, size_t length) //wxMemoryInputStream(const wxMemoryOutputStream& stream) *************** *** 784,788 **** //%include "wx/mstream.h" ! //%class %delete %noclassinfo %encapsulate wxMemoryInputStream, wxInputStream // wxMemoryOutputStream(void *data, size_t length) // wxMemoryInputStream(const wxMemoryOutputStream& stream) --- 784,788 ---- //%include "wx/mstream.h" ! //%class %delete wxMemoryInputStream, wxInputStream // wxMemoryOutputStream(void *data, size_t length) // wxMemoryInputStream(const wxMemoryOutputStream& stream) *************** *** 794,798 **** %include "wx/datstrm.h" ! %class %delete %noclassinfo %encapsulate wxDataInputStream // wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto()); wxDataInputStream(wxInputStream& s) --- 794,798 ---- %include "wx/datstrm.h" ! %class %delete wxDataInputStream // wxDataInputStream(wxInputStream& s, const wxMBConv& conv = wxConvAuto()); wxDataInputStream(wxInputStream& s) *************** *** 837,841 **** %include "wx/datstrm.h" ! %class %delete %noclassinfo %encapsulate wxDataOutputStream // wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto()); wxDataOutputStream(wxOutputStream& s); --- 837,841 ---- %include "wx/datstrm.h" ! %class %delete wxDataOutputStream // wxDataOutputStream(wxOutputStream& s, const wxMBConv& conv = wxConvAuto()); wxDataOutputStream(wxOutputStream& s); Index: wxcore_core.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_core.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxcore_core.i 29 Jan 2008 00:49:11 -0000 1.3 --- wxcore_core.i 1 Oct 2009 04:21:00 -0000 1.4 *************** *** 20,24 **** %if wxUSE_LOGGUI ! %class %delete %noclassinfo %encapsulate wxLogGui, wxLog wxLogGui() %endclass --- 20,24 ---- %if wxUSE_LOGGUI ! %class %delete wxLogGui, wxLog wxLogGui() %endclass *************** *** 31,35 **** %if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL ! %class %delete %noclassinfo %encapsulate wxLogTextCtrl, wxLog wxLogTextCtrl(wxTextCtrl* textCtrl); --- 31,35 ---- %if wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL ! %class %delete wxLogTextCtrl, wxLog wxLogTextCtrl(wxTextCtrl* textCtrl); *************** *** 43,47 **** %if wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW ! %class %delete %noclassinfo %encapsulate wxLogWindow, wxLogPassThrough wxLogWindow(wxWindow *pParent, const wxString& szTitle, bool bShow = true, bool bPassToOld = true); --- 43,47 ---- %if wxLUA_USE_wxLogWindow && wxUSE_LOGWINDOW ! %class %delete wxLogWindow, wxLogPassThrough wxLogWindow(wxWindow *pParent, const wxString& szTitle, bool bShow = true, bool bPassToOld = true); *************** *** 171,175 **** %endenum ! %class %noclassinfo wxSystemSettings //wxSystemSettings() // No constructor, all members static --- 171,175 ---- %endenum ! %class wxSystemSettings //wxSystemSettings() // No constructor, all members static *************** *** 287,291 **** %include "wx/fs_mem.h" ! %class %noclassinfo %delete wxMemoryFSHandler, wxFileSystemHandler wxMemoryFSHandler() --- 287,291 ---- %include "wx/fs_mem.h" ! %class %delete wxMemoryFSHandler, wxFileSystemHandler wxMemoryFSHandler() Index: wxrichtext_richtext.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxrichtext_richtext.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxrichtext_richtext.i 16 Jul 2007 19:34:26 -0000 1.1 --- wxrichtext_richtext.i 1 Oct 2009 04:21:01 -0000 1.2 *************** *** 152,156 **** ! %class %delete %noclassinfo %encapsulate wxRichTextRange //#define wxRICHTEXT_ALL wxRichTextRange(-2, -2) // FIXME //#define wxRICHTEXT_NONE wxRichTextRange(-1, -1) // FIXME --- 152,156 ---- ! %class %delete wxRichTextRange //#define wxRICHTEXT_ALL wxRichTextRange(-2, -2) // FIXME //#define wxRICHTEXT_NONE wxRichTextRange(-1, -1) // FIXME *************** *** 205,209 **** ! %class %delete %noclassinfo %encapsulate wxTextAttrEx, wxTextAttr wxTextAttrEx(const wxTextAttrEx& attr); wxTextAttrEx(const wxTextAttr& attr) --- 205,209 ---- ! %class %delete wxTextAttrEx, wxTextAttr wxTextAttrEx(const wxTextAttrEx& attr); wxTextAttrEx(const wxTextAttr& attr) *************** *** 294,298 **** ! %class %delete %noclassinfo %encapsulate wxRichTextAttr wxRichTextAttr(const wxTextAttrEx& attr); wxRichTextAttr(const wxRichTextAttr& attr); --- 294,298 ---- ! %class %delete wxRichTextAttr wxRichTextAttr(const wxTextAttrEx& attr); wxRichTextAttr(const wxRichTextAttr& attr); *************** *** 848,852 **** */ ! %class %delete %encapsulate %noclassinfo wxRichTextLine wxRichTextLine(wxRichTextParagraph* parent); wxRichTextLine(const wxRichTextLine& obj) --- 848,852 ---- */ ! %class %delete wxRichTextLine wxRichTextLine(wxRichTextParagraph* parent); wxRichTextLine(const wxRichTextLine& obj) *************** *** 1632,1636 **** */ ! %class %delete %noclassinfo wxRichTextRenderer, wxObject //wxRichTextRenderer() {} --- 1632,1636 ---- */ ! %class %delete wxRichTextRenderer, wxObject //wxRichTextRenderer() {} *************** *** 1652,1656 **** */ ! %class %delete %noclassinfo wxRichTextStdRenderer, wxRichTextRenderer wxRichTextStdRenderer() {} --- 1652,1656 ---- */ ! %class %delete wxRichTextStdRenderer, wxRichTextRenderer wxRichTextStdRenderer() {} Index: wxcore_menutool.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_menutool.i,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxcore_menutool.i 1 Apr 2008 04:19:42 -0000 1.4 --- wxcore_menutool.i 1 Oct 2009 04:21:01 -0000 1.5 *************** *** 168,172 **** // wxMenuItemList ! %class %noclassinfo wxMenuItemList, wxList // no constructor, you only get this back from wxMenu::GetMenuItems --- 168,172 ---- // wxMenuItemList ! %class wxMenuItemList, wxList // no constructor, you only get this back from wxMenu::GetMenuItems *************** *** 212,216 **** %define wxTB_HORZ_TEXT ! %class %noclassinfo wxToolBarBase, wxControl // no constructors base class --- 212,216 ---- %define wxTB_HORZ_TEXT ! %class wxToolBarBase, wxControl // no constructors base class *************** *** 341,348 **** // --------------------------------------------------------------------------- ! // wxToolBarTool ! %class %noclassinfo wxToolBarTool, wxToolBarToolBase ! %endclass %endif //wxLUA_USE_wxToolbar --- 341,348 ---- // --------------------------------------------------------------------------- ! // wxToolBarTool - This class doesn't exist! ! //%class wxToolBarTool, wxToolBarToolBase ! //%endclass %endif //wxLUA_USE_wxToolbar *************** *** 389,393 **** %endenum ! %class %delete %noclassinfo %encapsulate wxAcceleratorEntry wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0, wxMenuItem *item = NULL) wxAcceleratorEntry(const wxAcceleratorEntry& entry) --- 389,393 ---- %endenum ! %class %delete wxAcceleratorEntry wxAcceleratorEntry(int flags = 0, int keyCode = 0, int cmd = 0, wxMenuItem *item = NULL) wxAcceleratorEntry(const wxAcceleratorEntry& entry) Index: wxbase_datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_datetime.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxbase_datetime.i 22 Oct 2008 05:31:45 -0000 1.3 --- wxbase_datetime.i 1 Oct 2009 04:21:00 -0000 1.4 *************** *** 134,138 **** %typedef unsigned short wxDateTime::wxDateTime_t ! %class %delete %noclassinfo %encapsulate wxDateTime %define_object wxDefaultDateTime --- 134,138 ---- %typedef unsigned short wxDateTime::wxDateTime_t ! %class %delete wxDateTime %define_object wxDefaultDateTime *************** *** 211,215 **** // wxDateTimeArray ! %class %delete %noclassinfo %encapsulate wxDateTimeArray wxDateTimeArray() wxDateTimeArray(const wxDateTimeArray& array) --- 211,215 ---- // wxDateTimeArray ! %class %delete wxDateTimeArray wxDateTimeArray() wxDateTimeArray(const wxDateTimeArray& array) *************** *** 237,241 **** %include "wx/datetime.h" ! %class %delete %noclassinfo %encapsulate wxTimeSpan wxTimeSpan() wxTimeSpan(long hours, long minutes = 0, long seconds = 0, long milliseconds = 0) --- 237,241 ---- %include "wx/datetime.h" ! %class %delete wxTimeSpan wxTimeSpan() wxTimeSpan(long hours, long minutes = 0, long seconds = 0, long milliseconds = 0) *************** *** 282,286 **** %include "wx/datetime.h" ! %class %delete %noclassinfo %encapsulate wxDateSpan wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0) --- 282,286 ---- %include "wx/datetime.h" ! %class %delete wxDateSpan wxDateSpan(int years = 0, int months = 0, int weeks = 0, int days = 0) *************** *** 318,322 **** %if wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME ! %class %noclassinfo %encapsulate wxDateTimeHolidayAuthority // no constructor since this class has pure virtual functions --- 318,322 ---- %if wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME ! %class wxDateTimeHolidayAuthority // no constructor since this class has pure virtual functions *************** *** 331,335 **** // wxDateTimeWorkDays ! %class %delete %noclassinfo %encapsulate wxDateTimeWorkDays, wxDateTimeHolidayAuthority wxDateTimeWorkDays() %endclass --- 331,335 ---- // wxDateTimeWorkDays ! %class %delete wxDateTimeWorkDays, wxDateTimeHolidayAuthority wxDateTimeWorkDays() %endclass *************** *** 345,349 **** %include "wx/stopwatch.h" ! %class %delete %noclassinfo %encapsulate wxStopWatch wxStopWatch() // ctor starts the stop watch --- 345,349 ---- %include "wx/stopwatch.h" ! %class %delete wxStopWatch wxStopWatch() // ctor starts the stop watch *************** *** 752,756 **** %endif %wxchkver_2_8 ! %struct %delete %encapsulate wxLanguageInfo wxLanguageInfo() // you must set all the values by hand --- 752,756 ---- %endif %wxchkver_2_8 ! %struct %delete wxLanguageInfo wxLanguageInfo() // you must set all the values by hand *************** *** 762,766 **** ! %class %delete %noclassinfo %encapsulate wxLocale // call Init() if you use this ctor --- 762,766 ---- ! %class %delete wxLocale // call Init() if you use this ctor Index: wxcore_defsutils.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_defsutils.i,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxcore_defsutils.i 5 Dec 2008 04:31:30 -0000 1.5 --- wxcore_defsutils.i 1 Oct 2009 04:21:00 -0000 1.6 *************** *** 71,75 **** %endenum ! %class %delete %encapsulate wxProcess, wxEvtHandler wxProcess(wxEvtHandler *parent = NULL, int nId = wxID_ANY) //wxProcess(int flags) --- 71,75 ---- %endenum ! %class %delete wxProcess, wxEvtHandler wxProcess(wxEvtHandler *parent = NULL, int nId = wxID_ANY) //wxProcess(int flags) *************** *** 194,198 **** %if %wxchkver_2_8 // This is in wxWidgets 2.6 docs, but it's only in >=2.7 ! %class %delete %noclassinfo %encapsulate wxMouseState wxMouseState() --- 194,198 ---- %if %wxchkver_2_8 // This is in wxWidgets 2.6 docs, but it's only in >=2.7 ! %class %delete wxMouseState wxMouseState() *************** *** 500,504 **** %include "wx/utils.h" ! %class %delete %noclassinfo %encapsulate wxBusyCursor // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) --- 500,504 ---- %include "wx/utils.h" ! %class %delete wxBusyCursor // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxBusyCursor(wxCursor* cursor = wxHOURGLASS_CURSOR) *************** *** 510,514 **** // delete() this anyway which is just as easy as wxBegin/EndBusyCursor ! //%class %delete %noclassinfo %encapsulate wxBusyCursorSuspender // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough // wxBusyCursorSuspender() --- 510,514 ---- // delete() this anyway which is just as easy as wxBegin/EndBusyCursor ! //%class %delete wxBusyCursorSuspender // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough // wxBusyCursorSuspender() *************** *** 525,529 **** %include "wx/busyinfo.h" ! %class %delete %noclassinfo wxBusyInfo, wxObject // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxBusyInfo(const wxString& message, wxWindow *parent = NULL) --- 525,529 ---- %include "wx/busyinfo.h" ! %class %delete wxBusyInfo, wxObject // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxBusyInfo(const wxString& message, wxWindow *parent = NULL) Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** wx_datatypes.lua 25 Sep 2009 18:47:57 -0000 1.103 --- wx_datatypes.lua 1 Oct 2009 04:21:00 -0000 1.104 *************** *** 173,177 **** }, wxAboutDialogInfo = { - ["%encapsulate"] = true, Condition = "wxCHECK_VERSION(2,8,0) && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog", IsNumber = false, --- 173,176 ---- *************** *** 180,184 **** }, wxAcceleratorEntry = { [...1134 lines suppressed...] - ["%encapsulate"] = true, IsNumber = false, Name = "wxWindowUpdateLocker", --- 4915,4918 ---- *************** *** 5132,5136 **** }, wxXmlNode = { - ["%encapsulate"] = true, Condition = "wxLUA_USE_wxXML && wxUSE_XML", IsNumber = false, --- 4984,4987 ---- *************** *** 5145,5149 **** }, wxXmlProperty = { - ["%encapsulate"] = true, Condition = "wxLUA_USE_wxXML && wxUSE_XML", IsNumber = false, --- 4996,4999 ---- Index: wxbase_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_rules.lua,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxbase_rules.lua 29 Jan 2008 00:49:11 -0000 1.9 --- wxbase_rules.lua 1 Oct 2009 04:21:00 -0000 1.10 *************** *** 79,85 **** -- hook_cpp_header_filename. -- This code will be place directly after any #includes at the top of the file ! hook_cpp_binding_header_includes = ! "#include \"wxbind/include/wxbinddefs.h\"\n".. ! "#include \"wxluasetup.h\"\n" -- ---------------------------------------------------------------------------- --- 79,100 ---- -- hook_cpp_header_filename. -- This code will be place directly after any #includes at the top of the file ! hook_cpp_binding_header_includes = [[ ! #include "wxbind/include/wxbinddefs.h" ! #include "wxluasetup.h" ! ! // ---------------------------------------------------------------------------- ! // Convert from wxWidgets wxT('') to wxT(""), a string. Copied from wx/filefn.h ! ! // platform independent versions ! #if defined(__UNIX__) && !defined(__OS2__) ! // CYGWIN also uses UNIX settings ! #define wxLua_FILE_SEP_PATH wxT("/") ! #elif defined(__MAC__) ! #define wxLua_FILE_SEP_PATH wxT(":") ! #else // Windows and OS/2 ! #define wxLua_FILE_SEP_PATH wxT("\\") ! #endif // Unix/Windows ! ! ]] -- ---------------------------------------------------------------------------- Index: wxcore_override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_override.hpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxcore_override.hpp 24 Mar 2009 04:15:07 -0000 1.20 --- wxcore_override.hpp 1 Oct 2009 04:21:01 -0000 1.21 *************** *** 144,148 **** if (returns != NULL) { ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAcceleratorTable); --- 144,148 ---- if (returns != NULL) { ! wxluaO_addgcobject(L, returns, wxluatype_wxAcceleratorTable); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxAcceleratorTable); *************** *** 542,546 **** wxTreeItemId *returns = new wxTreeItemId(self->GetFirstChild(*item, cookie)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxTreeItemId(returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxTreeItemId); --- 542,546 ---- wxTreeItemId *returns = new wxTreeItemId(self->GetFirstChild(*item, cookie)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, wxluatype_wxTreeItemId); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxTreeItemId); *************** *** 574,578 **** wxTreeItemId *returns = new wxTreeItemId(self->GetNextChild(*item, cookie)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxTreeItemId(returns)); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxTreeItemId); --- 574,578 ---- wxTreeItemId *returns = new wxTreeItemId(self->GetNextChild(*item, cookie)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxTreeItemId); // push the result datatype wxluaT_pushuserdatatype(L, returns, wxluatype_wxTreeItemId); *************** *** 604,608 **** { wxTreeItemId* treeId = new wxTreeItemId(selection[idx]); ! wxluaO_addgcobject(L, (void*)treeId, new wxLua_wxObject_wxTreeItemId(treeId)); wxluaT_pushuserdatatype(L, treeId, wxluatype_wxTreeItemId); lua_rawseti(L, -2, idx + 1); --- 604,608 ---- { wxTreeItemId* treeId = new wxTreeItemId(selection[idx]); ! wxluaO_addgcobject(L, treeId, wxluatype_wxTreeItemId); wxluaT_pushuserdatatype(L, treeId, wxluatype_wxTreeItemId); lua_rawseti(L, -2, idx + 1); *************** *** 627,631 **** wxTreeItemId *returns = new wxTreeItemId(self->HitTest(*point, flags)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxTreeItemId(returns)); // push the result datatype --- 627,631 ---- wxTreeItemId *returns = new wxTreeItemId(self->HitTest(*point, flags)); // add the new object to the tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxTreeItemId); // push the result datatype *************** *** 673,677 **** wxGenericValidator *returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 673,677 ---- wxGenericValidator *returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 690,694 **** wxGenericValidator *returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 690,694 ---- wxGenericValidator *returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 707,711 **** wxGenericValidator *returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 707,711 ---- wxGenericValidator *returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 724,728 **** wxGenericValidator *returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); --- 724,728 ---- wxGenericValidator *returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxGenericValidator); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxGenericValidator); *************** *** 885,889 **** wxBusyCursor *returns = new wxBusyCursor(cursor); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxBusyCursor((wxBusyCursor *)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBusyCursor); --- 885,889 ---- wxBusyCursor *returns = new wxBusyCursor(cursor); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBusyCursor); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBusyCursor); *************** *** 1475,1479 **** wxBitmap *returns = new wxBitmap(bits, width, height, depth); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); --- 1475,1479 ---- wxBitmap *returns = new wxBitmap(bits, width, height, depth); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBitmap); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); *************** *** 1522,1526 **** // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); --- 1522,1526 ---- // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBitmap); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); *************** *** 1550,1554 **** wxBitmap *returns = new wxBitmap(data, type, width, height, depth); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); --- 1550,1554 ---- wxBitmap *returns = new wxBitmap(data, type, width, height, depth); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBitmap); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); *************** *** 1572,1576 **** delete [] sizeArray; // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); --- 1572,1576 ---- delete [] sizeArray; // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxBitmap); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxBitmap); *************** *** 1764,1768 **** wxImage *returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxImage); --- 1764,1768 ---- wxImage *returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxImage); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxImage); *************** *** 1781,1785 **** wxImage *returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxImage); --- 1781,1785 ---- wxImage *returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxImage); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxImage); *************** *** 2023,2027 **** wxLuaArtProvider *returns = new wxLuaArtProvider(wxlState); // add to tracked memory list ! wxluaO_addgcobject(L, (wxLuaArtProvider *)returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaArtProvider); --- 2023,2027 ---- wxLuaArtProvider *returns = new wxLuaArtProvider(wxlState); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLuaArtProvider); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaArtProvider); *************** *** 2389,2393 **** *returns = *self; // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxPrintData); --- 2389,2393 ---- *returns = *self; // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxPrintData); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxPrintData); *************** *** 2406,2410 **** *returns = *self; // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxPageSetupDialogData); --- 2406,2410 ---- *returns = *self; // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxPageSetupDialogData); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxPageSetupDialogData); *************** *** 2804,2808 **** wxLuaPrintout *returns = new wxLuaPrintout(wxlState, title, pObject); // add to tracked memory list ! wxluaO_addgcobject(L, (wxLuaPrintout *)returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaPrintout); --- 2804,2808 ---- wxLuaPrintout *returns = new wxLuaPrintout(wxlState, title, pObject); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLuaPrintout); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaPrintout); Index: wxcore_image.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_image.i,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxcore_image.i 19 May 2009 03:20:53 -0000 1.5 --- wxcore_image.i 1 Oct 2009 04:21:01 -0000 1.6 *************** *** 212,216 **** // wxImageHistogram ! %class %delete %noclassinfo %encapsulate wxImageHistogramEntry wxImageHistogramEntry() %member unsigned long index // GetIndex() only, SetIndex(idx) is not allowed --- 212,216 ---- // wxImageHistogram ! %class %delete wxImageHistogramEntry wxImageHistogramEntry() %member unsigned long index // GetIndex() only, SetIndex(idx) is not allowed *************** *** 218,222 **** %endclass ! %class %delete %noclassinfo %encapsulate wxImageHistogram::iterator %member long first %member wxImageHistogramEntry second --- 218,222 ---- %endclass ! %class %delete wxImageHistogram::iterator %member long first %member wxImageHistogramEntry second *************** *** 227,231 **** %endclass ! %class %delete %noclassinfo %encapsulate wxImageHistogram // wxImageHistogramBase actually a hash map wxImageHistogram() --- 227,231 ---- %endclass ! %class %delete wxImageHistogram // wxImageHistogramBase actually a hash map wxImageHistogram() *************** *** 237,245 **** // Selected functions from the base wxHashMap class ! const wxImageHistogram::iterator begin() const void clear() size_t count(long key) const bool empty() const ! const wxImageHistogram::iterator end() const size_t erase(long key) wxImageHistogram::iterator find(long key) --- 237,245 ---- // Selected functions from the base wxHashMap class ! wxImageHistogram::iterator begin() const // not const iterator since we create a new copy of it void clear() size_t count(long key) const bool empty() const ! wxImageHistogram::iterator end() const // not const iterator since we create a new copy of it size_t erase(long key) wxImageHistogram::iterator find(long key) Index: wxbase_override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_override.hpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxbase_override.hpp 19 May 2009 03:20:53 -0000 1.19 --- wxbase_override.hpp 1 Oct 2009 04:21:00 -0000 1.20 *************** *** 186,190 **** // we may not be tracked, but delete us anyway ! if (!wxluaO_deletegcobject(L, lua_touserdata(L, 1), self, WXLUA_DELETE_OBJECT_ALL)) delete self; --- 186,190 ---- // we may not be tracked, but delete us anyway ! if (!wxluaO_deletegcobject(L, 1, WXLUA_DELETE_OBJECT_ALL)) delete self; *************** *** 373,377 **** wxString* returns = new wxString(str); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxString(returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxString); --- 373,377 ---- wxString* returns = new wxString(str); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxString); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxString); *************** *** 598,607 **** bool returns = self->GetTimes(dtAccess, dtMod, dtCreate); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)dtAccess, new wxLua_wxObject_wxDateTime(dtAccess)); ! wxluaO_addgcobject(L, (void*)dtMod, new wxLua_wxObject_wxDateTime(dtMod)); ! wxluaO_addgcobject(L, (void*)dtCreate, new wxLua_wxObject_wxDateTime(dtCreate)); // push the constructed class pointers wxluaT_pushuserdatatype(L, dtAccess, wxluatype_wxDateTime); ! wxluaT_pushuserdatatype(L, dtMod, wxluatype_wxDateTime); wxluaT_pushuserdatatype(L, dtCreate, wxluatype_wxDateTime); // push the result flag --- 598,607 ---- bool returns = self->GetTimes(dtAccess, dtMod, dtCreate); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)dtAccess, wxluatype_wxDateTime); ! wxluaO_addgcobject(L, (void*)dtMod, wxluatype_wxDateTime); ! wxluaO_addgcobject(L, (void*)dtCreate, wxluatype_wxDateTime); // push the constructed class pointers wxluaT_pushuserdatatype(L, dtAccess, wxluatype_wxDateTime); ! wxluaT_pushuserdatatype(L, dtMod, wxluatype_wxDateTime); wxluaT_pushuserdatatype(L, dtCreate, wxluatype_wxDateTime); // push the result flag *************** *** 908,912 **** wxMemoryInputStream* returns = new wxMemoryInputStream(data, length); // add to tracked memory list ! wxluaO_addgcobject(L, (void*)returns, new wxLua_wxObject_wxMemoryInputStream((wxMemoryInputStream*)returns)); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMemoryInputStream); --- 908,912 ---- wxMemoryInputStream* returns = new wxMemoryInputStream(data, length); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxMemoryInputStream); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxMemoryInputStream); Index: wxbase_config.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxbase_config.i,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxbase_config.i 18 Dec 2007 01:03:32 -0000 1.2 --- wxbase_config.i 1 Oct 2009 04:21:00 -0000 1.3 *************** *** 35,39 **** %endenum ! %class %delete %noclassinfo %encapsulate wxConfigBase // No constructor since this is a base class --- 35,39 ---- %endenum ! %class %delete wxConfigBase // No constructor since this is a base class *************** *** 121,125 **** // wxConfig ! %class %delete %noclassinfo %encapsulate wxConfig, wxConfigBase wxConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = 0) --- 121,125 ---- // wxConfig ! %class %delete wxConfig, wxConfigBase wxConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = 0) *************** *** 129,133 **** // wxFileConfig ! %class %delete %noclassinfo %encapsulate wxFileConfig, wxConfigBase wxFileConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE) //, wxMBConv& conv = wxConvUTF8) --- 129,133 ---- // wxFileConfig ! %class %delete wxFileConfig, wxConfigBase wxFileConfig(const wxString& appName = "", const wxString& vendorName = "", const wxString& localFilename = "", const wxString& globalFilename = "", long style = wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_GLOBAL_FILE) //, wxMBConv& conv = wxConvUTF8) *************** *** 140,144 **** %include "wx/memconf.h" ! %class %delete %noclassinfo %encapsulate wxMemoryConfig, wxFileConfig wxMemoryConfig() --- 140,144 ---- %include "wx/memconf.h" ! %class %delete wxMemoryConfig, wxFileConfig wxMemoryConfig() *************** *** 153,157 **** // when the function returns ! %class %delete %noclassinfo %encapsulate wxConfigPathChanger // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry) --- 153,157 ---- // when the function returns ! %class %delete wxConfigPathChanger // NOTE: ALWAYS delete() this when done since Lua's gc may not delete it soon enough wxConfigPathChanger(const wxConfigBase *pContainer, const wxString& strEntry) Index: wxcore_controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_controls.i,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxcore_controls.i 25 Sep 2009 18:47:57 -0000 1.9 --- wxcore_controls.i 1 Oct 2009 04:21:00 -0000 1.10 *************** *** 124,128 **** %include "wx/ctrlsub.h" ! %class %noclassinfo wxItemContainerImmutable // no constructor, used only as a base class --- 124,128 ---- %include "wx/ctrlsub.h" ! %class wxItemContainerImmutable // no constructor, used only as a base class *************** *** 151,155 **** %include "wx/ctrlsub.h" ! %class %noclassinfo wxItemContainer, wxItemContainerImmutable // no constructor, used only as base class --- 151,155 ---- %include "wx/ctrlsub.h" ! %class wxItemContainer, wxItemContainerImmutable // no constructor, used only as base class *************** *** 507,511 **** // wxListItemAttr - wxListCtrl ! %class %delete %noclassinfo %encapsulate wxListItemAttr wxListItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont) --- 507,511 ---- // wxListItemAttr - wxListCtrl ! %class %delete wxListItemAttr wxListItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont) *************** *** 969,973 **** %define wxTEXT_ATTR_TABS ! %class %delete %noclassinfo %encapsulate wxTextAttr //wxTextAttr() wxTextAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont, wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT) --- 969,973 ---- %define wxTEXT_ATTR_TABS ! %class %delete wxTextAttr //wxTextAttr() wxTextAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont, wxTextAttrAlignment alignment = wxTEXT_ALIGNMENT_DEFAULT) *************** *** 1168,1172 **** /* ! %class %delete %noclassinfo %encapsulate wxTreeItemAttr wxTreeItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont) --- 1168,1172 ---- /* ! %class %delete wxTreeItemAttr wxTreeItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont) *************** *** 1187,1191 **** //%if %wxchkver_2_6 ! //%class %noclassinfo wxTreeItemIdValue //%endclass //%endif --- 1187,1191 ---- //%if %wxchkver_2_6 ! //%class wxTreeItemIdValue //%endclass //%endif *************** *** 1199,1203 **** %endenum ! %class %delete %noclassinfo %encapsulate wxTreeItemId wxTreeItemId() wxTreeItemId(const wxTreeItemId& id) --- 1199,1203 ---- %endenum ! %class %delete wxTreeItemId wxTreeItemId() wxTreeItemId(const wxTreeItemId& id) *************** *** 1220,1224 **** /* ! %class %delete %noclassinfo %encapsulate wxArrayTreeItemIds wxArrayTreeItemIds() wxArrayTreeItemIds(const wxArrayTreeItemIds& array) --- 1220,1224 ---- /* ! %class %delete wxArrayTreeItemIds wxArrayTreeItemIds() wxArrayTreeItemIds(const wxArrayTreeItemIds& array) *************** *** 1246,1250 **** // of these if you're going to attach it to a wxTreeCtrl to avoid memory leaks. ! %class %noclassinfo wxTreeItemData, wxClientData wxTreeItemData() --- 1246,1250 ---- // of these if you're going to attach it to a wxTreeCtrl to avoid memory leaks. ! %class wxTreeItemData, wxClientData wxTreeItemData() *************** *** 1261,1265 **** %include "wxbind/include/wxcore_wxlcore.h" ! %class %noclassinfo wxLuaTreeItemData, wxTreeItemData wxLuaTreeItemData(double value = 0) --- 1261,1265 ---- %include "wxbind/include/wxcore_wxlcore.h" ! %class wxLuaTreeItemData, wxTreeItemData wxLuaTreeItemData(double value = 0) Index: wxhtml_html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxhtml_html.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxhtml_html.i 10 Jan 2008 23:06:23 -0000 1.3 --- wxhtml_html.i 1 Oct 2009 04:21:01 -0000 1.4 *************** *** 171,175 **** %include "wx/html/htmlcell.h" ! %class %delete %noclassinfo wxHtmlLinkInfo wxHtmlLinkInfo(const wxString& href, const wxString& target = "") --- 171,175 ---- %include "wx/html/htmlcell.h" ! %class %delete wxHtmlLinkInfo wxHtmlLinkInfo(const wxString& href, const wxString& target = "") *************** *** 374,378 **** %endenum ! %class %noclassinfo wxHtmlWindowInterface virtual void SetHTMLWindowTitle(const wxString& title) --- 374,378 ---- %endenum ! %class wxHtmlWindowInterface virtual void SetHTMLWindowTitle(const wxString& title) *************** *** 396,400 **** %define wxHLB_MULTIPLE ! %class wxSimpleHtmlListBox, wxHtmlWindowInterface //: public wxHtmlListBox, public wxItemContainer wxSimpleHtmlListBox() wxSimpleHtmlListBox(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, const wxArrayString& choices, long style = wxHLB_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = "wxSimpleHtmlListBox") --- 396,400 ---- %define wxHLB_MULTIPLE ! ... [truncated message content] |
From: John L. <jr...@us...> - 2009-10-01 04:21:11
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/apps/wxluacan/src Modified Files: wxluacan.i wxluacan_bind.cpp wxluacan_bind.h Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxluacan_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxluacan_bind.h 25 Sep 2009 18:47:57 -0000 1.7 --- wxluacan_bind.h 1 Oct 2009 04:20:59 -0000 1.8 *************** *** 18,24 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 18,24 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 60,67 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxluacan_H__ --- 60,63 ---- Index: wxluacan.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.i,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxluacan.i 31 May 2007 17:18:45 -0000 1.10 --- wxluacan.i 1 Oct 2009 04:20:58 -0000 1.11 *************** *** 5,9 **** %include "wx/gdicmn.h" ! %class %noclassinfo wxlCanObj, wxObject wxlCanObj( double x = 0, double y = 0 ) void SetPos( double x, double y ) --- 5,9 ---- %include "wx/gdicmn.h" ! %class wxlCanObj, wxObject wxlCanObj( double x = 0, double y = 0 ) void SetPos( double x, double y ) *************** *** 16,37 **** %endclass ! %class %noclassinfo wxlCanObjRect, wxlCanObj wxlCanObjRect( double x, double y, double w, double h ) %endclass ! %class %noclassinfo wxlCanObjCircle, wxlCanObj wxlCanObjCircle( double x, double y, double r ) %endclass ! %class %noclassinfo wxlCanObjScript, wxlCanObj wxlCanObjScript( double x, double y, const wxString& name ) %endclass ! %class %noclassinfo wxlCanObjAddScript, wxlCanObj wxlCanObjAddScript( double x, double y, const wxString& script ) void SetScript( const wxString& script ) %endclass ! %class %noclassinfo wxlCan, wxScrolledWindow wxlCan( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize ) void AddObject( wxlCanObj *canobj ) --- 16,37 ---- %endclass ! %class wxlCanObjRect, wxlCanObj wxlCanObjRect( double x, double y, double w, double h ) %endclass ! %class wxlCanObjCircle, wxlCanObj wxlCanObjCircle( double x, double y, double r ) %endclass ! %class wxlCanObjScript, wxlCanObj wxlCanObjScript( double x, double y, const wxString& name ) %endclass ! %class wxlCanObjAddScript, wxlCanObj wxlCanObjAddScript( double x, double y, const wxString& script ) void SetScript( const wxString& script ) %endclass ! %class wxlCan, wxScrolledWindow wxlCan( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize ) void AddObject( wxlCanObj *canobj ) *************** *** 44,48 **** %function wxlLuaCanCmd* GetCmdhMain() ! %class %noclassinfo wxlLuaCanCmd, wxCommandProcessor wxlLuaCanCmd( wxlCan* canvas, int maxCommands = -1 ) void MoveObject( int index, double x, double y ) --- 44,48 ---- %function wxlLuaCanCmd* GetCmdhMain() ! %class wxlLuaCanCmd, wxCommandProcessor wxlLuaCanCmd( wxlCan* canvas, int maxCommands = -1 ) void MoveObject( int index, double x, double y ) Index: wxluacan_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.cpp,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** wxluacan_bind.cpp 27 Sep 2009 03:13:50 -0000 1.38 --- wxluacan_bind.cpp 1 Oct 2009 04:20:59 -0000 1.39 *************** *** 169,172 **** --- 169,178 ---- + void wxLua_wxlCanObj_delete_function(void** p) + { + wxlCanObj* o = (wxlCanObj*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxlCanObj_methods[] = { *************** *** 220,223 **** --- 226,235 ---- + void wxLua_wxlCanObjRect_delete_function(void** p) + { + wxlCanObjRect* o = (wxlCanObjRect*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxlCanObjRect_methods[] = { *************** *** 258,261 **** --- 270,279 ---- + void wxLua_wxlCanObjCircle_delete_function(void** p) + { + wxlCanObjCircle* o = (wxlCanObjCircle*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxlCanObjCircle_methods[] = { *************** *** 296,299 **** --- 314,323 ---- + void wxLua_wxlCanObjScript_delete_function(void** p) + { + wxlCanObjScript* o = (wxlCanObjScript*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxlCanObjScript_methods[] = { *************** *** 350,353 **** --- 374,383 ---- + void wxLua_wxlCanObjAddScript_delete_function(void** p) + { + wxlCanObjAddScript* o = (wxlCanObjAddScript*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxlCanObjAddScript_methods[] = { *************** *** 435,438 **** --- 465,470 ---- // call constructor wxlCan* returns = new wxlCan(parent, id, *pos, *size); + // add to tracked window list, it will check validity + wxluaW_addtrackedwindow(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxlCan); *************** *** 445,448 **** --- 477,486 ---- + void wxLua_wxlCan_delete_function(void** p) + { + wxlCan* o = (wxlCan*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxlCan_methods[] = { *************** *** 510,513 **** --- 548,557 ---- + void wxLua_wxlLuaCanCmd_delete_function(void** p) + { + wxlLuaCanCmd* o = (wxlLuaCanCmd*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxlLuaCanCmd_methods[] = { *************** *** 672,687 **** --- 716,738 ---- extern wxLuaBindMethod wxlCan_methods[]; extern int wxlCan_methodCount; + extern void wxLua_wxlCan_delete_function(void** p); extern wxLuaBindMethod wxlCanObj_methods[]; extern int wxlCanObj_methodCount; + extern void wxLua_wxlCanObj_delete_function(void** p); extern wxLuaBindMethod wxlCanObjAddScript_methods[]; extern int wxlCanObjAddScript_methodCount; + extern void wxLua_wxlCanObjAddScript_delete_function(void** p); extern wxLuaBindMethod wxlCanObjCircle_methods[]; extern int wxlCanObjCircle_methodCount; + extern void wxLua_wxlCanObjCircle_delete_function(void** p); extern wxLuaBindMethod wxlCanObjRect_methods[]; extern int wxlCanObjRect_methodCount; + extern void wxLua_wxlCanObjRect_delete_function(void** p); extern wxLuaBindMethod wxlCanObjScript_methods[]; extern int wxlCanObjScript_methodCount; + extern void wxLua_wxlCanObjScript_delete_function(void** p); extern wxLuaBindMethod wxlLuaCanCmd_methods[]; extern int wxlLuaCanCmd_methodCount; + extern void wxLua_wxlLuaCanCmd_delete_function(void** p); *************** *** 692,702 **** static wxLuaBindClass classList[] = { ! { wxluaclassname_wxlCan, wxlCan_methods, wxlCan_methodCount, NULL, &wxluatype_wxlCan, wxluabaseclassnames_wxlCan, wxluabaseclassbinds_wxlCan, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxlCanObj, wxlCanObj_methods, wxlCanObj_methodCount, NULL, &wxluatype_wxlCanObj, wxluabaseclassnames_wxlCanObj, wxluabaseclassbinds_wxlCanObj, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxlCanObjAddScript, wxlCanObjAddScript_methods, wxlCanObjAddScript_methodCount, NULL, &wxluatype_wxlCanObjAddScript, wxluabaseclassnames_wxlCanObjAddScript, wxluabaseclassbinds_wxlCanObjAddScript, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxlCanObjCircle, wxlCanObjCircle_methods, wxlCanObjCircle_methodCount, NULL, &wxluatype_wxlCanObjCircle, wxluabaseclassnames_wxlCanObjCircle, wxluabaseclassbinds_wxlCanObjCircle, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxlCanObjRect, wxlCanObjRect_methods, wxlCanObjRect_methodCount, NULL, &wxluatype_wxlCanObjRect, wxluabaseclassnames_wxlCanObjRect, wxluabaseclassbinds_wxlCanObjRect, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxlCanObjScript, wxlCanObjScript_methods, wxlCanObjScript_methodCount, NULL, &wxluatype_wxlCanObjScript, wxluabaseclassnames_wxlCanObjScript, wxluabaseclassbinds_wxlCanObjScript, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxlLuaCanCmd, wxlLuaCanCmd_methods, wxlLuaCanCmd_methodCount, NULL, &wxluatype_wxlLuaCanCmd, wxluabaseclassnames_wxlLuaCanCmd, wxluabaseclassbinds_wxlLuaCanCmd, NULL, NULL, NULL, 0, }, { 0, 0, 0, 0, 0, 0, 0 }, --- 743,753 ---- static wxLuaBindClass classList[] = { ! { wxluaclassname_wxlCan, wxlCan_methods, wxlCan_methodCount, CLASSINFO(wxlCan), &wxluatype_wxlCan, wxluabaseclassnames_wxlCan, wxluabaseclassbinds_wxlCan, NULL, NULL, NULL, 0, &wxLua_wxlCan_delete_function, }, ! { wxluaclassname_wxlCanObj, wxlCanObj_methods, wxlCanObj_methodCount, CLASSINFO(wxlCanObj), &wxluatype_wxlCanObj, wxluabaseclassnames_wxlCanObj, wxluabaseclassbinds_wxlCanObj, NULL, NULL, NULL, 0, &wxLua_wxlCanObj_delete_function, }, ! { wxluaclassname_wxlCanObjAddScript, wxlCanObjAddScript_methods, wxlCanObjAddScript_methodCount, CLASSINFO(wxlCanObjAddScript), &wxluatype_wxlCanObjAddScript, wxluabaseclassnames_wxlCanObjAddScript, wxluabaseclassbinds_wxlCanObjAddScript, NULL, NULL, NULL, 0, &wxLua_wxlCanObjAddScript_delete_function, }, ! { wxluaclassname_wxlCanObjCircle, wxlCanObjCircle_methods, wxlCanObjCircle_methodCount, CLASSINFO(wxlCanObjCircle), &wxluatype_wxlCanObjCircle, wxluabaseclassnames_wxlCanObjCircle, wxluabaseclassbinds_wxlCanObjCircle, NULL, NULL, NULL, 0, &wxLua_wxlCanObjCircle_delete_function, }, ! { wxluaclassname_wxlCanObjRect, wxlCanObjRect_methods, wxlCanObjRect_methodCount, CLASSINFO(wxlCanObjRect), &wxluatype_wxlCanObjRect, wxluabaseclassnames_wxlCanObjRect, wxluabaseclassbinds_wxlCanObjRect, NULL, NULL, NULL, 0, &wxLua_wxlCanObjRect_delete_function, }, ! { wxluaclassname_wxlCanObjScript, wxlCanObjScript_methods, wxlCanObjScript_methodCount, CLASSINFO(wxlCanObjScript), &wxluatype_wxlCanObjScript, wxluabaseclassnames_wxlCanObjScript, wxluabaseclassbinds_wxlCanObjScript, NULL, NULL, NULL, 0, &wxLua_wxlCanObjScript_delete_function, }, ! { wxluaclassname_wxlLuaCanCmd, wxlLuaCanCmd_methods, wxlLuaCanCmd_methodCount, CLASSINFO(wxlLuaCanCmd), &wxluatype_wxlLuaCanCmd, wxluabaseclassnames_wxlLuaCanCmd, wxluabaseclassbinds_wxlLuaCanCmd, NULL, NULL, NULL, 0, &wxLua_wxlLuaCanCmd_delete_function, }, { 0, 0, 0, 0, 0, 0, 0 }, |
From: John L. <jr...@us...> - 2009-10-01 04:21:11
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp wxlua_bind.cpp Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.183 retrieving revision 1.184 diff -C2 -d -r1.183 -r1.184 *** wxlstate.cpp 25 Sep 2009 18:47:58 -0000 1.183 --- wxlstate.cpp 1 Oct 2009 04:21:02 -0000 1.184 *************** *** 482,490 **** // ---------------------------------------------------------------------------- ! void LUACALL wxluaO_addgcobject(lua_State *L, wxObject* wxobj) ! { ! wxluaO_addgcobject(L, (void*)wxobj, wxobj); ! } ! void LUACALL wxluaO_addgcobject(lua_State *L, void *obj_ptr, wxObject* wxobj) { lua_pushlightuserdata(L, &wxlua_lreg_gcobjects_key); // push key --- 482,486 ---- // ---------------------------------------------------------------------------- ! void LUACALL wxluaO_addgcobject(lua_State *L, void *obj_ptr, int wxl_type) { lua_pushlightuserdata(L, &wxlua_lreg_gcobjects_key); // push key *************** *** 497,501 **** { lua_pop(L, 2); // pop table and value ! wxFAIL_MSG(wxT("Tracking an object twice in wxluaO_addgcobject: ") + wxString(wxobj->GetClassInfo()->GetClassName())); return; } --- 493,497 ---- { lua_pop(L, 2); // pop table and value ! wxFAIL_MSG(wxT("Tracking an object twice in wxluaO_addgcobject: ") + wxluaT_typename(L, wxl_type)); return; } *************** *** 504,508 **** // Then add it lua_pushlightuserdata(L, obj_ptr); // push key ! lua_pushlightuserdata(L, wxobj); // push value lua_rawset(L, -3); // set t[key] = value, pops key and value --- 500,504 ---- // Then add it lua_pushlightuserdata(L, obj_ptr); // push key ! lua_pushnumber(L, wxl_type); // push value lua_rawset(L, -3); // set t[key] = value, pops key and value *************** *** 510,526 **** } ! bool LUACALL wxluaO_deletegcobject(lua_State *L, void* udata, void *obj_ptr, int flags) { ! if (obj_ptr == NULL) return false; // can happen bool delete_all = WXLUA_HASBIT(flags, WXLUA_DELETE_OBJECT_ALL); ! // Remove the weak ref to it int udata_count = wxluaO_untrackweakobject(L, delete_all ? NULL : udata, obj_ptr); if (delete_all || (udata_count < 1)) { wxlua_removederivedmethods(L, obj_ptr); lua_pushlightuserdata(L, &wxlua_lreg_gcobjects_key); // push key lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) --- 506,538 ---- } ! bool LUACALL wxluaO_deletegcobject(lua_State *L, int stack_idx, int flags) { ! void* udata = lua_touserdata(L, stack_idx); ! void* obj_ptr = wxlua_touserdata(L, stack_idx, true); // clear lua userdata's ptr ! ! //if (obj_ptr == NULL) return false; // can happen bool delete_all = WXLUA_HASBIT(flags, WXLUA_DELETE_OBJECT_ALL); ! wxLuaBindClass *wxlClass = NULL; ! ! if (lua_getmetatable(L, stack_idx)) ! { ! lua_pushlightuserdata(L, &wxlua_metatable_wxluabindclass_key); // push key ! lua_rawget(L, -2); // get t[key] = value; pop key push value ! wxlClass = (wxLuaBindClass *)lua_touserdata(L, -1); ! lua_pop(L, 2); // pop metatable and lightuserdata value ! } ! ! // Remove the weak ref to it, will optionally clear all the metatables ! // for an userdata created for this object to make them unusable. int udata_count = wxluaO_untrackweakobject(L, delete_all ? NULL : udata, obj_ptr); if (delete_all || (udata_count < 1)) { + // remove any derived methods attached to this object wxlua_removederivedmethods(L, obj_ptr); + // check if we are really supposed to delete it lua_pushlightuserdata(L, &wxlua_lreg_gcobjects_key); // push key lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push value (table) *************** *** 529,539 **** lua_rawget(L, -2); // get t[key] = value, pops key ! if (lua_islightuserdata(L, -1)) // is the wxObject* we delete { ! // delete the real object for the case where it's encapsulated ! wxObject *wxobj = (wxObject*)lua_touserdata(L, -1); ! delete wxobj; ! ! lua_pop(L, 1); // pop lightuserdata value lua_pushlightuserdata(L, obj_ptr); // push key --- 541,547 ---- lua_rawget(L, -2); // get t[key] = value, pops key ! if (wxlClass && lua_isnumber(L, -1)) // the wxLua type for it { ! lua_pop(L, 1); // pop number value lua_pushlightuserdata(L, obj_ptr); // push key *************** *** 542,545 **** --- 550,559 ---- lua_pop(L, 1); // pop delobj table + + // delete the object using the function stored in the wxLuaBindClass + if (obj_ptr) + wxlClass->delete_fn(&obj_ptr); + else + return false; return true; *************** *** 567,573 **** lua_rawget(L, -2); // get t[key] = value, pops key ! if (lua_islightuserdata(L, -1)) // is the wxObject* we delete { ! lua_pop(L, 1); // pop lightuserdata lua_pushlightuserdata(L, obj_ptr); // push key --- 581,587 ---- lua_rawget(L, -2); // get t[key] = value, pops key ! if (lua_isnumber(L, -1)) // is the wxLua type of the object { ! lua_pop(L, 1); // pop number lua_pushlightuserdata(L, obj_ptr); // push key *************** *** 592,596 **** lua_rawget(L, -2); // get t[key] = value, pops key ! bool found = lua_islightuserdata(L, -1); lua_pop(L, 2); // pop udata and table --- 606,610 ---- lua_rawget(L, -2); // get t[key] = value, pops key ! bool found = lua_isnumber(L, -1); lua_pop(L, 2); // pop udata and table *************** *** 611,619 **** wxString name(wxT("wxObject?")); ! wxObject* obj = (wxObject*)lua_touserdata(L, -1); ! if (obj && obj->GetClassInfo() && obj->GetClassInfo()->GetClassName()) ! name = obj->GetClassInfo()->GetClassName(); ! arrStr.Add(wxString::Format(wxT("%s(%p)"), name.c_str(), obj)); lua_pop(L, 1); // pop value, lua_next will pop key at end --- 625,632 ---- wxString name(wxT("wxObject?")); ! int wxl_type = (int)lua_tonumber(L, -1); ! name = wxluaT_typename(L, wxl_type); ! arrStr.Add(wxString::Format(wxT("%s(%p)"), name.c_str(), lua_touserdata(L, -2))); lua_pop(L, 1); // pop value, lua_next will pop key at end *************** *** 2314,2342 **** ClearCallbacks(); - /* - // Let the Lua garbage collector do it for shutdown. - - // Delete all the wxObject data - lua_pushlightuserdata(m_lua_State, &wxlua_lreg_gcobjects_key); - lua_rawget(m_lua_State, LUA_REGISTRYINDEX); - - lua_pushnil(m_lua_State); - while (lua_next(m_lua_State, -2) != 0) - { - // value = -1, key = -2, table = -3 - wxObject* o = (wxObject*)lua_touserdata(m_lua_State, -1); // delete object not key - delete o; - - lua_pop(m_lua_State, 1); // pop value, lua_next will pop key at end - } - - lua_pop(m_lua_State, 1); // pop table - - // remove table since we've deleted everything in it - lua_pushlightuserdata(m_lua_State, &wxlua_lreg_gcobjects_key); - lua_newtable(m_lua_State); - lua_rawset(m_lua_State, LUA_REGISTRYINDEX); - */ - // remove refs table to try to clear memory gracefully wxlua_lreg_createtable(m_lua_State, &wxlua_lreg_refs_key); --- 2327,2330 ---- *************** *** 3041,3059 **** // memory tracking functions ! void wxLuaState::AddGCObject(wxObject *wxobj) ! { ! AddGCObject(wxobj, wxobj); ! } ! ! void wxLuaState::AddGCObject(void* obj_ptr, wxObject *wxobj) { ! wxCHECK_RET(Ok() && wxobj, wxT("Invalid wxLuaState or wxObject to track")); ! wxluaO_addgcobject(M_WXLSTATEDATA->m_lua_State, obj_ptr, wxobj); } ! bool wxLuaState::DeleteGCObject(void* udata, void *obj_ptr, int flags) { ! wxCHECK_MSG(Ok() && obj_ptr, false, wxT("Invalid wxLuaState or object")); ! return wxluaO_deletegcobject(M_WXLSTATEDATA->m_lua_State, udata, obj_ptr, flags); } --- 3029,3042 ---- // memory tracking functions ! void wxLuaState::AddGCObject(void* obj_ptr, int wxl_type) { ! wxCHECK_RET(Ok() && obj_ptr, wxT("Invalid wxLuaState or wxObject to track")); ! wxluaO_addgcobject(M_WXLSTATEDATA->m_lua_State, obj_ptr, wxl_type); } ! bool wxLuaState::DeleteGCObject(int stack_idx, int flags) { ! wxCHECK_MSG(Ok(), false, wxT("Invalid wxLuaState or object")); ! return wxluaO_deletegcobject(M_WXLSTATEDATA->m_lua_State, stack_idx, flags); } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.124 retrieving revision 1.125 diff -C2 -d -r1.124 -r1.125 *** wxlbind.cpp 25 Sep 2009 18:47:58 -0000 1.124 --- wxlbind.cpp 1 Oct 2009 04:21:02 -0000 1.125 *************** *** 291,299 **** int LUACALL wxlua_userdata_delete(lua_State *L) { - void* udata = lua_touserdata(L, 1); - void* obj_ptr = wxlua_touserdata(L, 1, false); - // if removed from tracked mem list, remove the metatable so that __gc is not called on this object. ! if ((obj_ptr != NULL) && wxluaO_deletegcobject(L, udata, obj_ptr, WXLUA_DELETE_OBJECT_ALL)) { lua_pushnil(L); --- 291,296 ---- int LUACALL wxlua_userdata_delete(lua_State *L) { // if removed from tracked mem list, remove the metatable so that __gc is not called on this object. ! if (wxluaO_deletegcobject(L, 1, WXLUA_DELETE_OBJECT_ALL)) { lua_pushnil(L); *************** *** 303,307 **** { wxString msg; ! msg.Printf(wxT("wxLua: Unable to call wxuserdata:delete() on object %p, someone else owns it."), obj_ptr); // leave this printf since we really want to know if this happens --- 300,304 ---- { wxString msg; ! msg.Printf(wxT("wxLua: Unable to call wxuserdata:delete() on object!")); // leave this printf since we really want to know if this happens *************** *** 323,331 **** if ((wxlClass != NULL) && wxlua_iswxuserdata(L, 1) && (wxluaT_type(L, 1) == *wxlClass->wxluatype)) { - void* udata = lua_touserdata(L, 1); - void* obj_ptr = wxlua_touserdata(L, 1, true); // clear lua userdata's ptr - // clean up the rest of this, this won't error if the key doesn't exist ! wxluaO_deletegcobject(L, udata, obj_ptr, WXLUA_DELETE_OBJECT_LAST); } --- 320,325 ---- if ((wxlClass != NULL) && wxlua_iswxuserdata(L, 1) && (wxluaT_type(L, 1) == *wxlClass->wxluatype)) { // clean up the rest of this, this won't error if the key doesn't exist ! wxluaO_deletegcobject(L, 1, WXLUA_DELETE_OBJECT_LAST); } Index: wxlua_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlua_bind.cpp,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** wxlua_bind.cpp 27 Sep 2009 03:13:55 -0000 1.34 --- wxlua_bind.cpp 1 Oct 2009 04:21:02 -0000 1.35 *************** *** 38,41 **** --- 38,47 ---- + void wxLua_wxLuaState_delete_function(void** p) + { + wxLuaState* o = (wxLuaState*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaState_methods[] = { *************** *** 118,122 **** returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxluaO_addgcobject(L, returns); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaObject); --- 124,128 ---- returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxluaO_addgcobject(L, returns, wxluatype_wxLuaObject); // push the constructed class pointer wxluaT_pushuserdatatype(L, returns, wxluatype_wxLuaObject); *************** *** 128,131 **** --- 134,143 ---- + void wxLua_wxLuaObject_delete_function(void** p) + { + wxLuaObject* o = (wxLuaObject*)(*p); + delete o; + } + // Map Lua Class Methods to C Binding Functions wxLuaBindMethod wxLuaObject_methods[] = { *************** *** 622,625 **** --- 634,671 ---- return 0; } + else if (strcmp(idx_str, "baseclass_wxluatypes") == 0) + { + if (wxlClass->baseclass_wxluatypes) + { + lua_newtable(L); + size_t i = 0; + while (wxlClass->baseclass_wxluatypes[i]) + { + lua_pushnumber(L, *wxlClass->baseclass_wxluatypes[i]); + lua_rawseti(L, -2, i + 1); + ++i; + } + return 1; + } + + return 0; + } + else if (strcmp(idx_str, "baseclass_vtable_offsets") == 0) + { + if (wxlClass->baseclass_wxluatypes) // check this for NULL not baseclass_vtable_offsets + { + lua_newtable(L); + size_t i = 0; + while (wxlClass->baseclass_wxluatypes[i]) // see above + { + lua_pushnumber(L, wxlClass->baseclass_vtable_offsets[i]); + lua_rawseti(L, -2, i + 1); + ++i; + } + return 1; + } + + return 0; + } else if (strcmp(idx_str, "enums") == 0) { *************** *** 1215,1220 **** --- 1261,1268 ---- extern wxLuaBindMethod wxLuaObject_methods[]; extern int wxLuaObject_methodCount; + extern void wxLua_wxLuaObject_delete_function(void** p); extern wxLuaBindMethod wxLuaState_methods[]; extern int wxLuaState_methodCount; + extern void wxLua_wxLuaState_delete_function(void** p); *************** *** 1225,1230 **** static wxLuaBindClass classList[] = { ! { wxluaclassname_wxLuaObject, wxLuaObject_methods, wxLuaObject_methodCount, CLASSINFO(wxLuaObject), &wxluatype_wxLuaObject, wxluabaseclassnames_wxLuaObject, wxluabaseclassbinds_wxLuaObject, NULL, NULL, NULL, 0, }, ! { wxluaclassname_wxLuaState, wxLuaState_methods, wxLuaState_methodCount, CLASSINFO(wxLuaState), &wxluatype_wxLuaState, wxluabaseclassnames_wxLuaState, wxluabaseclassbinds_wxLuaState, NULL, NULL, NULL, 0, }, { 0, 0, 0, 0, 0, 0, 0 }, --- 1273,1278 ---- static wxLuaBindClass classList[] = { ! { wxluaclassname_wxLuaObject, wxLuaObject_methods, wxLuaObject_methodCount, CLASSINFO(wxLuaObject), &wxluatype_wxLuaObject, wxluabaseclassnames_wxLuaObject, wxluabaseclassbinds_wxLuaObject, NULL, NULL, NULL, 0, &wxLua_wxLuaObject_delete_function, }, ! { wxluaclassname_wxLuaState, wxLuaState_methods, wxLuaState_methodCount, CLASSINFO(wxLuaState), &wxluatype_wxLuaState, wxluabaseclassnames_wxLuaState, wxluabaseclassbinds_wxLuaState, NULL, NULL, NULL, 0, &wxLua_wxLuaState_delete_function, }, { 0, 0, 0, 0, 0, 0, 0 }, |
From: John L. <jr...@us...> - 2009-10-01 04:21:11
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxluadebug/src Modified Files: wxldebug.cpp Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -C2 -d -r1.67 -r1.68 *** wxldebug.cpp 24 Jun 2009 19:57:40 -0000 1.67 --- wxldebug.cpp 1 Oct 2009 04:21:02 -0000 1.68 *************** *** 406,411 **** else if (lightuserdata_reg_key == &wxlua_lreg_gcobjects_key) { ! wxObject* obj = (wxObject*)lua_touserdata(L, -1); ! name = wxString::Format(wxT("%s(%s)"), obj->GetClassInfo()->GetClassName(), name.c_str()); } } --- 406,428 ---- else if (lightuserdata_reg_key == &wxlua_lreg_gcobjects_key) { ! int wxl_type_ = (int)lua_tonumber(L, -1); ! name = wxString::Format(wxT("%s(%s)"), wxluaT_typename(L, wxl_type_).c_str(), name.c_str()); ! } ! else if (lightuserdata_reg_key == &wxlua_lreg_weakobjects_key) ! { ! wxString names_weak; ! ! // iterate the table of userdata ! lua_pushnil(L); ! while (lua_next(L, -2) != 0) ! { ! // value = -1, key = -2, table = -3 ! int wxl_type_weak = (int)lua_tonumber(L, -2); ! if (!names_weak.IsEmpty()) names_weak += wxT(", "); ! names_weak += wxString::Format(wxT("%s(%d)"), wxluaT_typename(L, wxl_type_weak).c_str(), wxl_type_weak); ! lua_pop(L, 1); // pop value, lua_next will pop key at end ! } ! ! name = wxString::Format(wxT("%s (%s)"), names_weak.c_str(), name.c_str()); } } |
From: John L. <jr...@us...> - 2009-10-01 04:21:09
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h wxlstate.h wxlua_bind.h Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** wxldefs.h 27 Sep 2009 03:13:55 -0000 1.49 --- wxldefs.h 1 Oct 2009 04:21:01 -0000 1.50 *************** *** 65,69 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 28 // ---------------------------------------------------------------------------- --- 65,69 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 29 // ---------------------------------------------------------------------------- *************** *** 93,96 **** --- 93,104 ---- // ---------------------------------------------------------------------------- + // Blank dummy defines that may be used in the bindings to not import or export + // a class or data in a DLL. + // ---------------------------------------------------------------------------- + + #define WXLUA_NO_DLLIMPEXP // use if you don't want to export class + #define WXLUA_NO_DLLIMPEXP_DATA(x) x // use if you don't want to export data + + // ---------------------------------------------------------------------------- // Useful macros to make coding easier // ---------------------------------------------------------------------------- *************** *** 120,136 **** // ---------------------------------------------------------------------------- - // Convert from wxWidgets wxT('') to wxT(""), a string. Copied from wx/filefn.h - - // platform independent versions - #if defined(__UNIX__) && !defined(__OS2__) - // CYGWIN also uses UNIX settings - #define wxLua_FILE_SEP_PATH wxT("/") - #elif defined(__MAC__) - #define wxLua_FILE_SEP_PATH wxT(":") - #else // Windows and OS/2 - #define wxLua_FILE_SEP_PATH wxT("\\") - #endif // Unix/Windows - - // ---------------------------------------------------------------------------- // wxWidgets compatibility defines // ---------------------------------------------------------------------------- --- 128,131 ---- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** wxlbind.h 27 Sep 2009 03:13:55 -0000 1.89 --- wxlbind.h 1 Oct 2009 04:21:01 -0000 1.90 *************** *** 59,65 **** // Check that the Lua LUA_TXXX types are what they used to be ! #if (LUA_TNONE != -1) || (LUA_TNIL != 0) || (LUA_TBOOLEAN != 1) || (LUA_TLIGHTUSERDATA != 2) || \ ! (LUA_TNUMBER != 3) || (LUA_TSTRING != 4) || (LUA_TTABLE != 5) || (LUA_TFUNCTION != 6) || \ ! (LUA_TUSERDATA != 7) || (LUA_TTHREAD != 8) # error "Lua has changed it's LUA_TXXX defines." #endif --- 59,67 ---- // Check that the Lua LUA_TXXX types are what they used to be ! #if (LUA_TNONE != -1) || (LUA_TNIL != 0) || \ ! (LUA_TBOOLEAN != 1) || (LUA_TLIGHTUSERDATA != 2) || \ ! (LUA_TNUMBER != 3) || (LUA_TSTRING != 4) || \ ! (LUA_TTABLE != 5) || (LUA_TFUNCTION != 6) || \ ! (LUA_TUSERDATA != 7) || (LUA_TTHREAD != 8) # error "Lua has changed it's LUA_TXXX defines." #endif *************** *** 103,106 **** --- 105,110 ---- // Note that we do not use the original since we may not be linked // to the binding library that defines them. + // Their values are set at compile time if linked to library, + // see wxbase_rules.lua and wxcore_rules.lua extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxEvent; // wxLua type for wxEvent extern WXDLLIMPEXP_DATA_WXLUA(int*) p_wxluatype_wxWindow; // wxLua type for wxWindow *************** *** 134,139 **** // original class. - WXLUAMETHOD_ENCAPSULATE = 0x4000, // This class is not derived from a wxObject - WXLUAMETHOD_CHECKED_OVERLOAD = 0x10000, // Class method has been checked to see if it is // overloaded function from the base class by --- 138,141 ---- *************** *** 223,230 **** // ---------------------------------------------------------------------------- struct WXDLLIMPEXP_WXLUA wxLuaBindClass { const char* name; // Name of the class or struct ! wxLuaBindMethod* wxluamethods; // Pointer to methods for this class int wxluamethods_n; // Number of methods wxClassInfo* classInfo; // Pointer to the wxClassInfo associated with this class or NULL. --- 225,234 ---- // ---------------------------------------------------------------------------- + typedef void (*wxlua_delete_function) (void** o); + struct WXDLLIMPEXP_WXLUA wxLuaBindClass { const char* name; // Name of the class or struct ! wxLuaBindMethod* wxluamethods; // Pointer to array of methods for this class int wxluamethods_n; // Number of methods wxClassInfo* classInfo; // Pointer to the wxClassInfo associated with this class or NULL. *************** *** 249,252 **** --- 253,259 ---- wxLuaBindNumber* enums; // Class member enums or NULL if none int enums_n; // number of enums + + wxlua_delete_function delete_fn; // Function that will cast the void* pointer + // to the class type and then call delete on it. }; *************** *** 353,389 **** // ---------------------------------------------------------------------------- - // wxLUA_DECLARE_ENCAPSULATION and wxLUA_IMPLEMENT_ENCAPSULATION - // Declare the macros used to define and implement classes that - // wrap non-wxObject derived pointers used by wxLua in the bindings. - // - // IMPEXPSYMBOL : similiar to WXDLLIMPEXP_WXBIND, you cannot leave this - // parameter empty, but you may use WXLUA_NO_DLLIMPEXP and - // WXLUA_NO_DLLIMPEXP_DATA(x) if you don't want DLL export symbols. - // className : name of the class to encapsulate (may be NameSpace::MyClass) - // objName : name to use in naming the encapsulation class (NameSpace_MyClass) - // ---------------------------------------------------------------------------- - - #define WXLUA_NO_DLLIMPEXP // use if you don't want to export class - #define WXLUA_NO_DLLIMPEXP_DATA(x) x // use if you don't want to export data - - #define wxLUA_DECLARE_ENCAPSULATION(IMPEXPSYMBOL, className, objName) \ - class IMPEXPSYMBOL wxLua_wxObject_##objName : public wxObject \ - { \ - public: \ - wxLua_wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \ - virtual ~wxLua_wxObject_##objName(); \ - className *m_p##objName; \ - DECLARE_ABSTRACT_CLASS(wxLua_wxObject_##objName) \ - }; - - // we may not have fully defined the class/object in header so delete it in src. - #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ - IMPLEMENT_ABSTRACT_CLASS(wxLua_wxObject_##objName, wxObject) \ - wxLua_wxObject_##objName::~wxLua_wxObject_##objName() \ - { \ - delete m_p##objName; \ - } - - // ---------------------------------------------------------------------------- // wxLuaSmartStringArray - Wraps a "new" array of wxStrings with an automatic // destructor that deletes them to make binding easier. --- 360,363 ---- Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.125 retrieving revision 1.126 diff -C2 -d -r1.125 -r1.126 *** wxlstate.h 25 Sep 2009 18:47:58 -0000 1.125 --- wxlstate.h 1 Oct 2009 04:21:01 -0000 1.126 *************** *** 141,149 **** // The key in the LUA_REGISTRYINDEX table that is a table of all // objects to delete that were added using wxluaO_addgcobject(). - // Note that non wxObject classes use wxLUA_DECLARE_ENCAPSULATION so - // the key is the object pointer and the value is the wxObject encapsulation. - // Both the key and the value are the same if not encapsulated. // LUA_REGISTRYINDEX[&wxlua_lreg_gcobjects_key][lightuserdata(obj_ptr)] = ! // lightuserdata(wxObject derived class) extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key; // The key in the LUA_REGISTRYINDEX table that is a table of all --- 141,146 ---- // The key in the LUA_REGISTRYINDEX table that is a table of all // objects to delete that were added using wxluaO_addgcobject(). // LUA_REGISTRYINDEX[&wxlua_lreg_gcobjects_key][lightuserdata(obj_ptr)] = ! // integer wxLua type extern WXDLLIMPEXP_DATA_WXLUA(const char*) wxlua_lreg_gcobjects_key; // The key in the LUA_REGISTRYINDEX table that is a table of all *************** *** 293,310 **** }; ! // Track this wxObject and delete it when Lua calls the __gc method for it. // The object is stored in the wxlua_lreg_gcobjects_key of the LUA_REGISTRYINDEX. ! // The second version is used when a non-wxObject class is encapsulated and ! // the obj_ptr points to the actual object that the wxObject encapsulates. ! // Note that the lua userdata internal pointer is the obj_ptr and the ! // wxobj is *only* stored in the wxlua_lreg_gcobjects_key. ! WXDLLIMPEXP_WXLUA void LUACALL wxluaO_addgcobject(lua_State* L, wxObject* wxobj); ! WXDLLIMPEXP_WXLUA void LUACALL wxluaO_addgcobject(lua_State* L, void* obj_ptr, wxObject* wxobj); ! // Remove this obj_ptr wrapped in a Lua userdata, udata, from the // wxlua_lreg_gcobjects_key table of the LUA_REGISTRYINDEX. // It is deleted depending on the flags enum wxLuaGCObject_Flags. // If flags = WXLUA_DELETE_OBJECT_ALL or if this is the last userdata it will also remove all // wxlua_lreg_weakobjects_key and wxlua_lreg_derivedmethods_key since the object is gone. ! WXDLLIMPEXP_WXLUA bool LUACALL wxluaO_deletegcobject(lua_State *L, void* udata, void *obj_ptr, int flags); // Remove this obj_ptr from the wxlua_lreg_gcobjects_key table of the // LUA_REGISTRYINDEX. The Lua userdata for the object stays in Lua and it's --- 290,303 ---- }; ! // Track this object and delete it when Lua calls the __gc method for it. // The object is stored in the wxlua_lreg_gcobjects_key of the LUA_REGISTRYINDEX. ! // Note that the Lua userdata internal pointer is to the obj_ptr. ! WXDLLIMPEXP_WXLUA void LUACALL wxluaO_addgcobject(lua_State* L, void* obj_ptr, int wxl_type); ! // Remove the wxLua object wrapped in a Lua userdata at the stack index from the // wxlua_lreg_gcobjects_key table of the LUA_REGISTRYINDEX. // It is deleted depending on the flags enum wxLuaGCObject_Flags. // If flags = WXLUA_DELETE_OBJECT_ALL or if this is the last userdata it will also remove all // wxlua_lreg_weakobjects_key and wxlua_lreg_derivedmethods_key since the object is gone. ! WXDLLIMPEXP_WXLUA bool LUACALL wxluaO_deletegcobject(lua_State *L, int stack_idx, int flags); // Remove this obj_ptr from the wxlua_lreg_gcobjects_key table of the // LUA_REGISTRYINDEX. The Lua userdata for the object stays in Lua and it's *************** *** 928,936 **** // See wxluaO_addgcobject(). ! void AddGCObject(wxObject *wxobj); ! // See wxluaO_addgcobject(). ! void AddGCObject(void* obj_ptr, wxObject *wxobj); // See wxluaO_deletegcobject(). ! bool DeleteGCObject(void* udata, void *obj_ptr, int flags); // See wxluaO_isgcobject(). bool IsGCObject(void *obj_ptr) const; --- 921,927 ---- // See wxluaO_addgcobject(). ! void AddGCObject(void* obj_ptr, int wxl_type); // See wxluaO_deletegcobject(). ! bool DeleteGCObject(int stack_idx, int flags); // See wxluaO_isgcobject(). bool IsGCObject(void *obj_ptr) const; Index: wxlua_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlua_bind.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxlua_bind.h 25 Sep 2009 18:47:58 -0000 1.19 --- wxlua_bind.h 1 Oct 2009 04:21:01 -0000 1.20 *************** *** 17,23 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 28 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 28 // --------------------------------------------------------------------------- --- 17,23 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 29 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 29 // --------------------------------------------------------------------------- *************** *** 52,59 **** - // --------------------------------------------------------------------------- - // Encapsulation Declarations - need to be public for other bindings. - // --------------------------------------------------------------------------- - #endif // __HOOK_WXLUA_wxlua_H__ --- 52,55 ---- |
From: John L. <jr...@us...> - 2009-10-01 04:21:08
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv4255/wxLua/apps/wxluaedit/src Modified Files: wxluaedit.cpp Log Message: Removed %encapsulate and %noclassinfo tags for %classes in the bindings. No longer encapsulating non wxObjects in a wxObject class for deletion. We now provide delete functions for each class in the wxLuaBindClass structs to be called on the void* we get from Lua. Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** wxluaedit.cpp 6 Jan 2009 21:17:18 -0000 1.41 --- wxluaedit.cpp 1 Oct 2009 04:20:59 -0000 1.42 *************** *** 379,383 **** { if (m_luaConsoleWrapper.Ok()) ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); else { --- 379,383 ---- { if (m_luaConsoleWrapper.Ok()) ! m_luaConsoleWrapper.GetConsole()->AppendText(msg); else { *************** *** 396,401 **** else if (m_luaConsoleWrapper.Ok()) { ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); ! m_luaConsoleWrapper.GetConsole()->SetExitOnError(is_error); if (wxlState.Ok()) m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); --- 396,401 ---- else if (m_luaConsoleWrapper.Ok()) { ! m_luaConsoleWrapper.GetConsole()->AppendText(msg); ! m_luaConsoleWrapper.GetConsole()->SetExitWhenClosed(is_error); if (wxlState.Ok()) m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); |
From: John L. <jr...@us...> - 2009-09-27 05:35:30
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24103/wxLua/apps/wxlua/src Modified Files: lconsole.cpp lconsole.h wxlua.cpp Log Message: Make the wxLuaConsole a little nicer, fixed width font, toolbar, red error messages. Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** wxlua.cpp 1 Jun 2009 22:28:29 -0000 1.57 --- wxlua.cpp 27 Sep 2009 05:35:20 -0000 1.58 *************** *** 385,389 **** if (m_luaConsoleWrapper.Ok()) ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); if (m_print_msgdlg) --- 385,389 ---- if (m_luaConsoleWrapper.Ok()) ! m_luaConsoleWrapper.GetConsole()->AppendText(msg); if (m_print_msgdlg) *************** *** 397,402 **** if (m_luaConsoleWrapper.Ok()) { ! m_luaConsoleWrapper.GetConsole()->DisplayText(msg); ! m_luaConsoleWrapper.GetConsole()->SetExitOnError(is_error); if (wxlState.Ok()) m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); --- 397,404 ---- if (m_luaConsoleWrapper.Ok()) { ! wxTextAttr attr(*wxRED); ! attr.SetFlags(wxTEXT_ATTR_TEXT_COLOUR); ! m_luaConsoleWrapper.GetConsole()->AppendTextWithAttr(msg, attr); ! m_luaConsoleWrapper.GetConsole()->SetExitWhenClosed(is_error); if (wxlState.Ok()) m_luaConsoleWrapper.GetConsole()->DisplayStack(wxlState); Index: lconsole.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** lconsole.h 5 Dec 2008 21:15:10 -0000 1.12 --- lconsole.h 27 Sep 2009 05:35:20 -0000 1.13 *************** *** 34,47 **** const wxString& name = wxT("wxLuaConsole")); ! // Display a message in the console ! void DisplayText(const wxString& msg); // Display the stack in a wxListBox, but only if there are any items in it void DisplayStack(const wxLuaState& wxlState); ! // An error has occurred, when this window is closed call wxExit to close ! // the app. ! void SetExitOnError(bool is_error) { m_exit_on_error = m_exit_on_error || is_error; } protected: void OnCloseWindow(wxCloseEvent& event); wxLuaConsoleWrapper *m_wrapper; --- 34,49 ---- const wxString& name = wxT("wxLuaConsole")); ! // Display a message in the console with optional attribute to display it with. ! void AppendText(const wxString& msg); ! void AppendTextWithAttr(const wxString& msg, const wxTextAttr& attr); // Display the stack in a wxListBox, but only if there are any items in it void DisplayStack(const wxLuaState& wxlState); ! // Perhaps an error has occurred, when this window is closed wxExit ! // will be called to close the app. ! void SetExitWhenClosed(bool do_exit) { m_exit_when_closed = m_exit_when_closed || do_exit; } protected: void OnCloseWindow(wxCloseEvent& event); + void OnMenu(wxCommandEvent& event); wxLuaConsoleWrapper *m_wrapper; *************** *** 49,53 **** wxTextCtrl *m_textCtrl; wxListBox *m_debugListBox; ! bool m_exit_on_error; private: --- 51,58 ---- wxTextCtrl *m_textCtrl; wxListBox *m_debugListBox; ! bool m_exit_when_closed; ! ! wxString m_saveFilename; ! wxString m_savePath; private: Index: lconsole.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** lconsole.cpp 5 Dec 2008 05:57:21 -0000 1.19 --- lconsole.cpp 27 Sep 2009 05:35:20 -0000 1.20 *************** *** 24,31 **** --- 24,37 ---- #include "wx/splitter.h" + #include "wx/toolbar.h" + #include "wx/filename.h" #include "wxlua/include/wxlua.h" #include "lconsole.h" + #include "../../../art/new.xpm" + #include "../../../art/save.xpm" + #include "../../../art/copy.xpm" + // ---------------------------------------------------------------------------- // wxLuaConsole *************** *** 34,37 **** --- 40,44 ---- BEGIN_EVENT_TABLE(wxLuaConsole, wxFrame) EVT_CLOSE(wxLuaConsole::OnCloseWindow) + EVT_MENU(wxID_ANY, wxLuaConsole::OnMenu) END_EVENT_TABLE() *************** *** 41,48 **** long style, const wxString& name) :wxFrame(parent, id, title, pos, size, style, name), ! m_wrapper(consoleWrapper), m_exit_on_error(false) { SetIcon(wxICON(LUA)); m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, --- 48,65 ---- long style, const wxString& name) :wxFrame(parent, id, title, pos, size, style, name), ! m_wrapper(consoleWrapper), m_exit_when_closed(false) { + m_savePath = wxGetCwd(); + SetIcon(wxICON(LUA)); + wxToolBar* tb = CreateToolBar(); + + tb->AddTool(wxID_NEW, wxT("Clear window"), wxBitmap(new_xpm), wxT("Clear console window"), wxITEM_NORMAL); + tb->AddTool(wxID_SAVEAS, wxT("Save output"), wxBitmap(save_xpm), wxT("Save contents to file"), wxITEM_NORMAL); + tb->AddTool(wxID_COPY, wxT("Copy text"), wxBitmap(copy_xpm), wxT("Copy contents to clipboard"), wxITEM_NORMAL); + + tb->Realize(); + m_splitter = new wxSplitterWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, *************** *** 50,54 **** m_textCtrl = new wxTextCtrl(m_splitter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, ! wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH); m_debugListBox = new wxListBox(m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, --- 67,73 ---- m_textCtrl = new wxTextCtrl(m_splitter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, ! wxTE_MULTILINE | wxTE_READONLY | wxTE_RICH | wxTE_DONTWRAP); ! m_textCtrl->SetFont(wxFont(10, wxTELETYPE, wxNORMAL, wxNORMAL)); ! m_debugListBox = new wxListBox(m_splitter, wxID_ANY, wxDefaultPosition, wxDefaultSize, *************** *** 69,80 **** Destroy(); ! if (m_exit_on_error) wxExit(); } ! void wxLuaConsole::DisplayText(const wxString& msg) { m_textCtrl->AppendText(msg + wxT("\n")); } void wxLuaConsole::DisplayStack(const wxLuaState& wxlState) --- 88,145 ---- Destroy(); ! if (m_exit_when_closed) wxExit(); } ! void wxLuaConsole::OnMenu(wxCommandEvent& event) ! { ! switch (event.GetId()) ! { ! case wxID_NEW : ! { ! m_textCtrl->Clear(); ! break; ! } ! case wxID_SAVEAS : ! { ! wxString filename = wxFileSelector(wxT("Select file to save output to"), ! m_savePath, ! m_saveFilename, ! wxT("txt"), ! wxT("Text files (*.txt)|*.txt|All files|*.*"), ! wxFD_SAVE|wxFD_OVERWRITE_PROMPT, ! this); ! ! if (!filename.IsEmpty()) ! { ! wxFileName fn(filename); ! m_savePath = fn.GetPath(); ! m_saveFilename = fn.GetFullName(); ! ! m_textCtrl->SaveFile(filename); ! } ! break; ! } ! case wxID_COPY : ! { ! m_textCtrl->Copy(); ! break; ! } ! } ! } ! ! void wxLuaConsole::AppendText(const wxString& msg) { m_textCtrl->AppendText(msg + wxT("\n")); } + void wxLuaConsole::AppendTextWithAttr(const wxString& msg, const wxTextAttr& attr) + { + wxTextAttr oldAttr = m_textCtrl->GetDefaultStyle(); + + m_textCtrl->SetDefaultStyle(attr); + m_textCtrl->AppendText(msg + wxT("\n")); + + m_textCtrl->SetDefaultStyle(oldAttr); + } void wxLuaConsole::DisplayStack(const wxLuaState& wxlState) |
From: John L. <jr...@us...> - 2009-09-27 03:14:33
|
Update of /cvsroot/wxlua/wxLua/bindings In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24793/wxLua/bindings Modified Files: genwxbind.lua Log Message: Move wx/wxprec.h before __BORLANDC__ pragma hdrstop as it should be in cpp binding files. Move hook_cpp_binding_includes in genwxbind.lua to be written before any other code. Comment cleanup in some headers. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** genwxbind.lua 25 Sep 2009 18:47:57 -0000 1.182 --- genwxbind.lua 27 Sep 2009 03:13:51 -0000 1.183 *************** *** 584,588 **** -- --------------------------------------------------------------------------- function FileDataIsStringData(filename, strData) ! local file_handle = io.open(filename, "rb") if not file_handle then return false end -- ok if it doesn't exist --- 584,588 ---- -- --------------------------------------------------------------------------- function FileDataIsStringData(filename, strData) ! local file_handle = io.open(filename, "rt") if not file_handle then return false end -- ok if it doesn't exist *************** *** 4098,4102 **** - local a = {parseObject.Name} local base_diff_table = {} local base_type_table = {} --- 4098,4101 ---- *************** *** 4114,4119 **** end - a[#a+1] = dataTypeTable[name].BaseClasses[i] - -- only store the ptr_diffs to higher base classes, the 1st level is always 0 if level > 1 then --- 4113,4116 ---- *************** *** 4134,4138 **** baseclassVtableOffsets_name = "wxluabaseclass_vtable_offsets_"..MakeClassVar(parseObject.Name) baseclassTypes_name = "wxluabaseclass_wxluatypes_"..MakeClassVar(parseObject.Name) - print(table.concat(a, " ")) end --- 4131,4134 ---- *************** *** 4472,4487 **** if add_includes then table.insert(fileData, "#ifdef __BORLANDC__\n") table.insert(fileData, " #pragma hdrstop\n") table.insert(fileData, "#endif\n") table.insert(fileData, "\n") - table.insert(fileData, "#include \"wx/wxprec.h\"\n") - table.insert(fileData, "\n") table.insert(fileData, "#ifndef WX_PRECOMP\n") table.insert(fileData, " #include \"wx/wx.h\"\n") table.insert(fileData, "#endif\n") table.insert(fileData, "\n") - table.insert(fileData, hook_cpp_binding_includes or "") - table.insert(fileData, "\n") table.insert(fileData, "#include \"wxlua/include/wxlstate.h\"\n") table.insert(fileData, "#include \""..hook_cpp_header_filename.."\"\n") --- 4468,4483 ---- if add_includes then + table.insert(fileData, hook_cpp_binding_includes or "") + table.insert(fileData, "\n") + table.insert(fileData, "#include \"wx/wxprec.h\"\n") + table.insert(fileData, "\n") table.insert(fileData, "#ifdef __BORLANDC__\n") table.insert(fileData, " #pragma hdrstop\n") table.insert(fileData, "#endif\n") table.insert(fileData, "\n") table.insert(fileData, "#ifndef WX_PRECOMP\n") table.insert(fileData, " #include \"wx/wx.h\"\n") table.insert(fileData, "#endif\n") table.insert(fileData, "\n") table.insert(fileData, "#include \"wxlua/include/wxlstate.h\"\n") table.insert(fileData, "#include \""..hook_cpp_header_filename.."\"\n") |
From: John L. <jr...@us...> - 2009-09-27 03:14:30
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24793/wxLua/apps/wxluacan/src Modified Files: wxluacan_bind.cpp Log Message: Move wx/wxprec.h before __BORLANDC__ pragma hdrstop as it should be in cpp binding files. Move hook_cpp_binding_includes in genwxbind.lua to be written before any other code. Comment cleanup in some headers. Index: wxluacan_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** wxluacan_bind.cpp 25 Sep 2009 18:47:57 -0000 1.37 --- wxluacan_bind.cpp 27 Sep 2009 03:13:50 -0000 1.38 *************** *** 5,19 **** // --------------------------------------------------------------------------- #ifdef __BORLANDC__ #pragma hdrstop #endif - #include "wx/wxprec.h" - #ifndef WX_PRECOMP #include "wx/wx.h" #endif - #include "wxlua/include/wxlstate.h" #include "wxluacan_bind.h" --- 5,19 ---- // --------------------------------------------------------------------------- + + #include "wx/wxprec.h" + #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlstate.h" #include "wxluacan_bind.h" |
From: John L. <jr...@us...> - 2009-09-27 03:14:29
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24793/wxLua/bindings/wxwidgets Modified Files: wxadv_rules.lua Log Message: Move wx/wxprec.h before __BORLANDC__ pragma hdrstop as it should be in cpp binding files. Move hook_cpp_binding_includes in genwxbind.lua to be written before any other code. Comment cleanup in some headers. Index: wxadv_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxadv_rules.lua,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxadv_rules.lua 29 Jan 2008 01:38:55 -0000 1.5 --- wxadv_rules.lua 27 Sep 2009 03:13:51 -0000 1.6 *************** *** 65,69 **** -- Set any #includes or other C++ code to be placed verbatim at the top of -- every generated cpp file or "" for none ! hook_cpp_binding_includes = "" -- ---------------------------------------------------------------------------- --- 65,100 ---- -- Set any #includes or other C++ code to be placed verbatim at the top of -- every generated cpp file or "" for none ! hook_cpp_binding_includes = [[ ! ! #include "wx/wxprec.h" ! ! #ifdef __BORLANDC__ ! #pragma hdrstop ! #endif ! ! #ifndef WX_PRECOMP ! #include "wx/wx.h" ! #endif ! ! // Hack to add accessor to get the ref count ! #define wxGridCellWorkerDummyFriend wxGridCellWorkerDummyFriend; \ ! public: \ ! size_t GetRef() const { return m_nRef; } ! ! #define wxGridCellAttrDummyFriend wxGridCellAttrDummyFriend; \ ! public: \ ! size_t GetRef() const { return m_nRef; } ! ! #include "wx/grid.h" ! ! // The wxGridWorker classes have protected destructors, use DecRef(). ! #define wxLUA_IMPLEMENT_wxGridCellWorker_ENCAPSULATION(className, objName) \ ! IMPLEMENT_ABSTRACT_CLASS(wxLua_wxObject_##objName, wxObject) \ ! wxLua_wxObject_##objName::~wxLua_wxObject_##objName() \ ! { \ ! m_p##objName->DecRef(); \ ! } ! ! ]] -- ---------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2009-09-27 03:14:09
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv24793/wxLua/modules/wxluasocket/src Modified Files: wxluasocket_bind.cpp Log Message: Move wx/wxprec.h before __BORLANDC__ pragma hdrstop as it should be in cpp binding files. Move hook_cpp_binding_includes in genwxbind.lua to be written before any other code. Comment cleanup in some headers. Index: wxluasocket_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket_bind.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** wxluasocket_bind.cpp 25 Sep 2009 18:47:58 -0000 1.35 --- wxluasocket_bind.cpp 27 Sep 2009 03:13:55 -0000 1.36 *************** *** 5,19 **** // --------------------------------------------------------------------------- #ifdef __BORLANDC__ #pragma hdrstop #endif - #include "wx/wxprec.h" - #ifndef WX_PRECOMP #include "wx/wx.h" #endif - #include "wxlua/include/wxlstate.h" #include "wxluasocket/include/wxluasocket_bind.h" --- 5,19 ---- // --------------------------------------------------------------------------- + + #include "wx/wxprec.h" + #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP #include "wx/wx.h" #endif #include "wxlua/include/wxlstate.h" #include "wxluasocket/include/wxluasocket_bind.h" |