From: John L. <jr...@us...> - 2008-01-20 19:23:34
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv32640/wxLua/bindings/wxwidgets Modified Files: wxcore_appframe.i wxcore_override.hpp Log Message: - Added static bool wxLuaState::sm_wxAppMainLoop_will_run so that Lua code that calls "wx.wxGetApp:MainLoop()" will not do anything. C++ coders should call it if they create a wxLuaState and run Lua code from their wxApp:OnInit() when wxApp:IsMainLoopRunning() returns false. Added luamodule_mono to wxLua.dsw Index: wxcore_appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_appframe.i,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxcore_appframe.i 18 Dec 2007 01:03:32 -0000 1.3 --- wxcore_appframe.i 20 Jan 2008 19:23:00 -0000 1.4 *************** *** 43,47 **** // bool Initialized() obsolete in wxWidgets ! // %override int wxApp::MainLoop() Only calls it if !IsMainLoopRunning(), returns 0 if it already is // C++ Func: int MainLoop() int MainLoop() --- 43,47 ---- // bool Initialized() obsolete in wxWidgets ! // %override int wxApp::MainLoop() : Only calls it if !wxLuaState::sm_wxAppMainLoop_will_run, returns 0 if it is true. // C++ Func: int MainLoop() int MainLoop() Index: wxcore_override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_override.hpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxcore_override.hpp 3 Jan 2008 00:05:56 -0000 1.16 --- wxcore_override.hpp 20 Jan 2008 19:23:00 -0000 1.17 *************** *** 29,34 **** // get this wxApp * self = (wxApp *)wxluaT_getuserdatatype(L, 1, g_wxluatype_wxApp); ! // call MainLoop ! int returns = !wxApp::IsMainLoopRunning() ? (self->MainLoop()) : 0; // push the result number lua_pushnumber(L, returns); --- 29,37 ---- // get this wxApp * self = (wxApp *)wxluaT_getuserdatatype(L, 1, g_wxluatype_wxApp); ! int returns = 0; ! ! if (!wxLuaState::sm_wxAppMainLoop_will_run) ! returns = self->MainLoop(); ! // push the result number lua_pushnumber(L, returns); |