Update of /cvsroot/wxlua/wxLua/modules/wxlua/include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15042/wxLua/modules/wxlua/include
Modified Files:
wxlhandl.h
Log Message:
initialize vars in debugio.cpp
add static function in wxLuaHandler to get the global handler, deprecate global function
code cleaning
Index: wxlhandl.h
===================================================================
RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlhandl.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** wxlhandl.h 25 Nov 2005 02:46:53 -0000 1.1
--- wxlhandl.h 25 Nov 2005 18:52:21 -0000 1.2
***************
*** 17,22 ****
#include "wxlua/include/wxldefs.h"
! #include "wx/utils.h"
! #include "wx/app.h"
class WXDLLIMPEXP_WXLUA wxLuaDebugEvent;
--- 17,21 ----
#include "wxlua/include/wxldefs.h"
! #include "wx/thread.h"
class WXDLLIMPEXP_WXLUA wxLuaDebugEvent;
***************
*** 34,57 ****
virtual void AddPendingEvent(wxEvent& event) = 0;
-
virtual bool ProcessEvent(wxEvent& event) = 0;
! //#if wxUSE_LUASTACKFRAME
// virtual void SetStackFrame(wxLuaStackFrame *pStackFrame) = 0;
//#endif // wxUSE_LUASTACKFRAME
! virtual void DisplayError(const wxString &strError) const = 0;
!
! void EnterLuaCriticalSection()
! {
! m_luaCriticalSection.Enter();
! }
! void LeaveLuaCriticalSection()
! {
! m_luaCriticalSection.Leave();
! }
! public:
static wxLuaHandler* sm_luahandler;
wxCriticalSection m_luaCriticalSection;
--- 33,51 ----
virtual void AddPendingEvent(wxEvent& event) = 0;
virtual bool ProcessEvent(wxEvent& event) = 0;
+ virtual void DisplayError(const wxString &strError) const = 0;
! //#if wxUSE_LUASTACKFRAME FIXME - do we need this? see also wxluadebug/src/staktree.cpp
// virtual void SetStackFrame(wxLuaStackFrame *pStackFrame) = 0;
//#endif // wxUSE_LUASTACKFRAME
! void EnterLuaCriticalSection() { m_luaCriticalSection.Enter(); }
! void LeaveLuaCriticalSection() { m_luaCriticalSection.Leave(); }
! // Get the single global wxLuaHandler
! // note: if sm_luahandler = NULL let this fail hard, it should NEVER happen
! static wxLuaHandler& GetHandler() { return *sm_luahandler; }
! protected:
static wxLuaHandler* sm_luahandler;
wxCriticalSection m_luaCriticalSection;
***************
*** 59,64 ****
! // Lua App/Debugger Interface
! wxLuaHandler& wxGetLuaHandler();
#endif //_WXLHANDL_H_
--- 53,58 ----
! // Lua App/Debugger Interface - use wxLuaHandler::GetHandler
! wxDEPRECATED( wxLuaHandler& wxGetLuaHandler() );
#endif //_WXLHANDL_H_
|