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...> - 2006-09-06 05:33:13
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25350/wxLua/modules/wxluasocket/include Modified Files: dservice.h wxldbgio.h wxldserv.h wxldtarg.h wxlhandl.h wxlsock.h Log Message: simplify socket code to use a wxLuaSocketBase for all IO operations remove wxLuaDebugIO class, in wxLuaSocketBase First step to using wxSockets and/or C sockets transparently Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** wxldserv.h 5 Sep 2006 21:48:11 -0000 1.9 --- wxldserv.h 6 Sep 2006 05:33:08 -0000 1.10 *************** *** 18,22 **** #include "wxluadebug/include/wxldebug.h" #include "wxluasocket/include/wxlsock.h" - #include "wxluasocket/include/wxldbgio.h" class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer; --- 18,21 ---- *************** *** 144,148 **** // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer : public wxLuaDebuggerBase, public wxLuaDebugIO { public: --- 143,147 ---- // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer : public wxLuaDebuggerBase { public: Index: wxldbgio.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldbgio.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** wxldbgio.h 5 Sep 2006 21:48:11 -0000 1.4 --- wxldbgio.h 6 Sep 2006 05:33:08 -0000 1.5 *************** *** 16,52 **** #include "wxluasocket/include/wxluasocketdefs.h" - class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; - class WXDLLIMPEXP_WXLUASOCKET wxLuaSocket; - - // ---------------------------------------------------------------------------- - // wxLuaDebugIO - A mixin class that merely provides a means to read/write - // to a wxLuaSocket. - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugIO - { - protected: - - unsigned char ReadByte(wxLuaSocket *); - short ReadWord(wxLuaSocket *); - unsigned short ReadUWord(wxLuaSocket *); - int ReadInt(wxLuaSocket *); - unsigned int ReadUInt(wxLuaSocket *); - long ReadLong(wxLuaSocket *); - unsigned long ReadULong(wxLuaSocket *); - wxString ReadString(wxLuaSocket *); - wxLuaDebugData *ReadDebugData(wxLuaSocket *); - - bool WriteCharData(wxLuaSocket *, const char* data, int length); - bool WriteByte(wxLuaSocket *, unsigned char value); - bool WriteWord(wxLuaSocket *, short value); - bool WriteUWord(wxLuaSocket *, unsigned short value); - bool WriteInt(wxLuaSocket *, int value); - bool WriteUInt(wxLuaSocket *, unsigned int value); - bool WriteLong(wxLuaSocket *, long value); - bool WriteULong(wxLuaSocket *, unsigned long value); - bool WriteString(wxLuaSocket *, const wxString &value); - bool WriteDebugData(wxLuaSocket *, const wxLuaDebugData *pData); - }; - #endif // WX_LUA_DEBUG_IO_H --- 16,18 ---- Index: dservice.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/dservice.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** dservice.h 28 Aug 2006 05:26:21 -0000 1.12 --- dservice.h 6 Sep 2006 05:33:08 -0000 1.13 *************** *** 25,42 **** #include "wx/dynarray.h" #include "wx/socket.h" ! ! #if wxCHECK_VERSION(2,3,0) ! #include "wx/filename.h" ! #else ! // FIXME: for wxWidgets 2.2.9 which does not implement wxFileName ! // This is a quick hack to test if I can compile the ! // lua wrapper for 2.2.9. I am not going to do anything ! // more for 2.2.9, but if anyone requires it, they may wish ! // fix and test the wxWidgets lua wrapper. RG ! typedef wxString wxFileName; ! #endif #include "wxlua/include/wxlua.h" #include "wxluasocket/include/wxldserv.h" #define ID_WXLUA_SERVER 1200 --- 25,33 ---- #include "wx/dynarray.h" #include "wx/socket.h" ! #include "wx/filename.h" #include "wxlua/include/wxlua.h" #include "wxluasocket/include/wxldserv.h" + #include "wxluasocket/include/wxlsock.h" #define ID_WXLUA_SERVER 1200 *************** *** 53,57 **** // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugSocket { public: --- 44,48 ---- // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugSocket : public wxLuaSocketBase { public: *************** *** 86,110 **** bool WaitForRead(long seconds = 0, long milliseconds = 300) { return m_socket && m_socket->WaitForRead(seconds, milliseconds); } ! // Read Data ! unsigned char ReadByte(); ! short ReadWord(); ! unsigned short ReadUWord(); ! int ReadInt(); ! unsigned int ReadUInt(); ! long ReadLong(); ! unsigned long ReadULong(); ! wxString ReadString(); ! wxLuaDebugData* ReadDebugData(); ! ! // Write Data ! bool WriteByte(unsigned char value); ! bool WriteWord(short value); ! bool WriteUWord(unsigned short value); ! bool WriteInt(int value); ! bool WriteUInt(unsigned int value); ! bool WriteLong(long value); ! bool WriteULong(unsigned long value); ! bool WriteString(const wxString &value); ! bool WriteDebugData(const wxLuaDebugData *pSortedList); // operators --- 77,84 ---- bool WaitForRead(long seconds = 0, long milliseconds = 300) { return m_socket && m_socket->WaitForRead(seconds, milliseconds); } ! // Read the whole buffer of size length into buffer buffer from the socket ! virtual int Read(char *buffer, int length); ! // Write the whole buffer of size length to the socket ! virtual int Write(const char *buffer, int length); // operators Index: wxlsock.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlsock.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxlsock.h 20 May 2006 19:57:59 -0000 1.6 --- wxlsock.h 6 Sep 2006 05:33:08 -0000 1.7 *************** *** 17,20 **** --- 17,22 ---- #include "wxluasocket/include/wxluasocketdefs.h" + class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; + #ifdef WIN32 typedef int socklen_t; *************** *** 38,46 **** #endif // SD_RECEIVE // ---------------------------------------------------------------------------- // wxLuaSocket // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaSocket { #ifdef WIN32 --- 40,90 ---- #endif // SD_RECEIVE + + // ---------------------------------------------------------------------------- + // wxLuaSocketBase - a base class for different socket implementations + // + // You must override virtual int Read(...) and virtual int Write(...) + // ---------------------------------------------------------------------------- + + class WXDLLIMPEXP_WXLUASOCKET wxLuaSocketBase + { + public: + wxLuaSocketBase() {} + virtual ~wxLuaSocketBase() {} + + // Read the whole buffer of size length into buffer buffer from the socket + virtual int Read(char *buffer, int length) = 0; + // Write the whole buffer of size length to the socket + virtual int Write(const char *buffer, int length) = 0; + + // Read data from the socket, calls virtual int Read(...) + unsigned char ReadByte(); + short ReadWord(); + unsigned short ReadUWord(); + int ReadInt(); + unsigned int ReadUInt(); + long ReadLong(); + unsigned long ReadULong(); + wxString ReadString(); + wxLuaDebugData *ReadDebugData(); + + // Write data to the socket, calls virtual void Write(...) + bool WriteCharData(const char* data, int length); + bool WriteByte(unsigned char value); + bool WriteWord(short value); + bool WriteUWord(unsigned short value); + bool WriteInt(int value); + bool WriteUInt(unsigned int value); + bool WriteLong(long value); + bool WriteULong(unsigned long value); + bool WriteString(const wxString &value); + bool WriteDebugData(const wxLuaDebugData *pData); + }; + // ---------------------------------------------------------------------------- // wxLuaSocket // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaSocket : public wxLuaSocketBase { #ifdef WIN32 *************** *** 117,123 **** int GetPort() const; // Read the whole buffer of size length into buffer buffer from the socket ! int Read(char *buffer, int length); // Write the whole buffer of size length to the socket ! void Write(const char *buffer, int length); // Shutdown the socket in an orderly fashion void Shutdown(int how); --- 161,167 ---- int GetPort() const; // Read the whole buffer of size length into buffer buffer from the socket ! virtual int Read(char *buffer, int length); // Write the whole buffer of size length to the socket ! virtual int Write(const char *buffer, int length); // Shutdown the socket in an orderly fashion void Shutdown(int how); Index: wxldtarg.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldtarg.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxldtarg.h 28 Aug 2006 05:26:21 -0000 1.11 --- wxldtarg.h 6 Sep 2006 05:33:08 -0000 1.12 *************** *** 19,23 **** #include "wxlua/include/wxlua.h" #include "wxluadebug/include/wxldebug.h" - #include "wxluasocket/include/wxldbgio.h" #include "wxluasocket/include/wxlsock.h" --- 19,22 ---- *************** *** 54,58 **** // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugTarget : public wxObject, public wxLuaDebugIO { private: --- 53,57 ---- // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugTarget : public wxObject { private: Index: wxlhandl.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlhandl.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxlhandl.h 5 Sep 2006 21:48:11 -0000 1.6 --- wxlhandl.h 6 Sep 2006 05:33:08 -0000 1.7 *************** *** 42,49 **** // 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; }; --- 42,49 ---- // 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; }; |
From: John L. <jr...@us...> - 2006-09-06 05:33:12
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25350/wxLua/modules/wxluasocket/src Modified Files: dservice.cpp wxldbgio.cpp wxldserv.cpp wxldtarg.cpp wxlhandl.cpp wxlsock.cpp Log Message: simplify socket code to use a wxLuaSocketBase for all IO operations remove wxLuaDebugIO class, in wxLuaSocketBase First step to using wxSockets and/or C sockets transparently Index: wxldbgio.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldbgio.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxldbgio.cpp 1 Mar 2006 23:12:11 -0000 1.6 --- wxldbgio.cpp 6 Sep 2006 05:33:09 -0000 1.7 *************** *** 23,271 **** #include "wxluasocket/include/wxldbgio.h" - #include "wxlua/include/wxlstate.h" - #include "wxluasocket/include/wxlsock.h" - #include "wxluadebug/include/wxldebug.h" - - // ---------------------------------------------------------------------------- - // wxLuaDebugIO - // ---------------------------------------------------------------------------- - - unsigned char wxLuaDebugIO::ReadByte(wxLuaSocket *pSocket) - { - unsigned char value = 0; - pSocket->Read((char *) &value, sizeof(value)); - return value; - } - - short wxLuaDebugIO::ReadWord(wxLuaSocket *pSocket) - { - short value = 0; - pSocket->Read((char *)&value, sizeof(value)); - return value; - } - - unsigned short wxLuaDebugIO::ReadUWord(wxLuaSocket *pSocket) - { - unsigned short value = 0; - pSocket->Read((char *)&value, sizeof(value)); - return value; - } - - int wxLuaDebugIO::ReadInt(wxLuaSocket *pSocket) - { - int value = 0; - pSocket->Read((char *) &value, sizeof(value)); - return value; - } - - unsigned int wxLuaDebugIO::ReadUInt(wxLuaSocket *pSocket) - { - unsigned int value = 0; - pSocket->Read((char *) &value, sizeof(value)); - return value; - } - - long wxLuaDebugIO::ReadLong(wxLuaSocket *pSocket) - { - long value = 0; - pSocket->Read((char *) &value, sizeof(value)); - return value; - } - - unsigned long wxLuaDebugIO::ReadULong(wxLuaSocket *pSocket) - { - unsigned long value = 0; - pSocket->Read((char *) &value, sizeof(value)); - return value; - } - - wxString wxLuaDebugIO::ReadString(wxLuaSocket *pSocket) - { - wxString value; - unsigned int length = ReadInt(pSocket); - if (length > 0) - { - char *buffer = new char[length + 1]; - memset(buffer, 0, length+1); - pSocket->Read(buffer, length); - buffer[length] = 0; - value = lua2wx(buffer); - delete[] buffer; - } - return value; - } - - wxLuaDebugData *wxLuaDebugIO::ReadDebugData(wxLuaSocket *pSocket) - { - wxLuaDebugData *pSortedList = new wxLuaDebugData(); - - try - { - int idx, idxMax = 0; - pSocket->Read((char *) &idxMax, sizeof(int)); - - for (idx = 0; idx < idxMax; ++idx) - { - int bufferLength; - pSocket->Read((char *) &bufferLength, sizeof(bufferLength)); - if (bufferLength > 0) - { - char *pBuffer = new char[bufferLength]; - char *pMemory = pBuffer; - pSocket->Read(pMemory, bufferLength); - - int nReference = *(int *) pMemory; - pMemory += sizeof(int); - - int nIndex = *(int *) pMemory; - pMemory += sizeof(int); - - bool fExpanded = (0 != (*(int *) pMemory)); - pMemory += sizeof(int); - - const char *pNamePtr = pMemory; - pMemory += strlen(pNamePtr) + 1; - const char *pTypePtr = pMemory; - pMemory += strlen(pTypePtr) + 1; - const char *pValuePtr = pMemory; - - wxLuaDebugDataItem *pItem = new wxLuaDebugDataItem(lua2wx(pNamePtr), - lua2wx(pTypePtr), - lua2wx(pValuePtr), - wxEmptyString, // FIXME! source? - nReference, - nIndex, - fExpanded); - pSortedList->Add(pItem); - - delete[] pBuffer; - } - } - } - catch(wxLuaSocketException & /*e*/) - { - delete pSortedList; - pSortedList = NULL; - } - - return pSortedList; - } - - bool wxLuaDebugIO::WriteCharData(wxLuaSocket *pSocket, const char* value, int length) - { - try - { - pSocket->Write(value, length); - return true; - } - catch(wxLuaSocketException & /*e*/) - { - } - return false; - } - bool wxLuaDebugIO::WriteByte(wxLuaSocket *pSocket, unsigned char value) - { - return WriteCharData(pSocket, (const char *)&value, sizeof(value)); - } - bool wxLuaDebugIO::WriteWord(wxLuaSocket *pSocket, short value) - { - return WriteCharData(pSocket, (const char *)&value, sizeof(value)); - } - bool wxLuaDebugIO::WriteUWord(wxLuaSocket *pSocket, unsigned short value) - { - return WriteCharData(pSocket, (const char *)&value, sizeof(value)); - } - bool wxLuaDebugIO::WriteInt(wxLuaSocket *pSocket, int value) - { - return WriteCharData(pSocket, (const char *)&value, sizeof(value)); - } - bool wxLuaDebugIO::WriteUInt(wxLuaSocket *pSocket, unsigned int value) - { - return WriteCharData(pSocket, (const char *)&value, sizeof(value)); - } - bool wxLuaDebugIO::WriteLong(wxLuaSocket *pSocket, long value) - { - return WriteCharData(pSocket, (const char *)&value, sizeof(value)); - } - bool wxLuaDebugIO::WriteULong(wxLuaSocket *pSocket, unsigned long value) - { - return WriteCharData(pSocket, (const char *)&value, sizeof(value)); - } - - bool wxLuaDebugIO::WriteString(wxLuaSocket *pSocket, const wxString &value) - { - try - { - wxLuaCharBuffer buf(value); - int buflen = buf.Length(); - pSocket->Write((const char *)&buflen, sizeof(buflen)); - if (buflen > 0) - { - pSocket->Write(buf.GetData(), buflen); - } - return true; - } - catch(wxLuaSocketException & /*e*/) - { - } - return false; - } - - bool wxLuaDebugIO::WriteDebugData(wxLuaSocket *pSocket, const wxLuaDebugData *pSortedList) - { - bool result = false; - int idx, idxMax = pSortedList->Count(); - - pSocket->Write((const char *) &idxMax, sizeof(int)); - - for (idx = 0; idx < idxMax; ++idx) - { - try - { - const wxLuaDebugDataItem *item = pSortedList->Item(idx); - - int nameLength = item->GetName().Length() + 1; - int typeLength = item->GetType().Length() + 1; - int valueLength = item->GetValue().Length() + 1; - - int bufferLength = (3 * sizeof(int)) + - nameLength + - typeLength + - valueLength; - - unsigned char *pBuffer = new unsigned char[bufferLength]; - unsigned char *pMemory = pBuffer; - - pSocket->Write((const char *) &bufferLength, sizeof(bufferLength)); - - *(int *) pMemory = item->GetReference(); - pMemory += sizeof(int); - - *(int *) pMemory = item->GetIndex(); - pMemory += sizeof(int); - - *(int *) pMemory = item->IsExpanded() ? 1 : 0; - pMemory += sizeof(int); - - memcpy(pMemory, wx2lua(item->GetName()), nameLength); - pMemory += nameLength; - - memcpy(pMemory, wx2lua(item->GetType()), typeLength); - pMemory += typeLength; - - memcpy(pMemory, wx2lua(item->GetValue()), valueLength); - - pSocket->Write((const char *) pBuffer, bufferLength); - - delete[] pBuffer; - result = true; - } - catch(wxLuaSocketException & /*e*/) - { - } - - if (result == false) - break; - } - return result; - } --- 23,24 ---- Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxldserv.cpp 28 Aug 2006 05:26:21 -0000 1.14 --- wxldserv.cpp 6 Sep 2006 05:33:09 -0000 1.15 *************** *** 319,325 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_ADD_BREAKPOINT) && ! WriteString(m_acceptedSocket, fileName) && ! WriteInt(m_acceptedSocket, lineNumber)) { return true; --- 319,325 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_ADD_BREAKPOINT) && ! m_acceptedSocket->WriteString(fileName) && ! m_acceptedSocket->WriteInt(lineNumber)) { return true; *************** *** 339,345 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_REMOVE_BREAKPOINT) && ! WriteString(m_acceptedSocket, fileName) && ! WriteInt(m_acceptedSocket, lineNumber)) { return true; --- 339,345 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_REMOVE_BREAKPOINT) && ! m_acceptedSocket->WriteString(fileName) && ! m_acceptedSocket->WriteInt(lineNumber)) { return true; *************** *** 359,363 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_CLEAR_ALL_BREAKPOINTS)) return true; } --- 359,363 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_CLEAR_ALL_BREAKPOINTS)) return true; } *************** *** 437,443 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_RUN_BUFFER) && ! WriteString(m_acceptedSocket, fileName) && ! WriteString(m_acceptedSocket, buffer)) { return true; --- 437,443 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_RUN_BUFFER) && ! m_acceptedSocket->WriteString(fileName) && ! m_acceptedSocket->WriteString(buffer)) { return true; *************** *** 457,461 **** try { ! return WriteByte(m_acceptedSocket, wxLUA_CMD_DEBUG_STEP); } catch(wxLuaSocketException & /*e*/) --- 457,461 ---- try { ! return m_acceptedSocket->WriteByte(wxLUA_CMD_DEBUG_STEP); } catch(wxLuaSocketException & /*e*/) *************** *** 472,476 **** try { ! return WriteByte(m_acceptedSocket, wxLUA_CMD_DEBUG_STEPOVER); } catch(wxLuaSocketException & /*e*/) --- 472,476 ---- try { ! return m_acceptedSocket->WriteByte(wxLUA_CMD_DEBUG_STEPOVER); } catch(wxLuaSocketException & /*e*/) *************** *** 487,491 **** try { ! return WriteByte(m_acceptedSocket, wxLUA_CMD_DEBUG_STEPOUT); } catch(wxLuaSocketException & /*e*/) --- 487,491 ---- try { ! return m_acceptedSocket->WriteByte(wxLUA_CMD_DEBUG_STEPOUT); } catch(wxLuaSocketException & /*e*/) *************** *** 502,506 **** try { ! return WriteByte(m_acceptedSocket, wxLUA_CMD_DEBUG_CONTINUE); } catch(wxLuaSocketException & /*e*/) --- 502,506 ---- try { ! return m_acceptedSocket->WriteByte(wxLUA_CMD_DEBUG_CONTINUE); } catch(wxLuaSocketException & /*e*/) *************** *** 517,521 **** try { ! return WriteByte(m_acceptedSocket, wxLUA_CMD_DEBUG_BREAK); } catch(wxLuaSocketException & /*e*/) --- 517,521 ---- try { ! return m_acceptedSocket->WriteByte(wxLUA_CMD_DEBUG_BREAK); } catch(wxLuaSocketException & /*e*/) *************** *** 532,536 **** try { ! return WriteByte(m_acceptedSocket, wxLUA_CMD_ENUMERATE_STACK); } catch(wxLuaSocketException & /*e*/) --- 532,536 ---- try { ! return m_acceptedSocket->WriteByte(wxLUA_CMD_ENUMERATE_STACK); } catch(wxLuaSocketException & /*e*/) *************** *** 547,551 **** try { ! return WriteByte(m_acceptedSocket, wxLUA_CMD_RESET); } catch(wxLuaSocketException & /*e*/) --- 547,551 ---- try { ! return m_acceptedSocket->WriteByte(wxLUA_CMD_RESET); } catch(wxLuaSocketException & /*e*/) *************** *** 562,567 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_ENUMERATE_STACK_ENTRY) && ! WriteInt(m_acceptedSocket, stackEntry)) { return true; --- 562,567 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_ENUMERATE_STACK_ENTRY) && ! m_acceptedSocket->WriteInt(stackEntry)) { return true; *************** *** 581,588 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_ENUMERATE_TABLE_REF) && ! WriteInt(m_acceptedSocket, tableRef) && ! WriteInt(m_acceptedSocket, nIndex) && ! WriteLong(m_acceptedSocket, nItemNode)) { return true; --- 581,588 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_ENUMERATE_TABLE_REF) && ! m_acceptedSocket->WriteInt(tableRef) && ! m_acceptedSocket->WriteInt(nIndex) && ! m_acceptedSocket->WriteLong(nItemNode)) { return true; *************** *** 602,606 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_CLEAR_DEBUG_REFERENCES)) { return true; --- 602,606 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_CLEAR_DEBUG_REFERENCES)) { return true; *************** *** 642,652 **** while (!m_fShutdown) { ! int debugEvent = ReadByte(m_acceptedSocket); switch((wxLuaDebugEvents_Type) debugEvent) { case wxLUA_EVENT_DEBUG_BREAK: { ! wxString fileName = ReadString(m_acceptedSocket); ! int lineNumber = ReadInt(m_acceptedSocket); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAK, lineNumber, fileName); --- 642,652 ---- while (!m_fShutdown) { ! int debugEvent = m_acceptedSocket->ReadByte(); switch((wxLuaDebugEvents_Type) debugEvent) { case wxLUA_EVENT_DEBUG_BREAK: { ! wxString fileName = m_acceptedSocket->ReadString(); ! int lineNumber = m_acceptedSocket->ReadInt(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_BREAK, lineNumber, fileName); *************** *** 657,661 **** case wxLUA_EVENT_DEBUG_PRINT: { ! wxString strMessage = ReadString(m_acceptedSocket); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_PRINT); --- 657,661 ---- case wxLUA_EVENT_DEBUG_PRINT: { ! wxString strMessage = m_acceptedSocket->ReadString(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_PRINT); *************** *** 667,671 **** case wxLUA_EVENT_DEBUG_ERROR: { ! wxString strMessage = ReadString(m_acceptedSocket); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_ERROR); --- 667,671 ---- case wxLUA_EVENT_DEBUG_ERROR: { ! wxString strMessage = m_acceptedSocket->ReadString(); wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_ERROR); *************** *** 685,689 **** { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENUM); ! wxLuaDebugData *pDebugData = ReadDebugData(m_acceptedSocket); if (pDebugData != NULL) debugEvent.SetDebugData(-1, pDebugData); --- 685,689 ---- { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENUM); ! wxLuaDebugData *pDebugData = m_acceptedSocket->ReadDebugData(); if (pDebugData != NULL) debugEvent.SetDebugData(-1, pDebugData); *************** *** 695,700 **** { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM); ! int stackRef = ReadInt(m_acceptedSocket); ! wxLuaDebugData *pDebugData = ReadDebugData(m_acceptedSocket); if (pDebugData != NULL) debugEvent.SetDebugData(stackRef, pDebugData); --- 695,700 ---- { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_STACK_ENTRY_ENUM); ! int stackRef = m_acceptedSocket->ReadInt(); ! wxLuaDebugData *pDebugData = m_acceptedSocket->ReadDebugData(); if (pDebugData != NULL) debugEvent.SetDebugData(stackRef, pDebugData); *************** *** 706,711 **** { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_TABLE_ENUM); ! long itemNode = ReadLong(m_acceptedSocket); ! wxLuaDebugData *pDebugData = ReadDebugData(m_acceptedSocket); if (pDebugData != NULL) debugEvent.SetDebugData(itemNode, pDebugData); --- 706,711 ---- { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_TABLE_ENUM); ! long itemNode = m_acceptedSocket->ReadLong(); ! wxLuaDebugData *pDebugData = m_acceptedSocket->ReadDebugData(); if (pDebugData != NULL) debugEvent.SetDebugData(itemNode, pDebugData); *************** *** 717,722 **** { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EVALUATE_EXPR); ! int exprRef = ReadInt(m_acceptedSocket); ! wxString strResult = ReadString(m_acceptedSocket); debugEvent.SetMessage(strResult); --- 717,722 ---- { wxLuaDebugEvent debugEvent(wxEVT_WXLUA_DEBUG_EVALUATE_EXPR); ! int exprRef = m_acceptedSocket->ReadInt(); ! wxString strResult = m_acceptedSocket->ReadString(); debugEvent.SetMessage(strResult); *************** *** 782,788 **** try { ! if (WriteByte(m_acceptedSocket, wxLUA_CMD_EVALUATE_EXPR) && ! WriteInt(m_acceptedSocket, exprRef) && ! WriteString(m_acceptedSocket, strExpression)) { return true; --- 782,788 ---- try { ! if (m_acceptedSocket->WriteByte(wxLUA_CMD_EVALUATE_EXPR) && ! m_acceptedSocket->WriteInt(exprRef) && ! m_acceptedSocket->WriteString(strExpression)) { return true; Index: dservice.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/dservice.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dservice.cpp 2 May 2006 05:25:06 -0000 1.17 --- dservice.cpp 6 Sep 2006 05:33:09 -0000 1.18 *************** *** 67,304 **** // wxLuaDebugSocket - Handles Debugger/Debuggee IO // ---------------------------------------------------------------------------- - unsigned char wxLuaDebugSocket::ReadByte() - { - unsigned char value; - m_socket->Read((char *) &value, sizeof(value)); - return value; - } - - short wxLuaDebugSocket::ReadWord() - { - short value; - m_socket->Read((char *)&value, sizeof(value)); - return value; - } - - unsigned short wxLuaDebugSocket::ReadUWord() - { - unsigned short value; - m_socket->Read((char *)&value, sizeof(value)); - return value; - } - - int wxLuaDebugSocket::ReadInt() - { - int value; - m_socket->Read((char *) &value, sizeof(value)); - return value; - } - - unsigned int wxLuaDebugSocket::ReadUInt() - { - unsigned int value; - m_socket->Read((char *) &value, sizeof(value)); - return value; - } - - long wxLuaDebugSocket::ReadLong() - { - long value; - m_socket->Read((char *) &value, sizeof(value)); - return value; - } - - unsigned long wxLuaDebugSocket::ReadULong() - { - unsigned long value; - m_socket->Read((char *) &value, sizeof(value)); - return value; - } - - wxString wxLuaDebugSocket::ReadString() - { - wxString value; - unsigned int length = ReadInt(); - if (length > 0) - { - char *buffer = new char[length + 1]; - if (buffer) - { - m_socket->Read(buffer, length); - buffer[length] = 0; - value = lua2wx(buffer); - delete[] buffer; - } - } - - return value; - } - - wxLuaDebugData *wxLuaDebugSocket::ReadDebugData() - { - wxLuaDebugData *pSortedList = new wxLuaDebugData(); - - size_t idx, idxMax = 0; - m_socket->Read((char *) &idxMax, sizeof(idxMax)); - - for (idx = 0; idx < idxMax; ++idx) - { - int bufferLength; - m_socket->Read((char *) &bufferLength, sizeof(bufferLength)); - if (bufferLength > 0) - { - char *pBuffer = new char[bufferLength]; - char *pMemory = pBuffer; - m_socket->Read(pMemory, bufferLength); - int nReference = *(int *) pMemory; - pMemory += sizeof(int); - int nIndex = *(int *) pMemory; - pMemory += sizeof(int); - bool fExpanded = (0 != *(int *) pMemory); - pMemory += sizeof(int); ! const char *pNamePtr = pMemory; ! pMemory += strlen(pNamePtr) + 1; ! const char *pTypePtr = pMemory; ! pMemory += strlen(pTypePtr) + 1; ! const char *pValuePtr = pMemory; ! pMemory += strlen(pValuePtr) + 1; ! const char *pSourcePtr = pMemory; ! ! wxLuaDebugDataItem *pItem = new wxLuaDebugDataItem(lua2wx(pNamePtr), ! lua2wx(pTypePtr), ! lua2wx(pValuePtr), ! lua2wx(pSourcePtr), ! nReference, ! nIndex, ! fExpanded); ! pSortedList->Add(pItem); ! ! delete[] pBuffer; ! } ! } ! ! return pSortedList; ! } ! ! bool wxLuaDebugSocket::WriteByte(unsigned char value) ! { ! m_socket->Write((const char *) &value, sizeof(value)); ! return !m_socket->Error(); ! } ! ! bool wxLuaDebugSocket::WriteWord(short value) ! { ! m_socket->Write((const char *) &value, sizeof(value)); ! return !m_socket->Error(); ! } ! ! bool wxLuaDebugSocket::WriteUWord(unsigned short value) ! { ! m_socket->Write((const char *) &value, sizeof(value)); ! return !m_socket->Error(); ! } ! ! bool wxLuaDebugSocket::WriteInt(int value) ! { ! m_socket->Write((const char *) &value, sizeof(value)); ! return !m_socket->Error(); ! } ! ! bool wxLuaDebugSocket::WriteUInt(unsigned int value) ! { ! m_socket->Write((const char *) &value, sizeof(value)); ! return !m_socket->Error(); ! } ! ! bool wxLuaDebugSocket::WriteLong(long value) ! { ! m_socket->Write((const char *) &value, sizeof(value)); ! return !m_socket->Error(); ! } ! ! bool wxLuaDebugSocket::WriteULong(unsigned long value) ! { ! m_socket->Write((const char *) &value, sizeof(value)); ! return !m_socket->Error(); ! } ! ! bool wxLuaDebugSocket::WriteString(const wxString &value) { ! wxLuaCharBuffer buf(value); ! int buflen = buf.Length(); ! m_socket->Write((const char *) &buflen, sizeof(buflen)); ! if (m_socket->Error()) ! return false; ! ! if (buflen > 0) ! { ! m_socket->Write(buf.GetData(), buflen); ! if (m_socket->Error()) ! return false; ! } ! ! return true; } ! bool wxLuaDebugSocket::WriteDebugData(const wxLuaDebugData *pSortedList) { ! size_t idx, idxMax = pSortedList->Count(); ! ! m_socket->Write((const char *) &idxMax, sizeof(idxMax)); ! if (m_socket->Error()) ! return false; ! ! for (idx = 0; idx < idxMax; ++idx) ! { ! const wxLuaDebugDataItem *item = pSortedList->Item(idx); ! ! int nameLength = item->GetName().Length() + 1; ! int typeLength = item->GetType().Length() + 1; ! int valueLength = item->GetValue().Length() + 1; ! int sourceLength = item->GetSource().Length() + 1; ! ! int bufferLength = (3 * sizeof(int)) + ! nameLength + ! typeLength + ! valueLength + ! sourceLength; ! ! m_socket->Write((const char *) &bufferLength, sizeof(bufferLength)); ! if (m_socket->Error()) ! return false; ! ! unsigned char *pBuffer = new unsigned char[bufferLength]; ! unsigned char *pMemory = pBuffer; ! ! *(int *) pMemory = item->GetReference(); ! pMemory += sizeof(int); ! ! *(int *) pMemory = item->GetIndex(); ! pMemory += sizeof(int); ! ! *(int *) pMemory = item->IsExpanded() ? 1 : 0; ! pMemory += sizeof(int); ! ! memcpy(pMemory, wx2lua(item->GetName()), nameLength); ! pMemory += nameLength; ! ! memcpy(pMemory, wx2lua(item->GetType()), typeLength); ! pMemory += typeLength; ! ! memcpy(pMemory, wx2lua(item->GetValue()), valueLength); ! pMemory += valueLength; ! ! memcpy(pMemory, wx2lua(item->GetSource()), sourceLength); ! ! m_socket->Write((const char *) pBuffer, bufferLength); ! ! delete[] pBuffer; ! ! if (m_socket->Error()) ! return false; ! } ! ! return true; } --- 67,83 ---- // wxLuaDebugSocket - Handles Debugger/Debuggee IO // ---------------------------------------------------------------------------- ! int wxLuaDebugSocket::Read(char *buffer, int length) { ! wxCHECK_MSG(m_socket, 0, wxT("Invalid wxSocketBase")); ! m_socket->Read(buffer, (wxUint32)length); ! return m_socket->LastCount(); } ! int wxLuaDebugSocket::Write(const char *buffer, int length) { ! wxCHECK_MSG(m_socket, 0, wxT("Invalid wxSocketBase")); ! m_socket->Write(buffer, (wxUint32)length); ! return m_socket->LastCount(); } *************** *** 667,681 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_BREAK); #if wxCHECK_VERSION(2,3,0) ! m_debuggerSocketList[i]->WriteString(fileName.GetFullPath()); #else ! m_debuggerSocketList[i]->WriteString(fileName); #endif ! m_debuggerSocketList[i]->WriteInt(lineNumber); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 446,462 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_BREAK); #if wxCHECK_VERSION(2,3,0) ! dSocket->WriteString(fileName.GetFullPath()); #else ! dSocket->WriteString(fileName); #endif ! dSocket->WriteInt(lineNumber); ! if (!dSocket->Error()) result = true; } *************** *** 691,700 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_ERROR); ! m_debuggerSocketList[i]->WriteString(errorMsg); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 472,483 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_ERROR); ! dSocket->WriteString(errorMsg); ! if (!dSocket->Error()) result = true; } *************** *** 710,719 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_ERROR); ! m_debuggerSocketList[i]->WriteString(errorMsg); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 493,504 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_ERROR); ! dSocket->WriteString(errorMsg); ! if (!dSocket->Error()) result = true; } *************** *** 729,737 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_EXIT); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 514,524 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_EXIT); ! if (!dSocket->Error()) result = true; } *************** *** 747,756 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); ! m_debuggerSocketList[i]->WriteDebugData(pDebugData); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 534,545 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); ! dSocket->WriteDebugData(pDebugData); ! if (!dSocket->Error()) result = true; } *************** *** 768,778 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); ! m_debuggerSocketList[i]->WriteInt(entryRef); ! m_debuggerSocketList[i]->WriteDebugData(pDebugData); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 557,569 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); ! dSocket->WriteInt(entryRef); ! dSocket->WriteDebugData(pDebugData); ! if (!dSocket->Error()) result = true; } *************** *** 790,800 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); ! m_debuggerSocketList[i]->WriteLong(itemNode); ! m_debuggerSocketList[i]->WriteDebugData(pDebugData); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 581,593 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); ! dSocket->WriteLong(itemNode); ! dSocket->WriteDebugData(pDebugData); ! if (!dSocket->Error()) result = true; } *************** *** 812,822 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_EVALUATE_EXPR); ! m_debuggerSocketList[i]->WriteInt(exprRef); ! m_debuggerSocketList[i]->WriteString(strResult); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 605,617 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_EVALUATE_EXPR); ! dSocket->WriteInt(exprRef); ! dSocket->WriteString(strResult); ! if (!dSocket->Error()) result = true; } *************** *** 832,849 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { if (!debugSocket || debugSocket == m_debuggerSocketList[i]) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_BREAKPOINT_ADDED); #if wxCHECK_VERSION(2,3,0) ! m_debuggerSocketList[i]->WriteString(breakPoint.GetFileName().GetFullPath()); #else ! m_debuggerSocketList[i]->WriteString(breakPoint.GetFileName()); #endif ! m_debuggerSocketList[i]->WriteInt(breakPoint.GetLine()); ! m_debuggerSocketList[i]->WriteInt((int)breakPoint.GetEnabled()); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 627,646 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { if (!debugSocket || debugSocket == m_debuggerSocketList[i]) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_BREAKPOINT_ADDED); #if wxCHECK_VERSION(2,3,0) ! dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); #else ! dSocket->WriteString(breakPoint.GetFileName()); #endif ! dSocket->WriteInt(breakPoint.GetLine()); ! dSocket->WriteInt((int)breakPoint.GetEnabled()); ! if (!dSocket->Error()) result = true; } *************** *** 860,877 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { if (!debugSocket || debugSocket == m_debuggerSocketList[i]) { ! m_debuggerSocketList[i]->WriteByte(wxLUA_EVENT_DEBUG_BREAKPOINT_REMOVED); #if wxCHECK_VERSION(2,3,0) ! m_debuggerSocketList[i]->WriteString(breakPoint.GetFileName().GetFullPath()); #else ! m_debuggerSocketList[i]->WriteString(breakPoint.GetFileName()); #endif ! m_debuggerSocketList[i]->WriteInt(breakPoint.GetLine()); ! m_debuggerSocketList[i]->WriteInt((int)breakPoint.GetEnabled()); ! if (!m_debuggerSocketList[i]->Error()) result = true; } --- 657,676 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { if (!debugSocket || debugSocket == m_debuggerSocketList[i]) { ! wxLuaDebugSocket* dSocket = m_debuggerSocketList[i]; ! dSocket->WriteByte(wxLUA_EVENT_DEBUG_BREAKPOINT_REMOVED); #if wxCHECK_VERSION(2,3,0) ! dSocket->WriteString(breakPoint.GetFileName().GetFullPath()); #else ! dSocket->WriteString(breakPoint.GetFileName()); #endif ! dSocket->WriteInt(breakPoint.GetLine()); ! dSocket->WriteInt((int)breakPoint.GetEnabled()); ! if (!dSocket->Error()) result = true; } *************** *** 885,889 **** wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! for (size_t i = 0; i < m_debuggerSocketList.GetCount(); i++) { if (m_debuggerSocketList[i]->WaitForRead()) --- 684,689 ---- wxCriticalSectionLocker locker(m_debuggerSocketListCriticalSection); ! size_t i, count = m_debuggerSocketList.GetCount(); ! for (i = 0; i < count; i++) { if (m_debuggerSocketList[i]->WaitForRead()) Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxlsock.cpp 28 Aug 2006 05:26:21 -0000 1.7 --- wxlsock.cpp 6 Sep 2006 05:33:09 -0000 1.8 *************** *** 23,26 **** --- 23,28 ---- #include "wxluasocket/include/wxlsock.h" + #include "wxlua/include/wxlstate.h" + #include "wxluadebug/include/wxldebug.h" #ifdef _MSC_VER *************** *** 28,33 **** #endif ! extern const wxCharBuffer wx2lua(const wxString& AppString); ! extern wxString lua2wx(const char* c_str); // ---------------------------------------------------------------------------- --- 30,276 ---- #endif ! // ---------------------------------------------------------------------------- ! // wxLuaSocketBase ! // ---------------------------------------------------------------------------- ! ! unsigned char wxLuaSocketBase::ReadByte() ! { ! unsigned char value = 0; ! Read((char *) &value, sizeof(value)); ! return value; ! } ! ! short wxLuaSocketBase::ReadWord() ! { ! short value = 0; ! Read((char *)&value, sizeof(value)); ! return value; ! } ! ! unsigned short wxLuaSocketBase::ReadUWord() ! { ! unsigned short value = 0; ! Read((char *)&value, sizeof(value)); ! return value; ! } ! ! int wxLuaSocketBase::ReadInt() ! { ! int value = 0; ! Read((char *) &value, sizeof(value)); ! return value; ! } ! ! unsigned int wxLuaSocketBase::ReadUInt() ! { ! unsigned int value = 0; ! Read((char *) &value, sizeof(value)); ! return value; ! } ! ! long wxLuaSocketBase::ReadLong() ! { ! long value = 0; ! Read((char *) &value, sizeof(value)); ! return value; ! } ! ! unsigned long wxLuaSocketBase::ReadULong() ! { ! unsigned long value = 0; ! Read((char *) &value, sizeof(value)); ! return value; ! } ! ! wxString wxLuaSocketBase::ReadString() ! { ! wxString value; ! unsigned int length = ReadInt(); ! if (length > 0) ! { ! char *buffer = new char[length + 1]; ! memset(buffer, 0, length+1); ! Read(buffer, length); ! buffer[length] = 0; ! value = lua2wx(buffer); ! delete[] buffer; ! } ! return value; ! } ! ! wxLuaDebugData *wxLuaSocketBase::ReadDebugData() ! { ! wxLuaDebugData *pSortedList = new wxLuaDebugData(); ! ! try ! { ! int idx, idxMax = 0; ! Read((char *) &idxMax, sizeof(int)); ! ! for (idx = 0; idx < idxMax; ++idx) ! { ! int bufferLength; ! Read((char *) &bufferLength, sizeof(bufferLength)); ! if (bufferLength > 0) ! { ! char *pBuffer = new char[bufferLength]; ! char *pMemory = pBuffer; ! Read(pMemory, bufferLength); ! ! int nReference = *(int *) pMemory; ! pMemory += sizeof(int); ! ! int nIndex = *(int *) pMemory; ! pMemory += sizeof(int); ! ! bool fExpanded = (0 != (*(int *) pMemory)); ! pMemory += sizeof(int); ! ! const char *pNamePtr = pMemory; ! pMemory += strlen(pNamePtr) + 1; ! const char *pTypePtr = pMemory; ! pMemory += strlen(pTypePtr) + 1; ! const char *pValuePtr = pMemory; ! ! wxLuaDebugDataItem *pItem = new wxLuaDebugDataItem(lua2wx(pNamePtr), ! lua2wx(pTypePtr), ! lua2wx(pValuePtr), ! wxEmptyString, // FIXME! source? ! nReference, ! nIndex, ! fExpanded); ! pSortedList->Add(pItem); ! ! delete[] pBuffer; ! } ! } ! } ! catch(wxLuaSocketException & /*e*/) ! { ! delete pSortedList; ! pSortedList = NULL; ! } ! ! return pSortedList; ! } ! ! bool wxLuaSocketBase::WriteCharData(const char* value, int length) ! { ! try ! { ! Write(value, length); ! return true; ! } ! catch(wxLuaSocketException & /*e*/) ! { ! } ! return false; ! } ! bool wxLuaSocketBase::WriteByte(unsigned char value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteWord(short value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteUWord(unsigned short value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteInt(int value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteUInt(unsigned int value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteLong(long value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! bool wxLuaSocketBase::WriteULong(unsigned long value) ! { ! return WriteCharData((const char *)&value, sizeof(value)); ! } ! ! bool wxLuaSocketBase::WriteString(const wxString &value) ! { ! try ! { ! wxLuaCharBuffer buf(value); ! int buflen = buf.Length(); ! Write((const char *)&buflen, sizeof(buflen)); ! if (buflen > 0) ! { ! Write(buf.GetData(), buflen); ! } ! return true; ! } ! catch(wxLuaSocketException & /*e*/) ! { ! } ! return false; ! } ! ! bool wxLuaSocketBase::WriteDebugData(const wxLuaDebugData *pSortedList) ! { ! bool result = false; ! int idx, idxMax = pSortedList->Count(); ! ! Write((const char *) &idxMax, sizeof(int)); ! ! for (idx = 0; idx < idxMax; ++idx) ! { ! try ! { ! const wxLuaDebugDataItem *item = pSortedList->Item(idx); ! ! int nameLength = item->GetName().Length() + 1; ! int typeLength = item->GetType().Length() + 1; ! int valueLength = item->GetValue().Length() + 1; ! ! int bufferLength = (3 * sizeof(int)) + ! nameLength + ! typeLength + ! valueLength; ! ! unsigned char *pBuffer = new unsigned char[bufferLength]; ! unsigned char *pMemory = pBuffer; ! ! Write((const char *) &bufferLength, sizeof(bufferLength)); ! ! *(int *) pMemory = item->GetReference(); ! pMemory += sizeof(int); ! ! *(int *) pMemory = item->GetIndex(); ! pMemory += sizeof(int); ! ! *(int *) pMemory = item->IsExpanded() ? 1 : 0; ! pMemory += sizeof(int); ! ! memcpy(pMemory, wx2lua(item->GetName()), nameLength); ! pMemory += nameLength; ! ! memcpy(pMemory, wx2lua(item->GetType()), typeLength); ! pMemory += typeLength; ! ! memcpy(pMemory, wx2lua(item->GetValue()), valueLength); ! ! Write((const char *) pBuffer, bufferLength); ! ! delete[] pBuffer; ! result = true; ! } ! catch(wxLuaSocketException & /*e*/) ! { ! } ! ! if (result == false) ! break; ! } ! return result; ! } // ---------------------------------------------------------------------------- *************** *** 150,158 **** // Write data to an open socket, repeat until all data has been sent. ! void wxLuaSocket::Write(const char *buffer, int length) { if ((m_sockstate != SOCKET_CONNECTED) && (m_sockstate != SOCKET_ACCEPTED)) throw wxLuaSocketException(wxLuaSocketException::SOCKET_NOT_CONNECTED); while (length > 0) { --- 393,403 ---- // Write data to an open socket, repeat until all data has been sent. ! int wxLuaSocket::Write(const char *buffer, int length_) { if ((m_sockstate != SOCKET_CONNECTED) && (m_sockstate != SOCKET_ACCEPTED)) throw wxLuaSocketException(wxLuaSocketException::SOCKET_NOT_CONNECTED); + int length = length_; + while (length > 0) { *************** *** 164,167 **** --- 409,414 ---- buffer += numWritten; } + + return length_; } Index: wxlhandl.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlhandl.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxlhandl.cpp 28 Aug 2006 05:26:21 -0000 1.3 --- wxlhandl.cpp 6 Sep 2006 05:33:09 -0000 1.4 *************** *** 30,43 **** // ---------------------------------------------------------------------------- ! wxLuaHandler* wxLuaHandler::sm_luahandler = NULL; wxLuaHandler::wxLuaHandler() { ! wxASSERT_MSG(!sm_luahandler, wxT("There can only be one wxLuaHandler")); ! sm_luahandler = this; } wxLuaHandler::~wxLuaHandler() { ! sm_luahandler = NULL; } --- 30,43 ---- // ---------------------------------------------------------------------------- ! wxLuaHandler* wxLuaHandler::sm_luaHandler = NULL; wxLuaHandler::wxLuaHandler() { ! wxASSERT_MSG(!sm_luaHandler, wxT("There can only be one wxLuaHandler")); ! sm_luaHandler = this; } wxLuaHandler::~wxLuaHandler() { ! sm_luaHandler = NULL; } Index: wxldtarg.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldtarg.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxldtarg.cpp 2 May 2006 05:25:06 -0000 1.17 --- wxldtarg.cpp 6 Sep 2006 05:33:09 -0000 1.18 *************** *** 196,206 **** try { ! wxLuaDebugCommands_Type debugCommand = (wxLuaDebugCommands_Type) ReadByte(&m_clientSocket); switch(debugCommand) { case wxLUA_CMD_ADD_BREAKPOINT: { ! wxString fileName = ReadString(&m_clientSocket); ! int lineNumber = ReadInt(&m_clientSocket); AddBreakPoint(fileName, lineNumber); --- 196,206 ---- try { ! wxLuaDebugCommands_Type debugCommand = (wxLuaDebugCommands_Type)m_clientSocket.ReadByte(); switch(debugCommand) { case wxLUA_CMD_ADD_BREAKPOINT: { ! wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); AddBreakPoint(fileName, lineNumber); *************** *** 210,215 **** case wxLUA_CMD_REMOVE_BREAKPOINT: { ! wxString fileName = ReadString(&m_clientSocket); ! int lineNumber = ReadInt(&m_clientSocket); RemoveBreakPoint(fileName, lineNumber); --- 210,215 ---- case wxLUA_CMD_REMOVE_BREAKPOINT: { ! wxString fileName = m_clientSocket.ReadString(); ! int lineNumber = m_clientSocket.ReadInt(); RemoveBreakPoint(fileName, lineNumber); *************** *** 223,228 **** case wxLUA_CMD_RUN_BUFFER: { ! wxString fileName = ReadString(&m_clientSocket); ! wxString buffer = ReadString(&m_clientSocket); Run(fileName, buffer); --- 223,228 ---- case wxLUA_CMD_RUN_BUFFER: { ! wxString fileName = m_clientSocket.ReadString(); ! wxString buffer = m_clientSocket.ReadString(); Run(fileName, buffer); *************** *** 256,260 **** case wxLUA_CMD_ENUMERATE_STACK_ENTRY: { ! int stackRef = ReadInt(&m_clientSocket); EnumerateStackEntry(stackRef); } --- 256,260 ---- case wxLUA_CMD_ENUMERATE_STACK_ENTRY: { ! int stackRef = m_clientSocket.ReadInt(); EnumerateStackEntry(stackRef); } *************** *** 263,269 **** case wxLUA_CMD_ENUMERATE_TABLE_REF: { ! int tableRef = ReadInt(&m_clientSocket); ! int index = ReadInt(&m_clientSocket); ! long itemNode = ReadLong(&m_clientSocket); EnumerateTable(tableRef, index, itemNode); } --- 263,269 ---- case wxLUA_CMD_ENUMERATE_TABLE_REF: { ! int tableRef = m_clientSocket.ReadInt(); ! int index = m_clientSocket.ReadInt(); ! long itemNode = m_clientSocket.ReadLong(); EnumerateTable(tableRef, index, itemNode); } *************** *** 276,281 **** case wxLUA_CMD_EVALUATE_EXPR: { ! int exprRef = ReadInt(&m_clientSocket); ! wxString buffer = ReadString(&m_clientSocket); EvaluateExpr(exprRef, buffer); } --- 276,281 ---- case wxLUA_CMD_EVALUATE_EXPR: { ! int exprRef = m_clientSocket.ReadInt(); ! wxString buffer = m_clientSocket.ReadString(); EvaluateExpr(exprRef, buffer); } *************** *** 601,607 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_BREAK); ! WriteString(&m_clientSocket, fileName); ! WriteInt(&m_clientSocket, lineNumber); return true; } --- 601,607 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_BREAK); ! m_clientSocket.WriteString(fileName); ! m_clientSocket.WriteInt(lineNumber); return true; } *************** *** 613,618 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_PRINT); ! WriteString(&m_clientSocket, errorMsg); return true; } --- 613,618 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_PRINT); ! m_clientSocket.WriteString(errorMsg); return true; } *************** *** 624,629 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_ERROR); ! WriteString(&m_clientSocket, errorMsg); return true; } --- 624,629 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_ERROR); ! m_clientSocket.WriteString(errorMsg); return true; } *************** *** 639,643 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_EXIT); return true; } --- 639,643 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_EXIT); return true; } *************** *** 649,654 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_STACK_ENUM); ! WriteDebugData(&m_clientSocket, pDebugData); return true; } --- 649,654 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENUM); ! m_clientSocket.WriteDebugData(pDebugData); return true; } *************** *** 662,668 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); ! WriteInt(&m_clientSocket, entryRef); ! WriteDebugData(&m_clientSocket, pDebugData); return true; } --- 662,668 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_STACK_ENTRY_ENUM); ! m_clientSocket.WriteInt(entryRef); ! m_clientSocket.WriteDebugData(pDebugData); return true; } *************** *** 676,682 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_TABLE_ENUM); ! WriteLong(&m_clientSocket, itemNode); ! WriteDebugData(&m_clientSocket, pDebugData); return true; } --- 676,682 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_TABLE_ENUM); ! m_clientSocket.WriteLong(itemNode); ! m_clientSocket.WriteDebugData(pDebugData); return true; } *************** *** 690,696 **** if (WaitForConnect()) { ! WriteByte(&m_clientSocket, wxLUA_EVENT_DEBUG_EVALUATE_EXPR); ! WriteInt(&m_clientSocket, exprRef); ! WriteString(&m_clientSocket, strResult); return true; } --- 690,696 ---- if (WaitForConnect()) { ! m_clientSocket.WriteByte(wxLUA_EVENT_DEBUG_EVALUATE_EXPR); ! m_clientSocket.WriteInt(exprRef); ! m_clientSocket.WriteString(strResult); return true; } |
From: John L. <jr...@us...> - 2006-09-05 21:48:16
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30388/wxLua/modules/wxluasocket/include Modified Files: wxldbgio.h wxldserv.h wxlhandl.h wxluasocketdefs.h Log Message: cleanup #includes to ensure that defs get included first fix DLLIMPEXP for the modules to correctly use the right one per module Index: wxlhandl.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxlhandl.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlhandl.h 20 May 2006 19:57:59 -0000 1.5 --- wxlhandl.h 5 Sep 2006 21:48:11 -0000 1.6 *************** *** 16,24 **** #endif - #include "wxluasocket/include/wxluasocketdefs.h" #include "wx/thread.h" class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugEvent; ! class WXDLLIMPEXP_WXLUASOCKET wxLuaStackDialog; // ---------------------------------------------------------------------------- --- 16,24 ---- #endif #include "wx/thread.h" + #include "wxluasocket/include/wxluasocketdefs.h" class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugEvent; ! class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog; // ---------------------------------------------------------------------------- Index: wxldserv.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldserv.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxldserv.h 20 May 2006 19:57:59 -0000 1.8 --- wxldserv.h 5 Sep 2006 21:48:11 -0000 1.9 *************** *** 22,26 **** class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer; class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugEvent; ! class WXDLLIMPEXP_WXLUASOCKET wxLuaStackDialog; // ---------------------------------------------------------------------------- --- 22,26 ---- class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugServer; class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugEvent; ! class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog; // ---------------------------------------------------------------------------- Index: wxldbgio.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldbgio.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxldbgio.h 20 May 2006 19:57:59 -0000 1.3 --- wxldbgio.h 5 Sep 2006 21:48:11 -0000 1.4 *************** *** 16,20 **** #include "wxluasocket/include/wxluasocketdefs.h" ! class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugData; class WXDLLIMPEXP_WXLUASOCKET wxLuaSocket; --- 16,20 ---- #include "wxluasocket/include/wxluasocketdefs.h" ! class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; class WXDLLIMPEXP_WXLUASOCKET wxLuaSocket; Index: wxluasocketdefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocketdefs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxluasocketdefs.h 4 Sep 2006 18:07:55 -0000 1.3 --- wxluasocketdefs.h 5 Sep 2006 21:48:11 -0000 1.4 *************** *** 16,19 **** --- 16,20 ---- #include "wxlua/include/wxldefs.h" + #include "wxluadebug/include/wxluadebugdefs.h" // ---------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2006-09-05 21:48:15
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30388/wxLua/apps/wxluaedit/src Modified Files: wxledit.h Log Message: cleanup #includes to ensure that defs get included first fix DLLIMPEXP for the modules to correctly use the right one per module Index: wxledit.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxledit.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxledit.h 8 Apr 2006 23:05:38 -0000 1.12 --- wxledit.h 5 Sep 2006 21:48:11 -0000 1.13 *************** *** 25,29 **** class WXDLLIMPEXP_WXLUA wxLuaState; class WXDLLIMPEXP_WXLUA wxLuaEvent; ! class WXDLLIMPEXP_WXLUA wxLuaConsole; // Note: If you get a compilation error on the next two lines you need to --- 25,29 ---- class WXDLLIMPEXP_WXLUA wxLuaState; class WXDLLIMPEXP_WXLUA wxLuaEvent; ! class wxLuaConsole; // Note: If you get a compilation error on the next two lines you need to *************** *** 82,86 **** //----------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUA wxLuaShell : public wxSTEditorShell { public : --- 82,86 ---- //----------------------------------------------------------------------------- ! class wxLuaShell : public wxSTEditorShell { public : *************** *** 145,149 **** //----------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUA wxLuaEditor : public wxSTEditor { public : --- 145,149 ---- //----------------------------------------------------------------------------- ! class wxLuaEditor : public wxSTEditor { public : *************** *** 216,220 **** }; ! class WXDLLIMPEXP_WXLUA wxLuaConsole : public wxWindow { public: --- 216,220 ---- }; ! class wxLuaConsole : public wxWindow { public: |
From: John L. <jr...@us...> - 2006-09-05 21:48:15
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30388/wxLua/apps/wxlua/src Modified Files: lconsole.h wxlua.h Log Message: cleanup #includes to ensure that defs get included first fix DLLIMPEXP for the modules to correctly use the right one per module Index: lconsole.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/lconsole.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** lconsole.h 15 May 2006 04:48:37 -0000 1.5 --- lconsole.h 5 Sep 2006 21:48:10 -0000 1.6 *************** *** 28,32 **** void FillListbox(); ! private: wxLuaState m_wxlState; wxListBox* m_listBox; --- 28,32 ---- void FillListbox(); ! protected: wxLuaState m_wxlState; wxListBox* m_listBox; *************** *** 48,52 **** void DisplayText(wxString msg, bool fError = false); ! private: void OnCloseWindow(wxCloseEvent& event); void OnEraseBackground(wxEraseEvent& WXUNUSED(event)) {} --- 48,52 ---- void DisplayText(wxString msg, bool fError = false); ! protected: void OnCloseWindow(wxCloseEvent& event); void OnEraseBackground(wxEraseEvent& WXUNUSED(event)) {} Index: wxlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.h,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxlua.h 15 May 2006 04:48:37 -0000 1.16 --- wxlua.h 5 Sep 2006 21:48:10 -0000 1.17 *************** *** 22,28 **** class WXDLLIMPEXP_WXLUA wxLuaEvent; class LuaHandler; - class WXDLLIMPEXP_WXLUA wxLuaStackDialog; - class WXDLLIMPEXP_WXLUA wxLuaDebugEvent; // ---------------------------------------------------------------------------- --- 22,28 ---- class WXDLLIMPEXP_WXLUA wxLuaEvent; + class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDialog; + class WXDLLIMPEXP_WXLUASOCKET wxLuaDebugEvent; class LuaHandler; // ---------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2006-09-05 21:48:15
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30388/wxLua/apps/wxluacan/src Modified Files: canlua.cpp cansim.h Log Message: cleanup #includes to ensure that defs get included first fix DLLIMPEXP for the modules to correctly use the right one per module Index: cansim.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/cansim.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** cansim.h 28 Aug 2006 05:26:19 -0000 1.3 --- cansim.h 5 Sep 2006 21:48:11 -0000 1.4 *************** *** 22,28 **** #include "wx/timer.h" #include "wxlua/include/wxlstate.h" - #include "wxluadebug/include/wxldebug.h" - #include "wxluasocket/include/wxldserv.h" - #include "wxluasocket/include/wxldtarg.h" //---------------------------------------------------------------------------- --- 22,25 ---- Index: canlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/canlua.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** canlua.cpp 10 Apr 2006 22:37:01 -0000 1.10 --- canlua.cpp 5 Sep 2006 21:48:11 -0000 1.11 *************** *** 24,28 **** #include "wxluacan.h" ! #include <wx/listimpl.cpp> WX_DEFINE_LIST(wxlCanObjList); --- 24,28 ---- #include "wxluacan.h" ! #include "wx/listimpl.cpp" WX_DEFINE_LIST(wxlCanObjList); |
From: John L. <jr...@us...> - 2006-09-05 21:48:15
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv30388/wxLua/modules/wxluadebug/include Modified Files: staktree.h Log Message: cleanup #includes to ensure that defs get included first fix DLLIMPEXP for the modules to correctly use the right one per module Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** staktree.h 4 Sep 2006 18:07:55 -0000 1.9 --- staktree.h 5 Sep 2006 21:48:11 -0000 1.10 *************** *** 19,23 **** class WXDLLIMPEXP_WXLUADEBUG wxLuaStackDataWindow; - class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugServer; class WXDLLIMPEXP_WXLUADEBUG wxLuaInterface; class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; --- 19,22 ---- |
From: Francesco M. <fr...@us...> - 2006-09-04 18:30:01
|
Update of /cvsroot/wxlua/wxLua/modules/luamodule/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv19802/modules/luamodule/src Modified Files: luamodule.cpp Log Message: super small fix for borland compiler Index: luamodule.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/luamodule/src/luamodule.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** luamodule.cpp 21 May 2006 14:43:36 -0000 1.3 --- luamodule.cpp 4 Sep 2006 18:29:59 -0000 1.4 *************** *** 42,47 **** private: ! DECLARE_ABSTRACT_CLASS(wxLuaModuleApp); ! DECLARE_EVENT_TABLE(); }; --- 42,47 ---- private: ! DECLARE_ABSTRACT_CLASS(wxLuaModuleApp) ! DECLARE_EVENT_TABLE() }; |
From: John L. <jr...@us...> - 2006-09-04 18:07:58
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11114/wxLua/modules/wxluadebug/include Modified Files: splttree.h staktree.h wxldebug.h wxluadebugdefs.h Log Message: include wxlua/include/wxldefs.h first Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** wxldebug.h 4 Sep 2006 17:54:01 -0000 1.19 --- wxldebug.h 4 Sep 2006 18:07:55 -0000 1.20 *************** *** 30,36 **** #include "wx/treectrl.h" // for wxTreeItemData - #include "wxlua/include/wxldefs.h" - #include "wxlua/include/wxlstate.h" #include "wxluadebug/include/wxluadebugdefs.h" class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; --- 30,35 ---- #include "wx/treectrl.h" // for wxTreeItemData #include "wxluadebug/include/wxluadebugdefs.h" + #include "wxlua/include/wxlstate.h" class WXDLLIMPEXP_WXLUADEBUG wxLuaDebugData; Index: splttree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/splttree.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** splttree.h 20 May 2006 19:57:59 -0000 1.8 --- splttree.h 4 Sep 2006 18:07:55 -0000 1.9 *************** *** 20,24 **** #endif - #include "wxlua/include/wxldefs.h" #include "wxluadebug/include/wxluadebugdefs.h" #include "wx/treectrl.h" --- 20,23 ---- Index: wxluadebugdefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxluadebugdefs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxluadebugdefs.h 21 May 2006 19:17:00 -0000 1.2 --- wxluadebugdefs.h 4 Sep 2006 18:07:55 -0000 1.3 *************** *** 15,18 **** --- 15,20 ---- #include "wx/defs.h" + #include "wxlua/include/wxldefs.h" + // ---------------------------------------------------------------------------- // WXDLLIMPEXP macros Index: staktree.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/staktree.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** staktree.h 20 May 2006 19:57:59 -0000 1.8 --- staktree.h 4 Sep 2006 18:07:55 -0000 1.9 *************** *** 15,19 **** #endif - #include "wxlua/include/wxldefs.h" #include "wxluadebug/include/wxluadebugdefs.h" #include "wxluadebug/include/splttree.h" --- 15,18 ---- |
From: John L. <jr...@us...> - 2006-09-04 18:07:58
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11114/wxLua/modules/wxluasocket/include Modified Files: wxluasocketdefs.h Log Message: include wxlua/include/wxldefs.h first Index: wxluasocketdefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocketdefs.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxluasocketdefs.h 21 May 2006 19:17:00 -0000 1.2 --- wxluasocketdefs.h 4 Sep 2006 18:07:55 -0000 1.3 *************** *** 15,18 **** --- 15,20 ---- #include "wx/defs.h" + #include "wxlua/include/wxldefs.h" + // ---------------------------------------------------------------------------- // WXDLLIMPEXP macros |
From: John L. <jr...@us...> - 2006-09-04 17:54:08
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5498/wxLua/modules/wxluadebug/include Modified Files: wxldebug.h Log Message: don't try to return values from void functions... Index: wxldebug.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/include/wxldebug.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxldebug.h 8 Aug 2006 22:54:38 -0000 1.18 --- wxldebug.h 4 Sep 2006 17:54:01 -0000 1.19 *************** *** 72,76 **** }; ! WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(wxLuaDebugDataItem *, wxLuaDebugDataItemArray, WXDLLIMPEXP_WXLUADEBUG ); // ---------------------------------------------------------------------------- --- 72,76 ---- }; ! WX_DEFINE_SORTED_USER_EXPORTED_ARRAY(wxLuaDebugDataItem *, wxLuaDebugDataItemArray, WXDLLIMPEXP_WXLUADEBUG); // ---------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2006-09-04 17:54:06
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv5498/wxLua/modules/wxlua/src Modified Files: wxlstate.cpp Log Message: don't try to return values from void functions... Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** wxlstate.cpp 28 Aug 2006 05:26:20 -0000 1.74 --- wxlstate.cpp 4 Sep 2006 17:54:01 -0000 1.75 *************** *** 2259,2263 **** wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_terror(L, errorMsg); } --- 2259,2263 ---- wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxLua_lua_terror(L, errorMsg); } *************** *** 2266,2270 **** wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_tpushusertag(L, u, tag); } --- 2266,2270 ---- wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxLua_lua_tpushusertag(L, u, tag); } *************** *** 2337,2341 **** wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); lua_State* L = M_WXLSTATEDATA->m_lua_State; ! return wxLua_lua_tsettag(L, tag); } --- 2337,2341 ---- wxCHECK_RET(Ok(), wxT("Invalid wxLuaState")); lua_State* L = M_WXLSTATEDATA->m_lua_State; ! wxLua_lua_tsettag(L, tag); } |
From: John L. <jr...@us...> - 2006-08-28 05:29:26
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv3113/wxLua/docs Modified Files: wxluaref.html Log Message: Updated reference docs Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxluaref.html 9 Jun 2006 03:41:49 -0000 1.8 --- wxluaref.html 28 Aug 2006 05:29:22 -0000 1.9 *************** *** 734,740 **** --- 734,742 ---- // No constructors, virtual base class, use <a href="#wxFrame">wxFrame</a> or wxDialog<br> <br> + <i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* GetDefaultItem() const<br> <a href="#wxIcon">wxIcon</a> GetIcon() const<br> //const wxIconBundle& GetIcons() const<br> <a href="#wxString">wxString</a> GetTitle() const<br> + <i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* GetTmpDefaultItem() const<br> bool IsActive() const<br> void Iconize(bool iconize)<br> *************** *** 744,747 **** --- 746,750 ---- void Maximize(bool maximize)<br> void RequestUserAttention(int flags = wxUSER_ATTENTION_INFO)<br> + <i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* SetDefaultItem(<a href="#wxWindow">wxWindow</a> *win)<br> void SetIcon(const <a href="#wxIcon">wxIcon</a>& icon)<br> //void SetIcons(const wxIconBundle& icons)<br> *************** *** 750,755 **** --- 753,761 ---- bool SetShape(const <a href="#wxRegion">wxRegion</a>& region)<br> virtual void SetTitle(const <a href="#wxString">wxString</a>& title)<br> + <i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* SetTmpDefaultItem(<a href="#wxWindow">wxWindow</a> *win)<br> <i>%win</i> bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL)<br> <br> + <font color=#000077> <i>%wxchkver27</i> <i>%property</i>=DefaultItem, read, write</font><br> + <font color=#000077> <i>%wxchkver27</i> <i>%property</i>=TmpDefaultItem, read, write</font><br> <font color=#000077> <i>%property</i>=Title, read, write</font><br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> *************** *** 3784,3788 **** // Application initialization and termination<br> <br> ! <i>%function</i> bool wxHandleFatalExceptions(bool doIt = true)<br> <i>%function</i> void wxInitAllImageHandlers()<br> <i>%function</i> bool wxSafeYield(<a href="#wxWindow">wxWindow</a>* win = NULL, bool onlyIfNeeded = false)<br> --- 3790,3797 ---- // Application initialization and termination<br> <br> ! <i>%if</i> wxUSE_ON_FATAL_EXCEPTION<br> ! <i>%function</i> bool wxHandleFatalExceptions(bool doIt = true)<br> ! <i>%endif</i> // wxUSE_ON_FATAL_EXCEPTION<br> ! <br> <i>%function</i> void wxInitAllImageHandlers()<br> <i>%function</i> bool wxSafeYield(<a href="#wxWindow">wxWindow</a>* win = NULL, bool onlyIfNeeded = false)<br> *************** *** 3886,3889 **** --- 3895,3899 ---- // Network, user, and OS functions<br> <br> + <i>%if</i> !<i>%wxchkver27</i><br> <font color=#007700><font size=+1>%<b><a name="enum">enum</a></b></font><blockquote> wxUNKNOWN_PLATFORM<br> *************** *** 3923,3926 **** --- 3933,3937 ---- wxDOS<br> </blockquote><i>%endenum</i></font><br> + <i>%endif</i> // !<i>%wxchkver27</i><br> <br> // !<i>%wxchkver27</i> <i>%function</i> long wxGetFreeMemory() FIXME need to add wxLongLong - maybe always return longlong here?<br> *************** *** 4238,4242 **** <font color=#007755><i>%define</i> wxINVERT</font><br> <font color=#007755><i>%define</i> wxMORE</font><br> - <font color=#007755><i>%define</i> wxMOTIF_X</font><br> <font color=#007755><i>%define</i> wxNO</font><br> <font color=#007755><i>%define</i> wxNO_BORDER</font><br> --- 4249,4252 ---- *************** *** 4261,4267 **** <font color=#007755><i>%define</i> wxUNKNOWN_PLATFORM</font><br> //<i>%define</i> wxUSER_COLOURS deprecated use wxNO_3D<br> - <font color=#007755><i>%define</i> wxWINDOWS</font><br> <font color=#007755><i>%define</i> wxWS_EX_VALIDATE_RECURSIVELY</font><br> - <font color=#007755><i>%define</i> wxXVIEW_X</font><br> <font color=#007755><i>%define</i> wxYES</font><br> <font color=#007755><i>%define</i> wxYES_DEFAULT</font><br> --- 4271,4275 ---- *************** *** 6430,6435 **** virtual bool EnumerateFacenames( <a href="#wxFontEncoding">wxFontEncoding</a> encoding = wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false)<br> virtual bool EnumerateEncodings( const <a href="#wxString">wxString</a> &font = "" )<br> ! <a href="#wxArrayString">wxArrayString</a>* GetEncodings()<br> ! <a href="#wxArrayString">wxArrayString</a>* GetFacenames()<br> <br> <font color=#000077> <i>%win</i> <i>%property</i>=Encodings, read</font><br> --- 6438,6446 ---- virtual bool EnumerateFacenames( <a href="#wxFontEncoding">wxFontEncoding</a> encoding = wxFONTENCODING_SYSTEM, bool fixedWidthOnly = false)<br> virtual bool EnumerateEncodings( const <a href="#wxString">wxString</a> &font = "" )<br> ! <br> ! <i>%wxchkver27</i> static <a href="#wxArrayString">wxArrayString</a> GetEncodings()<br> ! <i>%wxchkver27</i> static <a href="#wxArrayString">wxArrayString</a> GetFacenames()<br> ! !<i>%wxchkver27</i> <a href="#wxArrayString">wxArrayString</a>* GetEncodings()<br> ! !<i>%wxchkver27</i> <a href="#wxArrayString">wxArrayString</a>* GetFacenames()<br> <br> <font color=#000077> <i>%win</i> <i>%property</i>=Encodings, read</font><br> *************** *** 8548,8552 **** <br> <font color=#CC3300> // <i>%override</i> [bool, int pagebreak] wxHtmlCell::AdjustPagebreak(int pagebreak)</font><br> ! virtual bool AdjustPagebreak(int pagebreak) // (int* pagebreak)<br> //virtual void Draw(<a href="#wxDC">wxDC</a>& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info)<br> //virtual void DrawInvisible(<a href="#wxDC">wxDC</a>& dc, int x, int y, wxHtmlRenderingInfo& info)<br> --- 8559,8564 ---- <br> <font color=#CC3300> // <i>%override</i> [bool, int pagebreak] wxHtmlCell::AdjustPagebreak(int pagebreak)</font><br> ! !<i>%wxchkver27</i> virtual bool AdjustPagebreak(int pagebreak) // int* known_pagebreaks, int number_of_pages)<br> ! <i>%wxchkver27</i> virtual bool AdjustPagebreak(int pagebreak, <a href="#wxArrayInt">wxArrayInt</a>& known_pagebreaks)<br> //virtual void Draw(<a href="#wxDC">wxDC</a>& dc, int x, int y, int view_y1, int view_y2, wxHtmlRenderingInfo& info)<br> //virtual void DrawInvisible(<a href="#wxDC">wxDC</a>& dc, int x, int y, wxHtmlRenderingInfo& info)<br> *************** *** 8786,8790 **** <a href="#wxColour">wxColour</a> GetLinkColor() const<br> //<a href="#wxFontEncoding">wxFontEncoding</a> GetOutputEncoding() const<br> ! <a href="#wxWindow">wxWindow</a>* GetWindow()<br> <a href="#wxHtmlContainerCell">wxHtmlContainerCell</a>* OpenContainer()<br> void SetActualColor(const <a href="#wxColour">wxColour</a>& clr)<br> --- 8798,8802 ---- <a href="#wxColour">wxColour</a> GetLinkColor() const<br> //<a href="#wxFontEncoding">wxFontEncoding</a> GetOutputEncoding() const<br> ! !<i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* GetWindow()<br> <a href="#wxHtmlContainerCell">wxHtmlContainerCell</a>* OpenContainer()<br> void SetActualColor(const <a href="#wxColour">wxColour</a>& clr)<br> *************** *** 8803,8807 **** void SetLinkColor(const <a href="#wxColour">wxColour</a>& clr)<br> <br> ! <font color=#000077> <i>%property</i>=Window, read</font><br> <font color=#000077> <i>%property</i>=ActualColor, read, write</font><br> <font color=#000077> <i>%property</i>=Align, read, write</font><br> --- 8815,8819 ---- void SetLinkColor(const <a href="#wxColour">wxColour</a>& clr)<br> <br> ! <font color=#000077> !<i>%wxchkver27</i> <i>%property</i>=Window, read</font><br> <font color=#000077> <i>%property</i>=ActualColor, read, write</font><br> <font color=#000077> <i>%property</i>=Align, read, write</font><br> *************** *** 8831,8835 **** void SetSize(int width, int height)<br> void SetHtmlText(const <a href="#wxString">wxString</a>& html, const <a href="#wxString">wxString</a>& basepath = "", bool isdir = true)<br> ! int Render(int x, int y, int from = 0, int dont_render = false)<br> int GetTotalHeight()<br> <br> --- 8843,8848 ---- void SetSize(int width, int height)<br> void SetHtmlText(const <a href="#wxString">wxString</a>& html, const <a href="#wxString">wxString</a>& basepath = "", bool isdir = true)<br> ! !<i>%wxchkver27</i> int Render(int x, int y, int from = 0, int dont_render = false) //, int *known_pagebreaks = NULL, int number_of_pages = 0)<br> ! <i>%wxchkver27</i> int Render(int x, int y, <a href="#wxArrayInt">wxArrayInt</a>& known_pagebreaks, int from = 0, int dont_render = false, int to = INT_MAX);<br> int GetTotalHeight()<br> <br> *************** *** 11795,11799 **** virtual void Enable(bool enable)<br> static <a href="#wxWindow">wxWindow</a>* FindFocus()<br> ! <font color=#CC3333> <i>%overload</i> <i>%rename</i> FindWindow <a href="#wxWindow">wxWindow</a>* FindWindow(long id)</font><br> <font color=#CC3333> <i>%overload</i> <i>%rename</i> FindWindowName <a href="#wxWindow">wxWindow</a>* FindWindow(const <a href="#wxString">wxString</a>& name)</font><br> static <a href="#wxWindow">wxWindow</a>* FindWindowById(long id, <a href="#wxWindow">wxWindow</a>* parent = NULL)<br> --- 11808,11812 ---- virtual void Enable(bool enable)<br> static <a href="#wxWindow">wxWindow</a>* FindFocus()<br> ! <font color=#CC3333> <i>%overload</i> <a href="#wxWindow">wxWindow</a>* FindWindow(long id)</font><br> <font color=#CC3333> <i>%overload</i> <i>%rename</i> FindWindowName <a href="#wxWindow">wxWindow</a>* FindWindow(const <a href="#wxString">wxString</a>& name)</font><br> static <a href="#wxWindow">wxWindow</a>* FindWindowById(long id, <a href="#wxWindow">wxWindow</a>* parent = NULL)<br> *************** *** 11823,11826 **** --- 11836,11840 ---- <a href="#wxCursor">wxCursor</a> GetCursor() const<br> //virtual <a href="#wxVisualAttributes">wxVisualAttributes</a> GetDefaultAttributes() const<br> + !<i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* GetDefaultItem() const<br> <a href="#wxDropTarget">wxDropTarget</a>* GetDropTarget() const<br> <a href="#wxEvtHandler">wxEvtHandler</a>* GetEventHandler() const<br> *************** *** 11839,11843 **** <font color=#CC3300> // <i>%override</i> [int x, int y] GetPositionXY(int x, int y) const - specify dummy x to get overload</font><br> <font color=#CC3333> <i>%overload</i> <i>%rename</i> GetPositionXY virtual void GetPosition(int x=0, int y=0) const // (int* x, int* y) const</font><br> ! <font color=#CC3333> <i>%overload</i> <i>%rename</i> GetPosition <a href="#wxPoint">wxPoint</a> GetPosition() const // FIXME</font><br> virtual <a href="#wxRect">wxRect</a> GetRect() const<br> virtual int GetScrollPos(int orientation)<br> --- 11853,11857 ---- <font color=#CC3300> // <i>%override</i> [int x, int y] GetPositionXY(int x, int y) const - specify dummy x to get overload</font><br> <font color=#CC3333> <i>%overload</i> <i>%rename</i> GetPositionXY virtual void GetPosition(int x=0, int y=0) const // (int* x, int* y) const</font><br> ! <font color=#CC3333> <i>%overload</i> <a href="#wxPoint">wxPoint</a> GetPosition() const</font><br> virtual <a href="#wxRect">wxRect</a> GetRect() const<br> virtual int GetScrollPos(int orientation)<br> *************** *** 11908,11916 **** void SetBestFittingSize(const <a href="#wxSize">wxSize</a>& size = wxDefaultSize)<br> void SetCaret(<a href="#wxCaret">wxCaret</a> *caret) const<br> ! <font color=#CC3333> <i>%overload</i> <i>%rename</i> SetClientSize virtual void SetClientSize(const <a href="#wxSize">wxSize</a>& size)</font><br> <font color=#CC3333> <i>%overload</i> <i>%rename</i> SetClientSizeWH virtual void SetClientSize(int width, int height)</font><br> void SetContainingSizer(<a href="#wxSizer">wxSizer</a>* sizer)<br> virtual void SetCursor(const <a href="#wxCursor">wxCursor</a>& cursor)<br> !<i>%wxchkver26</i> void SetConstraints(<a href="#wxLayoutConstraints">wxLayoutConstraints</a>* constraints)<br> // virtual void SetInitialBestSize(const <a href="#wxSize">wxSize</a>& size) protected<br> void SetMaxSize(const <a href="#wxSize">wxSize</a>& size)<br> --- 11922,11931 ---- void SetBestFittingSize(const <a href="#wxSize">wxSize</a>& size = wxDefaultSize)<br> void SetCaret(<a href="#wxCaret">wxCaret</a> *caret) const<br> ! <font color=#CC3333> <i>%overload</i> virtual void SetClientSize(const <a href="#wxSize">wxSize</a>& size)</font><br> <font color=#CC3333> <i>%overload</i> <i>%rename</i> SetClientSizeWH virtual void SetClientSize(int width, int height)</font><br> void SetContainingSizer(<a href="#wxSizer">wxSizer</a>* sizer)<br> virtual void SetCursor(const <a href="#wxCursor">wxCursor</a>& cursor)<br> !<i>%wxchkver26</i> void SetConstraints(<a href="#wxLayoutConstraints">wxLayoutConstraints</a>* constraints)<br> + !<i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* SetDefaultItem(<a href="#wxWindow">wxWindow</a> *win)<br> // virtual void SetInitialBestSize(const <a href="#wxSize">wxSize</a>& size) protected<br> void SetMaxSize(const <a href="#wxSize">wxSize</a>& size)<br> *************** *** 11972,11975 **** --- 11987,11991 ---- <font color=#000077> <i>%property</i>=ClientSize, read, write</font><br> <font color=#000077> <i>%property</i>=Constraints, read, write</font><br> + <font color=#000077> !<i>%wxchkver27</i> <i>%property</i>=DefaultItem, read, write</font><br> <font color=#000077> <i>%property</i>=DropTarget, read, write</font><br> <font color=#000077> <i>%property</i>=EventHandler, read, write</font><br> *************** *** 12011,12021 **** <br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const <a href="#wxString">wxString</a>& name = "wxPanel")<br> ! <a href="#wxWindow">wxWindow</a>* GetDefaultItem() const<br> void InitDialog()<br> ! void SetDefaultItem(<a href="#wxButton">wxButton</a> *btn)<br> //virtual void SetFocus() - see wxWindow<br> virtual void SetFocusIgnoringChildren()<br> - <br> - <font color=#000077> <i>%property</i>=DefaultItem, read, write</font><br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> --- 12027,12035 ---- <br> bool Create(<a href="#wxWindow">wxWindow</a>* parent, wxWindowID id, const <a href="#wxPoint">wxPoint</a>& pos = wxDefaultPosition, const <a href="#wxSize">wxSize</a>& size = wxDefaultSize, long style = wxTAB_TRAVERSAL, const <a href="#wxString">wxString</a>& name = "wxPanel")<br> ! //!<i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* GetDefaultItem() const - see wxWindow<br> void InitDialog()<br> ! //!<i>%wxchkver27</i> <a href="#wxWindow">wxWindow</a>* SetDefaultItem(<a href="#wxWindow">wxWindow</a> *win) - see wxWindow<br> //virtual void SetFocus() - see wxWindow<br> virtual void SetFocusIgnoringChildren()<br> </blockquote><font color=#AA0000><i>%endclass</i></font><br> <br> *************** *** 13201,13206 **** <font color=#007755><i>%define</i> wxSTC_LEX_BULLANT</font><br> <font color=#007755><i>%define</i> wxSTC_LEX_VBSCRIPT</font><br> ! <font color=#007755><i>%define</i> wxSTC_LEX_ASP</font><br> ! <font color=#007755><i>%define</i> wxSTC_LEX_PHP</font><br> <font color=#007755><i>%define</i> wxSTC_LEX_BAAN</font><br> <font color=#007755><i>%define</i> wxSTC_LEX_MATLAB</font><br> --- 13215,13220 ---- <font color=#007755><i>%define</i> wxSTC_LEX_BULLANT</font><br> <font color=#007755><i>%define</i> wxSTC_LEX_VBSCRIPT</font><br> ! <font color=#007755>!<i>%wxchkver27</i> <i>%define</i> wxSTC_LEX_ASP</font><br> ! <font color=#007755>!<i>%wxchkver27</i> <i>%define</i> wxSTC_LEX_PHP</font><br> <font color=#007755><i>%define</i> wxSTC_LEX_BAAN</font><br> <font color=#007755><i>%define</i> wxSTC_LEX_MATLAB</font><br> |
From: John L. <jr...@us...> - 2006-08-28 05:26:25
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxlua/include Modified Files: internal.h wxlbind.h wxldefs.h wxlstate.h Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxldefs.h 8 Apr 2006 23:05:39 -0000 1.6 --- wxldefs.h 28 Aug 2006 05:26:20 -0000 1.7 *************** *** 21,24 **** --- 21,55 ---- } + //----------------------------------------------------------------------------- + // The version of wxLua - for convenience we use the current version of + // wxWidgets which wxLua is most compatible with. + //----------------------------------------------------------------------------- + + #define WXLUA_MAJOR_VERSION 2 + #define WXLUA_MINOR_VERSION 6 + #define WXLUA_RELEASE_VERSION 3 + #define WXLUA_SUBRELEASE_VERSION 0 + #define WXLUA_VERSION_STRING _T("wxLua 2.6.3") + + // For non-Unix systems (i.e. when building without a configure script), + // users of this component can use the following macro to check if the + // current version is at least major.minor.release + #define wxCHECK_WXLUA_VERSION(major,minor,release) \ + (WXLUA_MAJOR_VERSION > (major) || \ + (WXLUA_MAJOR_VERSION == (major) && WXLUA_MINOR_VERSION > (minor)) || \ + (WXLUA_MAJOR_VERSION == (major) && WXLUA_MINOR_VERSION == (minor) && WXLUA_RELEASE_VERSION >= (release))) + + // ---------------------------------------------------------------------------- + // Strings pushed into lua to determine the platform + // ---------------------------------------------------------------------------- + + #if defined(__WXGTK__) + #define wxPlatformGTK wxVERSION_NUMBER + #elif defined(__WXMSW__) + #define wxPlatformWindows wxVERSION_NUMBER + #elif defined(__WXMAC__) + #define wxPlatformMac wxVERSION_NUMBER + #endif + // ---------------------------------------------------------------------------- // If you're using stdcall in Lua, then override this with Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxlbind.h 9 Jun 2006 03:24:50 -0000 1.22 --- wxlbind.h 28 Aug 2006 05:26:20 -0000 1.23 *************** *** 23,26 **** --- 23,27 ---- class WXDLLIMPEXP_WXLUA wxLuaBinding; + class WXDLLIMPEXP_WXLUA wxLuaState; // ---------------------------------------------------------------------------- *************** *** 39,56 **** // ---------------------------------------------------------------------------- ! enum LuaType // The type of a Lua method { ! LuaDelete = 1, // gc routine ! LuaConstructor = 2, // constructor ! LuaDestructor = 4, // destructor (not used) ! LuaMethod = 8, // class method ! LuaGlobal = 16, // global method (not really related to the class) ! LuaGetProp = 32, ! LuaSetProp = 64 }; typedef int* wxLuaArgTag; // address of class tag ! struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property { LuaType type; // type (one of the above enumeration values) --- 40,57 ---- // ---------------------------------------------------------------------------- ! enum LuaType // The type of a Lua method { ! LuaDelete = 1, // gc routine ! LuaConstructor = 2, // constructor ! LuaDestructor = 4, // destructor (not used) ! LuaMethod = 8, // class method ! LuaGlobal = 16, // global method (not really related to the class) ! LuaGetProp = 32, ! LuaSetProp = 64 }; typedef int* wxLuaArgTag; // address of class tag ! struct WXDLLIMPEXP_WXLUA WXLUAMETHOD // defines a LUA method or property { LuaType type; // type (one of the above enumeration values) *************** *** 72,76 **** extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_LuaFunction; ! struct WXDLLIMPEXP_WXLUA WXLUACLASS // defines a LUA class interface { const char *name; // name of the class --- 73,77 ---- extern WXDLLIMPEXP_DATA_WXLUA(int) s_wxluaarg_LuaFunction; ! struct WXDLLIMPEXP_WXLUA WXLUACLASS // defines a LUA class interface { const char *name; // name of the class *************** *** 84,100 **** }; ! struct WXDLLIMPEXP_WXLUA WXLUADEFINE // defines a wxWidgets define for wxLua { ! const char *name; // name ! double value; // numeric value }; ! struct WXDLLIMPEXP_WXLUA WXLUASTRING // defines a wxWidgets string for wxLua { ! const char *name; // name ! const wxChar *value; // string value }; ! struct WXDLLIMPEXP_WXLUA WXLUAEVENT // defines a wxWidgets Event for wxLua { const int *eventType; // new wxWidgets event type --- 85,101 ---- }; ! struct WXDLLIMPEXP_WXLUA WXLUADEFINE // defines a wxWidgets define for wxLua { ! const char *name; // name ! double value; // numeric value }; ! struct WXDLLIMPEXP_WXLUA WXLUASTRING // defines a wxWidgets string for wxLua { ! const char *name; // name ! const wxChar *value; // string value }; ! struct WXDLLIMPEXP_WXLUA WXLUAEVENT // defines a wxWidgets Event for wxLua { const int *eventType; // new wxWidgets event type *************** *** 103,107 **** }; ! struct WXDLLIMPEXP_WXLUA WXLUAOBJECT // Defines a wxWidgets object or pointer for wxLua { const void *objPtr; // a pointer to the object or pointer --- 104,108 ---- }; ! struct WXDLLIMPEXP_WXLUA WXLUAOBJECT // Defines a wxWidgets object or pointer for wxLua { const void *objPtr; // a pointer to the object or pointer *************** *** 126,132 **** public: wxLuaFunction(WXLUAMETHOD *pMethod, WXLUACLASS *pClass, void *pObject) ! : m_pMethod(pMethod), m_pClass(pClass), m_pObject(pObject) ! { ! } ~wxLuaFunction() {} --- 127,131 ---- public: wxLuaFunction(WXLUAMETHOD *pMethod, WXLUACLASS *pClass, void *pObject) ! : m_pMethod(pMethod), m_pClass(pClass), m_pObject(pObject) {} ~wxLuaFunction() {} *************** *** 134,140 **** int CallMethod(lua_State *L) { ! lua_remove(L, 1); // remove this line to restore calling ! // methods using the dot notation ! // otherwise the colon notation *must* be used. return (*m_pMethod->func)(L); } --- 133,140 ---- int CallMethod(lua_State *L) { ! // remove this line to restore calling methods using the dot notation ! // otherwise the colon notation *must* be used. ! lua_remove(L, 1); ! return (*m_pMethod->func)(L); } *************** *** 149,152 **** --- 149,217 ---- // ---------------------------------------------------------------------------- + // wxLuaObject - wraps a reference to a Lua object reference inside a + // wxObject-derived class so that a Lua object can be used for + // user data, and also with a simple extension by the + // input/output mechanism of the wxValidator classes. + // ---------------------------------------------------------------------------- + + #ifdef GetObject + #undef GetObject + #endif + + enum wxLuaObject_Type + { + wxLUAOBJECT_NONE = 0, // nothing is allocated + wxLUAOBJECT_BOOL = 1, // bool allocated + wxLUAOBJECT_INT = 2, // int allocated + wxLUAOBJECT_STRING = 4, // wxString allocated + wxLUAOBJECT_ARRAYINT = 8 // wxArrayInt allocated + }; + + class WXDLLIMPEXP_WXLUA wxLuaObject : public wxObject + { + public: + wxLuaObject(); + // Constructor that is passed a lua state and a parameter index. + wxLuaObject(lua_State* L, int iParam, int iRef = 1); + // Constructor that is passed a lua state and a parameter index. + wxLuaObject(const wxLuaState& wxlState, int iParam, int iRef = 1); + ~wxLuaObject(); + + // Get the value of the reference object (or a proxy if the object has + // been aliased for a wxValidator class. + bool GetObject(); + // Remove any existing reference and allocate another + void SetObject(int iParam); + // Set the reference and lua state up from a supplied parameter. + void SetObject(lua_State *L, int iParam); + + // The following methods are used by the wxValidator interface + bool *GetBoolPtr(); + int *GetIntPtr(); + wxString *GetStringPtr(); + wxArrayInt *GetArrayPtr(); + + // Return a flag value that indicated whether the + // object is being used by a wxValidator class (else 0). + int GetAllocationFlags() const { return m_alloc_flags; } + bool HasAllocationFlag(wxLuaObject_Type flag) const { return (m_alloc_flags & flag) != 0; } + // Allow the flag value to be manipulated. + void ModifyAllocationFlags(int iValue); + + wxLuaState GetwxLuaState() const; + lua_State* GetLuaState() const; + + private: + wxLuaState* m_wxlState; + int m_iReference; + bool m_bool; + int m_int; + wxString m_string; + wxArrayInt m_arrayInt; + int m_alloc_flags; + DECLARE_DYNAMIC_CLASS(wxLuaObject) + }; + + // ---------------------------------------------------------------------------- // wxLUA_DECLARE_ENCAPSULATION and wxLUA_IMPLEMENT_ENCAPSULATION // Declare the macros used to define and implement classes that *************** *** 154,159 **** // // IMPEXPSYMBOL : similiar to WXDLLIMPEXP_WXBIND, you cannot leave this ! // parameter empty, but you can "#define DUMMYDLLIMPEMP" to nothing ! // 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) --- 219,224 ---- // // 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) *************** *** 173,186 **** private: \ className *m_p##objName; \ - /* Don't put a final semicolon on DECLARE_XXX stuff as borland doesn't like it */ \ DECLARE_ABSTRACT_CLASS(wxObject_##objName) \ }; #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ ! IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject); \ wxObject_##objName::wxObject_##objName(className *p##objName) \ ! :m_p##objName(p##objName) \ ! { \ ! } \ wxObject_##objName::~wxObject_##objName() \ { \ --- 238,249 ---- private: \ className *m_p##objName; \ DECLARE_ABSTRACT_CLASS(wxObject_##objName) \ }; #define wxLUA_IMPLEMENT_ENCAPSULATION(className, objName) \ ! IMPLEMENT_ABSTRACT_CLASS(wxObject_##objName, wxObject) \ wxObject_##objName::wxObject_##objName(className *p##objName) \ ! :m_p##objName(p##objName) {} \ ! \ wxObject_##objName::~wxObject_##objName() \ { \ Index: wxlstate.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlstate.h,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** wxlstate.h 20 Jul 2006 16:16:32 -0000 1.49 --- wxlstate.h 28 Aug 2006 05:26:20 -0000 1.50 *************** *** 69,73 **** return wxString(wxConvUTF8.cMB2WC(luastr), *wxConvCurrent); #endif // wxUSE_UNICODE ! //return wxConvertMB2WX(luastr); // old way that mostly works } --- 69,73 ---- return wxString(wxConvUTF8.cMB2WC(luastr), *wxConvCurrent); #endif // wxUSE_UNICODE ! //return wxConvertMB2WX(luastr); // old way that mostly works } *************** *** 107,110 **** --- 107,191 ---- int LUACALL wxLua_lua_callFunction(lua_State *L); + // ---------------------------------------------------------------------------- + // lua C helper functions - These functions are also part of the wxLuaState + // and you are recommended to use those if the wxLuaState is required. However + // in some cases it may not be necessary to create a wxLuaState and just + // calling these functions will suffice. Only the functions that do not + // require the internal data from the wxLuaState are separated here + // ---------------------------------------------------------------------------- + + // create a reference to the object at index iParam in the Lua index + //WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tinsert(lua_State* L, int iParam) ); + // push onto the top of the stack the object referenced by iReference + //WXDLLIMPEXP_WXLUA wxDEPRECATED( bool LUACALL wxLua_lua_tremove(lua_State* L, int iReference) ); + // Get the number of items in the reference table + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int iReference); + // remove a Lua reference + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tgetn(lua_State* L); + // Display an error message + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_terror(lua_State* L, const char* errorMsg); + // push onto the top of the stack an userdata object containing u using tag to set the metatable + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushusertag(lua_State* L, const void* u, int tag); + // get the tag of the object at index + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_ttag(lua_State* L, int index); + // return the user data in the userdata object at index, if reset is true clear the user data + WXDLLIMPEXP_WXLUA void* LUACALL wxLua_lua_ttouserdata(lua_State* L, int index, bool reset = false); + // allocate a new metatable return its reference + //WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tnewtag(lua_State* L) ); + //WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tnewweaktag(lua_State* L, bool fWeakKey, bool fWeakData) ); + // set the metatable of the object at top of stack from the reference tag + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tsettag(lua_State* L, int tag); + // set a metamethod for the metatable referenced by tag with the supplied name and function. + // if pClass is non-null set the upvalue of the function to the supplied class + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tsettagmethod(lua_State* L, int tag, const char* method, lua_CFunction func, void* pClass = NULL); + // push the wxLuaReferences string onto the stack + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaReferences(lua_State* L); + // push the wxLuaNull string onto the stack + WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaNull(lua_State* L); + + // Helper functions to get numbers, booleans and strings safer + // Validate that the object at the stack index specified is a string, bool, + // enum, or double number object or that the object can be converted it. + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isstringtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isbooleantype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isenumerationtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_isnumbertype(lua_State* L, int iParam); + // After verifying using wxLua_lua_isXXXtype return the value + WXDLLIMPEXP_WXLUA const char* LUACALL wxLua_lua_getstringtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_getbooleantype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA long LUACALL wxLua_lua_getenumerationtype(lua_State* L, int iParam); + WXDLLIMPEXP_WXLUA double LUACALL wxLua_lua_getnumbertype(lua_State* L, int iParam); + + // Helper functions to get/set tables of strings and ints + // Validate that the object at the stack index specified is a table object + // This assumes that each numeric entry in the table is a string or number + // object or can be converted to a string or number. + + // Convert the table at index iParam to a "new" array of wxStrings. + // Return a pointer to the array of wxStrings (you need to delete them) + // and returns the number of strings in the array in count. + WXDLLIMPEXP_WXLUA wxString* LUACALL wxLua_lua_getwxstringarray(lua_State* L, int iParam, int& count); + // Adds the table at index iParam to the wxArrayString + // Return the number of strings added to the array in count. + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxarraystring(lua_State* L, int iParam, wxArrayString& strArray); + // Convert the table at index iParam to a "new" array of const char* strings. + // Return a pointer to the array of strings (you need to delete them) + // returns the number of character strings in the array in count. + WXDLLIMPEXP_WXLUA const char** LUACALL wxLua_lua_getchararray(lua_State* L, int iParam, int& count); + // Convert the table at index iParam to a "new" array of int* numbers. + // Return a pointer to the array of ints (you need to delete them) + // returns the number of ints in the array in count. + WXDLLIMPEXP_WXLUA int* LUACALL wxLua_lua_getintarray(lua_State* L, int iParam, int& count); + // Adds the table at index iParam to the wxArrayInt + // Return the number of strings added to the array in count. + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxarrayint(lua_State* L, int iParam, wxArrayInt& intArray); + + // Creates a lua table and pushes the strings into it, returns the number of items added + // The table is left on the stack + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarraystringtable(lua_State* L, const wxArrayString& strArray); + // Creates a lua table and pushes the ints into it, returns the number of items added + // The table is left on the stack + WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarrayinttable(lua_State* L, const wxArrayInt& intArray); + //---------------------------------------------------------------------------- // wxLuaStateData - the internal data for the wxLuaState. Index: internal.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/internal.h,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** internal.h 30 May 2006 22:56:28 -0000 1.31 --- internal.h 28 Aug 2006 05:26:20 -0000 1.32 *************** *** 14,178 **** #endif - #include "wx/treectrl.h" #include "wxlua/include/wxldefs.h" - #include "wxlua/include/wxlstate.h" - - extern "C" - { - #include "lua/include/lualib.h" - #include "lua/include/lauxlib.h" - } - - // change the name of some defines to avoid clashes - // with standard lua functions. - - //#define wxDataObjectGet wxDataObject::Get - //#define wxDataObjectSet wxDataObject::Set - - #if defined(__WXGTK__) - #define wxPlatformGTK wxVERSION_NUMBER - #elif defined(__WXMSW__) - #define wxPlatformWindows wxVERSION_NUMBER - #elif defined(__WXMAC__) - #define wxPlatformMac wxVERSION_NUMBER - #endif - - // ---------------------------------------------------------------------------- - // wxLuaObject - wraps a reference to a Lua object reference inside a - // wxObject-derived class so that a Lua object can be used for - // user data, and also with a simple extension by the - // input/output mechanism of the wxValidator classes. - // ---------------------------------------------------------------------------- - - #ifdef GetObject - #undef GetObject - #endif - - enum wxLuaObject_Type - { - wxLUAOBJECT_NONE = 0, // nothing is allocated - wxLUAOBJECT_BOOL = 1, // bool allocated - wxLUAOBJECT_INT = 2, // int allocated - wxLUAOBJECT_STRING = 4, // wxString allocated - wxLUAOBJECT_ARRAYINT = 8 // wxArrayInt allocated - }; - - class WXDLLIMPEXP_WXLUA wxLuaObject : public wxObject - { - public: - wxLuaObject(); - // Constructor that is passed a lua state and a parameter index. - wxLuaObject(lua_State* L, int iParam, int iRef = 1); - // Constructor that is passed a lua state and a parameter index. - wxLuaObject(const wxLuaState& wxlState, int iParam, int iRef = 1); - ~wxLuaObject(); - - // Get the value of the reference object (or a proxy if the object has - // been aliased for a wxValidator class. - bool GetObject(); - // Remove any existing reference and allocate another - void SetObject(int iParam); - // Set the reference and lua state up from a supplied parameter. - void SetObject(lua_State *L, int iParam); - - // The following methods are used by the wxValidator interface - bool *GetBoolPtr(); - int *GetIntPtr(); - wxString *GetStringPtr(); - wxArrayInt *GetArrayPtr(); - - // Return a flag value that indicated whether the - // object is being used by a wxValidator class (else 0). - int GetAllocationFlags() const { return m_alloc_flags; } - bool HasAllocationFlag(wxLuaObject_Type flag) const { return (m_alloc_flags & flag) != 0; } - // Allow the flag value to be manipulated. - void ModifyAllocationFlags(int iValue); - - wxLuaState GetwxLuaState() const { return m_wxlState; } - lua_State* GetLuaState() const { return m_wxlState.GetLuaState(); } - - private: - wxLuaState m_wxlState; - int m_iReference; - bool m_bool; - int m_int; - wxString m_string; - wxArrayInt m_arrayInt; - int m_alloc_flags; - DECLARE_DYNAMIC_CLASS(wxLuaObject) - }; - - // ---------------------------------------------------------------------------- - // wxLuaTreeItemData - // ---------------------------------------------------------------------------- - - class WXDLLIMPEXP_WXLUA wxLuaTreeItemData : public wxTreeItemData - { - public: - wxLuaTreeItemData(double value = 0) : m_value(value) {} - double GetValue() const { return m_value; } - void SetValue(double value) { m_value = value; } - - private: - double m_value; - }; - - // ---------------------------------------------------------------------------- - // C lua helper functions - // ---------------------------------------------------------------------------- - - // helper functions to get numbers, booleans and strings safer - WXDLLIMPEXP_WXLUA const char* LUACALL wxLua_lua_getstringtype(lua_State* L, int iParam); - WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_getbooleantype(lua_State* L, int iParam); - WXDLLIMPEXP_WXLUA long LUACALL wxLua_lua_getenumerationtype(lua_State* L, int iParam); - WXDLLIMPEXP_WXLUA double LUACALL wxLua_lua_getnumbertype(lua_State* L, int iParam); - - // convert a parameter which is presumably a table into a string array. - // returns the number of strings in the array in count. - // the return value may need to be deleted. - WXDLLIMPEXP_WXLUA wxString* LUACALL wxLua_lua_getwxstringarray(lua_State* L, int iParam, int& count); - // convert a parameter which is presumably a table into a character pointer array. - // returns the number of character strings in the array in count. - // the return value may need to be deleted. - WXDLLIMPEXP_WXLUA const char** LUACALL wxLua_lua_getchararray(lua_State* L, int iParam, int& count); - // convert a parameter which is presumably a wxArrayString reference a string array. - // returns the table containing the strings on the Lua stack. - // returns the number of items in the table - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarraystringtable(lua_State* L, wxArrayString& files); - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_pushwxarrayinttable(lua_State* L, const wxArrayInt& table); - // convert a parameter which is presumably a table into a integer array. - // returns the number of ints in the array in count. - // the return value may need to be deleted. - WXDLLIMPEXP_WXLUA int* LUACALL wxLua_lua_getintarray(lua_State* L, int iParam, int& count); - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_getwxarrayint(lua_State* L, int iParam, wxArrayInt& intArray); - - // create a reference to the object at index iParam in the Lua index - WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tinsert(lua_State* L, int iParam) ); - // push onto the top of the stack the object referenced by iReference - WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tget(lua_State* L, int iReference); - // remove a Lua reference - WXDLLIMPEXP_WXLUA wxDEPRECATED( bool LUACALL wxLua_lua_tremove(lua_State* L, int iReference) ); - // Get the number of items in the reference table - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tgetn(lua_State* L); - // Display an error message - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_terror(lua_State* L, const char* errorMsg); - // push onto the top of the stack an userdata object containing u using tag to set the metatable - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushusertag(lua_State* L, const void* u, int tag); - // get the tag of the object at index - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_ttag(lua_State* L, int index); - // return the user data in the userdata object at index, if reset is true clear the user data - WXDLLIMPEXP_WXLUA void* LUACALL wxLua_lua_ttouserdata(lua_State* L, int index, bool reset = false); - // allocate a new metatable return its reference - WXDLLIMPEXP_WXLUA wxDEPRECATED( int LUACALL wxLua_lua_tnewtag(lua_State* L) ); - WXDLLIMPEXP_WXLUA int LUACALL wxLua_lua_tnewweaktag(lua_State* L, bool fWeakKey, bool fWeakData); - // set the metatable of the object at top of stack from the reference tag - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tsettag(lua_State* L, int tag); - // set a metamethod for the metatable referenced by tag with the supplied name and function. - // if pClass is non-null set the upvalue of the function to the supplied class - WXDLLIMPEXP_WXLUA bool LUACALL wxLua_lua_tsettagmethod(lua_State* L, int tag, const char* method, lua_CFunction func, void* pClass = NULL); - // push the wxLuaReferences string onto the stack - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaReferences(lua_State* L); - // push the wxLuaNull string onto the stack - WXDLLIMPEXP_WXLUA void LUACALL wxLua_lua_tpushwxLuaNull(lua_State* L); #endif // WX_LUA_INTERNALS_H --- 14,18 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxlua/src Modified Files: Makefile internal.cpp wxlbind.cpp wxlcallb.cpp wxlstate.cpp Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: Makefile =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Makefile 13 May 2006 21:05:36 -0000 1.8 --- Makefile 28 Aug 2006 05:26:20 -0000 1.9 *************** *** 53,57 **** HEADERS = \ ../include/wxldefs.h \ - ../include/internal.h \ ../include/wxlua.h \ ../include/wxlbind.h \ --- 53,56 ---- *************** *** 60,64 **** SOURCES = \ - internal.cpp \ wxlbind.cpp \ wxlcallb.cpp \ --- 59,62 ---- Index: internal.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/internal.cpp,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** internal.cpp 30 May 2006 22:56:29 -0000 1.42 --- internal.cpp 28 Aug 2006 05:26:20 -0000 1.43 *************** *** 29,621 **** #ifndef WX_PRECOMP #include "wx/wx.h" - #include "wx/app.h" #endif #include "wxlua/include/internal.h" - // lua registry table - const char wxLuaReferences[] = "wxLuaReferences"; - const char wxLuaNull[] = "wxNull"; - - wxString GetSourceLine(lua_State *L) - { - wxString msg; - lua_Debug luaDebug = INIT_LUA_DEBUG; - - if (lua_getinfo(L, "Sln", &luaDebug)) - { - wxString name = lua2wx(luaDebug.name); - wxString source = lua2wx(luaDebug.source); - int line = luaDebug.currentline; - - msg = wxString::Format(wxT("%s %s: (%d)"), name.c_str(), source.c_str(), line); - } - - return msg; - } - - //----------------------------------------------------------------------------- - // wxLuaObject - //----------------------------------------------------------------------------- - IMPLEMENT_DYNAMIC_CLASS(wxLuaObject, wxObject) - - wxLuaObject::wxLuaObject() - : m_iReference(LUA_NOREF), - m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE) - { - } - - wxLuaObject::wxLuaObject(lua_State *L, int iParam, int WXUNUSED(iRef)) - : m_wxlState(L), m_bool(false), m_int(0), - m_alloc_flags(wxLUAOBJECT_NONE) - { - m_iReference = m_wxlState.tinsert(iParam); - } - - wxLuaObject::wxLuaObject(const wxLuaState& wxlState, int iParam, int WXUNUSED(iRef)) - : m_wxlState(wxlState), m_bool(false), m_int(0), - m_alloc_flags(wxLUAOBJECT_NONE) - { - // set up the reference - m_iReference = m_wxlState.tinsert(iParam); - } - - wxLuaObject::~wxLuaObject() - { - // If a refererence exists, remove it, don't bother if lua is being closed - if ((m_iReference != LUA_NOREF) && m_wxlState.Ok() && !m_wxlState.IsClosing()) - m_wxlState.tremove(m_iReference); - } - - void wxLuaObject::ModifyAllocationFlags(int iValue) - { - // FIXME - who uses and knows how to use this? - if (iValue & 1) m_alloc_flags &= (~wxLUAOBJECT_BOOL); - if (iValue & 2) m_alloc_flags &= (~wxLUAOBJECT_INT); - if (iValue & 4) m_alloc_flags &= (~wxLUAOBJECT_STRING); - if (iValue & 8) m_alloc_flags &= (~wxLUAOBJECT_ARRAYINT); - - if (iValue & 16) m_alloc_flags |= wxLUAOBJECT_BOOL; - if (iValue & 32) m_alloc_flags |= wxLUAOBJECT_INT; - if (iValue & 64) m_alloc_flags |= wxLUAOBJECT_STRING; - if (iValue & 128) m_alloc_flags |= wxLUAOBJECT_ARRAYINT; - } - - bool wxLuaObject::GetObject() - { - wxCHECK_MSG(m_wxlState.Ok(), false, wxT("Invalid wxLuaState")); - lua_State* L = GetLuaState(); - - if (HasAllocationFlag(wxLUAOBJECT_BOOL)) - { - lua_pushnumber(L, m_bool); - return true; - } - else if (HasAllocationFlag(wxLUAOBJECT_INT)) - { - lua_pushnumber(L, m_int); - return true; - } - else if (HasAllocationFlag(wxLUAOBJECT_STRING)) - { - lua_pushstring(L, wx2lua(m_string)); - return true; - } - else if (HasAllocationFlag(wxLUAOBJECT_ARRAYINT)) - { - lua_newtable(L); - - size_t idx, count = m_arrayInt.Count(); - for (idx = 0; idx < count; ++idx) - { - lua_pushnumber(L, m_arrayInt.Item(idx)); - lua_rawseti(L, -2, idx); - } - return true; - } - - return (m_iReference != LUA_NOREF) && (m_wxlState.tget(m_iReference) != 0); - } - - void wxLuaObject::SetObject(lua_State *L, int iParam) - { - m_wxlState.Create(L); - SetObject(iParam); - } - - void wxLuaObject::SetObject(int iParam) - { - if (m_wxlState.Ok() && (m_iReference != LUA_NOREF)) // FIXME should this error out? - m_wxlState.tremove(m_iReference); - - m_iReference = LUA_NOREF; - - if (m_wxlState.Ok()) - m_iReference = m_wxlState.tinsert(iParam); - } - - bool *wxLuaObject::GetBoolPtr() - { - if (m_wxlState.Ok() && (m_iReference != LUA_NOREF) && GetObject()) - { - m_bool = (lua_tonumber(GetLuaState(), -1) != 0); - m_alloc_flags |= wxLUAOBJECT_BOOL; - } - return &m_bool; - } - - int *wxLuaObject::GetIntPtr() - { - if (m_wxlState.Ok() && (m_iReference != LUA_NOREF) && GetObject()) - { - m_int = (int) lua_tonumber(GetLuaState(), -1); - m_alloc_flags |= wxLUAOBJECT_INT; - } - return &m_int; - } - - wxString *wxLuaObject::GetStringPtr() - { - if (m_wxlState.Ok() && (m_iReference != LUA_NOREF) && GetObject()) - { - m_string = lua2wx(lua_tostring(GetLuaState(), -1)); - m_alloc_flags |= wxLUAOBJECT_STRING; - } - return &m_string; - } - - wxArrayInt *wxLuaObject::GetArrayPtr() - { - if (m_wxlState.Ok() && (m_iReference != LUA_NOREF) && GetObject()) - { - lua_State* L = GetLuaState(); - if (lua_istable(L, -1)) - { - int idx, nItems = luaL_getn(L, -1); - for (idx = 1; idx <= nItems; ++idx) - { - lua_rawgeti(L, -1, idx); - int iValue = (int) wxLua_lua_getnumbertype(L, -1); - m_arrayInt.Add(iValue); - lua_pop(L, 1); - } - } - lua_pop(L, 1); - m_alloc_flags |= wxLUAOBJECT_ARRAYINT; - } - return &m_arrayInt; - } - - // ---------------------------------------------------------------------------- - // txxx functions to make lua calls easier - // ---------------------------------------------------------------------------- - - int LUACALL wxLua_lua_tinsert(lua_State *L, int iParam) - { - wxLuaState wxlState(L); - wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); - return wxlState.tinsert(iParam); - } - - bool LUACALL wxLua_lua_tremove(lua_State *L, int iReference) - { - wxLuaState wxlState(L); - wxCHECK_MSG(wxlState.Ok(), false, wxT("Invalid wxLuaState")); - return wxlState.tremove(iReference); - } - - bool LUACALL wxLua_lua_tget(lua_State *L, int iIndex) - { - if (iIndex == LUA_REFNIL) - { - lua_pushnil(L); - return true; - } - - int iCount; - bool ret = false; // false indicates index out of range - - wxLua_lua_tpushwxLuaReferences(L); - lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) - - lua_pushliteral(L, "n"); // push 'n' as key - lua_rawget(L, -2); // pop key, push result - iCount = (int) lua_tonumber(L, -1); // get result value - lua_pop(L, 1); // pop result - - if (iIndex > 0 && iIndex <= iCount) // ensure in range - { - lua_rawgeti(L, -1, iIndex); // push result - ret = true; - } - else - lua_pushnil(L); // push result - - lua_remove(L, -2); // balance stack - - return ret; - } - - int LUACALL wxLua_lua_tgetn(lua_State *L) - { - wxLua_lua_tpushwxLuaReferences(L); - lua_rawget(L, LUA_REGISTRYINDEX); // pop key, push result (refs table) - - lua_pushliteral(L, "n"); - lua_rawget(L, -2); - - int n; - if (lua_isnumber(L, -1)) - { - n = (int) lua_tonumber(L, -1); - } - else - { - /* must count elements */ - n = 0; - for (;;) - { - lua_rawgeti(L, -2, ++n); - bool isNil = lua_isnil(L, -1); - lua_pop(L, 1); - if (isNil) - break; - } - --n; - } - lua_pop(L, 2); - return n; - } - - void LUACALL wxLua_lua_terror(lua_State *L, const char *errorMsg) - { - lua_pushstring(L, errorMsg); - lua_error(L); - } - - void LUACALL wxLua_lua_tpushusertag(lua_State *L, const void *u, int tag) - { - const void **ptr = (const void **) lua_newuserdata(L, sizeof(void *)); - if (ptr != NULL) - { - *ptr = u; - if ((tag != TLUA_NOTAG) && wxLua_lua_tget(L, tag)) - { - if (lua_setmetatable(L, -2) == 0) - wxLua_lua_terror(L, "wxLua: Unable to set metatable"); - } - } - else - wxLua_lua_terror(L, "wxLua: Out of memory"); - } - - void LUACALL wxLua_lua_tsettag(lua_State *L, int tag) - { - if ((tag != TLUA_NOTAG) && wxLua_lua_tget(L, tag)) - { - if (!lua_setmetatable(L, -2)) - wxLua_lua_terror(L, "wxLua: Unable to set metatable"); - } - } - - int LUACALL wxLua_lua_ttag(lua_State *L, int index) - { - int tag = TLUA_NOTAG; - if (lua_getmetatable(L, index) != 0) - { - lua_pushliteral(L, "tag"); - lua_rawget(L, -2); - if (lua_isnumber(L, -1)) - { - tag = (int) lua_tonumber(L, -1); - } - lua_pop(L, 2); - } - return tag; - } - - void * LUACALL wxLua_lua_ttouserdata(lua_State *L, int index, bool reset /* = false*/) - { - void *pdata = NULL; - void **ptr = (void **) lua_touserdata(L, index); - if (ptr != NULL) - { - pdata = *ptr; - if (reset) - *ptr = NULL; - } - return pdata; - } - - int LUACALL wxLua_lua_tnewtag(lua_State *L) - { - wxLuaState wxlState(L); - wxCHECK_MSG(wxlState.Ok(), 0, wxT("Invalid wxLuaState")); - return wxlState.tnewtag(); - } - - bool LUACALL wxLua_lua_tsettagmethod(lua_State *L, int tag, const char *method, lua_CFunction func, void *pClass /* = NULL*/) - { - if ((tag != TLUA_NOTAG) && wxLua_lua_tget(L, tag)) - { - if (pClass != NULL) - { - lua_pushstring(L, method); - lua_pushlightuserdata(L, pClass); - lua_pushcclosure(L, func, 1); - } - else - { - lua_pushstring(L, method); - lua_pushcclosure(L, func, 0); - } - lua_rawset(L, -3); - lua_pop(L, 1); - return true; - } - return false; - } - - void LUACALL wxLua_lua_tpushwxLuaReferences(lua_State *L) - { - lua_pushlstring(L, wxLuaReferences, sizeof(wxLuaReferences)-1); - // FIXME this used to be #define tpushliteralstring(str, sizeof(str)-1) - //lua_pushstring(L, wxLuaReferences); //, strlen(wxLuaReferences)-1); - } - - void LUACALL wxLua_lua_tpushwxLuaNull(lua_State *L) - { - lua_pushlstring(L, wxLuaNull, sizeof(wxLuaNull)-1); - //lua_pushstring(L, wxLuaNull); //, strlen(wxLuaNull)-1); - } - - - // Validate that the object at the stack index specified is a string object - // or that the object can be converted to a string. - // Return the string. - const char * LUACALL wxLua_lua_getstringtype(lua_State *L, int iParam) - { - switch(lua_type(L, iParam)) - { - case LUA_TNIL: - case LUA_TSTRING: - case LUA_TNUMBER: - break; - default: - wxLua_lua_terror(L, wx2lua(wxString::Format(_("wxLua: Expected string for parameter %d."), iParam))); - break; - } - - return lua_tostring(L, iParam); - } - - // Validate that the object at the stack index specified is a boolean object - // or that the object can be converted to a boolean. - // Return the boolean. - bool LUACALL wxLua_lua_getbooleantype(lua_State *L, int iParam) - { - switch(lua_type(L, iParam)) - { - case LUA_TNIL: - case LUA_TNUMBER: - case LUA_TBOOLEAN: - /*OK*/ - break; - default: - wxLua_lua_terror(L, wx2lua(wxString::Format(_("wxLua: Expected boolean for parameter %d."), iParam))); - break; - } - - int num = (int) lua_toboolean(L, iParam); - - // This test is not reliable false == 0 but true !=0 not true == 1 - // The paramter can be the result of evaluating an expression as well as one of the two - // boolean constants. - // if (!(num == true) || !(num == false)) - // terror(L, wxString::Format("wxLua: Expected 'true' or 'false' for parameter %d.", iParam)); - - return num ? true : false; - } - - // Validate that the object at the stack index specified is a enumeration object - // or that the object can be converted to a enumeration. - // Return the enumeration value. - long LUACALL wxLua_lua_getenumerationtype(lua_State *L, int iParam) - { - switch(lua_type(L, iParam)) - { - //case LUA_TNIL: - //case LUA_TSTRING: - case LUA_TNUMBER: - /*OK*/ - break; - default: - wxLua_lua_terror(L, wx2lua(wxString::Format(_("wxLua: Expected enum number for parameter %d."), iParam))); - break; - } - - return (long) lua_tonumber(L, iParam); - } - - // Validate that the object at the stack index specified is a enumeration object - // or that the object can be converted to a enumeration. - // Return the enumeration value. - double LUACALL wxLua_lua_getnumbertype(lua_State *L, int iParam) - { - switch(lua_type(L, iParam)) - { - case LUA_TNIL: - case LUA_TSTRING: - case LUA_TNUMBER: - case LUA_TBOOLEAN: - /*OK*/ - break; - default: - wxLua_lua_terror(L, wx2lua(wxString::Format(_("wxLua: Expected number for parameter %d."), iParam))); - break; - } - - return lua_tonumber(L, iParam); - } - - // Validate that the object at the stack index specified is a table object - // Convert the table to an array of wxStrings. This assumes that each - // numeric entry in the table is a string object or can be converted to a string - // Return a pointer to the array of wxStrings. - wxString * LUACALL wxLua_lua_getwxstringarray(lua_State *L, int iParam, int &count) - { - int idx; - wxString *pItems = NULL; - - count = 0; - - if (lua_istable(L, iParam)) - { - int nItems = luaL_getn(L, iParam); - if (nItems > 0) - pItems = new wxString[nItems]; - if (pItems != NULL) - { - for (idx = 1; idx <= nItems; ++idx) - { - lua_rawgeti(L, iParam, idx); - const char *pString = wxLua_lua_getstringtype(L, -1); - if (pString != NULL) - pItems[count++] = lua2wx(pString); - lua_pop(L, 1); - } - } - } - return pItems; - } - - // Convert a wxArrayString object to an table of strings - int LUACALL wxLua_lua_pushwxarraystringtable(lua_State *L, wxArrayString &files) - { - lua_newtable(L); - - size_t idx, count = files.Count(); - for (idx = 0; idx < count; ++idx) - { - const wxString &item = files.Item(idx); - lua_pushstring(L, wx2lua(item)); - lua_rawseti(L, -2, idx + 1); - } - return idx; - } - - int LUACALL wxLua_lua_pushwxarrayinttable(lua_State *L, const wxArrayInt &table) - { - lua_newtable(L); - - size_t idx, count = table.Count(); - for (idx = 0; idx < count; ++idx) - { - int item = table.Item(idx); - lua_pushnumber(L, item); - lua_rawseti(L, -2, idx + 1); - } - return idx; - } - - // Validate that the object at the stack index specified is a table object - // Convert the table to an array of ints. This assumes that each - // numeric entry in the table is a numeric object or can be converted to a number - // Return a pointer to the array of ints. - int * LUACALL wxLua_lua_getintarray(lua_State *L, int iParam, int &count) - { - int idx; - int *pItems = NULL; - - count = 0; - - if (lua_istable(L, iParam)) - { - int nItems = luaL_getn(L, iParam); - if (nItems > 0) - pItems = new int[nItems]; - if (pItems != NULL) - { - for (idx = 1; idx <= nItems; ++idx) - { - lua_rawgeti(L, iParam, idx); - int iValue = (int) wxLua_lua_getnumbertype(L, -1); - pItems[count++] = iValue; - lua_pop(L, 1); - } - } - } - return pItems; - } - - int LUACALL wxLua_lua_getwxarrayint(lua_State *L, int iParam, wxArrayInt &intArray) - { - int idx, count = 0; - intArray.Clear(); - - if (lua_istable(L, iParam)) - { - int nItems = luaL_getn(L, iParam); - if (nItems > 0) - { - for (idx = 1; idx <= nItems; ++idx) - { - lua_rawgeti(L, iParam, idx); - if (lua_isnumber(L, -1)) - { - int iValue = (int) wxLua_lua_getnumbertype(L, -1); - intArray.Add(iValue); - ++count; - } - lua_pop(L, 1); - } - } - } - return count; - } - - const char ** LUACALL wxLua_lua_getchararray(lua_State *L, int iParam, int &count) - { - int idx; - const char **pItems = NULL; - - count = 0; - - if (lua_istable(L, iParam)) - { - int nItems = luaL_getn(L, iParam); - if (nItems > 0) - pItems = new const char *[nItems]; - if (pItems != NULL) - { - for (idx = 1; idx <= nItems; ++idx) - { - lua_rawgeti(L, iParam, idx); - const char *pValue = wxLua_lua_getstringtype(L, -1); - pItems[count++] = pValue; - lua_pop(L, 1); - } - } - } - return pItems; - } --- 29,34 ---- Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** wxlstate.cpp 21 Jun 2006 03:58:03 -0000 1.73 --- wxlstate.cpp 28 Aug 2006 05:26:20 -0000 1.74 *************** *** 42,46 **** #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlcallb.h" - #include "wxlua/include/internal.h" #include "wx/tokenzr.h" --- 42,45 ---- *************** *** 48,52 **** extern int wxLuaClassListCompareByTag(const void *p1, const void *p2); // wxlbind.cpp [...1221 lines suppressed...] } ! wxString wxLuaState::lua_TypeName(int type) const { wxCHECK_MSG(Ok(), wxEmptyString, wxT("Invalid wxLuaState")); ! return lua2wx(lua_typename(M_WXLSTATEDATA->m_lua_State, type)); } *************** *** 3529,3533 **** wxLuaEvent::wxLuaEvent(wxEventType commandType, wxWindowID id, const wxLuaState& wxlState) ! : wxNotifyEvent(commandType, id), m_wxlState(wxlState), m_debug_hook_break(false), m_lua_Debug(NULL) --- 3695,3699 ---- wxLuaEvent::wxLuaEvent(wxEventType commandType, wxWindowID id, const wxLuaState& wxlState) ! :wxNotifyEvent(commandType, id), m_wxlState(wxlState), m_debug_hook_break(false), m_lua_Debug(NULL) Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** wxlbind.cpp 21 Jun 2006 03:58:03 -0000 1.37 --- wxlbind.cpp 28 Aug 2006 05:26:20 -0000 1.38 *************** *** 23,27 **** #include "wxlua/include/wxlbind.h" #include "wxlua/include/wxlstate.h" - #include "wxlua/include/internal.h" #include "wx/listimpl.cpp" --- 23,26 ---- *************** *** 45,48 **** --- 44,218 ---- WX_DEFINE_LIST(wxLuaBindingList); + //----------------------------------------------------------------------------- + // wxLuaObject + //----------------------------------------------------------------------------- + IMPLEMENT_DYNAMIC_CLASS(wxLuaObject, wxObject) + + wxLuaObject::wxLuaObject() + : m_wxlState(NULL), m_iReference(LUA_NOREF), + m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE) + { + m_wxlState = new wxLuaState(false); // always created even if invalid + } + + wxLuaObject::wxLuaObject(lua_State *L, int iParam, int WXUNUSED(iRef)) + : m_wxlState(NULL), + m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE) + { + m_wxlState = new wxLuaState(L); + m_iReference = m_wxlState->tinsert(iParam); + } + + wxLuaObject::wxLuaObject(const wxLuaState& wxlState, int iParam, int WXUNUSED(iRef)) + : m_wxlState(NULL), + m_bool(false), m_int(0), m_alloc_flags(wxLUAOBJECT_NONE) + { + m_wxlState = new wxLuaState(wxlState); + // set up the reference + m_iReference = m_wxlState->tinsert(iParam); + } + + wxLuaObject::~wxLuaObject() + { + // If a refererence exists, remove it, don't bother if lua is being closed + if ((m_iReference != LUA_NOREF) && m_wxlState->Ok() && !m_wxlState->IsClosing()) + m_wxlState->tremove(m_iReference); + + delete m_wxlState; + } + + wxLuaState wxLuaObject::GetwxLuaState() const + { + return (m_wxlState != NULL) ? *m_wxlState : wxNullLuaState; + } + lua_State* wxLuaObject::GetLuaState() const + { + return GetwxLuaState().GetLuaState(); + } + + void wxLuaObject::ModifyAllocationFlags(int iValue) + { + // FIXME - who uses and knows how to use this? + if (iValue & 1) m_alloc_flags &= (~wxLUAOBJECT_BOOL); + if (iValue & 2) m_alloc_flags &= (~wxLUAOBJECT_INT); + if (iValue & 4) m_alloc_flags &= (~wxLUAOBJECT_STRING); + if (iValue & 8) m_alloc_flags &= (~wxLUAOBJECT_ARRAYINT); + + if (iValue & 16) m_alloc_flags |= wxLUAOBJECT_BOOL; + if (iValue & 32) m_alloc_flags |= wxLUAOBJECT_INT; + if (iValue & 64) m_alloc_flags |= wxLUAOBJECT_STRING; + if (iValue & 128) m_alloc_flags |= wxLUAOBJECT_ARRAYINT; + } + + bool wxLuaObject::GetObject() + { + lua_State* L = GetLuaState(); + wxCHECK_MSG(L, false, wxT("Invalid wxLuaState")); + + if (HasAllocationFlag(wxLUAOBJECT_BOOL)) + { + lua_pushnumber(L, m_bool); + return true; + } + else if (HasAllocationFlag(wxLUAOBJECT_INT)) + { + lua_pushnumber(L, m_int); + return true; + } + else if (HasAllocationFlag(wxLUAOBJECT_STRING)) + { + lua_pushstring(L, wx2lua(m_string)); + return true; + } + else if (HasAllocationFlag(wxLUAOBJECT_ARRAYINT)) + { + lua_newtable(L); + + size_t idx, count = m_arrayInt.Count(); + for (idx = 0; idx < count; ++idx) + { + lua_pushnumber(L, m_arrayInt.Item(idx)); + lua_rawseti(L, -2, idx); + } + return true; + } + + return (m_iReference != LUA_NOREF) && (m_wxlState->tget(m_iReference) != 0); + } + + void wxLuaObject::SetObject(lua_State *L, int iParam) + { + wxCHECK_RET(L, wxT("Invalid lua_State")); + m_wxlState->Create(L); + SetObject(iParam); + } + + void wxLuaObject::SetObject(int iParam) + { + if (m_wxlState->Ok() && (m_iReference != LUA_NOREF)) // FIXME should this error out? + m_wxlState->tremove(m_iReference); + + m_iReference = LUA_NOREF; + + if (m_wxlState->Ok()) + m_iReference = m_wxlState->tinsert(iParam); + } + + bool *wxLuaObject::GetBoolPtr() + { + if (m_wxlState->Ok() && (m_iReference != LUA_NOREF) && GetObject()) + { + m_bool = (lua_tonumber(GetLuaState(), -1) != 0); + m_alloc_flags |= wxLUAOBJECT_BOOL; + } + return &m_bool; + } + + int *wxLuaObject::GetIntPtr() + { + if (m_wxlState->Ok() && (m_iReference != LUA_NOREF) && GetObject()) + { + m_int = (int) lua_tonumber(GetLuaState(), -1); + m_alloc_flags |= wxLUAOBJECT_INT; + } + return &m_int; + } + + wxString *wxLuaObject::GetStringPtr() + { + if (m_wxlState->Ok() && (m_iReference != LUA_NOREF) && GetObject()) + { + m_string = lua2wx(lua_tostring(GetLuaState(), -1)); + m_alloc_flags |= wxLUAOBJECT_STRING; + } + return &m_string; + } + + wxArrayInt *wxLuaObject::GetArrayPtr() + { + if (m_wxlState->Ok() && (m_iReference != LUA_NOREF) && GetObject()) + { + lua_State* L = GetLuaState(); + if (lua_istable(L, -1)) + { + int idx, nItems = luaL_getn(L, -1); + for (idx = 1; idx <= nItems; ++idx) + { + lua_rawgeti(L, -1, idx); + int iValue = (int) m_wxlState->GetNumberType(-1); + m_arrayInt.Add(iValue); + lua_pop(L, 1); + } + } + lua_pop(L, 1); + m_alloc_flags |= wxLUAOBJECT_ARRAYINT; + } + return &m_arrayInt; + } + + // ---------------------------------------------------------------------------- + // wxLua_AddToTrackedMemoryList + // ---------------------------------------------------------------------------- + void LUACALL wxLua_AddToTrackedMemoryList(wxLuaState& wxlState, wxObject *pObject) { *************** *** 50,53 **** --- 220,227 ---- } + // ---------------------------------------------------------------------------- + // wxLua_lua_tableErrorHandler + // ---------------------------------------------------------------------------- + static int LUACALL wxLua_lua_tableErrorHandler(lua_State *L) { *************** *** 56,60 **** } ! // if the class defines a gc function, then call it. int LUACALL wxLua_lua_garbageCollect(lua_State *L) { --- 230,237 ---- } ! // ---------------------------------------------------------------------------- ! // wxLua_lua_garbageCollect - if the class defines a gc function, then call it. ! // ---------------------------------------------------------------------------- ! int LUACALL wxLua_lua_garbageCollect(lua_State *L) { *************** *** 91,96 **** //else wxPrintf(wxT("wxLua_lua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); ! int iMethod; ! for (iMethod = 0; iMethod < pClass->num_methods; ++iMethod) { WXLUAMETHOD *pMethod = pClass->methods + iMethod; --- 268,273 ---- //else wxPrintf(wxT("wxLua_lua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); ! int iMethod, method_count = pClass->num_methods; ! for (iMethod = 0; iMethod < method_count; ++iMethod) { WXLUAMETHOD *pMethod = pClass->methods + iMethod; *************** *** 110,115 **** } ! static const char baseString[] = "base_"; ! // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (gettable tag method). --- 287,293 ---- } ! // ---------------------------------------------------------------------------- ! // wxLua_lua_getTableFunc ! // // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (gettable tag method). *************** *** 118,121 **** --- 296,303 ---- // will be called to invoke the function. // todo: Handling of properties + // ---------------------------------------------------------------------------- + + static const char baseString[] = "base_"; + int LUACALL wxLua_lua_getTableFunc(lua_State *L) { *************** *** 195,202 **** } ! // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (settable tag method). // todo: Handling of properties int LUACALL wxLua_lua_setTableFunc(lua_State *L) { --- 377,388 ---- } ! // ---------------------------------------------------------------------------- ! // wxLua_lua_setTableFunc ! // // Called by LUA to find the method that corresponds to a given method name. // The class to lookup is in an upvalue. (settable tag method). // todo: Handling of properties + // ---------------------------------------------------------------------------- + int LUACALL wxLua_lua_setTableFunc(lua_State *L) { *************** *** 264,267 **** --- 450,454 ---- // ---------------------------------------------------------------------------- // Function to compare to events by eventType + // ---------------------------------------------------------------------------- int wxLuaEventListCompareFn(const void *p1, const void *p2) { *************** *** 269,273 **** --- 456,462 ---- } + // ---------------------------------------------------------------------------- // Function to compare the class tag of two classes + // ---------------------------------------------------------------------------- int wxLuaClassListCompareByTag(const void *p1, const void *p2) { *************** *** 385,391 **** if ((binding->GetLuaNamespace() == m_nameSpace) && (binding->m_wxLuaTable >= 0)) - { namedBinding = binding; - } } --- 574,578 ---- *************** *** 406,410 **** void LUACALL wxLuaBinding::RegisterGeneratedClasses(const wxLuaState& wxlState_, int tableOffset, bool registerTypes) { ! static const luaL_reg funcTable[] = { {"__gc", wxLua_lua_garbageCollect }, --- 593,597 ---- void LUACALL wxLuaBinding::RegisterGeneratedClasses(const wxLuaState& wxlState_, int tableOffset, bool registerTypes) { ! static const luaL_reg s_funcTable[] = { {"__gc", wxLua_lua_garbageCollect }, *************** *** 412,416 **** {"__newindex", wxLua_lua_setTableFunc } }; ! static const unsigned funcCount = sizeof(funcTable)/sizeof(funcTable[0]); wxLuaState wxlState(wxlState_); --- 599,603 ---- {"__newindex", wxLua_lua_setTableFunc } }; ! static const size_t s_funcCount = sizeof(s_funcTable)/sizeof(s_funcTable[0]); wxLuaState wxlState(wxlState_); *************** *** 420,428 **** m_startTag = wxlState.tnewtag(); - size_t iClass = 0; int iTag = m_startTag; // install the classes, functions and methods ! for (iClass = 0; iClass < m_classCount; ++iClass, iTag = (registerTypes ? wxlState.tnewtag() : iTag + 1)) { --- 607,614 ---- m_startTag = wxlState.tnewtag(); int iTag = m_startTag; // install the classes, functions and methods ! for (size_t iClass = 0; iClass < m_classCount; ++iClass, iTag = (registerTypes ? wxlState.tnewtag() : iTag + 1)) { *************** *** 430,439 **** *pClass->class_tag = iTag; ! for (size_t iFunction = 0; iFunction < funcCount; iFunction++) { ! wxlState.tsettagmethod(iTag, funcTable[iFunction].name, funcTable[iFunction].func, (void *) pClass); } ! for (int iMethod = 0; iMethod < pClass->num_methods; ++iMethod) { WXLUAMETHOD *pMethod = pClass->methods + iMethod; --- 616,626 ---- *pClass->class_tag = iTag; ! for (size_t iFunction = 0; iFunction < s_funcCount; iFunction++) { ! wxlState.tsettagmethod(iTag, s_funcTable[iFunction].name, s_funcTable[iFunction].func, (void *) pClass); } ! int iMethod, method_count = pClass->num_methods; ! for (iMethod = 0; iMethod < method_count; ++iMethod) { WXLUAMETHOD *pMethod = pClass->methods + iMethod; *************** *** 446,449 **** --- 633,637 ---- } } + m_lastTag = iTag; Index: wxlcallb.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlcallb.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxlcallb.cpp 25 May 2006 03:55:23 -0000 1.18 --- wxlcallb.cpp 28 Aug 2006 05:26:20 -0000 1.19 *************** *** 23,27 **** #endif // WX_PRECOMP - #include "wxlua/include/internal.h" #include "wxlua/include/wxlcallb.h" --- 23,26 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/bindings/wxwidgets Modified Files: wx_rules.lua Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wx_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_rules.lua,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wx_rules.lua 8 Aug 2006 22:54:37 -0000 1.22 --- wx_rules.lua 28 Aug 2006 05:26:20 -0000 1.23 *************** *** 73,81 **** -- This code will be place directly after any #includes at the top of the file hook_cpp_binding_header_includes = ! "#include \"wx/defs.h\"\n".. ! "#include \"wxluasetup.h\"\n".. ! "#include \"wxbind/include/wxbinddefs.h\"\n".. ! "#ifndef wxUSE_WAVE\n#define wxUSE_WAVE 0\n#endif\n".. ! "#ifndef wxUSE_SOUND\n#define wxUSE_SOUND 0\n#endif\n" ------------------------------------------------------------------------------- --- 73,104 ---- -- This code will be place directly after any #includes at the top of the file hook_cpp_binding_header_includes = ! [[ ! #include "wx/defs.h" ! #include "wxluasetup.h" ! #include "wxbind/include/wxbinddefs.h" ! #ifndef wxUSE_WAVE ! #define wxUSE_WAVE 0 ! #endif // wxUSE_WAVE ! #ifndef wxUSE_SOUND ! #define wxUSE_SOUND 0 ! #endif // wxUSE_SOUND ! ! #include "wx/treectrl.h" ! ! // ---------------------------------------------------------------------------- ! // wxLuaTreeItemData - our treeitem data that allows us to get/set an index ! // ---------------------------------------------------------------------------- ! class WXDLLIMPEXP_WXLUA wxLuaTreeItemData : public wxTreeItemData ! { ! public: ! wxLuaTreeItemData(double value = 0) : m_value(value) {} ! double GetValue() const { return m_value; } ! void SetValue(double value) { m_value = value; } ! ! private: ! double m_value; ! }; ! ! ]] ------------------------------------------------------------------------------- *************** *** 83,129 **** -- the single hook_cpp_binding_filename generated cpp file or "" for none hook_cpp_binding_source_includes = ! "// wxWidgets >= 2.7 doesn't have static versions of stock GDI objects anymore\n".. ! "wxColour* wxLua_wxBLACK = NULL;\n".. ! "wxColour* wxLua_wxWHITE = NULL;\n".. ! "wxColour* wxLua_wxRED = NULL;\n".. ! "wxColour* wxLua_wxBLUE = NULL;\n".. ! "wxColour* wxLua_wxGREEN = NULL;\n".. ! "wxColour* wxLua_wxCYAN = NULL;\n".. ! "wxColour* wxLua_wxLIGHT_GREY = NULL;\n".. ! "wxPen* wxLua_wxRED_PEN = NULL;\n".. ! "wxPen* wxLua_wxCYAN_PEN = NULL;\n".. ! "wxPen* wxLua_wxGREEN_PEN = NULL;\n".. ! "wxPen* wxLua_wxBLACK_PEN = NULL;\n".. ! "wxPen* wxLua_wxWHITE_PEN = NULL;\n".. ! "wxPen* wxLua_wxTRANSPARENT_PEN = NULL;\n".. ! "wxPen* wxLua_wxBLACK_DASHED_PEN = NULL;\n".. ! "wxPen* wxLua_wxGREY_PEN = NULL;\n".. ! "wxPen* wxLua_wxMEDIUM_GREY_PEN = NULL;\n".. ! "wxPen* wxLua_wxLIGHT_GREY_PEN = NULL;\n".. ! "wxBrush* wxLua_wxBLUE_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxGREEN_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxWHITE_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxBLACK_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxGREY_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxMEDIUM_GREY_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxLIGHT_GREY_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxTRANSPARENT_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxCYAN_BRUSH = NULL;\n".. ! "wxBrush* wxLua_wxRED_BRUSH = NULL;\n".. ! "wxFont* wxLua_wxNORMAL_FONT = NULL;\n".. ! "wxFont* wxLua_wxSMALL_FONT = NULL;\n".. ! "wxFont* wxLua_wxITALIC_FONT = NULL;\n".. ! "wxFont* wxLua_wxSWISS_FONT = NULL;\n".. ! "wxCursor* wxLua_wxSTANDARD_CURSOR = NULL;\n".. ! "wxCursor* wxLua_wxHOURGLASS_CURSOR = NULL;\n".. ! "wxCursor* wxLua_wxCROSS_CURSOR = NULL;\n".. ! "\n".. ! "#if defined(__MINGW32__) || defined(__GNUWIN32__)\n".. ! " // FIX: \"internal compiler error: output_operand: invalid expression as operand\"\n".. ! " const wxPoint wxDefaultPositionHack = wxDefaultPosition;\n".. ! " const wxSize wxDefaultSizeHack = wxDefaultSize;\n".. ! " #define wxDefaultPosition wxDefaultPositionHack\n".. ! " #define wxDefaultSize wxDefaultSizeHack\n".. ! "#endif //__MINGW32__ \n" --============================================================================= --- 106,154 ---- -- the single hook_cpp_binding_filename generated cpp file or "" for none hook_cpp_binding_source_includes = ! [[ ! // wxWidgets >= 2.7 doesn't have static versions of stock GDI objects anymore ! wxColour* wxLua_wxBLACK = NULL; ! wxColour* wxLua_wxWHITE = NULL; ! wxColour* wxLua_wxRED = NULL; ! wxColour* wxLua_wxBLUE = NULL; ! wxColour* wxLua_wxGREEN = NULL; ! wxColour* wxLua_wxCYAN = NULL; ! wxColour* wxLua_wxLIGHT_GREY = NULL; ! wxPen* wxLua_wxRED_PEN = NULL; ! wxPen* wxLua_wxCYAN_PEN = NULL; ! wxPen* wxLua_wxGREEN_PEN = NULL; ! wxPen* wxLua_wxBLACK_PEN = NULL; ! wxPen* wxLua_wxWHITE_PEN = NULL; ! wxPen* wxLua_wxTRANSPARENT_PEN = NULL; ! wxPen* wxLua_wxBLACK_DASHED_PEN = NULL; ! wxPen* wxLua_wxGREY_PEN = NULL; ! wxPen* wxLua_wxMEDIUM_GREY_PEN = NULL; ! wxPen* wxLua_wxLIGHT_GREY_PEN = NULL; ! wxBrush* wxLua_wxBLUE_BRUSH = NULL; ! wxBrush* wxLua_wxGREEN_BRUSH = NULL; ! wxBrush* wxLua_wxWHITE_BRUSH = NULL; ! wxBrush* wxLua_wxBLACK_BRUSH = NULL; ! wxBrush* wxLua_wxGREY_BRUSH = NULL; ! wxBrush* wxLua_wxMEDIUM_GREY_BRUSH = NULL; ! wxBrush* wxLua_wxLIGHT_GREY_BRUSH = NULL; ! wxBrush* wxLua_wxTRANSPARENT_BRUSH = NULL; ! wxBrush* wxLua_wxCYAN_BRUSH = NULL; ! wxBrush* wxLua_wxRED_BRUSH = NULL; ! wxFont* wxLua_wxNORMAL_FONT = NULL; ! wxFont* wxLua_wxSMALL_FONT = NULL; ! wxFont* wxLua_wxITALIC_FONT = NULL; ! wxFont* wxLua_wxSWISS_FONT = NULL; ! wxCursor* wxLua_wxSTANDARD_CURSOR = NULL; ! wxCursor* wxLua_wxHOURGLASS_CURSOR = NULL; ! wxCursor* wxLua_wxCROSS_CURSOR = NULL; ! ! #if defined(__MINGW32__) || defined(__GNUWIN32__) ! // FIX: "internal compiler error: output_operand: invalid expression as operand" ! const wxPoint wxLua_wxDefaultPositionHack = wxDefaultPosition; ! const wxSize wxLua_wxDefaultSizeHack = wxDefaultSize; ! #define wxDefaultPosition wxLua_wxDefaultPositionHack ! #define wxDefaultSize wxLua_wxDefaultSizeHack ! #endif //__MINGW32__ ! ]] --============================================================================= *************** *** 196,237 **** [[ // ugly hack for wxWidgets >2.7 change to use wxStockGDI::GetXXX ! wxLua_wxBLACK = (wxColour*)wxBLACK; ! wxLua_wxWHITE = (wxColour*)wxWHITE; ! wxLua_wxRED = (wxColour*)wxRED; ! wxLua_wxBLUE = (wxColour*)wxBLUE; ! wxLua_wxGREEN = (wxColour*)wxGREEN; ! wxLua_wxCYAN = (wxColour*)wxCYAN; ! wxLua_wxLIGHT_GREY = (wxColour*)wxLIGHT_GREY; ! wxLua_wxRED_PEN = (wxPen*)wxRED_PEN; ! wxLua_wxCYAN_PEN = (wxPen*)wxCYAN_PEN; ! wxLua_wxGREEN_PEN = (wxPen*)wxGREEN_PEN; ! wxLua_wxBLACK_PEN = (wxPen*)wxBLACK_PEN; ! wxLua_wxWHITE_PEN = (wxPen*)wxWHITE_PEN; ! wxLua_wxTRANSPARENT_PEN = (wxPen*)wxTRANSPARENT_PEN; ! wxLua_wxBLACK_DASHED_PEN = (wxPen*)wxBLACK_DASHED_PEN; ! wxLua_wxGREY_PEN = (wxPen*)wxGREY_PEN; ! wxLua_wxMEDIUM_GREY_PEN = (wxPen*)wxMEDIUM_GREY_PEN; ! wxLua_wxLIGHT_GREY_PEN = (wxPen*)wxLIGHT_GREY_PEN; ! wxLua_wxBLUE_BRUSH = (wxBrush*)wxBLUE_BRUSH; ! wxLua_wxGREEN_BRUSH = (wxBrush*)wxGREEN_BRUSH; ! wxLua_wxWHITE_BRUSH = (wxBrush*)wxWHITE_BRUSH; ! wxLua_wxBLACK_BRUSH = (wxBrush*)wxBLACK_BRUSH; ! wxLua_wxGREY_BRUSH = (wxBrush*)wxGREY_BRUSH; ! wxLua_wxMEDIUM_GREY_BRUSH = (wxBrush*)wxMEDIUM_GREY_BRUSH; ! wxLua_wxLIGHT_GREY_BRUSH = (wxBrush*)wxLIGHT_GREY_BRUSH; ! wxLua_wxTRANSPARENT_BRUSH = (wxBrush*)wxTRANSPARENT_BRUSH; ! wxLua_wxCYAN_BRUSH = (wxBrush*)wxCYAN_BRUSH; ! wxLua_wxRED_BRUSH = (wxBrush*)wxRED_BRUSH; ! wxLua_wxNORMAL_FONT = (wxFont*)wxNORMAL_FONT; ! wxLua_wxSMALL_FONT = (wxFont*)wxSMALL_FONT; ! wxLua_wxITALIC_FONT = (wxFont*)wxITALIC_FONT; ! wxLua_wxSWISS_FONT = (wxFont*)wxSWISS_FONT; ! wxLua_wxSTANDARD_CURSOR = (wxCursor*)wxSTANDARD_CURSOR; ! wxLua_wxHOURGLASS_CURSOR = (wxCursor*)wxHOURGLASS_CURSOR; ! wxLua_wxCROSS_CURSOR = (wxCursor*)wxCROSS_CURSOR; ]] --- 221,265 ---- [[ // ugly hack for wxWidgets >2.7 change to use wxStockGDI::GetXXX ! if (wxLua_wxBLACK == NULL) ! { ! wxLua_wxBLACK = (wxColour*)wxBLACK; ! wxLua_wxWHITE = (wxColour*)wxWHITE; ! wxLua_wxRED = (wxColour*)wxRED; ! wxLua_wxBLUE = (wxColour*)wxBLUE; ! wxLua_wxGREEN = (wxColour*)wxGREEN; ! wxLua_wxCYAN = (wxColour*)wxCYAN; ! wxLua_wxLIGHT_GREY = (wxColour*)wxLIGHT_GREY; ! wxLua_wxRED_PEN = (wxPen*)wxRED_PEN; ! wxLua_wxCYAN_PEN = (wxPen*)wxCYAN_PEN; ! wxLua_wxGREEN_PEN = (wxPen*)wxGREEN_PEN; ! wxLua_wxBLACK_PEN = (wxPen*)wxBLACK_PEN; ! wxLua_wxWHITE_PEN = (wxPen*)wxWHITE_PEN; ! wxLua_wxTRANSPARENT_PEN = (wxPen*)wxTRANSPARENT_PEN; ! wxLua_wxBLACK_DASHED_PEN = (wxPen*)wxBLACK_DASHED_PEN; ! wxLua_wxGREY_PEN = (wxPen*)wxGREY_PEN; ! wxLua_wxMEDIUM_GREY_PEN = (wxPen*)wxMEDIUM_GREY_PEN; ! wxLua_wxLIGHT_GREY_PEN = (wxPen*)wxLIGHT_GREY_PEN; ! wxLua_wxBLUE_BRUSH = (wxBrush*)wxBLUE_BRUSH; ! wxLua_wxGREEN_BRUSH = (wxBrush*)wxGREEN_BRUSH; ! wxLua_wxWHITE_BRUSH = (wxBrush*)wxWHITE_BRUSH; ! wxLua_wxBLACK_BRUSH = (wxBrush*)wxBLACK_BRUSH; ! wxLua_wxGREY_BRUSH = (wxBrush*)wxGREY_BRUSH; ! wxLua_wxMEDIUM_GREY_BRUSH = (wxBrush*)wxMEDIUM_GREY_BRUSH; ! wxLua_wxLIGHT_GREY_BRUSH = (wxBrush*)wxLIGHT_GREY_BRUSH; ! wxLua_wxTRANSPARENT_BRUSH = (wxBrush*)wxTRANSPARENT_BRUSH; ! wxLua_wxCYAN_BRUSH = (wxBrush*)wxCYAN_BRUSH; ! wxLua_wxRED_BRUSH = (wxBrush*)wxRED_BRUSH; ! wxLua_wxNORMAL_FONT = (wxFont*)wxNORMAL_FONT; ! wxLua_wxSMALL_FONT = (wxFont*)wxSMALL_FONT; ! wxLua_wxITALIC_FONT = (wxFont*)wxITALIC_FONT; ! wxLua_wxSWISS_FONT = (wxFont*)wxSWISS_FONT; ! wxLua_wxSTANDARD_CURSOR = (wxCursor*)wxSTANDARD_CURSOR; ! wxLua_wxHOURGLASS_CURSOR = (wxCursor*)wxHOURGLASS_CURSOR; ! wxLua_wxCROSS_CURSOR = (wxCursor*)wxCROSS_CURSOR; ! } ]] |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/docs Modified Files: changelog.txt Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** changelog.txt 2 Aug 2006 04:13:41 -0000 1.15 --- changelog.txt 28 Aug 2006 05:26:20 -0000 1.16 *************** *** 38,41 **** --- 38,44 ---- - Fixed wxEvtHandler::Connect[Event] to follow the C++ winID semantics for the case where there is no winId supplied, use wxID_ANY. + - Finished cleaning up the code, moved all the code in + modules/wxlua/include/internal.h and modules/wxlua/src/internal.cpp + to other files. Please include wxlua/wxlstate.h instead of this file. version 2.6.2.0 (released 10/03/2006) |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxluasocket/src Modified Files: wxldserv.cpp wxlhandl.cpp wxlsock.cpp Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxldserv.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxldserv.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** wxldserv.cpp 8 Apr 2006 18:22:35 -0000 1.13 --- wxldserv.cpp 28 Aug 2006 05:26:21 -0000 1.14 *************** *** 24,28 **** #include "wx/thread.h" #include "wxluasocket/include/wxldserv.h" - #include "wxlua/include/internal.h" #include "wxluasocket/include/wxlhandl.h" --- 24,27 ---- Index: wxlsock.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlsock.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** wxlsock.cpp 7 Mar 2006 11:53:42 -0000 1.6 --- wxlsock.cpp 28 Aug 2006 05:26:21 -0000 1.7 *************** *** 23,27 **** #include "wxluasocket/include/wxlsock.h" - #include "wxlua/include/internal.h" #ifdef _MSC_VER --- 23,26 ---- Index: wxlhandl.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxlhandl.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxlhandl.cpp 2 Mar 2006 03:50:40 -0000 1.2 --- wxlhandl.cpp 28 Aug 2006 05:26:21 -0000 1.3 *************** *** 25,29 **** #include "wxluasocket/include/wxlhandl.h" - #include "wxlua/include/internal.h" // ---------------------------------------------------------------------------- --- 25,28 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxluasocket/include Modified Files: dservice.h wxldtarg.h wxluasocket_bind.h Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: dservice.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/dservice.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** dservice.h 20 May 2006 19:57:59 -0000 1.11 --- dservice.h 28 Aug 2006 05:26:21 -0000 1.12 *************** *** 38,42 **** #include "wxlua/include/wxlua.h" - #include "wxlua/include/internal.h" #include "wxluasocket/include/wxldserv.h" --- 38,41 ---- Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** wxluasocket_bind.h 9 Jun 2006 22:51:34 -0000 1.3 --- wxluasocket_bind.h 28 Aug 2006 05:26:21 -0000 1.4 *************** *** 22,27 **** #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlbind.h" - #include "wxlua/include/internal.h" - // binding class class wxLuaBinding_wxluasocket : public wxLuaBinding --- 22,25 ---- Index: wxldtarg.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxldtarg.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxldtarg.h 20 May 2006 19:57:59 -0000 1.10 --- wxldtarg.h 28 Aug 2006 05:26:21 -0000 1.11 *************** *** 18,22 **** #include "wxluasocket/include/wxluasocketdefs.h" #include "wxlua/include/wxlua.h" - #include "wxlua/include/internal.h" #include "wxluadebug/include/wxldebug.h" #include "wxluasocket/include/wxldbgio.h" --- 18,21 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/modules/wxluadebug/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxluadebug/src Modified Files: staktree.cpp wxldebug.cpp Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxldebug.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/wxldebug.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wxldebug.cpp 30 May 2006 22:56:29 -0000 1.15 --- wxldebug.cpp 28 Aug 2006 05:26:20 -0000 1.16 *************** *** 24,28 **** #include "wxluadebug/include/wxldebug.h" - #include "wxlua/include/internal.h" // ---------------------------------------------------------------------------- --- 24,27 ---- *************** *** 221,225 **** // get the index, just want the name=value, type is dummy here ! GetTypeValue(wxlState, -2, type, name); // get the type and value GetTypeValue(wxlState, -1, type, value); --- 220,224 ---- // get the index, just want the name=value, type is dummy here ! GetTypeValue(wxlState, -2, type, name); // get the type and value GetTypeValue(wxlState, -1, type, value); Index: staktree.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluadebug/src/staktree.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** staktree.cpp 15 May 2006 04:48:37 -0000 1.25 --- staktree.cpp 28 Aug 2006 05:26:20 -0000 1.26 *************** *** 25,29 **** #include "wx/artprov.h" #include "wxluadebug/include/staktree.h" - #include "wxlua/include/internal.h" #include "wxlua/include/wxlua.h" #include "wxlua/include/wxlcallb.h" --- 25,28 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/apps/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/apps/wxlua/src Modified Files: wxlua.cpp Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxlua/src/wxlua.cpp,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** wxlua.cpp 24 May 2006 04:49:59 -0000 1.32 --- wxlua.cpp 28 Aug 2006 05:26:19 -0000 1.33 *************** *** 29,33 **** #include "wx/image.h" #include "wxlua/include/wxlua.h" - #include "wxlua/include/internal.h" #include "wxluasocket/include/wxldserv.h" #include "wxluasocket/include/wxlhandl.h" --- 29,32 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:24
|
Update of /cvsroot/wxlua/wxLua/apps/wxluaedit/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/apps/wxluaedit/src Modified Files: wxluaedit.cpp Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxluaedit.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluaedit/src/wxluaedit.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxluaedit.cpp 23 Aug 2006 04:57:52 -0000 1.20 --- wxluaedit.cpp 28 Aug 2006 05:26:19 -0000 1.21 *************** *** 26,30 **** #include "wx/stedit/stedit.h" #include "wxledit.h" - #include "wxlua/include/internal.h" // Declare the binding initialization functions as extern so we don't have to --- 26,29 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:23
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/apps/wxluacan/src Modified Files: canlua.h cansim.h wxluacan.cpp wxluacan.h wxluacan.i wxluacan_bind.cpp Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxluacan_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan_bind.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** wxluacan_bind.cpp 8 Jun 2006 03:22:06 -0000 1.7 --- wxluacan_bind.cpp 28 Aug 2006 05:26:19 -0000 1.8 *************** *** 45,51 **** --- 45,53 ---- // %define // -------------------------------------------------------------------- + // -------------------------------------------------------------------- // %enum // -------------------------------------------------------------------- + { 0, 0 }, }; *************** *** 66,69 **** --- 68,72 ---- // %define %string // -------------------------------------------------------------------- + { 0, 0 }, }; *************** *** 119,122 **** --- 122,129 ---- + // ---------------------------------------------------------------------------- + // wxLuaGetFunctionList_wxluacan() is called to register global functions + // ---------------------------------------------------------------------------- + WXLUAMETHOD* wxLuaGetFunctionList_wxluacan(size_t &count) { *************** *** 133,136 **** --- 140,147 ---- + // ---------------------------------------------------------------------------- + // wxLuaGetClassList_wxluacan() is called to register classes + // ---------------------------------------------------------------------------- + WXLUACLASS* wxLuaGetClassList_wxluacan(size_t &count) { Index: canlua.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/canlua.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** canlua.h 27 Feb 2006 15:49:57 -0000 1.6 --- canlua.h 28 Aug 2006 05:26:19 -0000 1.7 *************** *** 1,5 **** /*! \file canlua.h \brief simple canvas which takes as drawable area the whole of the scrollable area. ! \author Klaas Holwerda --- 1,5 ---- /*! \file canlua.h \brief simple canvas which takes as drawable area the whole of the scrollable area. ! \author Klaas Holwerda *************** *** 19,24 **** #include "wx/wx.h" ! ! #include "wxlua/include/internal.h" class wxlCanObj; --- 19,23 ---- #include "wx/wx.h" ! #include "wxlua/include/wxlstate.h" class wxlCanObj; *************** *** 29,33 **** class wxlCan; ! //! base canvas object /*! this and derived objects or placed on the canvas in the m_rootobject or as a child of another canvasobject. --- 28,32 ---- class wxlCan; ! //! base canvas object /*! this and derived objects or placed on the canvas in the m_rootobject or as a child of another canvasobject. *************** *** 38,43 **** public: ! ! //! constructor /*! This object can have child objects added, and acts as a grouping object. --- 37,42 ---- public: ! ! //! constructor /*! This object can have child objects added, and acts as a grouping object. *************** *** 48,62 **** ~wxlCanObj(); ! //! sets the position of teh object relative to its parent object. void SetPos( double x, double y ) { m_x = x; m_y = y; SetPending( true ); } ! //! get x positions double GetX() { return m_x; } ! //! get y positions double GetY() { return m_y; } ! //! set default pen to use for drawing void SetPen( const wxPen& pen ) { m_pen = pen; } ! //! set default brush to use for drawing void SetBrush( const wxBrush& brush ) { m_brush = brush; } --- 47,61 ---- ~wxlCanObj(); ! //! sets the position of teh object relative to its parent object. void SetPos( double x, double y ) { m_x = x; m_y = y; SetPending( true ); } ! //! get x positions double GetX() { return m_x; } ! //! get y positions double GetY() { return m_y; } ! //! set default pen to use for drawing void SetPen( const wxPen& pen ) { m_pen = pen; } ! //! set default brush to use for drawing void SetBrush( const wxBrush& brush ) { m_brush = brush; } *************** *** 93,97 **** protected: ! virtual void DoUpdate( double WXUNUSED(absx), double WXUNUSED(absy) ) { m_pending = false; --- 92,96 ---- protected: ! virtual void DoUpdate( double WXUNUSED(absx), double WXUNUSED(absy) ) { m_pending = false; *************** *** 113,117 **** }; ! //! rectangle canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject --- 112,116 ---- }; ! //! rectangle canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject *************** *** 121,125 **** public: ! wxlCanObjRect( double x, double y, double w, double h ); --- 120,124 ---- public: ! wxlCanObjRect( double x, double y, double w, double h ); *************** *** 133,137 **** }; ! //! circle canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject --- 132,136 ---- }; ! //! circle canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject *************** *** 141,145 **** public: ! wxlCanObjCircle( double x, double y, double r ); --- 140,144 ---- public: ! wxlCanObjCircle( double x, double y, double r ); *************** *** 153,161 **** }; ! //! lua script canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. ! The object name, is used to call a lua function fron DoDraw() called ! NameDraw( wxDC& dc, double absx, double absy ) to draw the object --- 152,160 ---- }; ! //! lua script canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. ! The object name, is used to call a lua function fron DoDraw() called ! NameDraw( wxDC& dc, double absx, double absy ) to draw the object *************** *** 169,173 **** public: ! wxlCanObjScript( double x, double y, const wxString& name ); --- 168,172 ---- public: ! wxlCanObjScript( double x, double y, const wxString& name ); *************** *** 181,185 **** }; ! //! lua script canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. --- 180,184 ---- }; ! //! lua script canvas object /*! to be placed on the canvas in the m_rootobject or as a child of another canvasobject. *************** *** 187,196 **** It should do that by adding child objects to this object itself. The hit is no more then a hit on those childs, which is default functionality. ! */ class wxlCanObjAddScript: public wxlCanObj { public: ! wxlCanObjAddScript( double x, double y, const wxString& script ); --- 186,195 ---- It should do that by adding child objects to this object itself. The hit is no more then a hit on those childs, which is default functionality. ! */ class wxlCanObjAddScript: public wxlCanObj { public: ! wxlCanObjAddScript( double x, double y, const wxString& script ); *************** *** 244,248 **** void SetPending( bool pending = true ); ! void Render( wxDC& dc ); //! Give the virtual size to be displayed. --- 243,247 ---- void SetPending( bool pending = true ); ! void Render( wxDC& dc ); //! Give the virtual size to be displayed. Index: wxluacan.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxluacan.cpp 8 Jun 2006 03:22:06 -0000 1.14 --- wxluacan.cpp 28 Aug 2006 05:26:19 -0000 1.15 *************** *** 27,31 **** int s_wxluatag_wxlCanObj = -1; ! // wxlCanObj( double x = 0, double y = 0 ) static int LUACALL wxLua_wxlCanObj_constructor(lua_State *L) { --- 27,31 ---- int s_wxluatag_wxlCanObj = -1; ! // wxlCanObj( double x = 0, double y = 0 ) static int LUACALL wxLua_wxlCanObj_constructor(lua_State *L) { *************** *** 62,66 **** } ! // double GetX() static int LUACALL wxLua_wxlCanObj_GetX(lua_State *L) { --- 62,66 ---- } ! // double GetX() static int LUACALL wxLua_wxlCanObj_GetX(lua_State *L) { *************** *** 92,96 **** } ! // void SetPending( bool pending = true ) static int LUACALL wxLua_wxlCanObj_SetPending(lua_State *L) { --- 92,96 ---- } ! // void SetPending( bool pending = true ) static int LUACALL wxLua_wxlCanObj_SetPending(lua_State *L) { *************** *** 108,112 **** } ! // void AddObject( wxlCanObj *canobj ) static int LUACALL wxLua_wxlCanObj_AddObject(lua_State *L) { --- 108,112 ---- } ! // void AddObject( wxlCanObj *canobj ) static int LUACALL wxLua_wxlCanObj_AddObject(lua_State *L) { *************** *** 157,161 **** } ! #endif --- 157,161 ---- } ! #endif // wxLUA_USE_wxColourPenBrush *************** *** 176,180 **** { LuaMethod, "SetPen", wxLua_wxlCanObj_SetPen, 1, 1, { &s_wxluatag_wxPen, 0 } }, { LuaMethod, "SetBrush", wxLua_wxlCanObj_SetBrush, 1, 1, { &s_wxluatag_wxBrush, 0 } }, ! #endif }; --- 176,180 ---- { LuaMethod, "SetPen", wxLua_wxlCanObj_SetPen, 1, 1, { &s_wxluatag_wxPen, 0 } }, { LuaMethod, "SetBrush", wxLua_wxlCanObj_SetBrush, 1, 1, { &s_wxluatag_wxBrush, 0 } }, ! #endif // wxLUA_USE_wxColourPenBrush }; *************** *** 462,466 **** } ! #endif --- 462,466 ---- } ! #endif // wxLUA_USE_wxPointSizeRect *************** *** 477,481 **** #if wxLUA_USE_wxPointSizeRect { LuaConstructor, "wxlCan", wxLua_wxlCan_constructor, 4, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, 0 } }, ! #endif }; --- 477,481 ---- #if wxLUA_USE_wxPointSizeRect { LuaConstructor, "wxlCan", wxLua_wxlCan_constructor, 4, 1, { &s_wxluatag_wxWindow, &s_wxluaarg_Number, &s_wxluatag_wxPoint, &s_wxluatag_wxSize, 0 } }, ! #endif // wxLUA_USE_wxPointSizeRect }; Index: cansim.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/cansim.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cansim.h 5 Feb 2006 17:52:22 -0000 1.2 --- cansim.h 28 Aug 2006 05:26:19 -0000 1.3 *************** *** 21,28 **** #include "cancom.h" #include "wx/timer.h" #include "wxluadebug/include/wxldebug.h" #include "wxluasocket/include/wxldserv.h" #include "wxluasocket/include/wxldtarg.h" - #include "wxlua/include/internal.h" //---------------------------------------------------------------------------- --- 21,28 ---- #include "cancom.h" #include "wx/timer.h" + #include "wxlua/include/wxlstate.h" #include "wxluadebug/include/wxldebug.h" #include "wxluasocket/include/wxldserv.h" #include "wxluasocket/include/wxldtarg.h" //---------------------------------------------------------------------------- *************** *** 34,38 **** // IDs the menu commands enum ! { MenuOption_First, Scale_StretchHoriz = MenuOption_First, --- 34,38 ---- // IDs the menu commands enum ! { MenuOption_First, Scale_StretchHoriz = MenuOption_First, *************** *** 43,50 **** Origin_MoveUp, Origin_MoveLeft, ! Origin_MoveRight, Object_AddRect, Object_AddCircle, ! Axis_Vertic, Map_Restore, MenuOption_Last = Map_Restore, --- 43,50 ---- Origin_MoveUp, Origin_MoveLeft, ! Origin_MoveRight, Object_AddRect, Object_AddCircle, ! Axis_Vertic, Map_Restore, MenuOption_Last = Map_Restore, *************** *** 67,76 **** wxMenu *m_menuObjects; ! private: // method declarations for MyFrame void CreateMyMenuBar(); ! private: --- 67,76 ---- wxMenu *m_menuObjects; ! private: // method declarations for MyFrame void CreateMyMenuBar(); ! private: *************** *** 93,97 **** void OnCloseWindow( wxCloseEvent &event ); void OnTimer( wxTimerEvent &event ); ! void OnOption(wxCommandEvent& event); --- 93,97 ---- void OnCloseWindow( wxCloseEvent &event ); void OnTimer( wxTimerEvent &event ); ! void OnOption(wxCommandEvent& event); Index: wxluacan.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.i,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** wxluacan.i 24 Apr 2006 02:33:26 -0000 1.8 --- wxluacan.i 28 Aug 2006 05:26:19 -0000 1.9 *************** *** 3,18 **** %include "cancom.h" %include "cansim.h" - %include "wxlua/include/internal.h" %include "wx/gdicmn.h" %class %noclassinfo wxlCanObj, wxObject ! wxlCanObj( double x = 0, double y = 0 ) void SetPos( double x, double y ) ! double GetX() double GetY() void SetPen( const wxPen& pen ) void SetBrush( const wxBrush& brush ) ! void SetPending( bool pending = true ) ! void AddObject( wxlCanObj *canobj ) %endclass --- 3,17 ---- %include "cancom.h" %include "cansim.h" %include "wx/gdicmn.h" %class %noclassinfo wxlCanObj, wxObject ! wxlCanObj( double x = 0, double y = 0 ) void SetPos( double x, double y ) ! double GetX() double GetY() void SetPen( const wxPen& pen ) void SetBrush( const wxBrush& brush ) ! void SetPending( bool pending = true ) ! void AddObject( wxlCanObj *canobj ) %endclass Index: wxluacan.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxluacan.h 9 Jun 2006 03:24:48 -0000 1.14 --- wxluacan.h 28 Aug 2006 05:26:19 -0000 1.15 *************** *** 13,18 **** #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlbind.h" - #include "wxlua/include/internal.h" - // binding class class wxLuaBinding_wxluacan : public wxLuaBinding --- 13,16 ---- *************** *** 35,45 **** extern WXLUA_NO_DLLIMPEXP bool wxLuaBinding_wxluacan_init(); #include "cancom.h" #include "canlua.h" #include "cansim.h" #include "wx/gdicmn.h" - #include "wxlua/include/internal.h" // Lua Tag Method Values for each Class extern WXLUA_NO_DLLIMPEXP_DATA(int) s_wxluatag_wxlCan; extern WXLUA_NO_DLLIMPEXP_DATA(int) s_wxluatag_wxlCanObj; --- 33,50 ---- extern WXLUA_NO_DLLIMPEXP bool wxLuaBinding_wxluacan_init(); + // ---------------------------------------------------------------------------- + // Includes + // ---------------------------------------------------------------------------- + #include "cancom.h" #include "canlua.h" #include "cansim.h" #include "wx/gdicmn.h" + + // ---------------------------------------------------------------------------- // Lua Tag Method Values for each Class + // ---------------------------------------------------------------------------- + extern WXLUA_NO_DLLIMPEXP_DATA(int) s_wxluatag_wxlCan; extern WXLUA_NO_DLLIMPEXP_DATA(int) s_wxluatag_wxlCanObj; *************** *** 51,55 **** ! // Method Table extern WXLUA_NO_DLLIMPEXP WXLUAMETHOD* wxlCan_methods; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCan_methodCount; --- 56,64 ---- ! ! // ---------------------------------------------------------------------------- ! // Method Tables ! // ---------------------------------------------------------------------------- ! extern WXLUA_NO_DLLIMPEXP WXLUAMETHOD* wxlCan_methods; extern WXLUA_NO_DLLIMPEXP_DATA(int) wxlCan_methodCount; *************** *** 69,72 **** --- 78,85 ---- + // ---------------------------------------------------------------------------- + // Encapsulation Declarations + // ---------------------------------------------------------------------------- + #endif // __HOOK_WXLUA_wxluacan_H__ |
From: John L. <jr...@us...> - 2006-08-28 05:26:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxbindstc/include Modified Files: wxbind.h Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/include/wxbind.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** wxbind.h 9 Jun 2006 22:51:34 -0000 1.11 --- wxbind.h 28 Aug 2006 05:26:20 -0000 1.12 *************** *** 21,26 **** #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlbind.h" - #include "wxlua/include/internal.h" - // binding class class wxLuaBinding_wxstc : public wxLuaBinding --- 21,24 ---- |
From: John L. <jr...@us...> - 2006-08-28 05:26:23
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1034/wxLua/modules/wxbind/src Modified Files: wx_bind.cpp wxlhtmlwin.cpp Log Message: Finished cleaning up the code, removed all code from internal.h and internal.cpp and moved it to other files. Do not #include internal.h anymore! Have the functions in wxLuaState that only call C lua funcs call C helper funcs in wxlstate.cpp so that you don't have to create a wxLuaState if you don't really need it. Index: wxlhtmlwin.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlhtmlwin.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** wxlhtmlwin.cpp 17 Apr 2006 13:58:54 -0000 1.10 --- wxlhtmlwin.cpp 28 Aug 2006 05:26:20 -0000 1.11 *************** *** 27,31 **** #include "wxlua/include/wxlstate.h" #include "wxlua/include/wxlcallb.h" - #include "wxlua/include/internal.h" #if wxLUA_USE_wxHTML --- 27,30 ---- Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** wx_bind.cpp 24 Aug 2006 05:12:27 -0000 1.53 --- wx_bind.cpp 28 Aug 2006 05:26:20 -0000 1.54 *************** *** 63,71 **** #if defined(__MINGW32__) || defined(__GNUWIN32__) // FIX: "internal compiler error: output_operand: invalid expression as operand" ! const wxPoint wxDefaultPositionHack = wxDefaultPosition; ! const wxSize wxDefaultSizeHack = wxDefaultSize; ! #define wxDefaultPosition wxDefaultPositionHack ! #define wxDefaultSize wxDefaultSizeHack ! #endif //__MINGW32__ // ---------------------------------------------------------------------------- --- 63,71 ---- #if defined(__MINGW32__) || defined(__GNUWIN32__) // FIX: "internal compiler error: output_operand: invalid expression as operand" ! const wxPoint wxLua_wxDefaultPositionHack = wxDefaultPosition; ! const wxSize wxLua_wxDefaultSizeHack = wxDefaultSize; ! #define wxDefaultPosition wxLua_wxDefaultPositionHack ! #define wxDefaultSize wxLua_wxDefaultSizeHack ! #endif //__MINGW32__ // ---------------------------------------------------------------------------- *************** *** 6018,6059 **** { // ugly hack for wxWidgets >2.7 change to use wxStockGDI::GetXXX ! wxLua_wxBLACK = (wxColour*)wxBLACK; ! wxLua_wxWHITE = (wxColour*)wxWHITE; ! wxLua_wxRED = (wxColour*)wxRED; ! wxLua_wxBLUE = (wxColour*)wxBLUE; ! wxLua_wxGREEN = (wxColour*)wxGREEN; ! wxLua_wxCYAN = (wxColour*)wxCYAN; ! wxLua_wxLIGHT_GREY = (wxColour*)wxLIGHT_GREY; ! wxLua_wxRED_PEN = (wxPen*)wxRED_PEN; ! wxLua_wxCYAN_PEN = (wxPen*)wxCYAN_PEN; ! wxLua_wxGREEN_PEN = (wxPen*)wxGREEN_PEN; ! wxLua_wxBLACK_PEN = (wxPen*)wxBLACK_PEN; ! wxLua_wxWHITE_PEN = (wxPen*)wxWHITE_PEN; ! wxLua_wxTRANSPARENT_PEN = (wxPen*)wxTRANSPARENT_PEN; ! wxLua_wxBLACK_DASHED_PEN = (wxPen*)wxBLACK_DASHED_PEN; ! wxLua_wxGREY_PEN = (wxPen*)wxGREY_PEN; ! wxLua_wxMEDIUM_GREY_PEN = (wxPen*)wxMEDIUM_GREY_PEN; ! wxLua_wxLIGHT_GREY_PEN = (wxPen*)wxLIGHT_GREY_PEN; ! wxLua_wxBLUE_BRUSH = (wxBrush*)wxBLUE_BRUSH; ! wxLua_wxGREEN_BRUSH = (wxBrush*)wxGREEN_BRUSH; ! wxLua_wxWHITE_BRUSH = (wxBrush*)wxWHITE_BRUSH; ! wxLua_wxBLACK_BRUSH = (wxBrush*)wxBLACK_BRUSH; ! wxLua_wxGREY_BRUSH = (wxBrush*)wxGREY_BRUSH; ! wxLua_wxMEDIUM_GREY_BRUSH = (wxBrush*)wxMEDIUM_GREY_BRUSH; ! wxLua_wxLIGHT_GREY_BRUSH = (wxBrush*)wxLIGHT_GREY_BRUSH; ! wxLua_wxTRANSPARENT_BRUSH = (wxBrush*)wxTRANSPARENT_BRUSH; ! wxLua_wxCYAN_BRUSH = (wxBrush*)wxCYAN_BRUSH; ! wxLua_wxRED_BRUSH = (wxBrush*)wxRED_BRUSH; ! wxLua_wxNORMAL_FONT = (wxFont*)wxNORMAL_FONT; ! wxLua_wxSMALL_FONT = (wxFont*)wxSMALL_FONT; ! wxLua_wxITALIC_FONT = (wxFont*)wxITALIC_FONT; ! wxLua_wxSWISS_FONT = (wxFont*)wxSWISS_FONT; ! wxLua_wxSTANDARD_CURSOR = (wxCursor*)wxSTANDARD_CURSOR; ! wxLua_wxHOURGLASS_CURSOR = (wxCursor*)wxHOURGLASS_CURSOR; ! wxLua_wxCROSS_CURSOR = (wxCursor*)wxCROSS_CURSOR; } void wxLuaBinding_wx::PostRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable) --- 6018,6062 ---- { // ugly hack for wxWidgets >2.7 change to use wxStockGDI::GetXXX ! if (wxLua_wxBLACK == NULL) ! { ! wxLua_wxBLACK = (wxColour*)wxBLACK; ! wxLua_wxWHITE = (wxColour*)wxWHITE; ! wxLua_wxRED = (wxColour*)wxRED; ! wxLua_wxBLUE = (wxColour*)wxBLUE; ! wxLua_wxGREEN = (wxColour*)wxGREEN; ! wxLua_wxCYAN = (wxColour*)wxCYAN; ! wxLua_wxLIGHT_GREY = (wxColour*)wxLIGHT_GREY; ! wxLua_wxRED_PEN = (wxPen*)wxRED_PEN; ! wxLua_wxCYAN_PEN = (wxPen*)wxCYAN_PEN; ! wxLua_wxGREEN_PEN = (wxPen*)wxGREEN_PEN; ! wxLua_wxBLACK_PEN = (wxPen*)wxBLACK_PEN; ! wxLua_wxWHITE_PEN = (wxPen*)wxWHITE_PEN; ! wxLua_wxTRANSPARENT_PEN = (wxPen*)wxTRANSPARENT_PEN; ! wxLua_wxBLACK_DASHED_PEN = (wxPen*)wxBLACK_DASHED_PEN; ! wxLua_wxGREY_PEN = (wxPen*)wxGREY_PEN; ! wxLua_wxMEDIUM_GREY_PEN = (wxPen*)wxMEDIUM_GREY_PEN; ! wxLua_wxLIGHT_GREY_PEN = (wxPen*)wxLIGHT_GREY_PEN; ! wxLua_wxBLUE_BRUSH = (wxBrush*)wxBLUE_BRUSH; ! wxLua_wxGREEN_BRUSH = (wxBrush*)wxGREEN_BRUSH; ! wxLua_wxWHITE_BRUSH = (wxBrush*)wxWHITE_BRUSH; ! wxLua_wxBLACK_BRUSH = (wxBrush*)wxBLACK_BRUSH; ! wxLua_wxGREY_BRUSH = (wxBrush*)wxGREY_BRUSH; ! wxLua_wxMEDIUM_GREY_BRUSH = (wxBrush*)wxMEDIUM_GREY_BRUSH; ! wxLua_wxLIGHT_GREY_BRUSH = (wxBrush*)wxLIGHT_GREY_BRUSH; ! wxLua_wxTRANSPARENT_BRUSH = (wxBrush*)wxTRANSPARENT_BRUSH; ! wxLua_wxCYAN_BRUSH = (wxBrush*)wxCYAN_BRUSH; ! wxLua_wxRED_BRUSH = (wxBrush*)wxRED_BRUSH; ! wxLua_wxNORMAL_FONT = (wxFont*)wxNORMAL_FONT; ! wxLua_wxSMALL_FONT = (wxFont*)wxSMALL_FONT; ! wxLua_wxITALIC_FONT = (wxFont*)wxITALIC_FONT; ! wxLua_wxSWISS_FONT = (wxFont*)wxSWISS_FONT; ! wxLua_wxSTANDARD_CURSOR = (wxCursor*)wxSTANDARD_CURSOR; ! wxLua_wxHOURGLASS_CURSOR = (wxCursor*)wxHOURGLASS_CURSOR; ! wxLua_wxCROSS_CURSOR = (wxCursor*)wxCROSS_CURSOR; ! } } void wxLuaBinding_wx::PostRegister(const wxLuaState& wxlState, bool registerTypes, int luaTable) |