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...> - 2007-03-15 14:20:20
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4462/bindings/wxwidgets Modified Files: file.i image.i Log Message: remove duplicate entries in .i files start to sort the binding items in the structs alphabetically Index: file.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/file.i,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** file.i 13 Mar 2007 23:01:53 -0000 1.19 --- file.i 15 Mar 2007 14:20:15 -0000 1.20 *************** *** 63,76 **** %define %string wxFILE_SEP_PATH_VMS wxT(".") // VMS also uses '[' and ']' ! %if defined(__UNIX__) && !defined(__OS2__) ! // CYGWIN also uses UNIX settings ! %define %string wxFILE_SEP_PATH wxT("/") // wxFILE_SEP_PATH_UNIX ! %endif ! %if defined(__MAC__) ! %define %string wxFILE_SEP_PATH wxT(":") // wxFILE_SEP_PATH_MAC ! %endif ! %if !(defined(__UNIX__) && !defined(__OS2__)) && !defined(__MAC__) // Windows and OS/2 ! %define %string wxFILE_SEP_PATH wxT("\\") // wxFILE_SEP_PATH_DOS ! %endif // Unix/Windows %define %string wxPATH_SEP_DOS // wxT(";") --- 63,67 ---- %define %string wxFILE_SEP_PATH_VMS wxT(".") // VMS also uses '[' and ']' ! %define %string wxFILE_SEP_PATH wxLua_FILE_SEP_PATH // hack to convert from wxChar wxT('') to wxChar* wxT("") %define %string wxPATH_SEP_DOS // wxT(";") *************** *** 82,86 **** //%function bool wxIsPathSeparator(wxChar c) FIXME ! //%function bool wxEndsWithPathSeparator(const wxChar *pszFileName) --- 73,77 ---- //%function bool wxIsPathSeparator(wxChar c) FIXME ! %function bool wxEndsWithPathSeparator(const wxString& pszFileName) Index: image.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/image.i,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** image.i 14 Mar 2007 05:08:09 -0000 1.22 --- image.i 15 Mar 2007 14:20:15 -0000 1.23 *************** *** 60,65 **** %wxchkver_2_6 %define %string wxIMAGE_OPTION_CUR_HOTSPOT_Y ! %define %string wxIMAGE_OPTION_PNG_FORMAT ! %define %string wxIMAGE_OPTION_PNG_BITDEPTH %define %string wxIMAGE_OPTION_QUALITY _T("quality") --- 60,65 ---- %wxchkver_2_6 %define %string wxIMAGE_OPTION_CUR_HOTSPOT_Y ! //%define %string wxIMAGE_OPTION_PNG_FORMAT see wxPNGHandler ! //%define %string wxIMAGE_OPTION_PNG_BITDEPTH see wxPNGHandler %define %string wxIMAGE_OPTION_QUALITY _T("quality") |
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxbind/src Modified Files: appframe.cpp clipdrag.cpp config.cpp controls.cpp data.cpp datetime.cpp defsutil.cpp dialogs.cpp event.cpp file.cpp gdi.cpp geometry.cpp grid.cpp help.cpp html.cpp image.cpp mdi.cpp menutool.cpp print.cpp regex.cpp sizer.cpp socket.cpp thread.cpp wave.cpp windows.cpp wx_bind.cpp wxlua.cpp xml.cpp Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: xml.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/xml.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** xml.cpp 9 Mar 2007 00:15:18 -0000 1.24 --- xml.cpp 15 Mar 2007 00:01:24 -0000 1.25 *************** *** 43,47 **** returns = new wxXmlNode(); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlNode *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlNode, returns); --- 43,47 ---- returns = new wxXmlNode(); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxXmlNode((wxXmlNode *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlNode, returns); *************** *** 67,71 **** returns = new wxXmlNode(type, name, content); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlNode *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlNode, returns); --- 67,71 ---- returns = new wxXmlNode(type, name, content); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxXmlNode((wxXmlNode *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlNode, returns); *************** *** 95,99 **** returns = new wxXmlNode(parent, type, name, content, props, next); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlNode *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlNode, returns); --- 95,99 ---- returns = new wxXmlNode(parent, type, name, content, props, next); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxXmlNode((wxXmlNode *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlNode, returns); *************** *** 473,498 **** } - static int LUACALL wxLua_wxXmlNode_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxXmlNode_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 473,486 ---- } static int LUACALL wxLua_wxXmlNode_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlNode * self = (wxXmlNode *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlNode); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 542,546 **** { LuaGetProp, "Type", wxLua_wxXmlNode_GetType, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Type", wxLua_wxXmlNode_SetType, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxXmlNode", wxLua_wxXmlNode_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxXmlNode_Delete, 0, 0, s_wxluaargArray_None }, }; --- 530,533 ---- *************** *** 573,577 **** returns = new wxXmlProperty(name, value, next); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlProperty *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlProperty, returns); --- 560,564 ---- returns = new wxXmlProperty(name, value, next); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxXmlProperty((wxXmlProperty *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlProperty, returns); *************** *** 588,592 **** returns = new wxXmlProperty(); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlProperty *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlProperty, returns); --- 575,579 ---- returns = new wxXmlProperty(); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxXmlProperty((wxXmlProperty *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlProperty, returns); *************** *** 685,710 **** } - static int LUACALL wxLua_wxXmlProperty_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlProperty * self = (wxXmlProperty *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlProperty); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxXmlProperty_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlProperty * self = (wxXmlProperty *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlProperty); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 672,685 ---- } static int LUACALL wxLua_wxXmlProperty_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlProperty * self = (wxXmlProperty *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlProperty); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 728,732 **** { LuaGetProp, "Next", wxLua_wxXmlProperty_GetNext, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Next", wxLua_wxXmlProperty_SetNext, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxXmlProperty", wxLua_wxXmlProperty_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxXmlProperty_Delete, 0, 0, s_wxluaargArray_None }, }; --- 703,706 ---- *************** *** 752,756 **** returns = new wxXmlDocument(); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlDocument *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); --- 726,730 ---- returns = new wxXmlDocument(); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlDocument *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); *************** *** 774,778 **** returns = new wxXmlDocument(filename, encoding); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlDocument *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); --- 748,752 ---- returns = new wxXmlDocument(filename, encoding); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlDocument *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlDocument, returns); *************** *** 926,951 **** } - static int LUACALL wxLua_wxXmlDocument_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlDocument * self = (wxXmlDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlDocument); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxXmlDocument_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlDocument * self = (wxXmlDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlDocument); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 900,913 ---- } static int LUACALL wxLua_wxXmlDocument_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlDocument * self = (wxXmlDocument *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlDocument); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 972,976 **** { LuaGetProp, "FileEncoding", wxLua_wxXmlDocument_GetFileEncoding, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "FileEncoding", wxLua_wxXmlDocument_SetFileEncoding, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxXmlDocument", wxLua_wxXmlDocument_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxXmlDocument_Delete, 0, 0, s_wxluaargArray_None }, }; --- 934,937 ---- *************** *** 988,1001 **** int s_wxluatag_wxXmlResourceHandler = -1; - static int LUACALL wxLua_wxXmlResourceHandler_destructor(lua_State *) - { - return 0; - } - // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxXmlResourceHandler_methods[] = { - { LuaDelete, "wxXmlResourceHandler", wxLua_wxXmlResourceHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 949,956 ---- *************** *** 1028,1032 **** returns = new wxBitmap(self->LoadBitmap(name)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxBitmap *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxBitmap, returns); --- 983,987 ---- returns = new wxBitmap(self->LoadBitmap(name)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxBitmap *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxBitmap, returns); *************** *** 1177,1181 **** returns = new wxIcon(self->LoadIcon(name)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxIcon *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxIcon, returns); --- 1132,1136 ---- returns = new wxIcon(self->LoadIcon(name)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxIcon *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxIcon, returns); *************** *** 1285,1289 **** returns = new wxXmlResource(filemask, flags); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlResource *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); --- 1240,1244 ---- returns = new wxXmlResource(filemask, flags); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlResource *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); *************** *** 1319,1323 **** returns = new wxXmlResource(flags); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxXmlResource *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); --- 1274,1278 ---- returns = new wxXmlResource(flags); // add to tracked memory list ! wxlState.AddTrackedObject((wxXmlResource *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxXmlResource, returns); *************** *** 1569,1594 **** } - static int LUACALL wxLua_wxXmlResource_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxXmlResource * self = (wxXmlResource *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlResource); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxXmlResource_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlResource * self = (wxXmlResource *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlResource); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 1524,1537 ---- } static int LUACALL wxLua_wxXmlResource_Delete(lua_State *L) { wxLuaState wxlState(L); wxXmlResource * self = (wxXmlResource *)wxlState.GetUserDataType(1, s_wxluatag_wxXmlResource); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 1652,1656 **** { LuaGetProp, "Flags", wxLua_wxXmlResource_GetFlags, 0, 0, s_wxluaargArray_None }, { LuaGetProp, "Version", wxLua_wxXmlResource_GetVersion, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxXmlResource", wxLua_wxXmlResource_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxXmlResource_Delete, 0, 0, s_wxluaargArray_None }, }; --- 1595,1598 ---- Index: defsutil.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/defsutil.cpp,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** defsutil.cpp 9 Mar 2007 00:15:14 -0000 1.26 --- defsutil.cpp 15 Mar 2007 00:01:16 -0000 1.27 *************** *** 179,183 **** returns = new wxProcess(parent, nId); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxProcess *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxProcess, returns); --- 179,183 ---- returns = new wxProcess(parent, nId); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxProcess((wxProcess *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxProcess, returns); *************** *** 283,308 **** } - static int LUACALL wxLua_wxProcess_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxProcess_Delete(lua_State *L) { wxLuaState wxlState(L); wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 283,296 ---- } static int LUACALL wxLua_wxProcess_Delete(lua_State *L) { wxLuaState wxlState(L); wxProcess * self = (wxProcess *)wxlState.GetUserDataType(1, s_wxluatag_wxProcess); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 335,339 **** { LuaMethod, "Redirect", wxLua_wxProcess_Redirect, 0, 0, s_wxluaargArray_None }, { LuaMethod, "IsRedirected", wxLua_wxProcess_IsRedirected, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxProcess", wxLua_wxProcess_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxProcess_Delete, 0, 0, s_wxluaargArray_None }, }; --- 323,326 ---- *************** *** 359,363 **** returns = new wxMouseState(); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxMouseState *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMouseState, returns); --- 346,350 ---- returns = new wxMouseState(); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxMouseState((wxMouseState *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxMouseState, returns); *************** *** 651,676 **** } - static int LUACALL wxLua_wxMouseState_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxMouseState * self = (wxMouseState *)wxlState.GetUserDataType(1, s_wxluatag_wxMouseState); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxMouseState_Delete(lua_State *L) { wxLuaState wxlState(L); wxMouseState * self = (wxMouseState *)wxlState.GetUserDataType(1, s_wxluatag_wxMouseState); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 638,651 ---- } static int LUACALL wxLua_wxMouseState_Delete(lua_State *L) { wxLuaState wxlState(L); wxMouseState * self = (wxMouseState *)wxlState.GetUserDataType(1, s_wxluatag_wxMouseState); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 700,704 **** { LuaMethod, "SetAltDown", wxLua_wxMouseState_SetAltDown, 1, 1, s_wxluatagArray_wxLua_wxMouseState_SetAltDown }, { LuaMethod, "SetMetaDown", wxLua_wxMouseState_SetMetaDown, 1, 1, s_wxluatagArray_wxLua_wxMouseState_SetMetaDown }, - { LuaDelete, "wxMouseState", wxLua_wxMouseState_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxMouseState_Delete, 0, 0, s_wxluaargArray_None }, }; --- 675,678 ---- *************** *** 734,738 **** returns = new wxBusyCursor(cursor); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxBusyCursor *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyCursor, returns); --- 708,712 ---- returns = new wxBusyCursor(cursor); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxBusyCursor((wxBusyCursor *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyCursor, returns); *************** *** 743,768 **** #endif // (wxLUA_USE_wxBusyCursor) && (wxLUA_USE_wxCursor) - static int LUACALL wxLua_wxBusyCursor_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxBusyCursor * self = (wxBusyCursor *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursor); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxBusyCursor_Delete(lua_State *L) { wxLuaState wxlState(L); wxBusyCursor * self = (wxBusyCursor *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursor); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 717,730 ---- #endif // (wxLUA_USE_wxBusyCursor) && (wxLUA_USE_wxCursor) static int LUACALL wxLua_wxBusyCursor_Delete(lua_State *L) { wxLuaState wxlState(L); wxBusyCursor * self = (wxBusyCursor *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursor); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 777,781 **** #endif // (wxLUA_USE_wxBusyCursor) && (wxLUA_USE_wxCursor) - { LuaDelete, "wxBusyCursor", wxLua_wxBusyCursor_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxBusyCursor_Delete, 0, 0, s_wxluaargArray_None }, }; --- 739,742 ---- *************** *** 801,805 **** returns = new wxBusyCursorSuspender(); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxBusyCursorSuspender *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyCursorSuspender, returns); --- 762,766 ---- returns = new wxBusyCursorSuspender(); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxBusyCursorSuspender((wxBusyCursorSuspender *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyCursorSuspender, returns); *************** *** 808,833 **** } - static int LUACALL wxLua_wxBusyCursorSuspender_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxBusyCursorSuspender * self = (wxBusyCursorSuspender *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursorSuspender); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxBusyCursorSuspender_Delete(lua_State *L) { wxLuaState wxlState(L); wxBusyCursorSuspender * self = (wxBusyCursorSuspender *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursorSuspender); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 769,782 ---- } static int LUACALL wxLua_wxBusyCursorSuspender_Delete(lua_State *L) { wxLuaState wxlState(L); wxBusyCursorSuspender * self = (wxBusyCursorSuspender *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyCursorSuspender); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 838,842 **** WXLUAMETHOD wxBusyCursorSuspender_methods[] = { { LuaConstructor, "wxBusyCursorSuspender", wxLua_wxBusyCursorSuspender_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxBusyCursorSuspender", wxLua_wxBusyCursorSuspender_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxBusyCursorSuspender_Delete, 0, 0, s_wxluaargArray_None }, }; --- 787,790 ---- *************** *** 869,873 **** returns = new wxBusyInfo(message, parent); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxBusyInfo *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyInfo, returns); --- 817,821 ---- returns = new wxBusyInfo(message, parent); // add to tracked memory list ! wxlState.AddTrackedObject((wxBusyInfo *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyInfo, returns); *************** *** 876,901 **** } - static int LUACALL wxLua_wxBusyInfo_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxBusyInfo * self = (wxBusyInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyInfo); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxBusyInfo_Delete(lua_State *L) { wxLuaState wxlState(L); wxBusyInfo * self = (wxBusyInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyInfo); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 824,837 ---- } static int LUACALL wxLua_wxBusyInfo_Delete(lua_State *L) { wxLuaState wxlState(L); wxBusyInfo * self = (wxBusyInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxBusyInfo); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 906,910 **** WXLUAMETHOD wxBusyInfo_methods[] = { { LuaConstructor, "wxBusyInfo", wxLua_wxBusyInfo_constructor, 2, 1, s_wxluatagArray_wxLua_wxBusyInfo_constructor }, - { LuaDelete, "wxBusyInfo", wxLua_wxBusyInfo_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxBusyInfo_Delete, 0, 0, s_wxluaargArray_None }, }; --- 842,845 ---- Index: wxlua.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wxlua.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wxlua.cpp 9 Mar 2007 00:15:18 -0000 1.30 --- wxlua.cpp 15 Mar 2007 00:01:24 -0000 1.31 *************** *** 33,58 **** int s_wxluatag_wxLuaState = -1; - static int LUACALL wxLua_wxLuaState_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxLuaState_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 33,46 ---- int s_wxluatag_wxLuaState = -1; static int LUACALL wxLua_wxLuaState_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaState * self = (wxLuaState *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaState); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 62,66 **** // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxLuaState_methods[] = { - { LuaDelete, "wxLuaState", wxLua_wxLuaState_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxLuaState_Delete, 0, 0, s_wxluaargArray_None }, }; --- 50,53 ---- *************** *** 84,88 **** returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); --- 71,75 ---- returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); *************** *** 171,196 **** } - static int LUACALL wxLua_wxLuaObject_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 158,171 ---- } static int LUACALL wxLua_wxLuaObject_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaObject * self = (wxLuaObject *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaObject); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 209,213 **** { LuaGetProp, "Object", wxLua_wxLuaObject_GetObject, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Object", wxLua_wxLuaObject_SetObject, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxLuaObject", wxLua_wxLuaObject_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxLuaObject_Delete, 0, 0, s_wxluaargArray_None }, }; --- 184,187 ---- *************** *** 240,244 **** returns = new wxLuaPrintout(wxlState, title, pObject); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxLuaPrintout *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaPrintout, returns); --- 214,218 ---- returns = new wxLuaPrintout(wxlState, title, pObject); // add to tracked memory list ! wxlState.AddTrackedObject((wxLuaPrintout *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaPrintout, returns); *************** *** 285,310 **** } - static int LUACALL wxLua_wxLuaPrintout_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 259,272 ---- } static int LUACALL wxLua_wxLuaPrintout_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaPrintout * self = (wxLuaPrintout *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaPrintout); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 317,321 **** { LuaMethod, "GetID", wxLua_wxLuaPrintout_GetID, 0, 0, s_wxluaargArray_None }, { LuaMethod, "SetPageInfo", wxLua_wxLuaPrintout_SetPageInfo, 4, 2, s_wxluatagArray_wxLua_wxLuaPrintout_SetPageInfo }, - { LuaDelete, "wxLuaPrintout", wxLua_wxLuaPrintout_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxLuaPrintout_Delete, 0, 0, s_wxluaargArray_None }, }; --- 279,282 ---- *************** *** 369,377 **** #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxPointSizeRect) - static int LUACALL wxLua_wxLuaHtmlWindow_destructor(lua_State *) - { - return 0; - } - --- 330,333 ---- *************** *** 383,387 **** #endif // (wxLUA_USE_wxLuaHtmlWindow) && (wxLUA_USE_wxPointSizeRect) - { LuaDelete, "wxLuaHtmlWindow", wxLua_wxLuaHtmlWindow_destructor, 0, 0, s_wxluaargArray_None }, }; --- 339,342 ---- *************** *** 464,489 **** } - static int LUACALL wxLua_wxLuaHtmlWinTagEvent_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 419,432 ---- } static int LUACALL wxLua_wxLuaHtmlWinTagEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaHtmlWinTagEvent * self = (wxLuaHtmlWinTagEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaHtmlWinTagEvent); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 505,509 **** { LuaGetProp, "ParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_GetParseInnerCalled, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "ParseInnerCalled", wxLua_wxLuaHtmlWinTagEvent_SetParseInnerCalled, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxLuaHtmlWinTagEvent", wxLua_wxLuaHtmlWinTagEvent_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxLuaHtmlWinTagEvent_Delete, 0, 0, s_wxluaargArray_None }, }; --- 448,451 ---- *************** *** 569,577 **** } - static int LUACALL wxLua_wxLuaTreeItemData_destructor(lua_State *) - { - return 0; - } - --- 511,514 ---- *************** *** 583,587 **** { LuaGetProp, "Value", wxLua_wxLuaTreeItemData_GetValue, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Value", wxLua_wxLuaTreeItemData_SetValue, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxLuaTreeItemData", wxLua_wxLuaTreeItemData_destructor, 0, 0, s_wxluaargArray_None }, }; --- 520,523 ---- Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** image.cpp 13 Mar 2007 23:01:57 -0000 1.31 --- image.cpp 15 Mar 2007 00:01:19 -0000 1.32 *************** *** 51,55 **** returns = new wxImage(self->Blur(radius)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 51,55 ---- returns = new wxImage(self->Blur(radius)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 72,76 **** returns = new wxImage(self->BlurHorizontal(radius)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 72,76 ---- returns = new wxImage(self->BlurHorizontal(radius)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 93,97 **** returns = new wxImage(self->BlurVertical(radius)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 93,97 ---- returns = new wxImage(self->BlurVertical(radius)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 120,124 **** returns = new wxImage(self->ConvertToGreyscale(lr, lg, lb)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 120,124 ---- returns = new wxImage(self->ConvertToGreyscale(lr, lg, lb)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 143,147 **** returns = new wxImage(self->ResampleBox(width, height)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 143,147 ---- returns = new wxImage(self->ResampleBox(width, height)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 166,170 **** returns = new wxImage(self->ResampleBicubic(width, height)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 166,170 ---- returns = new wxImage(self->ResampleBicubic(width, height)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 217,221 **** returns = new wxImage(self->Scale(width, height, quality)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 217,221 ---- returns = new wxImage(self->Scale(width, height, quality)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 240,244 **** returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 240,244 ---- returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 287,291 **** returns = new wxImage(self->Scale(width, height)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 287,291 ---- returns = new wxImage(self->Scale(width, height)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 326,330 **** returns = new wxPalette(self->GetPalette()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxPalette *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPalette, returns); --- 326,330 ---- returns = new wxPalette(self->GetPalette()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxPalette *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPalette, returns); *************** *** 366,370 **** returns = new wxImage(self->GetSubImage(*rect)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 366,370 ---- returns = new wxImage(self->GetSubImage(*rect)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 423,427 **** returns = new wxImage(self->Rotate(angle, *rotationCentre, interpolating, offsetAfterRotation)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 423,427 ---- returns = new wxImage(self->Rotate(angle, *rotationCentre, interpolating, offsetAfterRotation)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 454,458 **** returns = new wxImage(self->Size(*size, *pos, red, green, blue)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 454,458 ---- returns = new wxImage(self->Size(*size, *pos, red, green, blue)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 543,547 **** returns = new wxImage(*image); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 543,547 ---- returns = new wxImage(*image); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 558,562 **** returns = new wxImage(); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 558,562 ---- returns = new wxImage(); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 582,586 **** returns = new wxImage(width, height, clear); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 582,586 ---- returns = new wxImage(width, height, clear); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 609,613 **** returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 609,613 ---- returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 631,635 **** returns = new wxImage(name, type); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 631,635 ---- returns = new wxImage(name, type); // add to tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 697,701 **** returns = new wxImage(self->ConvertToMono(r, g, b)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 697,701 ---- returns = new wxImage(self->ConvertToMono(r, g, b)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 715,719 **** returns = new wxImage(self->Copy()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 715,719 ---- returns = new wxImage(self->Copy()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 1339,1343 **** returns = new wxImage(self->Mirror(horizontally)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1339,1343 ---- returns = new wxImage(self->Mirror(horizontally)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 1402,1406 **** returns = new wxImage(self->Rotate90(clockwise)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 1402,1406 ---- returns = new wxImage(self->Rotate90(clockwise)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxImage *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 1663,1688 **** } - static int LUACALL wxLua_wxImage_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxImage_Delete(lua_State *L) { wxLuaState wxlState(L); wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 1663,1676 ---- } static int LUACALL wxLua_wxImage_Delete(lua_State *L) { wxLuaState wxlState(L); wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 1802,1806 **** { LuaMethod, "SetRGB", wxLua_wxImage_SetRGB, 5, 5, s_wxluatagArray_wxLua_wxImage_SetRGB }, { LuaMethod, "op_assign", wxLua_wxImage_op_assign, 1, 1, s_wxluatagArray_wxLua_wxImage_op_assign }, - { LuaDelete, "wxImage", wxLua_wxImage_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxImage_Delete, 0, 0, s_wxluaargArray_None }, }; --- 1790,1793 ---- *************** *** 1881,1889 **** } - static int LUACALL wxLua_wxImageHistogramEntry_destructor(lua_State *) - { - return 0; - } - --- 1868,1871 ---- *************** *** 1899,1903 **** { LuaMethod, "SetValue", wxLua_wxImageHistogramEntry_SetValue, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "value", wxLua_wxImageHistogramEntry_SetValue, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxImageHistogramEntry", wxLua_wxImageHistogramEntry_destructor, 0, 0, s_wxluaargArray_None }, }; --- 1881,1884 ---- *************** *** 2002,2010 **** } - static int LUACALL wxLua_wxImageHistogram_iterator_destructor(lua_State *) - { - return 0; - } - --- 1983,1986 ---- *************** *** 2021,2025 **** { LuaMethod, "op_eq", wxLua_wxImageHistogram_iterator_op_eq, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_iterator_op_eq }, { LuaMethod, "op_inc", wxLua_wxImageHistogram_iterator_op_inc, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxImageHistogram_iterator", wxLua_wxImageHistogram_iterator_destructor, 0, 0, s_wxluaargArray_None }, }; --- 1997,2000 ---- *************** *** 2080,2084 **** returns = new wxImageHistogram::iterator(self->begin()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImageHistogram::iterator *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); --- 2055,2059 ---- returns = new wxImageHistogram::iterator(self->begin()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxImageHistogram_iterator((wxImageHistogram::iterator *)returns)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); *************** *** 2143,2147 **** returns = new wxImageHistogram::iterator(self->end()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImageHistogram::iterator *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); --- 2118,2122 ---- returns = new wxImageHistogram::iterator(self->end()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxImageHistogram_iterator((wxImageHistogram::iterator *)returns)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); *************** *** 2182,2186 **** returns = new wxImageHistogram::iterator(self->find(key)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxImageHistogram::iterator *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); --- 2157,2161 ---- returns = new wxImageHistogram::iterator(self->find(key)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxImageHistogram_iterator((wxImageHistogram::iterator *)returns)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); *************** *** 2204,2212 **** } - static int LUACALL wxLua_wxImageHistogram_destructor(lua_State *) - { - return 0; - } - --- 2179,2182 ---- *************** *** 2223,2227 **** { LuaMethod, "find", wxLua_wxImageHistogram_find, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_find }, { LuaMethod, "size", wxLua_wxImageHistogram_size, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxImageHistogram", wxLua_wxImageHistogram_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2193,2196 ---- *************** *** 2426,2451 **** } - static int LUACALL wxLua_wxImageHandler_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxImageHandler * self = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxImageHandler_Delete(lua_State *L) { wxLuaState wxlState(L); wxImageHandler * self = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 2395,2408 ---- } static int LUACALL wxLua_wxImageHandler_Delete(lua_State *L) { wxLuaState wxlState(L); wxImageHandler * self = (wxImageHandler *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHandler); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 2478,2482 **** { LuaGetProp, "Type", wxLua_wxImageHandler_GetType, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "Type", wxLua_wxImageHandler_SetType, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxImageHandler", wxLua_wxImageHandler_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxImageHandler_Delete, 0, 0, s_wxluaargArray_None }, }; --- 2435,2438 ---- *************** *** 2510,2518 **** } - static int LUACALL wxLua_wxBMPHandler_destructor(lua_State *) - { - return 0; - } - --- 2466,2469 ---- *************** *** 2520,2524 **** WXLUAMETHOD wxBMPHandler_methods[] = { { LuaConstructor, "wxBMPHandler", wxLua_wxBMPHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxBMPHandler", wxLua_wxBMPHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2471,2474 ---- *************** *** 2551,2559 **** } - static int LUACALL wxLua_wxICOHandler_destructor(lua_State *) - { - return 0; - } - --- 2501,2504 ---- *************** *** 2561,2565 **** WXLUAMETHOD wxICOHandler_methods[] = { { LuaConstructor, "wxICOHandler", wxLua_wxICOHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxICOHandler", wxLua_wxICOHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2506,2509 ---- *************** *** 2592,2600 **** } - static int LUACALL wxLua_wxCURHandler_destructor(lua_State *) - { - return 0; - } - --- 2536,2539 ---- *************** *** 2602,2606 **** WXLUAMETHOD wxCURHandler_methods[] = { { LuaConstructor, "wxCURHandler", wxLua_wxCURHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxCURHandler", wxLua_wxCURHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2541,2544 ---- *************** *** 2633,2641 **** } - static int LUACALL wxLua_wxANIHandler_destructor(lua_State *) - { - return 0; - } - --- 2571,2574 ---- *************** *** 2643,2647 **** WXLUAMETHOD wxANIHandler_methods[] = { { LuaConstructor, "wxANIHandler", wxLua_wxANIHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxANIHandler", wxLua_wxANIHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2576,2579 ---- *************** *** 2674,2682 **** } - static int LUACALL wxLua_wxIFFHandler_destructor(lua_State *) - { - return 0; - } - --- 2606,2609 ---- *************** *** 2684,2688 **** WXLUAMETHOD wxIFFHandler_methods[] = { { LuaConstructor, "wxIFFHandler", wxLua_wxIFFHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxIFFHandler", wxLua_wxIFFHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2611,2614 ---- *************** *** 2715,2723 **** } - static int LUACALL wxLua_wxGIFHandler_destructor(lua_State *) - { - return 0; - } - --- 2641,2644 ---- *************** *** 2725,2729 **** WXLUAMETHOD wxGIFHandler_methods[] = { { LuaConstructor, "wxGIFHandler", wxLua_wxGIFHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxGIFHandler", wxLua_wxGIFHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2646,2649 ---- *************** *** 2756,2764 **** } - static int LUACALL wxLua_wxJPEGHandler_destructor(lua_State *) - { - return 0; - } - --- 2676,2679 ---- *************** *** 2766,2770 **** WXLUAMETHOD wxJPEGHandler_methods[] = { { LuaConstructor, "wxJPEGHandler", wxLua_wxJPEGHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxJPEGHandler", wxLua_wxJPEGHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2681,2684 ---- *************** *** 2797,2805 **** } - static int LUACALL wxLua_wxPCXHandler_destructor(lua_State *) - { - return 0; - } - --- 2711,2714 ---- *************** *** 2807,2811 **** WXLUAMETHOD wxPCXHandler_methods[] = { { LuaConstructor, "wxPCXHandler", wxLua_wxPCXHandler_constructor, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxPCXHandler", wxLua_wxPCXHandler_destructor, 0, 0, s_wxluaargArray_None }, }; --- 2716,2719 ---- *************** *** 2838,2846 **** } - static int LUACALL wxLua_wxPNGHandler_destructor(lua_State *) - { - return 0; - } - --- 2746,2749 ---- *********... [truncated message content] |
From: John L. <jr...@us...> - 2007-03-15 00:01:51
|
Update of /cvsroot/wxlua/wxLua/apps/wxluacan/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/apps/wxluacan/src Modified Files: wxluacan.cpp wxluacan.h Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxluacan.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** wxluacan.cpp 9 Mar 2007 06:10:13 -0000 1.22 --- wxluacan.cpp 15 Mar 2007 00:01:08 -0000 1.23 *************** *** 126,134 **** } - static int LUACALL wxLua_wxlCanObj_destructor(lua_State *) - { - return 0; - } - #if wxLUA_USE_wxColourPenBrush --- 126,129 ---- *************** *** 175,179 **** { LuaMethod, "SetPending", wxLua_wxlCanObj_SetPending, 1, 0, s_wxluatagArray_wxLua_wxlCanObj_SetPending }, { LuaMethod, "AddObject", wxLua_wxlCanObj_AddObject, 1, 1, s_wxluatagArray_wxLua_wxlCanObj_AddObject }, - { LuaDelete, "wxlCanObj", wxLua_wxlCanObj_destructor, 0, 0, s_wxluaargArray_None }, #if wxLUA_USE_wxColourPenBrush --- 170,173 ---- *************** *** 215,223 **** } - static int LUACALL wxLua_wxlCanObjRect_destructor(lua_State *) - { - return 0; - } - --- 209,212 ---- *************** *** 225,229 **** WXLUAMETHOD wxlCanObjRect_methods[] = { { LuaConstructor, "wxlCanObjRect", wxLua_wxlCanObjRect_constructor, 4, 4, s_wxluatagArray_wxLua_wxlCanObjRect_constructor }, - { LuaDelete, "wxlCanObjRect", wxLua_wxlCanObjRect_destructor, 0, 0, s_wxluaargArray_None }, }; --- 214,217 ---- *************** *** 257,265 **** } - static int LUACALL wxLua_wxlCanObjCircle_destructor(lua_State *) - { - return 0; - } - --- 245,248 ---- *************** *** 267,271 **** WXLUAMETHOD wxlCanObjCircle_methods[] = { { LuaConstructor, "wxlCanObjCircle", wxLua_wxlCanObjCircle_constructor, 3, 3, s_wxluatagArray_wxLua_wxlCanObjCircle_constructor }, - { LuaDelete, "wxlCanObjCircle", wxLua_wxlCanObjCircle_destructor, 0, 0, s_wxluaargArray_None }, }; --- 250,253 ---- *************** *** 299,307 **** } - static int LUACALL wxLua_wxlCanObjScript_destructor(lua_State *) - { - return 0; - } - --- 281,284 ---- *************** *** 309,313 **** WXLUAMETHOD wxlCanObjScript_methods[] = { { LuaConstructor, "wxlCanObjScript", wxLua_wxlCanObjScript_constructor, 3, 3, s_wxluatagArray_wxLua_wxlCanObjScript_constructor }, - { LuaDelete, "wxlCanObjScript", wxLua_wxlCanObjScript_destructor, 0, 0, s_wxluaargArray_None }, }; --- 286,289 ---- *************** *** 356,364 **** } - static int LUACALL wxLua_wxlCanObjAddScript_destructor(lua_State *) - { - return 0; - } - --- 332,335 ---- *************** *** 367,371 **** { LuaConstructor, "wxlCanObjAddScript", wxLua_wxlCanObjAddScript_constructor, 3, 3, s_wxluatagArray_wxLua_wxlCanObjAddScript_constructor }, { LuaMethod, "SetScript", wxLua_wxlCanObjAddScript_SetScript, 1, 1, s_wxluatagArray_wxLua_wxlCanObjAddScript_SetScript }, - { LuaDelete, "wxlCanObjAddScript", wxLua_wxlCanObjAddScript_destructor, 0, 0, s_wxluaargArray_None }, }; --- 338,341 ---- *************** *** 424,432 **** } - static int LUACALL wxLua_wxlCan_destructor(lua_State *) - { - return 0; - } - #if wxLUA_USE_wxPointSizeRect --- 394,397 ---- *************** *** 464,468 **** { LuaMethod, "GetYaxis", wxLua_wxlCan_GetYaxis, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetCmdh", wxLua_wxlCan_GetCmdh, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxlCan", wxLua_wxlCan_destructor, 0, 0, s_wxluaargArray_None }, #if wxLUA_USE_wxPointSizeRect --- 429,432 ---- *************** *** 520,528 **** } - static int LUACALL wxLua_wxlLuaCanCmd_destructor(lua_State *) - { - return 0; - } - --- 484,487 ---- *************** *** 531,535 **** { LuaConstructor, "wxlLuaCanCmd", wxLua_wxlLuaCanCmd_constructor, 2, 1, s_wxluatagArray_wxLua_wxlLuaCanCmd_constructor }, { LuaMethod, "MoveObject", wxLua_wxlLuaCanCmd_MoveObject, 3, 3, s_wxluatagArray_wxLua_wxlLuaCanCmd_MoveObject }, - { LuaDelete, "wxlLuaCanCmd", wxLua_wxlLuaCanCmd_destructor, 0, 0, s_wxluaargArray_None }, }; --- 490,493 ---- Index: wxluacan.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/apps/wxluacan/src/wxluacan.h,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** wxluacan.h 26 Feb 2007 01:57:00 -0000 1.20 --- wxluacan.h 15 Mar 2007 00:01:08 -0000 1.21 *************** *** 18,24 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 5 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 5 // --------------------------------------------------------------------------- --- 18,24 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 6 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 6 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-03-15 00:01:51
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxbind/include Modified Files: wxbind.h Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbind.h,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** wxbind.h 13 Mar 2007 23:01:54 -0000 1.60 --- wxbind.h 15 Mar 2007 00:01:13 -0000 1.61 *************** *** 43,49 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 5 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 5 // --------------------------------------------------------------------------- --- 43,49 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 6 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 6 // --------------------------------------------------------------------------- *************** *** 296,299 **** --- 296,300 ---- #include "wx/config.h" #include "wx/fileconf.h" + #include "wx/memconf.h" #endif // wxLUA_USE_wxConfig && wxUSE_CONFIG *************** *** 698,706 **** #endif // (defined(__WXMSW__) || defined(__WXMAC__)) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) - #if (defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxBitmapHandler; - extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxGDIImageHandler; - #endif // (defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - #if (defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP) extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxBestHelpController; --- 699,702 ---- *************** *** 708,715 **** #endif // (defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP) - #if (wxCHECK_VERSION(2,5,0) && defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxGDIImageHandlerList; - #endif // (wxCHECK_VERSION(2,5,0) && defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - #if (wxCHECK_VERSION(2,6,0) && wxUSE_SOUND) && (wxLUA_USE_wxWave) extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxSound; --- 704,707 ---- *************** *** 1032,1035 **** --- 1024,1028 ---- extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxConfigPathChanger; extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxFileConfig; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxMemoryConfig; #endif // wxLUA_USE_wxConfig && wxUSE_CONFIG *************** *** 1611,1621 **** #endif // (defined(__WXMSW__) || defined(__WXMAC__)) && (wxLUA_USE_wxPrint && wxUSE_PRINTING_ARCHITECTURE) - #if (defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxBitmapHandler_methods[]; - extern WXDLLIMPEXP_DATA_WXBIND(int) wxBitmapHandler_methodCount; - extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxGDIImageHandler_methods[]; - extern WXDLLIMPEXP_DATA_WXBIND(int) wxGDIImageHandler_methodCount; - #endif // (defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - #if (defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP) extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxBestHelpController_methods[]; --- 1604,1607 ---- *************** *** 1625,1633 **** #endif // (defined(__WXMSW__)) && (wxLUA_USE_wxHelpController && wxUSE_HELP) - #if (wxCHECK_VERSION(2,5,0) && defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxGDIImageHandlerList_methods[]; - extern WXDLLIMPEXP_DATA_WXBIND(int) wxGDIImageHandlerList_methodCount; - #endif // (wxCHECK_VERSION(2,5,0) && defined(__WXMSW__)) && (wxLUA_USE_wxBitmap) - #if (wxCHECK_VERSION(2,6,0) && wxUSE_SOUND) && (wxLUA_USE_wxWave) extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxSound_methods[]; --- 1611,1614 ---- *************** *** 2091,2094 **** --- 2072,2077 ---- extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxFileConfig_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxFileConfig_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxMemoryConfig_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxMemoryConfig_methodCount; #endif // wxLUA_USE_wxConfig && wxUSE_CONFIG |
From: John L. <jr...@us...> - 2007-03-15 00:01:50
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/docs Modified Files: changelog.txt Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: changelog.txt =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/changelog.txt,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** changelog.txt 23 Feb 2007 04:35:30 -0000 1.24 --- changelog.txt 15 Mar 2007 00:01:12 -0000 1.25 *************** *** 6,14 **** -------------------------------------------------------------------- ! - Added RUNTIME_LIBS and THREADING options to the build system to allow to statically compile against the C runtime (only for some win compilers) - Added all of the wxWidget's wxUSE_XXX conditions to the bindings - Hopefully fixed the wx2lua and lua2wx string conversion for unicode and high ascii characters. version 2.8.0.0 (released 24/12/2006) --- 6,16 ---- -------------------------------------------------------------------- ! - Added RUNTIME_LIBS and THREADING options to the build system to allow to statically compile against the C runtime (only for some win compilers) - Added all of the wxWidget's wxUSE_XXX conditions to the bindings - Hopefully fixed the wx2lua and lua2wx string conversion for unicode and high ascii characters. + - Removed gc destructor functions, we can do it in the gc function itself. + - Removed wxLua_AddTrackedObject functions, use wxLuaState::AddTrackedObject. version 2.8.0.0 (released 24/12/2006) |
From: John L. <jr...@us...> - 2007-03-15 00:01:50
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/bindings/wxwidgets Modified Files: appframe.i gdi.i override.hpp wx_datatypes.lua Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** appframe.i 14 Mar 2007 05:08:09 -0000 1.30 --- appframe.i 15 Mar 2007 00:01:12 -0000 1.31 *************** *** 47,51 **** %typedef wxTraceMask unsigned long ! %class %noclassinfo %encapsulate wxLog wxLog() --- 47,51 ---- %typedef wxTraceMask unsigned long ! %class %delete %noclassinfo %encapsulate wxLog wxLog() *************** *** 55,58 **** --- 55,61 ---- static void FlushActive() static wxLog *GetActiveTarget() + // You must call SetActiveTarget(wx.NULL) before deleting any targets you've set + // and when your program exists. The wxLog must also exist for the life of + // the program as well, or until you null it. static wxLog *SetActiveTarget(wxLog *pLogger) static void Suspend() *************** *** 79,83 **** // wxLogBuffer ! %class %noclassinfo %encapsulate wxLogBuffer, wxLog wxLogBuffer() --- 82,86 ---- // wxLogBuffer ! %class %delete %noclassinfo %encapsulate wxLogBuffer, wxLog wxLogBuffer() *************** *** 88,92 **** // wxLogStderr - FIXME need to implement FILE* ! //%class %noclassinfo %encapsulate wxLogStderr, wxLog // wxLogStderr(FILE *fp = (FILE *) NULL) // redirect log output to a FILE //%endclass --- 91,95 ---- // wxLogStderr - FIXME need to implement FILE* ! //%class %delete %noclassinfo %encapsulate wxLogStderr, wxLog // wxLogStderr(FILE *fp = (FILE *) NULL) // redirect log output to a FILE //%endclass *************** *** 95,99 **** // wxLogStream - FIXME need to implement wxSTD ostream* ! //%class %noclassinfo %encapsulate wxLogStream, wxLog // wxLogStream(wxSTD ostream *ostr = NULL); // redirect log output to an ostream //%endclass --- 98,102 ---- // wxLogStream - FIXME need to implement wxSTD ostream* ! //%class %delete %noclassinfo %encapsulate wxLogStream, wxLog // wxLogStream(wxSTD ostream *ostr = NULL); // redirect log output to an ostream //%endclass *************** *** 102,106 **** // wxLogChain ! %class %noclassinfo %encapsulate wxLogChain, wxLog wxLogChain(wxLog *logger) --- 105,109 ---- // wxLogChain ! %class %delete %noclassinfo %encapsulate wxLogChain, wxLog wxLogChain(wxLog *logger) *************** *** 118,122 **** // wxLogPassThrough - a chain log target which uses itself as the new logger ! %class %noclassinfo %encapsulate wxLogPassThrough, wxLogChain wxLogPassThrough() --- 121,125 ---- // wxLogPassThrough - a chain log target which uses itself as the new logger ! %class %delete %noclassinfo %encapsulate wxLogPassThrough, wxLogChain wxLogPassThrough() *************** *** 126,130 **** // wxLogNull ! %class %noclassinfo %encapsulate %delete wxLogNull // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxLogNull() --- 129,133 ---- // wxLogNull ! %class %delete %noclassinfo %encapsulate wxLogNull // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough wxLogNull() Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** wx_datatypes.lua 14 Mar 2007 05:08:09 -0000 1.57 --- wx_datatypes.lua 15 Mar 2007 00:01:12 -0000 1.58 *************** *** 199,202 **** --- 199,203 ---- Condition = "wxCHECK_VERSION(2,8,0) && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxAboutDialogInfo", *************** *** 205,208 **** --- 206,210 ---- Condition = "wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxAcceleratorEntry", *************** *** 236,239 **** --- 238,242 ---- Condition = "wxLUA_USE_wxArrayInt", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayInt", *************** *** 247,250 **** --- 250,254 ---- Condition = "wxLUA_USE_wxArrayString", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayString", *************** *** 258,261 **** --- 262,266 ---- Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayTreeItemIds", *************** *** 264,267 **** --- 269,273 ---- Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayVideoModes", *************** *** 318,330 **** Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", IsNumber = false, Name = "wxBitmapDataObject", }, - wxBitmapHandler = { - Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxBitmap)", - DefType = "class", - IsNumber = false, - Name = "wxBitmapHandler", - }, wxBitmapType = { DefType = "enum", --- 324,331 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxBitmapDataObject", }, wxBitmapType = { DefType = "enum", *************** *** 389,392 **** --- 390,394 ---- Condition = "wxLUA_USE_wxBusyCursor", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxBusyCursor", *************** *** 395,398 **** --- 397,401 ---- Condition = "wxLUA_USE_wxBusyCursor", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxBusyCursorSuspender", *************** *** 441,444 **** --- 444,448 ---- Condition = "wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCalendarDateAttr", *************** *** 472,475 **** --- 476,480 ---- Condition = "wxLUA_USE_wxCaret && wxUSE_CARET", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCaretSuspend", *************** *** 588,591 **** --- 593,597 ---- Condition = "wxLUA_USE_wxColourPenBrush", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxColourDatabase", *************** *** 647,650 **** --- 653,657 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxConfigPathChanger", *************** *** 685,688 **** --- 692,696 ---- Condition = "wxLUA_USE_wxCriticalSection && wxUSE_THREADS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCriticalSection", *************** *** 691,694 **** --- 699,703 ---- Condition = "wxLUA_USE_wxCriticalSectionLocker", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCriticalSectionLocker", *************** *** 711,714 **** --- 720,724 ---- Condition = "wxLUA_USE_wxDC", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDCClipper", *************** *** 717,720 **** --- 727,731 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataFormat", *************** *** 748,751 **** --- 759,763 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataObjectComposite", *************** *** 755,758 **** --- 767,771 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataObjectSimple", *************** *** 781,784 **** --- 794,798 ---- Condition = "wxLUA_USE_wxDateSpan && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateSpan", *************** *** 787,790 **** --- 801,805 ---- Condition = "wxLUA_USE_wxDateTime && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTime", *************** *** 823,826 **** --- 838,842 ---- Condition = "wxLUA_USE_wxDateTime && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTimeArray", *************** *** 829,832 **** --- 845,849 ---- Condition = "wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTimeHolidayAuthority", *************** *** 836,839 **** --- 853,857 ---- Condition = "wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTimeWorkDays", *************** *** 849,852 **** --- 867,871 ---- Condition = "wxLUA_USE_wxDir", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDir", *************** *** 867,870 **** --- 886,890 ---- Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDisplay", *************** *** 932,935 **** --- 952,956 ---- Condition = "wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDropSource", *************** *** 1011,1014 **** --- 1032,1036 ---- Condition = "wxLUA_USE_wxFile && wxUSE_FILE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFile", *************** *** 1037,1040 **** --- 1059,1063 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileDataObject", *************** *** 1070,1073 **** --- 1093,1097 ---- Condition = "wxLUA_USE_wxFileName", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileName", *************** *** 1175,1178 **** --- 1199,1203 ---- Condition = "wxLUA_USE_wxFontEnumerator", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFontEnumerator", *************** *** 1218,1221 **** --- 1243,1247 ---- Condition = "wxLUA_USE_wxSizer", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGBPosition", *************** *** 1231,1250 **** Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, Name = "wxGBSpan", }, - wxGDIImageHandler = { - Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxBitmap)", - DefType = "class", - IsNumber = false, - Name = "wxGDIImageHandler", - }, - wxGDIImageHandlerList = { - BaseClass = "wxList", - Condition = "(wxCHECK_VERSION(2,5,0) && defined(__WXMSW__)) && (wxLUA_USE_wxBitmap)", - DefType = "class", - IsNumber = false, - Name = "wxGDIImageHandlerList", - }, wxGDIObject = { BaseClass = "wxObject", --- 1257,1264 ---- Condition = "wxLUA_USE_wxSizer", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGBSpan", }, wxGDIObject = { BaseClass = "wxObject", *************** *** 1373,1376 **** --- 1387,1391 ---- Condition = "wxLUA_USE_wxGrid && wxUSE_GRID", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGridCellCoords", *************** *** 1539,1542 **** --- 1554,1558 ---- Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxHelpControllerHelpProvider", *************** *** 1557,1560 **** --- 1573,1577 ---- Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxHelpProvider", *************** *** 1709,1712 **** --- 1726,1730 ---- Condition = "wxLUA_USE_wxIcon", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxIconBundle", *************** *** 1715,1718 **** --- 1733,1737 ---- Condition = "wxLUA_USE_wxIcon", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxIconLocation", *************** *** 1752,1755 **** --- 1771,1775 ---- Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxImageHistogram", *************** *** 1758,1761 **** --- 1778,1782 ---- Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxImageHistogram::iterator", *************** *** 1764,1767 **** --- 1785,1789 ---- Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxImageHistogramEntry", *************** *** 1952,1955 **** --- 1974,1978 ---- Condition = "wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxListItemAttr", *************** *** 1979,1982 **** --- 2002,2006 ---- Condition = "wxUSE_INTL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxLocale", *************** *** 2003,2006 **** --- 2027,2031 ---- Condition = "wxUSE_LOG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxLog", *************** *** 2010,2013 **** --- 2035,2039 ---- Condition = "wxUSE_LOG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxLogBuffer", *************** *** 2017,2020 **** --- 2043,2047 ---- Condition = "wxUSE_LOG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxLogChain", *************** *** 2023,2026 **** --- 2050,2054 ---- Condition = "wxUSE_LOG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxLogNull", *************** *** 2030,2033 **** --- 2058,2062 ---- Condition = "wxUSE_LOG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxLogPassThrough", *************** *** 2036,2039 **** --- 2065,2069 ---- Condition = "wxUSE_LONGLONG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxLongLong", *************** *** 2255,2258 **** --- 2285,2289 ---- Condition = "wxCHECK_VERSION(2,7,0)", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxMouseState", *************** *** 2274,2277 **** --- 2305,2309 ---- Condition = "wxLUA_USE_wxFont", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxNativeFontInfo", *************** *** 2440,2443 **** --- 2472,2476 ---- BaseClass = "wxArrayString", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPathList", *************** *** 2466,2469 **** --- 2499,2503 ---- Condition = "wxLUA_USE_wxPointSizeRect", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPoint", *************** *** 2472,2475 **** --- 2506,2510 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPoint2DDouble", *************** *** 2478,2481 **** --- 2513,2517 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPoint2DInt", *************** *** 2586,2589 **** --- 2622,2626 ---- Condition = "wxLUA_USE_wxProcess", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxProcess", *************** *** 2604,2607 **** --- 2641,2645 ---- wxPropagateOnce = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPropagateOnce", *************** *** 2609,2612 **** --- 2647,2651 ---- wxPropagationDisabler = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPropagationDisabler", *************** *** 2655,2658 **** --- 2694,2698 ---- Condition = "wxLUA_USE_wxPointSizeRect", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRect", *************** *** 2661,2664 **** --- 2701,2705 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRect2DDouble", *************** *** 2667,2670 **** --- 2708,2712 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRect2DInt", *************** *** 2673,2676 **** --- 2715,2719 ---- Condition = "wxLUA_USE_wxRegEx && wxUSE_REGEX", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRegEx", *************** *** 2796,2799 **** --- 2839,2843 ---- Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxSimpleHelpProvider", *************** *** 2816,2819 **** --- 2860,2864 ---- Condition = "wxLUA_USE_wxPointSizeRect", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxSize", *************** *** 2915,2918 **** --- 2960,2964 ---- Condition = "wxLUA_USE_wxArrayString", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxSortedArrayString", *************** *** 3026,3029 **** --- 3072,3076 ---- Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush)", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxStockGDI", *************** *** 3054,3057 **** --- 3101,3105 ---- wxString = { DefType = "special", + Encapsulate = true, IsNumber = true, Name = "wxString", *************** *** 3157,3160 **** --- 3205,3209 ---- Condition = "wxLUA_USE_wxFile && wxUSE_FILE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTempFile", *************** *** 3163,3166 **** --- 3212,3216 ---- Condition = "wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTextAttr", *************** *** 3194,3197 **** --- 3244,3248 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTextDataObject", *************** *** 3214,3217 **** --- 3265,3269 ---- Condition = "wxLUA_USE_wxTimeSpan && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTimeSpan", *************** *** 3328,3331 **** --- 3380,3384 ---- Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTreeItemId", *************** *** 3340,3343 **** --- 3393,3397 ---- Condition = "wxUSE_LONGLONG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxULongLong", *************** *** 3379,3382 **** --- 3433,3437 ---- Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ)", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxURLDataObject", *************** *** 3434,3437 **** --- 3489,3493 ---- Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxVideoMode", *************** *** 3490,3493 **** --- 3546,3550 ---- wxWindowDisabler = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxWindowDisabler", *************** *** 3559,3562 **** --- 3616,3620 ---- Condition = "wxLUA_USE_wxXMLResource && wxUSE_XML", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxXmlNode", *************** *** 3571,3574 **** --- 3629,3633 ---- Condition = "wxLUA_USE_wxXMLResource && wxUSE_XML", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxXmlProperty", Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.44 retrieving revision 1.45 diff -C2 -d -r1.44 -r1.45 *** gdi.i 14 Mar 2007 05:08:09 -0000 1.44 --- gdi.i 15 Mar 2007 00:01:12 -0000 1.45 *************** *** 167,171 **** %endenum ! %class wxRegion, wxGDIObject %overload wxRegion(long x = 0, long y = 0, long width = 0, long height = 0) %overload %constructor wxRegionFromPoints(const wxPoint& topLeft, const wxPoint& bottomRight) --- 167,171 ---- %endenum ! %class %delete wxRegion, wxGDIObject %overload wxRegion(long x = 0, long y = 0, long width = 0, long height = 0) %overload %constructor wxRegionFromPoints(const wxPoint& topLeft, const wxPoint& bottomRight) *************** *** 208,212 **** // wxRegionIterator ! %class wxRegionIterator, wxObject wxRegionIterator(const wxRegion& region) --- 208,212 ---- // wxRegionIterator ! %class %delete wxRegionIterator, wxObject wxRegionIterator(const wxRegion& region) *************** *** 472,476 **** %include "wx/fontutil.h" ! %class %noclassinfo %encapsulate wxNativeFontInfo wxNativeFontInfo() %constructor wxNativeFontInfoCopy(const wxNativeFontInfo& info) --- 472,476 ---- %include "wx/fontutil.h" ! %class %delete %noclassinfo %encapsulate wxNativeFontInfo wxNativeFontInfo() %constructor wxNativeFontInfoCopy(const wxNativeFontInfo& info) *************** *** 478,482 **** // accessors and modifiers for the font elements int GetPointSize() const ! %wxchkver_2_8_1 wxSize GetPixelSize() const wxFontStyle GetStyle() const wxFontWeight GetWeight() const --- 478,482 ---- // accessors and modifiers for the font elements int GetPointSize() const ! %msw wxSize GetPixelSize() const // FIXME wxWidgets has undefined symbol in gtk/mac wxFontStyle GetStyle() const wxFontWeight GetWeight() const *************** *** 487,491 **** void SetPointSize(int pointsize) ! %wxchkver_2_8_1 void SetPixelSize(const wxSize& pixelSize) void SetStyle(wxFontStyle style) void SetWeight(wxFontWeight weight) --- 487,491 ---- void SetPointSize(int pointsize) ! %msw void SetPixelSize(const wxSize& pixelSize) void SetStyle(wxFontStyle style) void SetWeight(wxFontWeight weight) *************** *** 620,624 **** !%wxchkver_2_8 wxColour(unsigned char red, unsigned char green, unsigned char blue) ! %wxchkver_2_8 wxColour(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha) %constructor wxNamedColour(const wxString& colourName) // wxPython compatibility %constructor wxColourCopy(const wxColour& colour) --- 620,624 ---- !%wxchkver_2_8 wxColour(unsigned char red, unsigned char green, unsigned char blue) ! %wxchkver_2_8 wxColour(unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha = wxALPHA_OPAQUE) %constructor wxNamedColour(const wxString& colourName) // wxPython compatibility %constructor wxColourCopy(const wxColour& colour) *************** *** 844,848 **** %class %noclassinfo %encapsulate wxStockGDI ! wxStockGDI() //static void DeleteAll() --- 844,848 ---- %class %noclassinfo %encapsulate wxStockGDI ! //wxStockGDI() use instance to get the implemented wxStockGDI //static void DeleteAll() *************** *** 938,942 **** %include "wx/iconloc.h" ! %class %noclassinfo %encapsulate wxIconLocation // ctor takes the name of the file where the icon is !%msw wxIconLocation(const wxString& filename = "") --- 938,942 ---- %include "wx/iconloc.h" ! %class %delete %noclassinfo %encapsulate wxIconLocation // ctor takes the name of the file where the icon is !%msw wxIconLocation(const wxString& filename = "") *************** *** 964,973 **** %include "wx/bitmap.h" ! %win %class %noclassinfo wxBitmapHandler // are these even necessary? ! %endclass ! %win %class %noclassinfo wxGDIImageHandler ! %endclass ! %wxchkver_2_5&%win %class %noclassinfo wxGDIImageHandlerList, wxList ! %endclass %class %delete wxBitmap, wxGDIObject --- 964,973 ---- %include "wx/bitmap.h" ! //%win %class %delete %noclassinfo wxBitmapHandler // are these even necessary? ! //%endclass ! //%win %class %delete %noclassinfo wxGDIImageHandler ! //%endclass ! //%wxchkver_2_5&%win %class %noclassinfo wxGDIImageHandlerList, wxList ! //%endclass %class %delete wxBitmap, wxGDIObject Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.63 retrieving revision 1.64 diff -C2 -d -r1.63 -r1.64 *** override.hpp 13 Mar 2007 05:01:00 -0000 1.63 --- override.hpp 15 Mar 2007 00:01:12 -0000 1.64 *************** *** 190,194 **** if (returns != NULL) { ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxAcceleratorTable, returns); --- 190,194 ---- if (returns != NULL) { ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxAcceleratorTable, returns); *************** *** 858,862 **** returns = new wxTreeItemId(self->GetFirstChild(*item, cookie)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); --- 858,862 ---- returns = new wxTreeItemId(self->GetFirstChild(*item, cookie)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxTreeItemId(returns)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); *************** *** 893,897 **** returns = new wxTreeItemId(self->GetNextChild(*item, cookie)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); --- 893,897 ---- returns = new wxTreeItemId(self->GetNextChild(*item, cookie)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxTreeItemId(returns)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, returns); *************** *** 924,927 **** --- 924,928 ---- { wxTreeItemId* treeId = new wxTreeItemId(selection[idx]); + wxlState.AddTrackedObject((long)treeId, new wxObject_wxTreeItemId(treeId)); wxlState.PushUserDataType(s_wxluatag_wxTreeItemId, treeId); lua_rawseti(L, -2, idx + 1); *************** *** 948,952 **** returns = new wxTreeItemId(self->HitTest(*point, flags)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the result datatype --- 949,953 ---- returns = new wxTreeItemId(self->HitTest(*point, flags)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxTreeItemId(returns)); // push the result datatype *************** *** 975,979 **** returns = new wxString(str); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxString, returns); --- 976,980 ---- returns = new wxString(str); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxString(returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxString, returns); *************** *** 1157,1161 **** returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); --- 1158,1162 ---- returns = new wxGenericValidator(boolPtr->GetBoolPtr()); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); *************** *** 1176,1180 **** returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); --- 1177,1181 ---- returns = new wxGenericValidator(valPtr->GetStringPtr()); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); *************** *** 1195,1199 **** returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); --- 1196,1200 ---- returns = new wxGenericValidator(valPtr->GetIntPtr()); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); *************** *** 1214,1218 **** returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); --- 1215,1219 ---- returns = new wxGenericValidator(valPtr->GetArrayPtr()); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxGenericValidator, returns); *************** *** 1476,1480 **** returns = new wxBusyCursor(cursor); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxBusyCursor *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyCursor, returns); --- 1477,1481 ---- returns = new wxBusyCursor(cursor); // add to tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxBusyCursor((wxBusyCursor *)returns)); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBusyCursor, returns); *************** *** 2009,2015 **** returns = self->GetTimes(dtAccess, dtMod, dtCreate); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, dtAccess); ! wxLua_AddTrackedObject(wxlState, dtMod); ! wxLua_AddTrackedObject(wxlState, dtCreate); // push the constructed class pointers wxlState.PushUserDataType(s_wxluatag_wxDateTime, dtAccess); --- 2010,2016 ---- returns = self->GetTimes(dtAccess, dtMod, dtCreate); // add to tracked memory list ! wxlState.AddTrackedObject((long)dtAccess, new wxObject_wxDateTime(dtAccess)); ! wxlState.AddTrackedObject((long)dtMod, new wxObject_wxDateTime(dtMod)); ! wxlState.AddTrackedObject((long)dtCreate, new wxObject_wxDateTime(dtCreate)); // push the constructed class pointers wxlState.PushUserDataType(s_wxluatag_wxDateTime, dtAccess); *************** *** 2505,2509 **** returns = new wxBitmap(data, type, width, height, depth); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBitmap, returns); --- 2506,2510 ---- returns = new wxBitmap(data, type, width, height, depth); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBitmap, returns); *************** *** 2530,2534 **** returns = new wxBitmap(sizeArray); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBitmap, returns); --- 2531,2535 ---- returns = new wxBitmap(sizeArray); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxBitmap, returns); *************** *** 3152,3156 **** returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 3153,3157 ---- returns = new wxImage(width, height, data, static_data); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 3171,3175 **** returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); --- 3172,3176 ---- returns = new wxImage(bitmap->ConvertToImage()); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxImage, returns); *************** *** 3777,3781 **** *returns = *self; // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPrintData, returns); --- 3778,3782 ---- *returns = *self; // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPrintData, returns); *************** *** 3795,3799 **** *returns = *self; // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPageSetupDialogData, returns); --- 3796,3800 ---- *returns = *self; // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxPageSetupDialogData, returns); *************** *** 4471,4475 **** returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); --- 4472,4476 ---- returns = new wxLuaObject(wxlState, 1); // add to tracked memory list ! wxlState.AddTrackedObject(returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaObject, returns); *************** *** 4522,4526 **** returns = new wxLuaPrintout(wxlState, title, pObject); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxLuaPrintout *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaPrintout, returns); --- 4523,4527 ---- returns = new wxLuaPrintout(wxlState, title, pObject); // add to tracked memory list ! wxlState.AddTrackedObject((wxLuaPrintout *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaPrintout, returns); |
From: John L. <jr...@us...> - 2007-03-15 00:01:47
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/bindings/wxstc Modified Files: wxstc_datatypes.lua Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** wxstc_datatypes.lua 13 Mar 2007 05:01:00 -0000 1.48 --- wxstc_datatypes.lua 15 Mar 2007 00:01:11 -0000 1.49 *************** *** 16,22 **** --- 16,24 ---- wxDouble = "double", wxInt32 = "int", + wxLogLevel = "unsigned long", wxNotebookPage = "wxWindow", wxPreviewWindow = "wxScrolledWindow", wxTextCoord = "long", + wxTraceMask = "unsigned long", } *************** *** 197,200 **** --- 199,203 ---- Condition = "wxCHECK_VERSION(2,8,0) && wxUSE_ABOUTDLG && wxLUA_USE_wxAboutDialog", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxAboutDialogInfo", *************** *** 203,206 **** --- 206,210 ---- Condition = "wxLUA_USE_wxAcceleratorTable && wxUSE_ACCEL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxAcceleratorEntry", *************** *** 234,237 **** --- 238,242 ---- Condition = "wxLUA_USE_wxArrayInt", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayInt", *************** *** 245,248 **** --- 250,254 ---- Condition = "wxLUA_USE_wxArrayString", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayString", *************** *** 256,259 **** --- 262,266 ---- Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayTreeItemIds", *************** *** 262,265 **** --- 269,273 ---- Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxArrayVideoModes", *************** *** 316,328 **** Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", IsNumber = false, Name = "wxBitmapDataObject", }, - wxBitmapHandler = { - Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxBitmap)", - DefType = "class", - IsNumber = false, - Name = "wxBitmapHandler", - }, wxBitmapType = { DefType = "enum", --- 324,331 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxBitmapDataObject", }, wxBitmapType = { DefType = "enum", *************** *** 387,390 **** --- 390,394 ---- Condition = "wxLUA_USE_wxBusyCursor", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxBusyCursor", *************** *** 393,396 **** --- 397,401 ---- Condition = "wxLUA_USE_wxBusyCursor", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxBusyCursorSuspender", *************** *** 439,442 **** --- 444,448 ---- Condition = "wxLUA_USE_wxCalendarCtrl && wxUSE_CALENDARCTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCalendarDateAttr", *************** *** 470,473 **** --- 476,480 ---- Condition = "wxLUA_USE_wxCaret && wxUSE_CARET", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCaretSuspend", *************** *** 586,589 **** --- 593,597 ---- Condition = "wxLUA_USE_wxColourPenBrush", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxColourDatabase", *************** *** 645,648 **** --- 653,657 ---- Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxConfigPathChanger", *************** *** 683,686 **** --- 692,696 ---- Condition = "wxLUA_USE_wxCriticalSection && wxUSE_THREADS", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCriticalSection", *************** *** 689,692 **** --- 699,703 ---- Condition = "wxLUA_USE_wxCriticalSectionLocker", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxCriticalSectionLocker", *************** *** 709,712 **** --- 720,724 ---- Condition = "wxLUA_USE_wxDC", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDCClipper", *************** *** 715,718 **** --- 727,731 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataFormat", *************** *** 746,749 **** --- 759,763 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataObjectComposite", *************** *** 753,756 **** --- 767,771 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDataObjectSimple", *************** *** 779,782 **** --- 794,798 ---- Condition = "wxLUA_USE_wxDateSpan && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateSpan", *************** *** 785,788 **** --- 801,805 ---- Condition = "wxLUA_USE_wxDateTime && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTime", *************** *** 821,824 **** --- 838,842 ---- Condition = "wxLUA_USE_wxDateTime && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTimeArray", *************** *** 827,830 **** --- 845,849 ---- Condition = "wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTimeHolidayAuthority", *************** *** 834,837 **** --- 853,857 ---- Condition = "wxLUA_USE_wxDateTimeHolidayAuthority && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDateTimeWorkDays", *************** *** 847,850 **** --- 867,871 ---- Condition = "wxLUA_USE_wxDir", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDir", *************** *** 865,868 **** --- 886,890 ---- Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDisplay", *************** *** 930,933 **** --- 952,956 ---- Condition = "wxLUA_USE_wxDragDrop && wxUSE_DRAG_AND_DROP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxDropSource", *************** *** 1009,1012 **** --- 1032,1036 ---- Condition = "wxLUA_USE_wxFile && wxUSE_FILE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFile", *************** *** 1035,1038 **** --- 1059,1063 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileDataObject", *************** *** 1068,1071 **** --- 1093,1097 ---- Condition = "wxLUA_USE_wxFileName", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFileName", *************** *** 1173,1176 **** --- 1199,1203 ---- Condition = "wxLUA_USE_wxFontEnumerator", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxFontEnumerator", *************** *** 1216,1219 **** --- 1243,1247 ---- Condition = "wxLUA_USE_wxSizer", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGBPosition", *************** *** 1229,1248 **** Condition = "wxLUA_USE_wxSizer", DefType = "class", IsNumber = false, Name = "wxGBSpan", }, - wxGDIImageHandler = { - Condition = "(defined(__WXMSW__)) && (wxLUA_USE_wxBitmap)", - DefType = "class", - IsNumber = false, - Name = "wxGDIImageHandler", - }, - wxGDIImageHandlerList = { - BaseClass = "wxList", - Condition = "(wxCHECK_VERSION(2,5,0) && defined(__WXMSW__)) && (wxLUA_USE_wxBitmap)", - DefType = "class", - IsNumber = false, - Name = "wxGDIImageHandlerList", - }, wxGDIObject = { BaseClass = "wxObject", --- 1257,1264 ---- Condition = "wxLUA_USE_wxSizer", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGBSpan", }, wxGDIObject = { BaseClass = "wxObject", *************** *** 1371,1374 **** --- 1387,1391 ---- Condition = "wxLUA_USE_wxGrid && wxUSE_GRID", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxGridCellCoords", *************** *** 1537,1540 **** --- 1554,1558 ---- Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxHelpControllerHelpProvider", *************** *** 1555,1558 **** --- 1573,1577 ---- Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxHelpProvider", *************** *** 1707,1710 **** --- 1726,1730 ---- Condition = "wxLUA_USE_wxIcon", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxIconBundle", *************** *** 1713,1716 **** --- 1733,1737 ---- Condition = "wxLUA_USE_wxIcon", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxIconLocation", *************** *** 1750,1753 **** --- 1771,1775 ---- Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxImageHistogram", *************** *** 1756,1759 **** --- 1778,1782 ---- Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxImageHistogram::iterator", *************** *** 1762,1765 **** --- 1785,1789 ---- Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxImageHistogramEntry", *************** *** 1862,1865 **** --- 1886,1901 ---- Name = "wxKillError", }, + wxLanguage = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLanguage", + }, + wxLanguageInfo = { + Condition = "wxUSE_INTL", + DefType = "struct", + IsNumber = false, + Name = "wxLanguageInfo", + }, wxLayoutAlgorithm = { BaseClass = "wxObject", *************** *** 1938,1941 **** --- 1974,1978 ---- Condition = "wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxListItemAttr", *************** *** 1962,1965 **** --- 1999,2072 ---- Name = "wxListbookEvent", }, + wxLocale = { + Condition = "wxUSE_INTL", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLocale", + }, + wxLocaleCategory = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLocaleCategory", + }, + wxLocaleInfo = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLocaleInfo", + }, + wxLocaleInitFlags = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLocaleInitFlags", + }, + wxLog = { + Condition = "wxUSE_LOG", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLog", + }, + wxLogBuffer = { + BaseClass = "wxLog", + Condition = "wxUSE_LOG", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLogBuffer", + }, + wxLogChain = { + BaseClass = "wxLog", + Condition = "wxUSE_LOG", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLogChain", + }, + wxLogNull = { + Condition = "wxUSE_LOG", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLogNull", + }, + wxLogPassThrough = { + BaseClass = "wxLogChain", + Condition = "wxUSE_LOG", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLogPassThrough", + }, + wxLongLong = { + Condition = "wxUSE_LONGLONG", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxLongLong", + }, wxLuaHtmlWinTagEvent = { BaseClass = "wxEvent", *************** *** 2067,2070 **** --- 2174,2184 ---- Name = "wxMediaState", }, + wxMemoryConfig = { + BaseClass = "wxFileConfig", + Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", + DefType = "class", + IsNumber = false, + Name = "wxMemoryConfig", + }, wxMemoryDC = { BaseClass = "wxDC", *************** *** 2171,2174 **** --- 2285,2289 ---- Condition = "wxCHECK_VERSION(2,7,0)", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxMouseState", *************** *** 2190,2193 **** --- 2305,2309 ---- Condition = "wxLUA_USE_wxFont", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxNativeFontInfo", *************** *** 2356,2359 **** --- 2472,2476 ---- BaseClass = "wxArrayString", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPathList", *************** *** 2382,2385 **** --- 2499,2503 ---- Condition = "wxLUA_USE_wxPointSizeRect", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPoint", *************** *** 2388,2391 **** --- 2506,2510 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPoint2DDouble", *************** *** 2394,2397 **** --- 2513,2517 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPoint2DInt", *************** *** 2502,2505 **** --- 2622,2626 ---- Condition = "wxLUA_USE_wxProcess", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxProcess", *************** *** 2520,2523 **** --- 2641,2645 ---- wxPropagateOnce = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPropagateOnce", *************** *** 2525,2528 **** --- 2647,2651 ---- wxPropagationDisabler = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxPropagationDisabler", *************** *** 2571,2574 **** --- 2694,2698 ---- Condition = "wxLUA_USE_wxPointSizeRect", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRect", *************** *** 2577,2580 **** --- 2701,2705 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRect2DDouble", *************** *** 2583,2586 **** --- 2708,2712 ---- Condition = "wxLUA_USE_Geometry && wxUSE_GEOMETRY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRect2DInt", *************** *** 2589,2592 **** --- 2715,2719 ---- Condition = "wxLUA_USE_wxRegEx && wxUSE_REGEX", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxRegEx", *************** *** 2712,2715 **** --- 2839,2843 ---- Condition = "wxLUA_USE_wxHelpController && wxUSE_HELP", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxSimpleHelpProvider", *************** *** 2732,2735 **** --- 2860,2864 ---- Condition = "wxLUA_USE_wxPointSizeRect", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxSize", *************** *** 2831,2834 **** --- 2960,2964 ---- Condition = "wxLUA_USE_wxArrayString", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxSortedArrayString", *************** *** 2942,2945 **** --- 3072,3076 ---- Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush)", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxStockGDI", *************** *** 3040,3043 **** --- 3171,3181 ---- Name = "wxSystemSettings", }, + wxTGAHandler = { + BaseClass = "wxImageHandler", + Condition = "(wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE)", + DefType = "class", + IsNumber = false, + Name = "wxTGAHandler", + }, wxTIFFHandler = { BaseClass = "wxImageHandler", *************** *** 3078,3081 **** --- 3216,3220 ---- Condition = "wxLUA_USE_wxFile && wxUSE_FILE", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTempFile", *************** *** 3084,3087 **** --- 3223,3227 ---- Condition = "wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTextAttr", *************** *** 3115,3118 **** --- 3255,3259 ---- Condition = "wxLUA_USE_wxDataObject && wxUSE_DATAOBJ", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTextDataObject", *************** *** 3135,3138 **** --- 3276,3280 ---- Condition = "wxLUA_USE_wxTimeSpan && wxUSE_DATETIME", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTimeSpan", *************** *** 3249,3252 **** --- 3391,3395 ---- Condition = "wxLUA_USE_wxTreeCtrl && wxUSE_TREECTRL", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxTreeItemId", *************** *** 3258,3261 **** --- 3401,3411 ---- Name = "wxTreeItemIdValue", }, + wxULongLong = { + Condition = "wxUSE_LONGLONG", + DefType = "class", + Encapsulate = true, + IsNumber = false, + Name = "wxULongLong", + }, wxURI = { BaseClass = "wxObject", *************** *** 3294,3297 **** --- 3444,3448 ---- Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDataObject && wxUSE_DATAOBJ)", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxURLDataObject", *************** *** 3349,3352 **** --- 3500,3504 ---- Condition = "wxLUA_USE_wxDisplay && wxUSE_DISPLAY", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxVideoMode", *************** *** 3405,3408 **** --- 3557,3561 ---- wxWindowDisabler = { DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxWindowDisabler", *************** *** 3474,3477 **** --- 3627,3631 ---- Condition = "wxLUA_USE_wxXMLResource && wxUSE_XML", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxXmlNode", *************** *** 3486,3489 **** --- 3640,3644 ---- Condition = "wxLUA_USE_wxXMLResource && wxUSE_XML", DefType = "class", + Encapsulate = true, IsNumber = false, Name = "wxXmlProperty", *************** *** 3559,3562 **** --- 3714,3718 ---- ["%wxchkver_2_5"] = "wxCHECK_VERSION(2,5,0)", ["%wxchkver_2_6"] = "wxCHECK_VERSION(2,6,0)", + ["%wxchkver_2_6_4"] = "wxCHECK_VERSION(2,6,4)", ["%wxchkver_2_7"] = "wxCHECK_VERSION(2,7,0)", ["%wxchkver_2_7_1"] = "wxCHECK_VERSION(2,7,1)", *************** *** 3850,3853 **** --- 4006,4010 ---- wxUSE_TEXTDLG = "wxUSE_TEXTDLG", wxUSE_TEXTFILE = "wxUSE_TEXTFILE", + wxUSE_TGA = "wxUSE_TGA", wxUSE_THREADS = "wxUSE_THREADS", wxUSE_TIMEDATE = "wxUSE_TIMEDATE", |
From: John L. <jr...@us...> - 2007-03-15 00:01:46
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/bindings Modified Files: genwxbind.lua Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.105 retrieving revision 1.106 diff -C2 -d -r1.105 -r1.106 *** genwxbind.lua 13 Mar 2007 23:01:53 -0000 1.105 --- genwxbind.lua 15 Mar 2007 00:01:09 -0000 1.106 *************** *** 18,22 **** -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 5 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h --- 18,22 ---- -- --------------------------------------------------------------------------- ! WXLUA_BINDING_VERSION = 6 -- Used to verify that the bindings are updated -- This must match modules/wxlua/include/wxldefs.h *************** *** 186,189 **** --- 186,190 ---- Abstract = abstract, Condition = nil, -- conditions for this data type, eg. wxLUA_USE_xxx + Encapsulate = nil, -- Non wxObject derived class } end *************** *** 2509,2512 **** --- 2510,2518 ---- end + -- Set if this data type should be Encapsulated + if dataTypeTable[parseState.ObjectStack[1].Name] and parseState.ObjectStack[1].Encapsulate then + dataTypeTable[parseState.ObjectStack[1].Name].Encapsulate = parseState.ObjectStack[1].Encapsulate + end + -- pop inline condition onto condition stack if not lineState.IsBlockCondition and lineState.Condition then *************** *** 3486,3490 **** end ! table.insert(codeList, " wxLua_AddTrackedObject(wxlState, ("..returnCast..")returns);\n") elseif parseObject.HasClassInfo then CommentBindingTable(codeList, " // add to tracked window list\n") --- 3492,3500 ---- end ! if parseObject.Encapsulate then ! table.insert(codeList, " wxlState.AddTrackedObject((long)returns, new wxObject_"..MakeVar(parseObject.Name).."(("..returnCast..")returns));\n") ! else ! table.insert(codeList, " wxlState.AddTrackedObject(("..returnCast..")returns);\n") ! end elseif parseObject.HasClassInfo then CommentBindingTable(codeList, " // add to tracked window list\n") *************** *** 3559,3563 **** end ! table.insert(codeList, " wxLua_AddTrackedObject(wxlState, ("..returnCast..")returns);\n") elseif (not member.IsOperator) and (memberPtr == "&") and (memberType ~= "wxString") then table.insert(codeList, " returns = &"..functor..";\n") --- 3569,3578 ---- end ! if dataTypeTable[memberType].Encapsulate then ! table.insert(codeList, " wxlState.AddTrackedObject((long)returns, new wxObject_"..MakeVar(memberType).."(("..returnCast..")returns));\n") ! else ! table.insert(codeList, " wxlState.AddTrackedObject(("..returnCast..")returns);\n") ! end ! elseif (not member.IsOperator) and (memberPtr == "&") and (memberType ~= "wxString") then table.insert(codeList, " returns = &"..functor..";\n") *************** *** 3697,3737 **** end ! local classcondition = parseObject.Condition or "1" ! local classBinding = ! { ! Map = " { \""..MakeVar(parseObject.Name).."\", "..MakeVar(parseObject.Name).."_methods, "..MakeVar(parseObject.Name).."_methodCount, "..classinfo..", &s_wxluatag_"..MakeClassVar(parseObject.Name)..", "..MakeVar(baseclass)..", NULL }, \n", ! Condition = classcondition ! } ! ! if not classBindingTable[classcondition] then classBindingTable[classcondition] = {} end ! classBindingTable[classcondition][parseObject.Name] = classBinding -- Class Functions if parseObject.DeleteRequired then - -- garbage collector routine - codeList = {} - local funcName = "wxLua_"..MakeVar(parseObject.Name).."_destructor" - table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n{\n") - table.insert(codeList, " wxLuaState wxlState(L);\n") - table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.GetUserDataType(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n") - - CommentBindingTable(codeList, "\n // remove from tracked memory list\n") - - table.insert(codeList, " if (self != 0)\n") - table.insert(codeList, " wxlState.RemoveTrackedObject(self);\n") - table.insert(codeList, " return 0;\n") - table.insert(codeList, "}\n\n") - - local condition = parseObject.Condition or "1" - local gcMethodBinding = - { - Method = codeList, - Map = " { LuaDelete, \""..MakeVar(parseObject.Name).."\", "..funcName..", 0, 0, s_wxluaargArray_None },\n", - Condition = condition - } - - if not interface.objectData[o].BindTable[condition] then interface.objectData[o].BindTable[condition] = {} end - table.insert(interface.objectData[o].BindTable[condition], gcMethodBinding) - -- delete routine codeList = {} --- 3712,3719 ---- end ! local gcFunctionName = "NULL" -- Class Functions if parseObject.DeleteRequired then -- delete routine codeList = {} *************** *** 3740,3755 **** table.insert(codeList, " wxLuaState wxlState(L);\n") table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.GetUserDataType(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n") ! ! CommentBindingTable(codeList, " // remove from tracked memory list\n") ! ! table.insert(codeList, " if (self != 0)\n") ! table.insert(codeList, " if (wxlState.RemoveTrackedObject(self))\n") ! table.insert(codeList, " { // if removed, reset the tag so that gc() is not called on this object.\n") ! table.insert(codeList, " lua_pushnil(L);\n") ! table.insert(codeList, " lua_setmetatable(L, -2);\n") ! table.insert(codeList, " }\n") table.insert(codeList, " return 0;\n") table.insert(codeList, "}\n\n") local delMethodBinding = { --- 3722,3735 ---- table.insert(codeList, " wxLuaState wxlState(L);\n") table.insert(codeList, " "..parseObject.Name.." * self = ("..parseObject.Name.." *)wxlState.GetUserDataType(1, s_wxluatag_"..MakeClassVar(parseObject.Name)..");\n") ! CommentBindingTable(codeList, " // if removed from tracked mem list, reset the tag so that gc() is not called on this object.\n") ! table.insert(codeList, " if ((self != NULL) && wxlState.RemoveTrackedObject(self))\n") ! table.insert(codeList, " {\n") ! table.insert(codeList, " lua_pushnil(L);\n") ! table.insert(codeList, " lua_setmetatable(L, -2);\n") ! table.insert(codeList, " }\n") table.insert(codeList, " return 0;\n") table.insert(codeList, "}\n\n") + local condition = parseObject.Condition or "1" local delMethodBinding = { *************** *** 3761,3783 **** if not interface.objectData[o].BindTable[condition] then interface.objectData[o].BindTable[condition] = {} end table.insert(interface.objectData[o].BindTable[condition], delMethodBinding) ! else ! -- garbage collector routine ! codeList = {} ! local funcName = "wxLua_"..MakeVar(parseObject.Name).."_destructor" ! table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *)\n{\n") ! table.insert(codeList, " return 0;\n") ! table.insert(codeList, "}\n\n") ! local condition = parseObject.Condition or "1" ! local gcMethodBinding = ! { ! Method = codeList, ! Map = " { LuaDelete, \""..MakeVar(parseObject.Name).."\", "..funcName..", 0, 0, s_wxluaargArray_None },\n", ! Condition = condition ! } - if not interface.objectData[o].BindTable[condition] then interface.objectData[o].BindTable[condition] = {} end - table.insert(interface.objectData[o].BindTable[condition], gcMethodBinding) - end end end --- 3741,3757 ---- if not interface.objectData[o].BindTable[condition] then interface.objectData[o].BindTable[condition] = {} end table.insert(interface.objectData[o].BindTable[condition], delMethodBinding) ! end ! local classcondition = parseObject.Condition or "1" ! local classBinding = ! { ! Name = MakeVar(parseObject.Name), ! Map = " { \""..MakeVar(parseObject.Name).."\", "..MakeVar(parseObject.Name).."_methods, "..MakeVar(parseObject.Name).."_methodCount, "..classinfo..", &s_wxluatag_"..MakeClassVar(parseObject.Name)..", "..MakeVar(baseclass)..", NULL }, \n", ! Condition = classcondition ! } ! ! if not classBindingTable[classcondition] then classBindingTable[classcondition] = {} end ! classBindingTable[classcondition][parseObject.Name] = classBinding end end |
From: John L. <jr...@us...> - 2007-03-15 00:01:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxbindstc/include Modified Files: wxbind.h Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/include/wxbind.h,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** wxbind.h 26 Feb 2007 01:57:05 -0000 1.18 --- wxbind.h 15 Mar 2007 00:01:24 -0000 1.19 *************** *** 26,32 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 5 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 5 // --------------------------------------------------------------------------- --- 26,32 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 6 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 6 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-03-15 00:01:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxluasocket/src Modified Files: wxluasocket.cpp Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxluasocket.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/src/wxluasocket.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** wxluasocket.cpp 26 Feb 2007 01:57:07 -0000 1.17 --- wxluasocket.cpp 15 Mar 2007 00:01:26 -0000 1.18 *************** *** 38,42 **** returns = new wxLuaDebuggerServer(portNumber); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxLuaDebuggerServer *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaDebuggerServer, returns); --- 38,42 ---- returns = new wxLuaDebuggerServer(portNumber); // add to tracked memory list ! wxlState.AddTrackedObject((wxLuaDebuggerServer *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxLuaDebuggerServer, returns); *************** *** 350,375 **** } - static int LUACALL wxLua_wxLuaDebuggerServer_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxLuaDebuggerServer_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 350,363 ---- } static int LUACALL wxLua_wxLuaDebuggerServer_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaDebuggerServer * self = (wxLuaDebuggerServer *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerServer); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 399,403 **** { LuaMethod, "GetProgramName", wxLua_wxLuaDebuggerServer_GetProgramName, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetNetworkName", wxLua_wxLuaDebuggerServer_GetNetworkName, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxLuaDebuggerServer", wxLua_wxLuaDebuggerServer_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxLuaDebuggerServer_Delete, 0, 0, s_wxluaargArray_None }, }; --- 387,390 ---- *************** *** 472,497 **** } - static int LUACALL wxLua_wxLuaDebuggerEvent_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxLuaDebuggerEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 459,472 ---- } static int LUACALL wxLua_wxLuaDebuggerEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxLuaDebuggerEvent * self = (wxLuaDebuggerEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxLuaDebuggerEvent); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 505,509 **** { LuaMethod, "GetFileName", wxLua_wxLuaDebuggerEvent_GetFileName, 0, 0, s_wxluaargArray_None }, { LuaMethod, "GetMessage", wxLua_wxLuaDebuggerEvent_GetMessage, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxLuaDebuggerEvent", wxLua_wxLuaDebuggerEvent_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxLuaDebuggerEvent_Delete, 0, 0, s_wxluaargArray_None }, }; --- 480,483 ---- |
From: John L. <jr...@us...> - 2007-03-15 00:01:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxbindstc/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxbindstc/src Modified Files: stc.cpp Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: stc.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbindstc/src/stc.cpp,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** stc.cpp 9 Mar 2007 00:15:18 -0000 1.27 --- stc.cpp 15 Mar 2007 00:01:24 -0000 1.28 *************** *** 40,44 **** returns = new wxColour(self->GetCaretLineBackground()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 40,44 ---- returns = new wxColour(self->GetCaretLineBackground()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 77,81 **** returns = new wxColour(self->GetCaretLineBack()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 77,81 ---- returns = new wxColour(self->GetCaretLineBack()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6216,6224 **** } - static int LUACALL wxLua_wxStyledTextCtrl_destructor(lua_State *) - { - return 0; - } - #if wxLUA_USE_wxBitmap --- 6216,6219 ---- *************** *** 6432,6436 **** returns = new wxColour(self->IndicatorGetForeground(indic)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 6427,6431 ---- returns = new wxColour(self->IndicatorGetForeground(indic)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6484,6488 **** returns = new wxColour(self->GetCaretForeground()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 6479,6483 ---- returns = new wxColour(self->GetCaretForeground()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6581,6585 **** returns = new wxColour(self->GetEdgeColour()); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); --- 6576,6580 ---- returns = new wxColour(self->GetEdgeColour()); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((wxColour *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxColour, returns); *************** *** 6771,6775 **** returns = new wxPoint(self->PointFromPosition(pos)); // add the new object to the tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxPoint *)returns); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); --- 6766,6770 ---- returns = new wxPoint(self->PointFromPosition(pos)); // add the new object to the tracked memory list ! wxlState.AddTrackedObject((long)returns, new wxObject_wxPoint((wxPoint *)returns)); // push the result datatype wxlState.PushUserDataType(s_wxluatag_wxPoint, returns); *************** *** 7355,7359 **** { LuaGetProp, "LastKeydownProcessed", wxLua_wxStyledTextCtrl_GetLastKeydownProcessed, 0, 0, s_wxluaargArray_None }, { LuaSetProp, "LastKeydownProcessed", wxLua_wxStyledTextCtrl_SetLastKeydownProcessed, 1, 1, s_wxluaargArray_None }, - { LuaDelete, "wxStyledTextCtrl", wxLua_wxStyledTextCtrl_destructor, 0, 0, s_wxluaargArray_None }, #if wxLUA_USE_wxBitmap --- 7350,7353 ---- *************** *** 7436,7440 **** returns = new wxStyledTextEvent(commandType, id); // add to tracked memory list ! wxLua_AddTrackedObject(wxlState, (wxStyledTextEvent *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxStyledTextEvent, returns); --- 7430,7434 ---- returns = new wxStyledTextEvent(commandType, id); // add to tracked memory list ! wxlState.AddTrackedObject((wxStyledTextEvent *)returns); // push the constructed class pointer wxlState.PushUserDataType(s_wxluatag_wxStyledTextEvent, returns); *************** *** 8058,8083 **** } - static int LUACALL wxLua_wxStyledTextEvent_destructor(lua_State *L) - { - wxLuaState wxlState(L); - wxStyledTextEvent * self = (wxStyledTextEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextEvent); - - // remove from tracked memory list - if (self != 0) - wxlState.RemoveTrackedObject(self); - return 0; - } - static int LUACALL wxLua_wxStyledTextEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxStyledTextEvent * self = (wxStyledTextEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextEvent); ! // remove from tracked memory list ! if (self != 0) ! if (wxlState.RemoveTrackedObject(self)) ! { // if removed, reset the tag so that gc() is not called on this object. ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } --- 8052,8065 ---- } static int LUACALL wxLua_wxStyledTextEvent_Delete(lua_State *L) { wxLuaState wxlState(L); wxStyledTextEvent * self = (wxStyledTextEvent *)wxlState.GetUserDataType(1, s_wxluatag_wxStyledTextEvent); ! // if removed from tracked mem list, reset the tag so that gc() is not called on this object. ! if ((self != NULL) && wxlState.RemoveTrackedObject(self)) ! { ! lua_pushnil(L); ! lua_setmetatable(L, -2); ! } return 0; } *************** *** 8204,8208 **** { LuaGetProp, "Control", wxLua_wxStyledTextEvent_GetControl, 0, 0, s_wxluaargArray_None }, { LuaGetProp, "Alt", wxLua_wxStyledTextEvent_GetAlt, 0, 0, s_wxluaargArray_None }, - { LuaDelete, "wxStyledTextEvent", wxLua_wxStyledTextEvent_destructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Delete", wxLua_wxStyledTextEvent_Delete, 0, 0, s_wxluaargArray_None }, --- 8186,8189 ---- |
From: John L. <jr...@us...> - 2007-03-15 00:01:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxlua/src Modified Files: wxlbind.cpp wxlstate.cpp Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxlstate.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlstate.cpp,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** wxlstate.cpp 26 Feb 2007 01:57:06 -0000 1.88 --- wxlstate.cpp 15 Mar 2007 00:01:25 -0000 1.89 *************** *** 1919,1922 **** --- 1919,1924 ---- wxLongToLongHashMap::iterator it = M_WXLSTATEDATA->m_wxlStateData->m_trackedObjects.find((long) pObject); + //wxPrintf(wxT("RemoveTracked %ld %d\n"), long(pObject), int(fDelete)); + if (it != M_WXLSTATEDATA->m_wxlStateData->m_trackedObjects.end()) { *************** *** 1931,1934 **** --- 1933,1938 ---- M_WXLSTATEDATA->m_wxlStateData->m_trackedObjects.erase(it); + //wxPrintf(wxT("RemoveTRACKED %ld %d\n"), long(pObject), int(fDelete)); + return true; } Index: wxlbind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlbind.cpp,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** wxlbind.cpp 26 Feb 2007 05:17:29 -0000 1.52 --- wxlbind.cpp 15 Mar 2007 00:01:25 -0000 1.53 *************** *** 229,241 **** // ---------------------------------------------------------------------------- - // wxLua_AddToTrackedMemoryList - // ---------------------------------------------------------------------------- - - void LUACALL wxLua_AddTrackedObject(wxLuaState& wxlState, wxObject *pObject) - { - wxlState.AddTrackedObject(pObject); - } - - // ---------------------------------------------------------------------------- // wxLua_lua_tableErrorHandler // ---------------------------------------------------------------------------- --- 229,232 ---- *************** *** 260,268 **** //bool tracked = false; if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { ! long key = (long)wxlState.ttouserdata(1, true); wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxLua_lua_garbageCollect")); --- 251,260 ---- //bool tracked = false; + long key = -1; if ((pClass != NULL) && lua_isuserdata(L, 1) && (lua_islightuserdata(L, 1) == 0) && (wxlState.ttag(1) == *pClass->class_tag)) { ! key = (long)wxlState.ttouserdata(1, true); wxCHECK_MSG(key != 0, 0, wxT("NULL user data in wxLua_lua_garbageCollect")); *************** *** 284,305 **** } //else wxPrintf(wxT("wxLua_lua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); - - // LuaDelete is placed at the end, so start there first and if found - // call the function - int i_method, method_count = pClass->num_methods; - for (i_method = method_count-1; i_method >= 0; --i_method) - { - WXLUAMETHOD *pMethod = pClass->methods + i_method; - if (pMethod->type == LuaDelete) - { - retVal = (*pMethod->func)(L); - break; - } - } } //else wxPrintf(wxT("wxLua_lua_garbageCollect - NULL WXLUACLASS!\n")); ! //wxPrintf(wxT("wxLua_lua_garbageCollect - '%s' tag %d lua %d tracked %d return value %d\n"), ! // lua2wx(pClass ? pClass->name : "").c_str(), pClass ? *pClass->class_tag : 0, (int)L, (int)tracked, retVal); return retVal; --- 276,284 ---- } //else wxPrintf(wxT("wxLua_lua_garbageCollect - Invalid WXLUACLASS derived hashmap iterator key %d!\n"), key); } //else wxPrintf(wxT("wxLua_lua_garbageCollect - NULL WXLUACLASS!\n")); ! //wxPrintf(wxT("wxLua_lua_garbageCollect - '%s' tag %d lua %d key %ld tracked %d return value %d\n"), ! // lua2wx(pClass ? pClass->name : "").c_str(), pClass ? *pClass->class_tag : 0, (int)L, key, (int)tracked, retVal); return retVal; |
From: John L. <jr...@us...> - 2007-03-15 00:01:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxlua/include Modified Files: wxlbind.h wxldefs.h Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxldefs.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxldefs.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** wxldefs.h 26 Feb 2007 01:57:06 -0000 1.14 --- wxldefs.h 15 Mar 2007 00:01:25 -0000 1.15 *************** *** 49,53 **** //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 5 // ---------------------------------------------------------------------------- --- 49,53 ---- //----------------------------------------------------------------------------- ! #define WXLUA_BINDING_VERSION 6 // ---------------------------------------------------------------------------- Index: wxlbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/include/wxlbind.h,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** wxlbind.h 26 Feb 2007 05:17:29 -0000 1.36 --- wxlbind.h 15 Mar 2007 00:01:25 -0000 1.37 *************** *** 42,52 **** enum wxLuaMethod_Type // 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, // Get %property funcName, read ! LuaSetProp = 64 // Set %property funcName, write }; --- 42,50 ---- enum wxLuaMethod_Type // The type of a Lua method { ! LuaConstructor = 1, // constructor ! LuaMethod = 2, // class method ! LuaGlobal = 4, // global method (not really related to the class) ! LuaGetProp = 8, // Get %property funcName, read ! LuaSetProp = 16 // Set %property funcName, write }; *************** *** 217,221 **** #define wxLUA_DECLARE_ENCAPSULATION(IMPEXPSYMBOL, className, objName) \ - IMPEXPSYMBOL void LUACALL wxLua_AddTrackedObject(wxLuaState& wxlState, className *); \ class IMPEXPSYMBOL wxObject_##objName : public wxObject \ { \ --- 215,218 ---- *************** *** 223,227 **** wxObject_##objName(className *p_##objName) : m_p##objName(p_##objName) {} \ ~wxObject_##objName(); \ - private: \ className *m_p##objName; \ DECLARE_ABSTRACT_CLASS(wxObject_##objName) \ --- 220,223 ---- *************** *** 233,247 **** { \ delete m_p##objName; \ - } \ - void LUACALL wxLua_AddTrackedObject(wxLuaState& wxlState, className *p##objName) \ - { \ - wxlState.AddTrackedObject((long)p##objName, new wxObject_##objName(p##objName)); \ } - // Add a wxWidgets wxObject to the list of tracked objects for - // garbage collection purposes. This is a C function for symmetry with - // the functions defined using wxLUA_DECLARE_ENCAPSULATION. - WXDLLIMPEXP_WXLUA void LUACALL wxLua_AddTrackedObject(wxLuaState& wxlState, wxObject *); - // ---------------------------------------------------------------------------- // wxLuaSmartStringArray - Wraps a "new" array of wxStrings with an automatic --- 229,234 ---- |
From: John L. <jr...@us...> - 2007-03-15 00:01:40
|
Update of /cvsroot/wxlua/wxLua/modules/wxluasocket/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15657/wxLua/modules/wxluasocket/include Modified Files: wxluasocket_bind.h Log Message: Remove wxLua_AddTrackedObject functions and just use wxLuaState::AddTrackedObject directly Remove all gc (destructor, LuaDelete) functions from the methods of a class since we can delete the objects in the single gc function in wxlbind.cpp anyway. Index: wxluasocket_bind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxluasocket/include/wxluasocket_bind.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** wxluasocket_bind.h 26 Feb 2007 01:57:07 -0000 1.12 --- wxluasocket_bind.h 15 Mar 2007 00:01:26 -0000 1.13 *************** *** 27,33 **** // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 5 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 5 // --------------------------------------------------------------------------- --- 27,33 ---- // the current version of the bindings. // See 'bindings/genwxbind.lua' and 'modules/wxlua/include/wxldefs.h' ! #if WXLUA_BINDING_VERSION > 6 # error "The WXLUA_BINDING_VERSION in the bindings is too old, regenerate bindings." ! #endif //WXLUA_BINDING_VERSION > 6 // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-03-14 05:08:20
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv7756/wxwidgets Modified Files: appframe.i config.i controls.i defsutil.i gdi.i html.i image.i menutool.i wave.i windows.i wx_datatypes.lua Log Message: update bindings to wxWidgets 2.8 using headers, to menuitem.h remove duplicate %defines and %enums Index: config.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/config.i,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** config.i 9 Mar 2007 06:10:15 -0000 1.17 --- config.i 14 Mar 2007 05:08:09 -0000 1.18 *************** *** 127,130 **** --- 127,140 ---- //----------------------------------------------------------------------------- + // wxMemoryConfig + + %include "wx/memconf.h" + + %class %noclassinfo wxMemoryConfig, wxFileConfig + wxMemoryConfig() + + %endclass + + //----------------------------------------------------------------------------- // wxConfigPathChanger Index: wave.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wave.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** wave.i 9 Mar 2007 00:15:12 -0000 1.15 --- wave.i 14 Mar 2007 05:08:09 -0000 1.16 *************** *** 13,24 **** // wxSound %if %wxchkver_2_6 & wxUSE_SOUND %include "wx/sound.h" - %define wxSOUND_SYNC - %define wxSOUND_ASYNC - %define wxSOUND_LOOP - %class %delete %noclassinfo wxSound, wxObject %constructor wxSoundDefault() --- 13,24 ---- // wxSound + wxUSE_SOUND|(%msw&wxUSE_WAVE) %define wxSOUND_SYNC + wxUSE_SOUND|(%msw&wxUSE_WAVE) %define wxSOUND_ASYNC + wxUSE_SOUND|(%msw&wxUSE_WAVE) %define wxSOUND_LOOP + %if %wxchkver_2_6 & wxUSE_SOUND %include "wx/sound.h" %class %delete %noclassinfo wxSound, wxObject %constructor wxSoundDefault() *************** *** 44,51 **** %include "wx/wave.h" - %win %define wxSOUND_SYNC - %win %define wxSOUND_ASYNC - %win %define wxSOUND_LOOP - %class %delete %noclassinfo wxWave, wxObject wxWave(const wxString& fileName, bool isResource = false) --- 44,47 ---- *************** *** 81,88 **** %endenum ! %define %string wxMEDIABACKEND_DIRECTSHOW ! %define %string wxMEDIABACKEND_MCI ! %define %string wxMEDIABACKEND_QUICKTIME ! %define %string wxMEDIABACKEND_GSTREAMER %class wxMediaCtrl, wxControl --- 77,86 ---- %endenum ! %define %string wxMEDIABACKEND_DIRECTSHOW //wxT("wxAMMediaBackend") ! %define %string wxMEDIABACKEND_MCI //wxT("wxMCIMediaBackend") ! %define %string wxMEDIABACKEND_QUICKTIME //wxT("wxQTMediaBackend") ! %define %string wxMEDIABACKEND_GSTREAMER //wxT("wxGStreamerMediaBackend") ! %wxchkver_2_8 %define %string wxMEDIABACKEND_REALPLAYER //wxT("wxRealPlayerMediaBackend") ! %wxchkver_2_8 %define %string wxMEDIABACKEND_WMP10 //wxT("wxWMP10MediaBackend") %class wxMediaCtrl, wxControl *************** *** 91,106 **** bool Create( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) ! wxFileOffset GetDownloadProgress() ! wxFileOffset GetDownloadTotal() wxMediaState GetState() bool Load(const wxString& fileName) %rename LoadFromURI bool Load(const wxURI& location) bool Pause() bool Play() ! wxFileOffset Seek(wxFileOffset where, wxSeekMode mode) bool Stop() bool SetVolume(double dVolume) double GetVolume() ! bool ShowPlayerControls(wxMediaCtrlPlayerControls flags) %endclass --- 89,112 ---- bool Create( wxWindow* parent, wxWindowID winid, const wxString& fileName = "", const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& szBackend = "", const wxValidator& val = wxDefaultValidator, const wxString& name = "wxMediaCtrl" ) ! wxFileOffset GetDownloadProgress() // DirectShow only ! wxFileOffset GetDownloadTotal() // DirectShow only wxMediaState GetState() + double GetVolume() + wxFileOffset Length() bool Load(const wxString& fileName) %rename LoadFromURI bool Load(const wxURI& location) + %rename LoadFromURIWithProxy bool Load(const wxURI& location, const wxURI& proxy) + bool LoadURI(const wxString& fileName) // { return Load(wxURI(fileName)); } + bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy) // { return Load(wxURI(fileName), wxURI(proxy)); } bool Pause() bool Play() ! wxFileOffset Seek(wxFileOffset where, wxSeekMode mode = wxFromStart) bool Stop() bool SetVolume(double dVolume) double GetVolume() ! bool ShowPlayerControls(wxMediaCtrlPlayerControls flags = wxMEDIACTRLPLAYERCONTROLS_DEFAULT) ! wxFileOffset Tell(); ! ! %endclass *************** *** 111,114 **** --- 117,123 ---- %define wxMEDIA_STOP_ID %define wxMEDIA_LOADED_ID + %wxchkver_2_6_4 %define wxMEDIA_STATECHANGED_ID + %wxchkver_2_6_4 %define wxMEDIA_PLAY_ID + %wxchkver_2_6_4 %define wxMEDIA_PAUSE_ID %class %delete wxMediaEvent, wxNotifyEvent *************** *** 116,119 **** --- 125,131 ---- %define %event wxEVT_MEDIA_STOP %define %event wxEVT_MEDIA_LOADED + %wxchkver_2_6_4 %define %event wxEVT_MEDIA_STATECHANGED + %wxchkver_2_6_4 %define %event wxEVT_MEDIA_PLAY + %wxchkver_2_6_4 %define %event wxEVT_MEDIA_PAUSE wxMediaEvent(wxEventType commandType = wxEVT_NULL, int winid = 0) Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** wx_datatypes.lua 13 Mar 2007 23:01:53 -0000 1.56 --- wx_datatypes.lua 14 Mar 2007 05:08:09 -0000 1.57 *************** *** 2144,2147 **** --- 2144,2154 ---- Name = "wxMediaState", }, + wxMemoryConfig = { + BaseClass = "wxFileConfig", + Condition = "wxLUA_USE_wxConfig && wxUSE_CONFIG", + DefType = "class", + IsNumber = false, + Name = "wxMemoryConfig", + }, wxMemoryDC = { BaseClass = "wxDC", *************** *** 3637,3640 **** --- 3644,3648 ---- ["%wxchkver_2_5"] = "wxCHECK_VERSION(2,5,0)", ["%wxchkver_2_6"] = "wxCHECK_VERSION(2,6,0)", + ["%wxchkver_2_6_4"] = "wxCHECK_VERSION(2,6,4)", ["%wxchkver_2_7"] = "wxCHECK_VERSION(2,7,0)", ["%wxchkver_2_8"] = "wxCHECK_VERSION(2,8,0)", Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** appframe.i 13 Mar 2007 23:01:53 -0000 1.29 --- appframe.i 14 Mar 2007 05:08:09 -0000 1.30 *************** *** 265,269 **** %define wxSTAY_ON_TOP %define wxSYSTEM_MENU ! %define wxSIMPLE_BORDER %define wxRESIZE_BORDER --- 265,269 ---- %define wxSTAY_ON_TOP %define wxSYSTEM_MENU ! //%define wxSIMPLE_BORDER see wxWindow defines %define wxRESIZE_BORDER Index: image.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/image.i,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** image.i 13 Mar 2007 23:01:53 -0000 1.21 --- image.i 14 Mar 2007 05:08:09 -0000 1.22 *************** *** 18,22 **** wxBITMAP_TYPE_BMP_RESOURCE wxBITMAP_TYPE_RESOURCE - wxBITMAP_TYPE_BMP_RESOURCE wxBITMAP_TYPE_ICO wxBITMAP_TYPE_ICO_RESOURCE --- 18,21 ---- Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** windows.i 13 Mar 2007 23:01:53 -0000 1.31 --- windows.i 14 Mar 2007 05:08:09 -0000 1.32 *************** *** 447,454 **** %include "wx/notebook.h" ! %define wxNB_FIXEDWIDTH ! %define wxNB_MULTILINE ! ! %if !%wxchkver_2_7|%wxcompat_2_6 %define wxNB_TOP // use wxBK_XXX after 2.6 %define wxNB_LEFT --- 447,451 ---- %include "wx/notebook.h" ! //%if !%wxchkver_2_7|%wxcompat_2_6 %define wxNB_TOP // use wxBK_XXX after 2.6 %define wxNB_LEFT *************** *** 458,462 **** %define wxNB_MULTILINE %define wxNB_NOPAGETHEME ! %endif // !%wxchkver_2_7|%wxcompat_2_6 %enum --- 455,459 ---- %define wxNB_MULTILINE %define wxNB_NOPAGETHEME ! //%endif // !%wxchkver_2_7|%wxcompat_2_6 %enum Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.43 retrieving revision 1.44 diff -C2 -d -r1.43 -r1.44 *** gdi.i 13 Mar 2007 23:01:53 -0000 1.43 --- gdi.i 14 Mar 2007 05:08:09 -0000 1.44 *************** *** 478,482 **** // accessors and modifiers for the font elements int GetPointSize() const ! wxSize GetPixelSize() const wxFontStyle GetStyle() const wxFontWeight GetWeight() const --- 478,482 ---- // accessors and modifiers for the font elements int GetPointSize() const ! %wxchkver_2_8_1 wxSize GetPixelSize() const wxFontStyle GetStyle() const wxFontWeight GetWeight() const *************** *** 487,491 **** void SetPointSize(int pointsize) ! void SetPixelSize(const wxSize& pixelSize) void SetStyle(wxFontStyle style) void SetWeight(wxFontWeight weight) --- 487,491 ---- void SetPointSize(int pointsize) ! %wxchkver_2_8_1 void SetPixelSize(const wxSize& pixelSize) void SetStyle(wxFontStyle style) void SetWeight(wxFontWeight weight) Index: html.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/html.i,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** html.i 12 Mar 2007 23:12:31 -0000 1.15 --- html.i 14 Mar 2007 05:08:09 -0000 1.16 *************** *** 131,135 **** %define wxHTML_ALIGN_RIGHT %define wxHTML_ALIGN_BOTTOM - %define wxHTML_ALIGN_CENTER %define wxHTML_ALIGN_TOP --- 131,134 ---- Index: menutool.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/menutool.i,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** menutool.i 9 Mar 2007 00:15:12 -0000 1.13 --- menutool.i 14 Mar 2007 05:08:09 -0000 1.14 *************** *** 104,107 **** --- 104,109 ---- void SetLabelTop(int pos, const wxString& label) + %wxchkver_2_8 virtual void UpdateMenus() + %property=MenuCount, read %endclass Index: controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/controls.i,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** controls.i 13 Mar 2007 23:01:53 -0000 1.32 --- controls.i 14 Mar 2007 05:08:09 -0000 1.33 *************** *** 337,343 **** %define wxLC_ICON %define wxLC_LIST - %define wxLC_MASK_ALIGN - %define wxLC_MASK_SORT - %define wxLC_MASK_TYPE %define wxLC_NO_HEADER %define wxLC_NO_SORT_HEADER --- 337,340 ---- *************** *** 843,848 **** %include "wx/spinctrl.h" ! %define wxSP_ARROW_KEYS ! %define wxSP_WRAP %class wxSpinCtrl, wxControl --- 840,845 ---- %include "wx/spinctrl.h" ! //%define wxSP_ARROW_KEYS see wxSpinButton ! //%define wxSP_WRAP see wxSpinButton %class wxSpinCtrl, wxControl Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** defsutil.i 13 Mar 2007 23:01:53 -0000 1.36 --- defsutil.i 14 Mar 2007 05:08:09 -0000 1.37 *************** *** 477,481 **** %define wxBACKINGSTORE %define wxBACKWARD - %define wxBOTTOM %define wxCANCEL %define wxCENTER --- 477,480 ---- *************** *** 489,498 **** //%define wxED_CLIENT_MARGIN //%define wxED_STATIC_LINE - %define wxEQUIV %define wxFIXED_LENGTH %define wxFORWARD - %define wxGTK %define wxHELP - %define wxINVERT %define wxMORE %define wxNO --- 488,494 ---- *************** *** 505,510 **** %define wxRESIZE_BOX %define wxRETAINED - %define wxRIGHT - %define wxSET %define wxSETUP %define wxSIZE_ALLOW_MINUS_ONE --- 501,504 ---- *************** *** 514,521 **** %define wxSIZE_NO_ADJUSTMENTS %define wxSIZE_USE_EXISTING - %define wxTOP - %define wxUNKNOWN_PLATFORM //%define wxUSER_COLOURS deprecated use wxNO_3D - %define wxWS_EX_VALIDATE_RECURSIVELY %define wxYES %define wxYES_DEFAULT --- 508,512 ---- |
From: John L. <jr...@us...> - 2007-03-13 23:02:47
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18915/wxLua/modules/wxbind/include Modified Files: wxbind.h Log Message: more updates to wxWidgets 2.8 using headers (up to longlong.h) Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbind.h,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** wxbind.h 13 Mar 2007 05:01:01 -0000 1.59 --- wxbind.h 13 Mar 2007 23:01:54 -0000 1.60 *************** *** 112,115 **** --- 112,119 ---- #endif // (wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML) + #if (wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + #include "wx/imagtga.h" + #endif // (wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD) #include "wx/event.h" *************** *** 175,178 **** --- 179,183 ---- #include "wx/event.h" #include "wx/filefn.h" + #include "wx/intl.h" #include "wx/process.h" #include "wx/timer.h" *************** *** 649,652 **** --- 654,665 ---- #endif // wxUSE_FONTDLG && wxLUA_USE_wxFontDialog + #if wxUSE_LOG + #include "wx/log.h" + #endif // wxUSE_LOG + + #if wxUSE_LONGLONG + #include "wx/longlong.h" + #endif // wxUSE_LONGLONG + #if wxUSE_PROGRESSDLG && wxLUA_USE_wxProgressDialog #include "wx/generic/progdlgg.h" *************** *** 708,711 **** --- 721,728 ---- #endif // (wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML) + #if (wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxTGAHandler; + #endif // (wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD) extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxClipboardTextEvent; *************** *** 1524,1527 **** --- 1541,1562 ---- #endif // wxUSE_FONTDLG && wxLUA_USE_wxFontDialog + #if wxUSE_INTL + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLanguageInfo; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLocale; + #endif // wxUSE_INTL + + #if wxUSE_LOG + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLog; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLogBuffer; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLogChain; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLogNull; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLogPassThrough; + #endif // wxUSE_LOG + + #if wxUSE_LONGLONG + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxLongLong; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxULongLong; + #endif // wxUSE_LONGLONG + #if wxUSE_PROGRESSDLG && wxLUA_USE_wxProgressDialog extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxProgressDialog; *************** *** 1607,1610 **** --- 1642,1650 ---- #endif // (wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML) + #if (wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxTGAHandler_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxTGAHandler_methodCount; + #endif // (wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxClipboard && wxUSE_CLIPBOARD) extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxClipboardTextEvent_methods[]; *************** *** 2794,2797 **** --- 2834,2864 ---- #endif // wxUSE_FONTDLG && wxLUA_USE_wxFontDialog + #if wxUSE_INTL + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLanguageInfo_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLanguageInfo_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLocale_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLocale_methodCount; + #endif // wxUSE_INTL + + #if wxUSE_LOG + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLog_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLog_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLogBuffer_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLogBuffer_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLogChain_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLogChain_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLogNull_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLogNull_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLogPassThrough_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLogPassThrough_methodCount; + #endif // wxUSE_LOG + + #if wxUSE_LONGLONG + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxLongLong_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxLongLong_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxULongLong_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxULongLong_methodCount; + #endif // wxUSE_LONGLONG + #if wxUSE_PROGRESSDLG && wxLUA_USE_wxProgressDialog extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxProgressDialog_methods[]; *************** *** 3031,3034 **** --- 3098,3118 ---- #endif // wxLUA_USE_wxXMLResource && wxUSE_XML + #if wxUSE_INTL + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxLocale, wxLocale) + #endif // wxUSE_INTL + + #if wxUSE_LOG + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxLog, wxLog) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxLogBuffer, wxLogBuffer) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxLogChain, wxLogChain) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxLogNull, wxLogNull) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxLogPassThrough, wxLogPassThrough) + #endif // wxUSE_LOG + + #if wxUSE_LONGLONG + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxLongLong, wxLongLong) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxULongLong, wxULongLong) + #endif // wxUSE_LONGLONG + #endif // __HOOK_WXLUA_wx_H__ |
From: John L. <jr...@us...> - 2007-03-13 23:02:47
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18915/wxLua/bindings/wxwidgets Modified Files: appframe.i controls.i data.i datetime.i defsutil.i file.i gdi.i image.i sizer.i windows.i wx_datatypes.lua Log Message: more updates to wxWidgets 2.8 using headers (up to longlong.h) Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.55 retrieving revision 1.56 diff -C2 -d -r1.55 -r1.56 *** wx_datatypes.lua 13 Mar 2007 05:01:01 -0000 1.55 --- wx_datatypes.lua 13 Mar 2007 23:01:53 -0000 1.56 *************** *** 16,22 **** --- 16,24 ---- wxDouble = "double", wxInt32 = "int", + wxLogLevel = "unsigned long", wxNotebookPage = "wxWindow", wxPreviewWindow = "wxScrolledWindow", wxTextCoord = "long", + wxTraceMask = "unsigned long", } *************** *** 1862,1865 **** --- 1864,1879 ---- Name = "wxKillError", }, + wxLanguage = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLanguage", + }, + wxLanguageInfo = { + Condition = "wxUSE_INTL", + DefType = "struct", + IsNumber = false, + Name = "wxLanguageInfo", + }, wxLayoutAlgorithm = { BaseClass = "wxObject", *************** *** 1962,1965 **** --- 1976,2042 ---- Name = "wxListbookEvent", }, + wxLocale = { + Condition = "wxUSE_INTL", + DefType = "class", + IsNumber = false, + Name = "wxLocale", + }, + wxLocaleCategory = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLocaleCategory", + }, + wxLocaleInfo = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLocaleInfo", + }, + wxLocaleInitFlags = { + Condition = "wxUSE_INTL", + DefType = "enum", + IsNumber = true, + Name = "wxLocaleInitFlags", + }, + wxLog = { + Condition = "wxUSE_LOG", + DefType = "class", + IsNumber = false, + Name = "wxLog", + }, + wxLogBuffer = { + BaseClass = "wxLog", + Condition = "wxUSE_LOG", + DefType = "class", + IsNumber = false, + Name = "wxLogBuffer", + }, + wxLogChain = { + BaseClass = "wxLog", + Condition = "wxUSE_LOG", + DefType = "class", + IsNumber = false, + Name = "wxLogChain", + }, + wxLogNull = { + Condition = "wxUSE_LOG", + DefType = "class", + IsNumber = false, + Name = "wxLogNull", + }, + wxLogPassThrough = { + BaseClass = "wxLogChain", + Condition = "wxUSE_LOG", + DefType = "class", + IsNumber = false, + Name = "wxLogPassThrough", + }, + wxLongLong = { + Condition = "wxUSE_LONGLONG", + DefType = "class", + IsNumber = false, + Name = "wxLongLong", + }, wxLuaHtmlWinTagEvent = { BaseClass = "wxEvent", *************** *** 3028,3031 **** --- 3105,3115 ---- Name = "wxSystemSettings", }, + wxTGAHandler = { + BaseClass = "wxImageHandler", + Condition = "(wxCHECK_VERSION(2,8,0) && wxUSE_TGA) && (wxLUA_USE_wxImage && wxUSE_IMAGE)", + DefType = "class", + IsNumber = false, + Name = "wxTGAHandler", + }, wxTIFFHandler = { BaseClass = "wxImageHandler", *************** *** 3246,3249 **** --- 3330,3339 ---- Name = "wxTreeItemIdValue", }, + wxULongLong = { + Condition = "wxUSE_LONGLONG", + DefType = "class", + IsNumber = false, + Name = "wxULongLong", + }, wxURI = { BaseClass = "wxObject", *************** *** 3837,3840 **** --- 3927,3931 ---- wxUSE_TEXTDLG = "wxUSE_TEXTDLG", wxUSE_TEXTFILE = "wxUSE_TEXTFILE", + wxUSE_TGA = "wxUSE_TGA", wxUSE_THREADS = "wxUSE_THREADS", wxUSE_TIMEDATE = "wxUSE_TIMEDATE", Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** appframe.i 9 Mar 2007 00:15:12 -0000 1.28 --- appframe.i 13 Mar 2007 23:01:53 -0000 1.29 *************** *** 9,28 **** //----------------------------------------------------------------------------- ! // wxApp ! %if wxLUA_USE_wxApp ! %include "wx/app.h" ! /* ! %if wxUSE_LOG ! %if !%wxchkver_2_5|%wxcompat_2_4 - %class %noclassinfo wxLog // FIXME %endclass - %endif //!%wxchkver_2_5|%wxcompat_2_4 %endif //wxUSE_LOG ! */ %function wxApp* wxGetBaseApp() // THIS IS DEPRECATED! use wxGetApp --- 9,144 ---- //----------------------------------------------------------------------------- ! // wxLog ! %if wxUSE_LOG ! %include "wx/log.h" ! // These functions are in log.h ! %function unsigned long wxSysErrorCode() ! %function wxString wxSysErrorMsg(unsigned long nErrCode = 0) ! ! %function void wxSafeShowMessage(const wxString& title, const wxString& text) ! ! %enum ! wxLOG_FatalError, // program can't continue, abort immediately ! wxLOG_Error, // a serious error, user must be informed about it ! wxLOG_Warning, // user is normally informed about it but may be ignored ! wxLOG_Message, // normal message (i.e. normal output of a non GUI app) ! wxLOG_Status, // informational: might go to the status line of GUI app ! wxLOG_Info, // informational message (a.k.a. 'Verbose') ! wxLOG_Debug, // never shown to the user, disabled in release mode ! wxLOG_Trace, // trace messages are also only enabled in debug mode ! wxLOG_Progress, // used for progress indicator (not yet) ! wxLOG_User, // user defined levels start here ! wxLOG_Max ! %endenum ! ! // symbolic trace masks - wxLogTrace("foo", "some trace message...") will be ! // discarded unless the string "foo" has been added to the list of allowed ! // ones with AddTraceMask() ! %define %string wxTRACE_MemAlloc //wxT("memalloc") // trace memory allocation (new/delete) ! %define %string wxTRACE_Messages //wxT("messages") // trace window messages/X callbacks ! %define %string wxTRACE_ResAlloc //wxT("resalloc") // trace GDI resource allocation ! %define %string wxTRACE_RefCount //wxT("refcount") // trace various ref counting operations ! %msw %define %string wxTRACE_OleCalls //wxT("ole") // OLE interface calls ! ! %typedef wxLogLevel unsigned long ! %typedef wxTraceMask unsigned long ! ! %class %noclassinfo %encapsulate wxLog ! wxLog() ! ! static bool IsEnabled() ! static bool EnableLogging(bool doIt = true) ! virtual void Flush() ! static void FlushActive() ! static wxLog *GetActiveTarget() ! static wxLog *SetActiveTarget(wxLog *pLogger) ! static void Suspend() ! static void Resume() ! static void SetVerbose(bool bVerbose = true) ! static void SetLogLevel(wxLogLevel logLevel) ! static void DontCreateOnDemand() ! %wxchkver_2_8 static void SetRepetitionCounting(bool bRepetCounting = true) ! %wxchkver_2_8 static bool GetRepetitionCounting() ! static void SetTraceMask(wxTraceMask ulMask) ! static void AddTraceMask(const wxString& str) ! static void RemoveTraceMask(const wxString& str) ! static void ClearTraceMasks() ! static const wxArrayString GetTraceMasks() ! static void SetTimestamp(const wxString& ts) ! static bool GetVerbose() ! static wxTraceMask GetTraceMask() ! static bool IsAllowedTraceMask(const wxString& mask) ! static wxLogLevel GetLogLevel() ! static wxString GetTimestamp() ! %endclass ! ! //----------------------------------------------------------------------------- ! // wxLogBuffer ! ! %class %noclassinfo %encapsulate wxLogBuffer, wxLog ! wxLogBuffer() ! ! const wxString& GetBuffer() const // get the string contents with all messages logged ! %endclass ! ! //----------------------------------------------------------------------------- ! // wxLogStderr - FIXME need to implement FILE* ! ! //%class %noclassinfo %encapsulate wxLogStderr, wxLog ! // wxLogStderr(FILE *fp = (FILE *) NULL) // redirect log output to a FILE ! //%endclass ! ! //----------------------------------------------------------------------------- ! // wxLogStream - FIXME need to implement wxSTD ostream* ! ! //%class %noclassinfo %encapsulate wxLogStream, wxLog ! // wxLogStream(wxSTD ostream *ostr = NULL); // redirect log output to an ostream ! //%endclass ! ! //----------------------------------------------------------------------------- ! // wxLogChain ! ! %class %noclassinfo %encapsulate wxLogChain, wxLog ! wxLogChain(wxLog *logger) ! ! void SetLog(wxLog *logger) // change the new log target ! // this can be used to temporarily disable (and then reenable) passing ! // messages to the old logger (by default we do pass them) ! void PassMessages(bool bDoPass) ! // are we passing the messages to the previous log target? ! bool IsPassingMessages() const ! // return the previous log target (may be NULL) ! wxLog *GetOldLog() const ! %endclass ! ! //----------------------------------------------------------------------------- ! // wxLogPassThrough - a chain log target which uses itself as the new logger ! ! %class %noclassinfo %encapsulate wxLogPassThrough, wxLogChain ! wxLogPassThrough() ! ! %endclass ! ! //----------------------------------------------------------------------------- ! // wxLogNull ! ! %class %noclassinfo %encapsulate %delete wxLogNull ! // NOTE: ALWAYS Delete() this when done since lua's gc may not delete it soon enough ! wxLogNull() %endclass %endif //wxUSE_LOG ! ! ! //----------------------------------------------------------------------------- ! // wxApp ! ! %if wxLUA_USE_wxApp ! ! %include "wx/app.h" %function wxApp* wxGetBaseApp() // THIS IS DEPRECATED! use wxGetApp Index: file.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/file.i,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** file.i 12 Mar 2007 23:12:31 -0000 1.18 --- file.i 13 Mar 2007 23:01:53 -0000 1.19 *************** *** 205,209 **** static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE) wxString GetShortPath() const ! //%wxchkver_2_8 wxULongLong GetSize() const //%wxchkver_2_8 static wxULongLong GetSize(const wxString &file) // %override [bool, wxDateTime dtAccess, wxDateTime dtMod, wxDateTime dtCreate] wxFileName::GetTimes() --- 205,209 ---- static wxString GetPathTerminators(wxPathFormat format = wxPATH_NATIVE) wxString GetShortPath() const ! %wxchkver_2_8 wxULongLong GetSize() const //%wxchkver_2_8 static wxULongLong GetSize(const wxString &file) // %override [bool, wxDateTime dtAccess, wxDateTime dtMod, wxDateTime dtCreate] wxFileName::GetTimes() *************** *** 409,413 **** %wxchkver_2_8 static wxString FindFirst(const wxString& dirname, const wxString& filespec, int flags = wxDIR_DEFAULT) ! //%wxchkver_2_8 static wxULongLong GetTotalSize(const wxString &dir, wxArrayString *filesSkipped = NULL) FIXME override // We don't need wxDirTraverser, just use wxDir methods GetFirst, GetNext. --- 409,413 ---- %wxchkver_2_8 static wxString FindFirst(const wxString& dirname, const wxString& filespec, int flags = wxDIR_DEFAULT) ! %wxchkver_2_8 static wxULongLong GetTotalSize(const wxString &dir) //, wxArrayString *filesSkipped = NULL) FIXME override // We don't need wxDirTraverser, just use wxDir methods GetFirst, GetNext. Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** windows.i 9 Mar 2007 06:10:16 -0000 1.30 --- windows.i 13 Mar 2007 23:01:53 -0000 1.31 *************** *** 543,547 **** bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxListbook") ! bool IsVertical() const wxListView* GetListView() --- 543,547 ---- bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxListbook") ! !%wxchkver_2_8 bool IsVertical() const // in wxBookCtrlBase in 2.8 wxListView* GetListView() *************** *** 587,591 **** bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxChoicebook") ! bool IsVertical() const wxChoice* GetChoiceCtrl() const --- 587,591 ---- bool Create(wxWindow* parent, wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "wxChoicebook") ! !%wxchkver_2_8 bool IsVertical() const // in wxBookCtrlBase in 2.8 wxChoice* GetChoiceCtrl() const Index: image.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/image.i,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** image.i 13 Mar 2007 05:01:00 -0000 1.20 --- image.i 13 Mar 2007 23:01:53 -0000 1.21 *************** *** 78,83 **** // Constants for wxImage::Scale() for determining the level of quality ! wxIMAGE_QUALITY_NORMAL ! wxIMAGE_QUALITY_HIGH %endenum --- 78,83 ---- // Constants for wxImage::Scale() for determining the level of quality ! %wxchkver_2_8 wxIMAGE_QUALITY_NORMAL ! %wxchkver_2_8 wxIMAGE_QUALITY_HIGH %endenum *************** *** 392,395 **** --- 392,408 ---- //----------------------------------------------------------------------------- + // wxTGAHandler and friends in imagtga.h + + %if %wxchkver_2_8 & wxUSE_TGA + + %include "wx/imagtga.h" + + %class wxTGAHandler, wxImageHandler + wxTGAHandler() + %endclass + + %endif // %wxchkver_2_8 & wxUSE_TGA + + //----------------------------------------------------------------------------- // wxXPMHandler and friends in imagxpm.h Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.42 retrieving revision 1.43 diff -C2 -d -r1.42 -r1.43 *** gdi.i 13 Mar 2007 05:01:00 -0000 1.42 --- gdi.i 13 Mar 2007 23:01:53 -0000 1.43 *************** *** 1002,1006 **** bool LoadFile(const wxString& name, wxBitmapType type) bool Ok() const ! %wxchkver_2_8 virtual wxColour QuantizeColour(const wxColour& colour) const //%win static bool RemoveHandler(const wxString& name) bool SaveFile(const wxString& name, wxBitmapType type, wxPalette* palette = NULL) --- 1002,1006 ---- bool LoadFile(const wxString& name, wxBitmapType type) bool Ok() const ! !%msw&%wxchkver_2_8 virtual wxColour QuantizeColour(const wxColour& colour) const // msw doesn't derive from wxBitmapBase //%win static bool RemoveHandler(const wxString& name) bool SaveFile(const wxString& name, wxBitmapType type, wxPalette* palette = NULL) Index: datetime.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/datetime.i,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** datetime.i 9 Mar 2007 00:15:12 -0000 1.23 --- datetime.i 13 Mar 2007 23:01:53 -0000 1.24 *************** *** 14,18 **** %function long wxGetLocalTime() %function long wxGetUTCTime() ! //%function wxLongLong wxGetLocalTimeMillis() %wxcompat_2_6 %function void wxStartTimer() // deprecated in 2.8 use wxStopWatch %wxcompat_2_6 %function long wxGetElapsedTime(bool resetTimer = true) // deprecated in 2.8 use wxStopWatch --- 14,18 ---- %function long wxGetLocalTime() %function long wxGetUTCTime() ! %function wxLongLong wxGetLocalTimeMillis() %wxcompat_2_6 %function void wxStartTimer() // deprecated in 2.8 use wxStopWatch %wxcompat_2_6 %function long wxGetElapsedTime(bool resetTimer = true) // deprecated in 2.8 use wxStopWatch *************** *** 248,255 **** int GetDays() const int GetHours() const ! //wxLongLong GetMilliseconds() const int GetMinutes() const ! //wxLongLong GetSeconds() const ! //wxLongLong GetValue() const int GetWeeks() const static wxTimeSpan Hours(long hours) --- 248,255 ---- int GetDays() const int GetHours() const ! wxLongLong GetMilliseconds() const int GetMinutes() const ! wxLongLong GetSeconds() const ! wxLongLong GetValue() const int GetWeeks() const static wxTimeSpan Hours(long hours) *************** *** 548,549 **** --- 548,947 ---- %endif //wxLUA_USE_wxDatePickerCtrl & wxUSE_DATEPICKCTRL + + //----------------------------------------------------------------------------- + // wxLocale + + %include "wx/intl.h" + + %if wxUSE_INTL + + %enum wxLanguage + // user's default/preffered language as got from OS: + wxLANGUAGE_DEFAULT, + // unknown language, if wxLocale::GetSystemLanguage fails: + wxLANGUAGE_UNKNOWN, + + wxLANGUAGE_ABKHAZIAN, + wxLANGUAGE_AFAR, + wxLANGUAGE_AFRIKAANS, + wxLANGUAGE_ALBANIAN, + wxLANGUAGE_AMHARIC, + wxLANGUAGE_ARABIC, + wxLANGUAGE_ARABIC_ALGERIA, + wxLANGUAGE_ARABIC_BAHRAIN, + wxLANGUAGE_ARABIC_EGYPT, + wxLANGUAGE_ARABIC_IRAQ, + wxLANGUAGE_ARABIC_JORDAN, + wxLANGUAGE_ARABIC_KUWAIT, + wxLANGUAGE_ARABIC_LEBANON, + wxLANGUAGE_ARABIC_LIBYA, + wxLANGUAGE_ARABIC_MOROCCO, + wxLANGUAGE_ARABIC_OMAN, + wxLANGUAGE_ARABIC_QATAR, + wxLANGUAGE_ARABIC_SAUDI_ARABIA, + wxLANGUAGE_ARABIC_SUDAN, + wxLANGUAGE_ARABIC_SYRIA, + wxLANGUAGE_ARABIC_TUNISIA, + wxLANGUAGE_ARABIC_UAE, + wxLANGUAGE_ARABIC_YEMEN, + wxLANGUAGE_ARMENIAN, + wxLANGUAGE_ASSAMESE, + wxLANGUAGE_AYMARA, + wxLANGUAGE_AZERI, + wxLANGUAGE_AZERI_CYRILLIC, + wxLANGUAGE_AZERI_LATIN, + wxLANGUAGE_BASHKIR, + wxLANGUAGE_BASQUE, + wxLANGUAGE_BELARUSIAN, + wxLANGUAGE_BENGALI, + wxLANGUAGE_BHUTANI, + wxLANGUAGE_BIHARI, + wxLANGUAGE_BISLAMA, + wxLANGUAGE_BRETON, + wxLANGUAGE_BULGARIAN, + wxLANGUAGE_BURMESE, + wxLANGUAGE_CAMBODIAN, + wxLANGUAGE_CATALAN, + wxLANGUAGE_CHINESE, + wxLANGUAGE_CHINESE_SIMPLIFIED, + wxLANGUAGE_CHINESE_TRADITIONAL, + wxLANGUAGE_CHINESE_HONGKONG, + wxLANGUAGE_CHINESE_MACAU, + wxLANGUAGE_CHINESE_SINGAPORE, + wxLANGUAGE_CHINESE_TAIWAN, + wxLANGUAGE_CORSICAN, + wxLANGUAGE_CROATIAN, + wxLANGUAGE_CZECH, + wxLANGUAGE_DANISH, + wxLANGUAGE_DUTCH, + wxLANGUAGE_DUTCH_BELGIAN, + wxLANGUAGE_ENGLISH, + wxLANGUAGE_ENGLISH_UK, + wxLANGUAGE_ENGLISH_US, + wxLANGUAGE_ENGLISH_AUSTRALIA, + wxLANGUAGE_ENGLISH_BELIZE, + wxLANGUAGE_ENGLISH_BOTSWANA, + wxLANGUAGE_ENGLISH_CANADA, + wxLANGUAGE_ENGLISH_CARIBBEAN, + wxLANGUAGE_ENGLISH_DENMARK, + wxLANGUAGE_ENGLISH_EIRE, + wxLANGUAGE_ENGLISH_JAMAICA, + wxLANGUAGE_ENGLISH_NEW_ZEALAND, + wxLANGUAGE_ENGLISH_PHILIPPINES, + wxLANGUAGE_ENGLISH_SOUTH_AFRICA, + wxLANGUAGE_ENGLISH_TRINIDAD, + wxLANGUAGE_ENGLISH_ZIMBABWE, + wxLANGUAGE_ESPERANTO, + wxLANGUAGE_ESTONIAN, + wxLANGUAGE_FAEROESE, + wxLANGUAGE_FARSI, + wxLANGUAGE_FIJI, + wxLANGUAGE_FINNISH, + wxLANGUAGE_FRENCH, + wxLANGUAGE_FRENCH_BELGIAN, + wxLANGUAGE_FRENCH_CANADIAN, + wxLANGUAGE_FRENCH_LUXEMBOURG, + wxLANGUAGE_FRENCH_MONACO, + wxLANGUAGE_FRENCH_SWISS, + wxLANGUAGE_FRISIAN, + wxLANGUAGE_GALICIAN, + wxLANGUAGE_GEORGIAN, + wxLANGUAGE_GERMAN, + wxLANGUAGE_GERMAN_AUSTRIAN, + wxLANGUAGE_GERMAN_BELGIUM, + wxLANGUAGE_GERMAN_LIECHTENSTEIN, + wxLANGUAGE_GERMAN_LUXEMBOURG, + wxLANGUAGE_GERMAN_SWISS, + wxLANGUAGE_GREEK, + wxLANGUAGE_GREENLANDIC, + wxLANGUAGE_GUARANI, + wxLANGUAGE_GUJARATI, + wxLANGUAGE_HAUSA, + wxLANGUAGE_HEBREW, + wxLANGUAGE_HINDI, + wxLANGUAGE_HUNGARIAN, + wxLANGUAGE_ICELANDIC, + wxLANGUAGE_INDONESIAN, + wxLANGUAGE_INTERLINGUA, + wxLANGUAGE_INTERLINGUE, + wxLANGUAGE_INUKTITUT, + wxLANGUAGE_INUPIAK, + wxLANGUAGE_IRISH, + wxLANGUAGE_ITALIAN, + wxLANGUAGE_ITALIAN_SWISS, + wxLANGUAGE_JAPANESE, + wxLANGUAGE_JAVANESE, + wxLANGUAGE_KANNADA, + wxLANGUAGE_KASHMIRI, + wxLANGUAGE_KASHMIRI_INDIA, + wxLANGUAGE_KAZAKH, + wxLANGUAGE_KERNEWEK, + wxLANGUAGE_KINYARWANDA, + wxLANGUAGE_KIRGHIZ, + wxLANGUAGE_KIRUNDI, + wxLANGUAGE_KONKANI, + wxLANGUAGE_KOREAN, + wxLANGUAGE_KURDISH, + wxLANGUAGE_LAOTHIAN, + wxLANGUAGE_LATIN, + wxLANGUAGE_LATVIAN, + wxLANGUAGE_LINGALA, + wxLANGUAGE_LITHUANIAN, + wxLANGUAGE_MACEDONIAN, + wxLANGUAGE_MALAGASY, + wxLANGUAGE_MALAY, + wxLANGUAGE_MALAYALAM, + wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM, + wxLANGUAGE_MALAY_MALAYSIA, + wxLANGUAGE_MALTESE, + wxLANGUAGE_MANIPURI, + wxLANGUAGE_MAORI, + wxLANGUAGE_MARATHI, + wxLANGUAGE_MOLDAVIAN, + wxLANGUAGE_MONGOLIAN, + wxLANGUAGE_NAURU, + wxLANGUAGE_NEPALI, + wxLANGUAGE_NEPALI_INDIA, + wxLANGUAGE_NORWEGIAN_BOKMAL, + wxLANGUAGE_NORWEGIAN_NYNORSK, + wxLANGUAGE_OCCITAN, + wxLANGUAGE_ORIYA, + wxLANGUAGE_OROMO, + wxLANGUAGE_PASHTO, + wxLANGUAGE_POLISH, + wxLANGUAGE_PORTUGUESE, + wxLANGUAGE_PORTUGUESE_BRAZILIAN, + wxLANGUAGE_PUNJABI, + wxLANGUAGE_QUECHUA, + wxLANGUAGE_RHAETO_ROMANCE, + wxLANGUAGE_ROMANIAN, + wxLANGUAGE_RUSSIAN, + wxLANGUAGE_RUSSIAN_UKRAINE, + wxLANGUAGE_SAMOAN, + wxLANGUAGE_SANGHO, + wxLANGUAGE_SANSKRIT, + wxLANGUAGE_SCOTS_GAELIC, + wxLANGUAGE_SERBIAN, + wxLANGUAGE_SERBIAN_CYRILLIC, + wxLANGUAGE_SERBIAN_LATIN, + wxLANGUAGE_SERBO_CROATIAN, + wxLANGUAGE_SESOTHO, + wxLANGUAGE_SETSWANA, + wxLANGUAGE_SHONA, + wxLANGUAGE_SINDHI, + wxLANGUAGE_SINHALESE, + wxLANGUAGE_SISWATI, + wxLANGUAGE_SLOVAK, + wxLANGUAGE_SLOVENIAN, + wxLANGUAGE_SOMALI, + wxLANGUAGE_SPANISH, + wxLANGUAGE_SPANISH_ARGENTINA, + wxLANGUAGE_SPANISH_BOLIVIA, + wxLANGUAGE_SPANISH_CHILE, + wxLANGUAGE_SPANISH_COLOMBIA, + wxLANGUAGE_SPANISH_COSTA_RICA, + wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC, + wxLANGUAGE_SPANISH_ECUADOR, + wxLANGUAGE_SPANISH_EL_SALVADOR, + wxLANGUAGE_SPANISH_GUATEMALA, + wxLANGUAGE_SPANISH_HONDURAS, + wxLANGUAGE_SPANISH_MEXICAN, + wxLANGUAGE_SPANISH_MODERN, + wxLANGUAGE_SPANISH_NICARAGUA, + wxLANGUAGE_SPANISH_PANAMA, + wxLANGUAGE_SPANISH_PARAGUAY, + wxLANGUAGE_SPANISH_PERU, + wxLANGUAGE_SPANISH_PUERTO_RICO, + wxLANGUAGE_SPANISH_URUGUAY, + wxLANGUAGE_SPANISH_US, + wxLANGUAGE_SPANISH_VENEZUELA, + wxLANGUAGE_SUNDANESE, + wxLANGUAGE_SWAHILI, + wxLANGUAGE_SWEDISH, + wxLANGUAGE_SWEDISH_FINLAND, + wxLANGUAGE_TAGALOG, + wxLANGUAGE_TAJIK, + wxLANGUAGE_TAMIL, + wxLANGUAGE_TATAR, + wxLANGUAGE_TELUGU, + wxLANGUAGE_THAI, + wxLANGUAGE_TIBETAN, + wxLANGUAGE_TIGRINYA, + wxLANGUAGE_TONGA, + wxLANGUAGE_TSONGA, + wxLANGUAGE_TURKISH, + wxLANGUAGE_TURKMEN, + wxLANGUAGE_TWI, + wxLANGUAGE_UIGHUR, + wxLANGUAGE_UKRAINIAN, + wxLANGUAGE_URDU, + wxLANGUAGE_URDU_INDIA, + wxLANGUAGE_URDU_PAKISTAN, + wxLANGUAGE_UZBEK, + wxLANGUAGE_UZBEK_CYRILLIC, + wxLANGUAGE_UZBEK_LATIN, + wxLANGUAGE_VIETNAMESE, + wxLANGUAGE_VOLAPUK, + wxLANGUAGE_WELSH, + wxLANGUAGE_WOLOF, + wxLANGUAGE_XHOSA, + wxLANGUAGE_YIDDISH, + wxLANGUAGE_YORUBA, + wxLANGUAGE_ZHUANG, + wxLANGUAGE_ZULU, + + // for custom, user-defined languages: + wxLANGUAGE_USER_DEFINED + %endenum + + %enum wxLocaleCategory + wxLOCALE_CAT_NUMBER, // (any) numbers + wxLOCALE_CAT_DATE, // date/time + wxLOCALE_CAT_MONEY, // monetary value + wxLOCALE_CAT_MAX + %endenum + + %enum wxLocaleInfo + wxLOCALE_THOUSANDS_SEP, // the thounsands separator + wxLOCALE_DECIMAL_POINT // the character used as decimal point + %endenum + + %enum wxLocaleInitFlags + wxLOCALE_LOAD_DEFAULT // load wxwin.mo? + wxLOCALE_CONV_ENCODING // convert encoding on the fly? + %endenum + + %struct wxLanguageInfo + %member int Language; // wxLanguage id + %member wxString CanonicalName; // Canonical name, e.g. fr_FR + %member wxString Description; // human-readable name of the language + %wxchkver_2_8 %member wxLayoutDirection LayoutDirection; + %endstruct + + + %class %noclassinfo %encapsulate wxLocale + + // call Init() if you use this ctor + //wxLocale() + + // the ctor has a side effect of changing current locale + // name (for messages), dir prefix (for msg files), locale (for setlocale), preload wxstd.mo?, convert Win<->Unix if necessary? + wxLocale(const wxString& szName, const wxString& szShort = "", const wxString& szLocale = "", bool bLoadDefault = true, bool bConvertEncoding = false) + + // wxLanguage id or custom language + %constructor wxLocaleFromLanguage(int language, int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING) + + // the same as a function (returns true on success) + //bool Init(const wxChar *szName, const wxChar *szShort = (const wxChar *) NULL, const wxChar *szLocale = (const wxChar *) NULL, bool bLoadDefault = true, bool bConvertEncoding = false) + + // same as second ctor (returns true on success) + //bool Init(int language = wxLANGUAGE_DEFAULT, int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); + + // Try to get user's (or OS's) preferred language setting. + // Return wxLANGUAGE_UNKNOWN if language-guessing algorithm failed + static int GetSystemLanguage() + + // get the encoding used by default for text on this system, returns + // wxFONTENCODING_SYSTEM if it couldn't be determined + static wxFontEncoding GetSystemEncoding(); + + // get the string describing the system encoding, return empty string if + // couldn't be determined + static wxString GetSystemEncodingName(); + + // get the values of the given locale-dependent datum: the current locale + // is used, the US default value is returned if everything else fails + static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat); + + // return true if the locale was set successfully + bool IsOk() const + + // returns locale name + wxString GetLocale() const + + // return current locale wxLanguage value + int GetLanguage() const + + // return locale name to be passed to setlocale() + wxString GetSysName() const; + + // return 'canonical' name, i.e. in the form of xx[_YY], where xx is + // language code according to ISO 639 and YY is country name + // as specified by ISO 3166. + wxString GetCanonicalName() const + + // add a prefix to the catalog lookup path: the message catalog files will be + // looked up under prefix/<lang>/LC_MESSAGES, prefix/LC_MESSAGES and prefix + // (in this order). + // + // This only applies to subsequent invocations of AddCatalog()! + static void AddCatalogLookupPathPrefix(const wxString& prefix); + + // add a catalog: it's searched for in standard places (current directory + // first, system one after), but the you may prepend additional directories to + // the search path with AddCatalogLookupPathPrefix(). + // + // The loaded catalog will be used for message lookup by GetString(). + // + // Returns 'true' if it was successfully loaded + bool AddCatalog(const wxString& szDomain); + %rename AddCatalogLanguage bool AddCatalog(const wxString& szDomain, wxLanguage msgIdLanguage, const wxString& msgIdCharset); + + // check if the given locale is provided by OS and C run time + %wxchkver_2_8 static bool IsAvailable(int lang); + + // check if the given catalog is loaded + bool IsLoaded(const wxString& szDomain) const; + + // Retrieve the language info struct for the given language + // + // Returns NULL if no info found, pointer must *not* be deleted by caller + static const wxLanguageInfo *GetLanguageInfo(int lang); + + // Returns language name in English or empty string if the language + // is not in database + static wxString GetLanguageName(int lang); + + // Find the language for the given locale string which may be either a + // canonical ISO 2 letter language code ("xx"), a language code followed by + // the country code ("xx_XX") or a Windows full language name ("Xxxxx...") + // + // Returns NULL if no info found, pointer must *not* be deleted by caller + static const wxLanguageInfo *FindLanguageInfo(const wxString& locale); + + // Add custom language to the list of known languages. + // Notes: 1) wxLanguageInfo contains platform-specific data + // 2) must be called before Init to have effect + static void AddLanguage(const wxLanguageInfo& info); + + // retrieve the translation for a string in all loaded domains unless + // the szDomain parameter is specified (and then only this domain is + // searched) + // n - additional parameter for PluralFormsParser + // + // return original string if translation is not available + // (in this case an error message is generated the first time + // a string is not found; use wxLogNull to suppress it) + // + // domains are searched in the last to first order, i.e. catalogs + // added later override those added before. + virtual wxString GetString(const wxString& szOrigString, const wxString& szDomain = "") const; + // plural form version of the same: + %rename GetStringPlural virtual wxString GetString(const wxString& szOrigString, const wxString& szOrigString2, size_t n, const wxString& szDomain = "") const; + + // Returns the current short name for the locale + const wxString& GetName() const + + // return the contents of .po file header + wxString GetHeaderValue( const wxString& szHeader, const wxString& szDomain = "" ) const; + %endclass + + %function wxLocale* wxGetLocale() + + %wxchkver_2_8 %function wxString wxGetTranslation(const wxString& sz, const wxString& domain="") + !%wxchkver_2_8 %function wxString wxGetTranslation(const wxString& sz) + + %wxchkver_2_8 %rename wxGetTranslationPlural %function wxString wxGetTranslation(const wxString& sz1, const wxString& sz2, size_t n, const wxString& domain="") + !%wxchkver_2_8 %rename wxGetTranslationPlural %function wxString wxGetTranslation(const wxString& sz1, const wxString& sz2, size_t n) + + %endif //wxUSE_INTL Index: controls.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/controls.i,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** controls.i 12 Mar 2007 23:12:30 -0000 1.31 --- controls.i 13 Mar 2007 23:01:53 -0000 1.32 *************** *** 293,296 **** --- 293,297 ---- //int GetSelections(wxArrayInt& selections) const int GetSelections() const + %wxchkver_2_8 int HitTest(const wxPoint& point) const //void InsertItems(int nItems, const wxString items[], int pos) void InsertItems(const wxArrayString_FromLuaTable& items, int pos) *************** *** 346,352 **** %define wxLC_SORT_ASCENDING %define wxLC_SORT_DESCENDING ! %define wxLC_USER_TEXT %define wxLC_VRULES %define wxLIST_ALIGN_DEFAULT %define wxLIST_ALIGN_LEFT --- 347,358 ---- %define wxLC_SORT_ASCENDING %define wxLC_SORT_DESCENDING ! //%define wxLC_USER_TEXT - deprecated - use wxLC_VIRTUAL ! %define wxLC_VIRTUAL %define wxLC_VRULES + %define wxLC_MASK_TYPE // (wxLC_ICON | wxLC_SMALL_ICON | wxLC_LIST | wxLC_REPORT) + %define wxLC_MASK_ALIGN // (wxLC_ALIGN_TOP | wxLC_ALIGN_LEFT) + %define wxLC_MASK_SORT // (wxLC_SORT_ASCENDING | wxLC_SORT_DESCENDING) + %define wxLIST_ALIGN_DEFAULT %define wxLIST_ALIGN_LEFT *************** *** 390,393 **** --- 396,401 ---- %define wxLIST_STATE_SELECTED + %wxchkver_2_8 %define wxLIST_GETSUBITEMRECT_WHOLEITEM + %class wxListCtrl, wxControl %constructor wxListCtrlDefault() *************** *** 476,479 **** --- 484,488 ---- wxListItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont) + %wxchkver_2_8 void AssignFrom(const wxListItemAttr& source) wxColour GetBackgroundColour() wxFont GetFont() Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** defsutil.i 13 Mar 2007 05:01:00 -0000 1.35 --- defsutil.i 13 Mar 2007 23:01:53 -0000 1.36 *************** *** 161,169 **** %endif // !%wxchkver_2_7 - // !%wxchkver_2_7 %function long wxGetFreeMemory() FIXME need to add wxLongLong - maybe always return longlong here? - // %wxchkver_2_7 %function wxMemorySize wxGetFreeMemory() - %function wxString wxGetEmailAddress() ! //%function wxMemorySize wxGetFreeMemory() %function wxString wxGetFullHostName() %function wxString wxGetHomeDir() --- 161,166 ---- %endif // !%wxchkver_2_7 %function wxString wxGetEmailAddress() ! %function wxLongLong wxGetFreeMemory() %function wxString wxGetFullHostName() %function wxString wxGetHomeDir() Index: sizer.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/sizer.i,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** sizer.i 9 Mar 2007 00:15:12 -0000 1.11 --- sizer.i 13 Mar 2007 23:01:53 -0000 1.12 *************** *** 374,377 **** %endclass ! %endif //wxLUA_USE_wxLayoutConstraints --- 374,377 ---- %endclass ! %endif //wxLUA_USE_wxLayoutConstraints&(!%wxchkver_2_6) Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** data.i 9 Mar 2007 00:15:12 -0000 1.24 --- data.i 13 Mar 2007 23:01:53 -0000 1.25 *************** *** 388,404 **** //----------------------------------------------------------------------------- // wxLongLong - FIXME it's a typedef so %encapsulate fails on class wxLongLong ! //%if wxUSE_LONGLONG ! //%class %encapsulate %delete %noclassinfo wxLongLong ! // wxLongLong(long hi = 0, unsigned long lo = 0) ! // wxLongLong Abs() const ! // wxLongLong& Assign(double d) ! // long GetHi() const ! // unsigned long GetLo() const ! // double ToDouble() const ! // long ToLong() const ! // wxString ToString() const //%operator wxLongLong operator+(const wxLongLong& ll) const --- 388,407 ---- //----------------------------------------------------------------------------- // wxLongLong - FIXME it's a typedef so %encapsulate fails on class wxLongLong + // Works in GCC ! %if wxUSE_LONGLONG ! %include "wx/longlong.h" ! %class %encapsulate %delete %noclassinfo wxLongLong ! wxLongLong(long hi = 0, unsigned long lo = 0) ! ! wxLongLong Abs() const ! wxLongLong& Assign(double d) ! long GetHi() const ! unsigned long GetLo() const ! double ToDouble() const ! long ToLong() const ! wxString ToString() const //%operator wxLongLong operator+(const wxLongLong& ll) const *************** *** 407,411 **** //%operator wxLongLong operator-() const //%operator wxLongLong operator-(const wxLongLong& ll) const ! //%endclass ! //%endif wxUSE_LONGLONG --- 410,426 ---- //%operator wxLongLong operator-() const //%operator wxLongLong operator-(const wxLongLong& ll) const ! %endclass ! //----------------------------------------------------------------------------- ! // wxULongLong ! ! %class %encapsulate %delete %noclassinfo wxULongLong ! wxULongLong(unsigned long hi = 0, unsigned long lo = 0) ! ! unsigned long GetHi() const ! unsigned long GetLo() const ! long ToULong() const ! wxString ToString() const ! %endclass ! ! %endif wxUSE_LONGLONG |
From: John L. <jr...@us...> - 2007-03-13 23:02:46
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18915/wxLua/bindings Modified Files: genwxbind.lua Log Message: more updates to wxWidgets 2.8 using headers (up to longlong.h) Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.104 retrieving revision 1.105 diff -C2 -d -r1.104 -r1.105 *** genwxbind.lua 13 Mar 2007 05:00:57 -0000 1.104 --- genwxbind.lua 13 Mar 2007 23:01:53 -0000 1.105 *************** *** 844,847 **** --- 844,848 ---- preprocConditionTable["wxUSE_TEXTDLG"] = "wxUSE_TEXTDLG" preprocConditionTable["wxUSE_TEXTFILE"] = "wxUSE_TEXTFILE" + preprocConditionTable["wxUSE_TGA"] = "wxUSE_TGA" preprocConditionTable["wxUSE_THREADS"] = "wxUSE_THREADS" preprocConditionTable["wxUSE_TIMEDATE"] = "wxUSE_TIMEDATE" *************** *** 2008,2012 **** if IsDataType(tag) or dataTypeAttribTable[tag] or (tag == "*") or (tag == "&") or (tag == "[]") then print("Error: Invalid Enum Token '"..tag.."'. "..LineTableErrString(lineTable)) ! else lineState.DefType = "enum" lineState.Name = tag --- 2009,2013 ---- if IsDataType(tag) or dataTypeAttribTable[tag] or (tag == "*") or (tag == "&") or (tag == "[]") then print("Error: Invalid Enum Token '"..tag.."'. "..LineTableErrString(lineTable)) ! elseif tag ~= "," then -- ignore trailing commas lineState.DefType = "enum" lineState.Name = tag *************** *** 2018,2022 **** -- class or function parseObject ! elseif (parseState.ObjectStack[1].DefType == "class") or (parseState.ObjectStack[1].DefType == "globals") then if IsDataType(tag) then lineState.DataType = SpaceSeparateStrings(lineState.DataType, tag) --- 2019,2025 ---- -- class or function parseObject ! elseif (parseState.ObjectStack[1].DefType == "class") or ! (parseState.ObjectStack[1].DefType == "struct") or ! (parseState.ObjectStack[1].DefType == "globals") then if IsDataType(tag) then lineState.DataType = SpaceSeparateStrings(lineState.DataType, tag) |
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv18915/wxLua/modules/wxbind/src Modified Files: appframe.cpp controls.cpp data.cpp datetime.cpp file.cpp gdi.cpp image.cpp windows.cpp wx_bind.cpp Log Message: more updates to wxWidgets 2.8 using headers (up to longlong.h) Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** controls.cpp 12 Mar 2007 23:12:34 -0000 1.47 --- controls.cpp 13 Mar 2007 23:01:54 -0000 1.48 *************** *** 2281,2284 **** --- 2281,2306 ---- #endif // ((wxLUA_USE_wxListBox && wxUSE_LISTBOX) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && (wxLUA_USE_wxPointSizeRect) + + #if (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListBox && wxUSE_LISTBOX)) + static wxLuaArgTag s_wxluatagArray_wxLua_wxListBox_HitTest[] = { &s_wxluatag_wxPoint, 0 }; + // %wxchkver_2_8 int HitTest(const wxPoint& point) const + static int LUACALL wxLua_wxListBox_HitTest(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // const wxPoint point + const wxPoint * point = (const wxPoint *)wxlState.GetUserDataType(2, s_wxluatag_wxPoint); + // get this + wxListBox * self = (wxListBox *)wxlState.GetUserDataType(1, s_wxluatag_wxListBox); + // call HitTest + returns = self->HitTest(*point); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif // (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListBox && wxUSE_LISTBOX)) + // %constructor wxListBoxDefault() static int LUACALL wxLua_wxListBoxDefault_constructor(lua_State *L) *************** *** 2450,2453 **** --- 2472,2480 ---- #endif // ((wxLUA_USE_wxListBox && wxUSE_LISTBOX) && (wxLUA_USE_wxValidator && wxUSE_VALIDATORS)) && (wxLUA_USE_wxPointSizeRect) + + #if (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListBox && wxUSE_LISTBOX)) + { LuaMethod, "HitTest", wxLua_wxListBox_HitTest, 1, 1, s_wxluatagArray_wxLua_wxListBox_HitTest }, + #endif // (wxLUA_USE_wxPointSizeRect) && ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListBox && wxUSE_LISTBOX)) + { LuaConstructor, "wxListBoxDefault", wxLua_wxListBoxDefault_constructor, 0, 0, s_wxluaargArray_None }, { LuaMethod, "Deselect", wxLua_wxListBox_Deselect, 1, 1, s_wxluatagArray_wxLua_wxListBox_Deselect }, *************** *** 4009,4012 **** --- 4036,4058 ---- + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) + static wxLuaArgTag s_wxluatagArray_wxLua_wxListItemAttr_AssignFrom[] = { &s_wxluatag_wxListItemAttr, 0 }; + // %wxchkver_2_8 void AssignFrom(const wxListItemAttr& source) + static int LUACALL wxLua_wxListItemAttr_AssignFrom(lua_State *L) + { + wxLuaState wxlState(L); + // const wxListItemAttr source + const wxListItemAttr * source = (const wxListItemAttr *)wxlState.GetUserDataType(2, s_wxluatag_wxListItemAttr); + // get this + wxListItemAttr * self = (wxListItemAttr *)wxlState.GetUserDataType(1, s_wxluatag_wxListItemAttr); + // call AssignFrom + self->AssignFrom(*source); + + return 0; + } + + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) + + #if ((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxFont)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) static wxLuaArgTag s_wxluatagArray_wxLua_wxListItemAttr_constructor[] = { &s_wxluatag_wxColour, &s_wxluatag_wxColour, &s_wxluatag_wxFont, 0 }; *************** *** 4218,4221 **** --- 4264,4272 ---- WXLUAMETHOD wxListItemAttr_methods[] = { + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) + { LuaMethod, "AssignFrom", wxLua_wxListItemAttr_AssignFrom, 1, 1, s_wxluatagArray_wxLua_wxListItemAttr_AssignFrom }, + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) + + #if ((wxLUA_USE_wxColourPenBrush) && (wxLUA_USE_wxFont)) && (wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL) { LuaConstructor, "wxListItemAttr", wxLua_wxListItemAttr_constructor, 3, 0, s_wxluatagArray_wxLua_wxListItemAttr_constructor }, Index: data.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/data.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** data.cpp 9 Mar 2007 06:10:18 -0000 1.37 --- data.cpp 13 Mar 2007 23:01:55 -0000 1.38 *************** *** 2458,2459 **** --- 2458,2777 ---- #endif // wxLUA_USE_wxArrayString + + #if wxUSE_LONGLONG + // --------------------------------------------------------------------------- + // Bind class wxLongLong + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLongLong' + int s_wxluatag_wxLongLong = -1; + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLongLong_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // wxLongLong(long hi = 0, unsigned long lo = 0) + static int LUACALL wxLua_wxLongLong_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong *returns; + // get number of arguments + int argCount = lua_gettop(L); + // unsigned long lo = 0 + unsigned long lo = (argCount >= 2 ? (long)wxlState.GetNumberType(2) : 0); + // long hi = 0 + long hi = (argCount >= 1 ? (long)wxlState.GetNumberType(1) : 0); + // call constructor + returns = new wxLongLong(hi, lo); + // add to tracked memory list + wxLua_AddTrackedObject(wxlState, (wxLongLong *)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLongLong, returns); + + return 1; + } + + // wxLongLong Abs() const + static int LUACALL wxLua_wxLongLong_Abs(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong *returns; + // get this + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // call Abs + // allocate a new object using the copy constructor + returns = new wxLongLong(self->Abs()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxLongLong *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLongLong, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLongLong_Assign[] = { &s_wxluaarg_Number, 0 }; + // wxLongLong& Assign(double d) + static int LUACALL wxLua_wxLongLong_Assign(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong *returns; + // double d + double d = (double)wxlState.GetNumberType(2); + // get this + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // call Assign + returns = &self->Assign(d); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLongLong, returns); + + return 1; + } + + // long GetHi() const + static int LUACALL wxLua_wxLongLong_GetHi(lua_State *L) + { + wxLuaState wxlState(L); + long returns; + // get this + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // call GetHi + returns = self->GetHi(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // unsigned long GetLo() const + static int LUACALL wxLua_wxLongLong_GetLo(lua_State *L) + { + wxLuaState wxlState(L); + unsigned long returns; + // get this + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // call GetLo + returns = self->GetLo(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // double ToDouble() const + static int LUACALL wxLua_wxLongLong_ToDouble(lua_State *L) + { + wxLuaState wxlState(L); + double returns; + // get this + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // call ToDouble + returns = self->ToDouble(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // long ToLong() const + static int LUACALL wxLua_wxLongLong_ToLong(lua_State *L) + { + wxLuaState wxlState(L); + long returns; + // get this + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // call ToLong + returns = self->ToLong(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxString ToString() const + static int LUACALL wxLua_wxLongLong_ToString(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // call ToString + returns = self->ToString(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static int LUACALL wxLua_wxLongLong_destructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + + // remove from tracked memory list + if (self != 0) + wxlState.RemoveTrackedObject(self); + return 0; + } + + static int LUACALL wxLua_wxLongLong_Delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong * self = (wxLongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxLongLong); + // remove from tracked memory list + if (self != 0) + if (wxlState.RemoveTrackedObject(self)) + { // if removed, reset the tag so that gc() is not called on this object. + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxLongLong_methods[] = { + { LuaConstructor, "wxLongLong", wxLua_wxLongLong_constructor, 2, 0, s_wxluatagArray_wxLua_wxLongLong_constructor }, + { LuaMethod, "Abs", wxLua_wxLongLong_Abs, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Assign", wxLua_wxLongLong_Assign, 1, 1, s_wxluatagArray_wxLua_wxLongLong_Assign }, + { LuaMethod, "GetHi", wxLua_wxLongLong_GetHi, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetLo", wxLua_wxLongLong_GetLo, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ToDouble", wxLua_wxLongLong_ToDouble, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ToLong", wxLua_wxLongLong_ToLong, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ToString", wxLua_wxLongLong_ToString, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxLongLong", wxLua_wxLongLong_destructor, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Delete", wxLua_wxLongLong_Delete, 0, 0, s_wxluaargArray_None }, + }; + + int wxLongLong_methodCount = sizeof(wxLongLong_methods)/sizeof(wxLongLong_methods[0]); + #endif // wxUSE_LONGLONG + + + #if wxUSE_LONGLONG + // --------------------------------------------------------------------------- + // Bind class wxULongLong + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxULongLong' + int s_wxluatag_wxULongLong = -1; + + static wxLuaArgTag s_wxluatagArray_wxLua_wxULongLong_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // wxULongLong(unsigned long hi = 0, unsigned long lo = 0) + static int LUACALL wxLua_wxULongLong_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxULongLong *returns; + // get number of arguments + int argCount = lua_gettop(L); + // unsigned long lo = 0 + unsigned long lo = (argCount >= 2 ? (long)wxlState.GetNumberType(2) : 0); + // unsigned long hi = 0 + unsigned long hi = (argCount >= 1 ? (long)wxlState.GetNumberType(1) : 0); + // call constructor + returns = new wxULongLong(hi, lo); + // add to tracked memory list + wxLua_AddTrackedObject(wxlState, (wxULongLong *)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxULongLong, returns); + + return 1; + } + + // unsigned long GetHi() const + static int LUACALL wxLua_wxULongLong_GetHi(lua_State *L) + { + wxLuaState wxlState(L); + unsigned long returns; + // get this + wxULongLong * self = (wxULongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxULongLong); + // call GetHi + returns = self->GetHi(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // unsigned long GetLo() const + static int LUACALL wxLua_wxULongLong_GetLo(lua_State *L) + { + wxLuaState wxlState(L); + unsigned long returns; + // get this + wxULongLong * self = (wxULongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxULongLong); + // call GetLo + returns = self->GetLo(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // long ToULong() const + static int LUACALL wxLua_wxULongLong_ToULong(lua_State *L) + { + wxLuaState wxlState(L); + long returns; + // get this + wxULongLong * self = (wxULongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxULongLong); + // call ToULong + returns = self->ToULong(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxString ToString() const + static int LUACALL wxLua_wxULongLong_ToString(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxULongLong * self = (wxULongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxULongLong); + // call ToString + returns = self->ToString(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static int LUACALL wxLua_wxULongLong_destructor(lua_State *L) + { + wxLuaState wxlState(L); + wxULongLong * self = (wxULongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxULongLong); + + // remove from tracked memory list + if (self != 0) + wxlState.RemoveTrackedObject(self); + return 0; + } + + static int LUACALL wxLua_wxULongLong_Delete(lua_State *L) + { + wxLuaState wxlState(L); + wxULongLong * self = (wxULongLong *)wxlState.GetUserDataType(1, s_wxluatag_wxULongLong); + // remove from tracked memory list + if (self != 0) + if (wxlState.RemoveTrackedObject(self)) + { // if removed, reset the tag so that gc() is not called on this object. + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxULongLong_methods[] = { + { LuaConstructor, "wxULongLong", wxLua_wxULongLong_constructor, 2, 0, s_wxluatagArray_wxLua_wxULongLong_constructor }, + { LuaMethod, "GetHi", wxLua_wxULongLong_GetHi, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetLo", wxLua_wxULongLong_GetLo, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ToULong", wxLua_wxULongLong_ToULong, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ToString", wxLua_wxULongLong_ToString, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxULongLong", wxLua_wxULongLong_destructor, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Delete", wxLua_wxULongLong_Delete, 0, 0, s_wxluaargArray_None }, + }; + + int wxULongLong_methodCount = sizeof(wxULongLong_methods)/sizeof(wxULongLong_methods[0]); + #endif // wxUSE_LONGLONG + Index: file.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/file.cpp,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** file.cpp 12 Mar 2007 23:12:35 -0000 1.36 --- file.cpp 13 Mar 2007 23:01:56 -0000 1.37 *************** *** 273,276 **** --- 273,298 ---- + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileName)) && (wxUSE_LONGLONG) + // %wxchkver_2_8 wxULongLong GetSize() const + static int LUACALL wxLua_wxFileName_GetSize(lua_State *L) + { + wxLuaState wxlState(L); + wxULongLong *returns; + // get this + wxFileName * self = (wxFileName *)wxlState.GetUserDataType(1, s_wxluatag_wxFileName); + // call GetSize + // allocate a new object using the copy constructor + returns = new wxULongLong(self->GetSize()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxULongLong *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxULongLong, returns); + + return 1; + } + + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileName)) && (wxUSE_LONGLONG) + + #if (wxCHECK_VERSION(2,8,0) && (wxUSE_FILE || wxUSE_FFILE )) && (wxLUA_USE_wxFileName) static wxLuaArgTag s_wxluatagArray_wxLua_wxFileName_AssignTempFileNameGetName[] = { &s_wxluaarg_String, 0 }; *************** *** 1840,1843 **** --- 1862,1870 ---- + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileName)) && (wxUSE_LONGLONG) + { LuaMethod, "GetSize", wxLua_wxFileName_GetSize, 0, 0, s_wxluaargArray_None }, + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxFileName)) && (wxUSE_LONGLONG) + + #if (wxCHECK_VERSION(2,8,0) && (wxUSE_FILE || wxUSE_FFILE )) && (wxLUA_USE_wxFileName) { LuaMethod, "AssignTempFileNameGetName", wxLua_wxFileName_AssignTempFileNameGetName, 1, 1, s_wxluatagArray_wxLua_wxFileName_AssignTempFileNameGetName }, *************** *** 2615,2618 **** --- 2642,2668 ---- + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir)) && (wxUSE_LONGLONG) + static wxLuaArgTag s_wxluatagArray_wxLua_wxDir_GetTotalSize[] = { &s_wxluaarg_String, 0 }; + // %wxchkver_2_8 static wxULongLong GetTotalSize(const wxString &dir) //, wxArrayString *filesSkipped = NULL) FIXME override + static int LUACALL wxLua_wxDir_GetTotalSize(lua_State *L) + { + wxLuaState wxlState(L); + wxULongLong *returns; + // const wxString dir + const wxString dir = wxlState.GetwxStringType(2); + // call GetTotalSize + // allocate a new object using the copy constructor + returns = new wxULongLong(wxDir::GetTotalSize(dir)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxULongLong *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxULongLong, returns); + + return 1; + } + + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir)) && (wxUSE_LONGLONG) + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir) static wxLuaArgTag s_wxluatagArray_wxLua_wxDir_FindFirst[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Number, 0 }; *************** *** 2883,2886 **** --- 2933,2941 ---- WXLUAMETHOD wxDir_methods[] = { + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir)) && (wxUSE_LONGLONG) + { LuaMethod, "GetTotalSize", wxLua_wxDir_GetTotalSize, 1, 1, s_wxluatagArray_wxLua_wxDir_GetTotalSize }, + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir)) && (wxUSE_LONGLONG) + + #if (wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDir) { LuaMethod, "FindFirst", wxLua_wxDir_FindFirst, 3, 2, s_wxluatagArray_wxLua_wxDir_FindFirst }, Index: appframe.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/appframe.cpp,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** appframe.cpp 9 Mar 2007 00:15:13 -0000 1.37 --- appframe.cpp 13 Mar 2007 23:01:54 -0000 1.38 *************** *** 27,30 **** --- 27,680 ---- + #if wxUSE_LOG + // --------------------------------------------------------------------------- + // Bind class wxLog + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLog' + int s_wxluatag_wxLog = -1; + + + #if (wxCHECK_VERSION(2,8,0)) && (wxUSE_LOG) + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_SetRepetitionCounting[] = { &s_wxluaarg_Boolean, 0 }; + // %wxchkver_2_8 static void SetRepetitionCounting(bool bRepetCounting = true) + static int LUACALL wxLua_wxLog_SetRepetitionCounting(lua_State *L) + { + wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // bool bRepetCounting = true + bool bRepetCounting = (argCount >= 2 ? wxlState.GetBooleanType(2) : true); + // call SetRepetitionCounting + wxLog::SetRepetitionCounting(bRepetCounting); + + return 0; + } + + // %wxchkver_2_8 static bool GetRepetitionCounting() + static int LUACALL wxLua_wxLog_GetRepetitionCounting(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // call GetRepetitionCounting + returns = wxLog::GetRepetitionCounting(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxUSE_LOG) + + + #if (wxUSE_LOG) && (wxLUA_USE_wxArrayString) + // static const wxArrayString GetTraceMasks() + static int LUACALL wxLua_wxLog_GetTraceMasks(lua_State *L) + { + wxLuaState wxlState(L); + const wxArrayString *returns; + // call GetTraceMasks + // allocate a new object using the copy constructor + returns = new wxArrayString(wxLog::GetTraceMasks()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxArrayString *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxArrayString, returns); + + return 1; + } + + #endif // (wxUSE_LOG) && (wxLUA_USE_wxArrayString) + + // wxLog() + static int LUACALL wxLua_wxLog_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLog *returns; + // call constructor + returns = new wxLog(); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLog, returns); + + return 1; + } + + // static bool IsEnabled() + static int LUACALL wxLua_wxLog_IsEnabled(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // call IsEnabled + returns = wxLog::IsEnabled(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_EnableLogging[] = { &s_wxluaarg_Boolean, 0 }; + // static bool EnableLogging(bool doIt = true) + static int LUACALL wxLua_wxLog_EnableLogging(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get number of arguments + int argCount = lua_gettop(L); + // bool doIt = true + bool doIt = (argCount >= 2 ? wxlState.GetBooleanType(2) : true); + // call EnableLogging + returns = wxLog::EnableLogging(doIt); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // virtual void Flush() + static int LUACALL wxLua_wxLog_Flush(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxLog * self = (wxLog *)wxlState.GetUserDataType(1, s_wxluatag_wxLog); + // call Flush + self->Flush(); + + return 0; + } + + // static void FlushActive() + static int LUACALL wxLua_wxLog_FlushActive(lua_State *L) + { + wxLuaState wxlState(L); + // call FlushActive + wxLog::FlushActive(); + + return 0; + } + + // static wxLog *GetActiveTarget() + static int LUACALL wxLua_wxLog_GetActiveTarget(lua_State *L) + { + wxLuaState wxlState(L); + wxLog *returns; + // call GetActiveTarget + returns = (wxLog *)wxLog::GetActiveTarget(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLog, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_SetActiveTarget[] = { &s_wxluatag_wxLog, 0 }; + // static wxLog *SetActiveTarget(wxLog *pLogger) + static int LUACALL wxLua_wxLog_SetActiveTarget(lua_State *L) + { + wxLuaState wxlState(L); + wxLog *returns; + // wxLog pLogger + wxLog * pLogger = (wxLog *)wxlState.GetUserDataType(2, s_wxluatag_wxLog); + // call SetActiveTarget + returns = (wxLog *)wxLog::SetActiveTarget(pLogger); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLog, returns); + + return 1; + } + + // static void Suspend() + static int LUACALL wxLua_wxLog_Suspend(lua_State *L) + { + wxLuaState wxlState(L); + // call Suspend + wxLog::Suspend(); + + return 0; + } + + // static void Resume() + static int LUACALL wxLua_wxLog_Resume(lua_State *L) + { + wxLuaState wxlState(L); + // call Resume + wxLog::Resume(); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_SetVerbose[] = { &s_wxluaarg_Boolean, 0 }; + // static void SetVerbose(bool bVerbose = true) + static int LUACALL wxLua_wxLog_SetVerbose(lua_State *L) + { + wxLuaState wxlState(L); + // get number of arguments + int argCount = lua_gettop(L); + // bool bVerbose = true + bool bVerbose = (argCount >= 2 ? wxlState.GetBooleanType(2) : true); + // call SetVerbose + wxLog::SetVerbose(bVerbose); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_SetLogLevel[] = { &s_wxluaarg_Number, 0 }; + // static void SetLogLevel(wxLogLevel logLevel) + static int LUACALL wxLua_wxLog_SetLogLevel(lua_State *L) + { + wxLuaState wxlState(L); + // wxLogLevel logLevel + wxLogLevel logLevel = (wxLogLevel)wxlState.GetNumberType(2); + // call SetLogLevel + wxLog::SetLogLevel(logLevel); + + return 0; + } + + // static void DontCreateOnDemand() + static int LUACALL wxLua_wxLog_DontCreateOnDemand(lua_State *L) + { + wxLuaState wxlState(L); + // call DontCreateOnDemand + wxLog::DontCreateOnDemand(); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_SetTraceMask[] = { &s_wxluaarg_Number, 0 }; + // static void SetTraceMask(wxTraceMask ulMask) + static int LUACALL wxLua_wxLog_SetTraceMask(lua_State *L) + { + wxLuaState wxlState(L); + // wxTraceMask ulMask + wxTraceMask ulMask = (wxTraceMask)wxlState.GetNumberType(2); + // call SetTraceMask + wxLog::SetTraceMask(ulMask); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_AddTraceMask[] = { &s_wxluaarg_String, 0 }; + // static void AddTraceMask(const wxString& str) + static int LUACALL wxLua_wxLog_AddTraceMask(lua_State *L) + { + wxLuaState wxlState(L); + // const wxString str + const wxString str = wxlState.GetwxStringType(2); + // call AddTraceMask + wxLog::AddTraceMask(str); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_RemoveTraceMask[] = { &s_wxluaarg_String, 0 }; + // static void RemoveTraceMask(const wxString& str) + static int LUACALL wxLua_wxLog_RemoveTraceMask(lua_State *L) + { + wxLuaState wxlState(L); + // const wxString str + const wxString str = wxlState.GetwxStringType(2); + // call RemoveTraceMask + wxLog::RemoveTraceMask(str); + + return 0; + } + + // static void ClearTraceMasks() + static int LUACALL wxLua_wxLog_ClearTraceMasks(lua_State *L) + { + wxLuaState wxlState(L); + // call ClearTraceMasks + wxLog::ClearTraceMasks(); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_SetTimestamp[] = { &s_wxluaarg_String, 0 }; + // static void SetTimestamp(const wxString& ts) + static int LUACALL wxLua_wxLog_SetTimestamp(lua_State *L) + { + wxLuaState wxlState(L); + // const wxString ts + const wxString ts = wxlState.GetwxStringType(2); + // call SetTimestamp + wxLog::SetTimestamp(ts); + + return 0; + } + + // static bool GetVerbose() + static int LUACALL wxLua_wxLog_GetVerbose(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // call GetVerbose + returns = wxLog::GetVerbose(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // static wxTraceMask GetTraceMask() + static int LUACALL wxLua_wxLog_GetTraceMask(lua_State *L) + { + wxLuaState wxlState(L); + wxTraceMask returns; + // call GetTraceMask + returns = wxLog::GetTraceMask(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLog_IsAllowedTraceMask[] = { &s_wxluaarg_String, 0 }; + // static bool IsAllowedTraceMask(const wxString& mask) + static int LUACALL wxLua_wxLog_IsAllowedTraceMask(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxString mask + const wxString mask = wxlState.GetwxStringType(2); + // call IsAllowedTraceMask + returns = wxLog::IsAllowedTraceMask(mask); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // static wxLogLevel GetLogLevel() + static int LUACALL wxLua_wxLog_GetLogLevel(lua_State *L) + { + wxLuaState wxlState(L); + wxLogLevel returns; + // call GetLogLevel + returns = wxLog::GetLogLevel(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // static wxString GetTimestamp() + static int LUACALL wxLua_wxLog_GetTimestamp(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // call GetTimestamp + returns = wxLog::GetTimestamp(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static int LUACALL wxLua_wxLog_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxLog_methods[] = { + + #if (wxCHECK_VERSION(2,8,0)) && (wxUSE_LOG) + { LuaMethod, "SetRepetitionCounting", wxLua_wxLog_SetRepetitionCounting, 1, 0, s_wxluatagArray_wxLua_wxLog_SetRepetitionCounting }, + { LuaMethod, "GetRepetitionCounting", wxLua_wxLog_GetRepetitionCounting, 0, 0, s_wxluaargArray_None }, + #endif // (wxCHECK_VERSION(2,8,0)) && (wxUSE_LOG) + + + #if (wxUSE_LOG) && (wxLUA_USE_wxArrayString) + { LuaMethod, "GetTraceMasks", wxLua_wxLog_GetTraceMasks, 0, 0, s_wxluaargArray_None }, + #endif // (wxUSE_LOG) && (wxLUA_USE_wxArrayString) + + { LuaConstructor, "wxLog", wxLua_wxLog_constructor, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "IsEnabled", wxLua_wxLog_IsEnabled, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "EnableLogging", wxLua_wxLog_EnableLogging, 1, 0, s_wxluatagArray_wxLua_wxLog_EnableLogging }, + { LuaMethod, "Flush", wxLua_wxLog_Flush, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "FlushActive", wxLua_wxLog_FlushActive, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetActiveTarget", wxLua_wxLog_GetActiveTarget, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetActiveTarget", wxLua_wxLog_SetActiveTarget, 1, 1, s_wxluatagArray_wxLua_wxLog_SetActiveTarget }, + { LuaMethod, "Suspend", wxLua_wxLog_Suspend, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Resume", wxLua_wxLog_Resume, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetVerbose", wxLua_wxLog_SetVerbose, 1, 0, s_wxluatagArray_wxLua_wxLog_SetVerbose }, + { LuaMethod, "SetLogLevel", wxLua_wxLog_SetLogLevel, 1, 1, s_wxluatagArray_wxLua_wxLog_SetLogLevel }, + { LuaMethod, "DontCreateOnDemand", wxLua_wxLog_DontCreateOnDemand, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetTraceMask", wxLua_wxLog_SetTraceMask, 1, 1, s_wxluatagArray_wxLua_wxLog_SetTraceMask }, + { LuaMethod, "AddTraceMask", wxLua_wxLog_AddTraceMask, 1, 1, s_wxluatagArray_wxLua_wxLog_AddTraceMask }, + { LuaMethod, "RemoveTraceMask", wxLua_wxLog_RemoveTraceMask, 1, 1, s_wxluatagArray_wxLua_wxLog_RemoveTraceMask }, + { LuaMethod, "ClearTraceMasks", wxLua_wxLog_ClearTraceMasks, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetTimestamp", wxLua_wxLog_SetTimestamp, 1, 1, s_wxluatagArray_wxLua_wxLog_SetTimestamp }, + { LuaMethod, "GetVerbose", wxLua_wxLog_GetVerbose, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetTraceMask", wxLua_wxLog_GetTraceMask, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "IsAllowedTraceMask", wxLua_wxLog_IsAllowedTraceMask, 1, 1, s_wxluatagArray_wxLua_wxLog_IsAllowedTraceMask }, + { LuaMethod, "GetLogLevel", wxLua_wxLog_GetLogLevel, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetTimestamp", wxLua_wxLog_GetTimestamp, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxLog", wxLua_wxLog_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxLog_methodCount = sizeof(wxLog_methods)/sizeof(wxLog_methods[0]); + #endif // wxUSE_LOG + + + #if wxUSE_LOG + // --------------------------------------------------------------------------- + // Bind class wxLogBuffer + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLogBuffer' + int s_wxluatag_wxLogBuffer = -1; + + // wxLogBuffer() + static int LUACALL wxLua_wxLogBuffer_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLogBuffer *returns; + // call constructor + returns = new wxLogBuffer(); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLogBuffer, returns); + + return 1; + } + + // const wxString& GetBuffer() const // get the string contents with all messages logged + static int LUACALL wxLua_wxLogBuffer_GetBuffer(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxLogBuffer * self = (wxLogBuffer *)wxlState.GetUserDataType(1, s_wxluatag_wxLogBuffer); + // call GetBuffer + returns = self->GetBuffer(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static int LUACALL wxLua_wxLogBuffer_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxLogBuffer_methods[] = { + { LuaConstructor, "wxLogBuffer", wxLua_wxLogBuffer_constructor, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetBuffer", wxLua_wxLogBuffer_GetBuffer, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxLogBuffer", wxLua_wxLogBuffer_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxLogBuffer_methodCount = sizeof(wxLogBuffer_methods)/sizeof(wxLogBuffer_methods[0]); + #endif // wxUSE_LOG + + + #if wxUSE_LOG + // --------------------------------------------------------------------------- + // Bind class wxLogChain + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLogChain' + int s_wxluatag_wxLogChain = -1; + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLogChain_constructor[] = { &s_wxluatag_wxLog, 0 }; + // wxLogChain(wxLog *logger) + static int LUACALL wxLua_wxLogChain_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLogChain *returns; + // wxLog logger + wxLog * logger = (wxLog *)wxlState.GetUserDataType(1, s_wxluatag_wxLog); + // call constructor + returns = new wxLogChain(logger); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLogChain, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLogChain_SetLog[] = { &s_wxluatag_wxLog, 0 }; + // void SetLog(wxLog *logger) // change the new log target + static int LUACALL wxLua_wxLogChain_SetLog(lua_State *L) + { + wxLuaState wxlState(L); + // wxLog logger + wxLog * logger = (wxLog *)wxlState.GetUserDataType(2, s_wxluatag_wxLog); + // get this + wxLogChain * self = (wxLogChain *)wxlState.GetUserDataType(1, s_wxluatag_wxLogChain); + // call SetLog + self->SetLog(logger); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLogChain_PassMessages[] = { &s_wxluaarg_Boolean, 0 }; + // void PassMessages(bool bDoPass) + static int LUACALL wxLua_wxLogChain_PassMessages(lua_State *L) + { + wxLuaState wxlState(L); + // bool bDoPass + bool bDoPass = wxlState.GetBooleanType(2); + // get this + wxLogChain * self = (wxLogChain *)wxlState.GetUserDataType(1, s_wxluatag_wxLogChain); + // call PassMessages + self->PassMessages(bDoPass); + + return 0; + } + + // bool IsPassingMessages() const + static int LUACALL wxLua_wxLogChain_IsPassingMessages(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxLogChain * self = (wxLogChain *)wxlState.GetUserDataType(1, s_wxluatag_wxLogChain); + // call IsPassingMessages + returns = self->IsPassingMessages(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // wxLog *GetOldLog() const + static int LUACALL wxLua_wxLogChain_GetOldLog(lua_State *L) + { + wxLuaState wxlState(L); + wxLog *returns; + // get this + wxLogChain * self = (wxLogChain *)wxlState.GetUserDataType(1, s_wxluatag_wxLogChain); + // call GetOldLog + returns = (wxLog *)self->GetOldLog(); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLog, returns); + + return 1; + } + + static int LUACALL wxLua_wxLogChain_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxLogChain_methods[] = { + { LuaConstructor, "wxLogChain", wxLua_wxLogChain_constructor, 1, 1, s_wxluatagArray_wxLua_wxLogChain_constructor }, + { LuaMethod, "SetLog", wxLua_wxLogChain_SetLog, 1, 1, s_wxluatagArray_wxLua_wxLogChain_SetLog }, + { LuaMethod, "PassMessages", wxLua_wxLogChain_PassMessages, 1, 1, s_wxluatagArray_wxLua_wxLogChain_PassMessages }, + { LuaMethod, "IsPassingMessages", wxLua_wxLogChain_IsPassingMessages, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetOldLog", wxLua_wxLogChain_GetOldLog, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxLogChain", wxLua_wxLogChain_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxLogChain_methodCount = sizeof(wxLogChain_methods)/sizeof(wxLogChain_methods[0]); + #endif // wxUSE_LOG + + + #if wxUSE_LOG + // --------------------------------------------------------------------------- + // Bind class wxLogPassThrough + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLogPassThrough' + int s_wxluatag_wxLogPassThrough = -1; + + // wxLogPassThrough() + static int LUACALL wxLua_wxLogPassThrough_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLogPassThrough *returns; + // call constructor + returns = new wxLogPassThrough(); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLogPassThrough, returns); + + return 1; + } + + static int LUACALL wxLua_wxLogPassThrough_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxLogPassThrough_methods[] = { + { LuaConstructor, "wxLogPassThrough", wxLua_wxLogPassThrough_constructor, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxLogPassThrough", wxLua_wxLogPassThrough_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxLogPassThrough_methodCount = sizeof(wxLogPassThrough_methods)/sizeof(wxLogPassThrough_methods[0]); + #endif // wxUSE_LOG + + + #if wxUSE_LOG + // --------------------------------------------------------------------------- + // Bind class wxLogNull + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLogNull' + int s_wxluatag_wxLogNull = -1; + + // wxLogNull() + static int LUACALL wxLua_wxLogNull_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLogNull *returns; + // call constructor + returns = new wxLogNull(); + // add to tracked memory list + wxLua_AddTrackedObject(wxlState, (wxLogNull *)returns); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLogNull, returns); + + return 1; + } + + static int LUACALL wxLua_wxLogNull_destructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLogNull * self = (wxLogNull *)wxlState.GetUserDataType(1, s_wxluatag_wxLogNull); + + // remove from tracked memory list + if (self != 0) + wxlState.RemoveTrackedObject(self); + return 0; + } + + static int LUACALL wxLua_wxLogNull_Delete(lua_State *L) + { + wxLuaState wxlState(L); + wxLogNull * self = (wxLogNull *)wxlState.GetUserDataType(1, s_wxluatag_wxLogNull); + // remove from tracked memory list + if (self != 0) + if (wxlState.RemoveTrackedObject(self)) + { // if removed, reset the tag so that gc() is not called on this object. + lua_pushnil(L); + lua_setmetatable(L, -2); + } + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxLogNull_methods[] = { + { LuaConstructor, "wxLogNull", wxLua_wxLogNull_constructor, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxLogNull", wxLua_wxLogNull_destructor, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Delete", wxLua_wxLogNull_Delete, 0, 0, s_wxluaargArray_None }, + }; + + int wxLogNull_methodCount = sizeof(wxLogNull_methods)/sizeof(wxLogNull_methods[0]); + #endif // wxUSE_LOG + + #if wxLUA_USE_wxApp // --------------------------------------------------------------------------- Index: datetime.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/datetime.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** datetime.cpp 9 Mar 2007 00:15:14 -0000 1.30 --- datetime.cpp 13 Mar 2007 23:01:55 -0000 1.31 *************** *** 1843,1846 **** --- 1843,1904 ---- int s_wxluatag_wxTimeSpan = -1; + + #if (wxLUA_USE_wxTimeSpan && wxUSE_DATETIME) && (wxUSE_LONGLONG) + // wxLongLong GetMilliseconds() const + static int LUACALL wxLua_wxTimeSpan_GetMilliseconds(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong *returns; + // get this + wxTimeSpan * self = (wxTimeSpan *)wxlState.GetUserDataType(1, s_wxluatag_wxTimeSpan); + // call GetMilliseconds + // allocate a new object using the copy constructor + returns = new wxLongLong(self->GetMilliseconds()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxLongLong *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLongLong, returns); + + return 1; + } + + // wxLongLong GetSeconds() const + static int LUACALL wxLua_wxTimeSpan_GetSeconds(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong *returns; + // get this + wxTimeSpan * self = (wxTimeSpan *)wxlState.GetUserDataType(1, s_wxluatag_wxTimeSpan); + // call GetSeconds + // allocate a new object using the copy constructor + returns = new wxLongLong(self->GetSeconds()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxLongLong *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLongLong, returns); + + return 1; + } + + // wxLongLong GetValue() const + static int LUACALL wxLua_wxTimeSpan_GetValue(lua_State *L) + { + wxLuaState wxlState(L); + wxLongLong *returns; + // get this + wxTimeSpan * self = (wxTimeSpan *)wxlState.GetUserDataType(1, s_wxluatag_wxTimeSpan); + // call GetValue + // allocate a new object using the copy constructor + returns = new wxLongLong(self->GetValue()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxLongLong *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxLongLong, returns); + + return 1; + } + + #endif // (wxLUA_USE_wxTimeSpan && wxUSE_DATETIME) && (wxUSE_LONGLONG) + // wxTimeSpan() static int LUACALL wxLua_wxTimeSpan_constructor(lua_State *L) *************** *** 2381,2384 **** --- 2439,2449 ---- // Map Lua Class Methods to C Binding Functions WXLUAMETHOD wxTimeSpan_methods[] = { + + #if (wxLUA_USE_wxTimeSpan && wxUSE_DATETIME) && (wxUSE_LONGLONG) + { LuaMethod, "GetMilliseconds", wxLua_wxTimeSpan_GetMilliseconds, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetSeconds", wxLua_wxTimeSpan_GetSeconds, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetValue", wxLua_wxTimeSpan_GetValue, 0, 0, s_wxluaargArray_None }, + #endif // (wxLUA_USE_wxTimeSpan && wxUSE_DATETIME) && (wxUSE_LONGLONG) + { LuaConstructor, "wxTimeSpan", wxLua_wxTimeSpan_constructor, 0, 0, s_wxluaargArray_None }, { LuaConstructor, "wxTimeSpanHMS", wxLua_wxTimeSpanHMS_constructor, 4, 1, s_wxluatagArray_wxLua_wxTimeSpanHMS_constructor }, *************** *** 4600,4601 **** --- 4665,5289 ---- #endif // wxLUA_USE_wxDatePickerCtrl && wxUSE_DATEPICKCTRL + + #if wxUSE_INTL + // --------------------------------------------------------------------------- + // Bind struct wxLanguageInfo + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLanguageInfo' + int s_wxluatag_wxLanguageInfo = -1; + + + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC)) && ((wxCHECK_VERSION(2,8,0)) && (wxUSE_INTL)) + // %wxchkver_2_8 %member wxLayoutDirection LayoutDirection; + static int LUACALL wxLua_wxLanguageInfo_Get_LayoutDirection(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxLanguageInfo *self = (wxLanguageInfo *) wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + // push the result number + lua_pushnumber(L, self->LayoutDirection); + // return the number of parameters + return 1; + } + + // %wxchkver_2_8 %member wxLayoutDirection LayoutDirection; + static int LUACALL wxLua_wxLanguageInfo_Set_LayoutDirection(lua_State *L) + { + wxLuaState wxlState(L); + // get the number value + wxLayoutDirection val = (wxLayoutDirection)wxlState.GetEnumerationType(2); + // get this + wxLanguageInfo *self = (wxLanguageInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + self->LayoutDirection = val; + // return the number of parameters + return 0; + } + + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC)) && ((wxCHECK_VERSION(2,8,0)) && (wxUSE_INTL)) + + // %member int Language; // wxLanguage id + static int LUACALL wxLua_wxLanguageInfo_Get_Language(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxLanguageInfo *self = (wxLanguageInfo *) wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + // push the result number + lua_pushnumber(L, self->Language); + // return the number of parameters + return 1; + } + + // %member int Language; // wxLanguage id + static int LUACALL wxLua_wxLanguageInfo_Set_Language(lua_State *L) + { + wxLuaState wxlState(L); + // get the number value + int val = (int)wxlState.GetNumberType(2); + // get this + wxLanguageInfo *self = (wxLanguageInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + self->Language = val; + // return the number of parameters + return 0; + } + + // %member wxString CanonicalName; // Canonical name, e.g. fr_FR + static int LUACALL wxLua_wxLanguageInfo_Get_CanonicalName(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxLanguageInfo *self = (wxLanguageInfo *) wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + // push the result string + wxlState.lua_PushString(self->CanonicalName); + // return the number of parameters + return 1; + } + + // %member wxString CanonicalName; // Canonical name, e.g. fr_FR + static int LUACALL wxLua_wxLanguageInfo_Set_CanonicalName(lua_State *L) + { + wxLuaState wxlState(L); + // get the string value + wxString val = wxlState.GetwxStringType(2); + // get this + wxLanguageInfo *self = (wxLanguageInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + self->CanonicalName = val; + // return the number of parameters + return 0; + } + + // %member wxString Description; // human-readable name of the language + static int LUACALL wxLua_wxLanguageInfo_Get_Description(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxLanguageInfo *self = (wxLanguageInfo *) wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + // push the result string + wxlState.lua_PushString(self->Description); + // return the number of parameters + return 1; + } + + // %member wxString Description; // human-readable name of the language + static int LUACALL wxLua_wxLanguageInfo_Set_Description(lua_State *L) + { + wxLuaState wxlState(L); + // get the string value + wxString val = wxlState.GetwxStringType(2); + // get this + wxLanguageInfo *self = (wxLanguageInfo *)wxlState.GetUserDataType(1, s_wxluatag_wxLanguageInfo); + self->Description = val; + // return the number of parameters + return 0; + } + + static int LUACALL wxLua_wxLanguageInfo_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxLanguageInfo_methods[] = { + + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC)) && ((wxCHECK_VERSION(2,8,0)) && (wxUSE_INTL)) + { LuaMethod, "Get_LayoutDirection", wxLua_wxLanguageInfo_Get_LayoutDirection, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "LayoutDirection", wxLua_wxLanguageInfo_Get_LayoutDirection, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Set_LayoutDirection", wxLua_wxLanguageInfo_Set_LayoutDirection, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "LayoutDirection", wxLua_wxLanguageInfo_Set_LayoutDirection, 0, 0, s_wxluaargArray_None }, + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxDC)) && ((wxCHECK_VERSION(2,8,0)) && (wxUSE_INTL)) + + { LuaMethod, "Get_Language", wxLua_wxLanguageInfo_Get_Language, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "Language", wxLua_wxLanguageInfo_Get_Language, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Set_Language", wxLua_wxLanguageInfo_Set_Language, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "Language", wxLua_wxLanguageInfo_Set_Language, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Get_CanonicalName", wxLua_wxLanguageInfo_Get_CanonicalName, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "CanonicalName", wxLua_wxLanguageInfo_Get_CanonicalName, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Set_CanonicalName", wxLua_wxLanguageInfo_Set_CanonicalName, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "CanonicalName", wxLua_wxLanguageInfo_Set_CanonicalName, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Get_Description", wxLua_wxLanguageInfo_Get_Description, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "Description", wxLua_wxLanguageInfo_Get_Description, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Set_Description", wxLua_wxLanguageInfo_Set_Description, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "Description", wxLua_wxLanguageInfo_Set_Description, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxLanguageInfo", wxLua_wxLanguageInfo_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxLanguageInfo_methodCount = sizeof(wxLanguageInfo_methods)/sizeof(wxLanguageInfo_methods[0]); + #endif // wxUSE_INTL + + + #if wxUSE_INTL + // --------------------------------------------------------------------------- + // Bind class wxLocale + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxLocale' + int s_wxluatag_wxLocale = -1; + + + #if (wxCHECK_VERSION(2,8,0)) && (wxUSE_INTL) + static wxLuaArgTag s_wxluatagArray_wxLua_wxLocale_IsAvailable[] = { &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 static bool IsAvailable(int lang); + static int LUACALL wxLua_wxLocale_IsAvailable(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // int lang + int lang = (int)wxlState.GetNumberType(2); + // call IsAvailable + returns = wxLocale::IsAvailable(lang); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + #endif // (wxCHECK_VERSION(2,8,0)) && (wxUSE_INTL) + + + #if (wxUSE_INTL) && (wxLUA_USE_wxFont) + // static wxFontEncoding GetSystemEncoding(); + static int LUACALL wxLua_wxLocale_GetSystemEncoding(lua_State *L) + { + wxLuaState wxlState(L); + wxFontEncoding returns; + // call GetSystemEncoding + returns = wxLocale::GetSystemEncoding(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif // (wxUSE_INTL) && (wxLUA_USE_wxFont) + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLocale_constructor[] = { &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_String, &s_wxluaarg_Boolean, &s_wxluaarg_Boolean, 0 }; + // wxLocale(const wxString& szName, const wxString& szShort = "", const wxString& szLocale = "", bool bLoadDefault = true, bool bConvertEncoding = false) + static int LUACALL wxLua_wxLocale_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLocale *returns; + // get number of arguments + int argCount = lua_gettop(L); + // bool bConvertEncoding = false + bool bConvertEncoding = (argCount >= 5 ? wxlState.GetBooleanType(5) : false); + // bool bLoadDefault = true + bool bLoadDefault = (argCount >= 4 ? wxlState.GetBooleanType(4) : true); + // const wxString szLocale = "" + const wxString szLocale = (argCount >= 3 ? wxlState.GetwxStringType(3) : wxString(wxEmptyString)); + // const wxString szShort = "" + const wxString szShort = (argCount >= 2 ? wxlState.GetwxStringType(2) : wxString(wxEmptyString)); + // const wxString szName + const wxString szName = wxlState.GetwxStringType(1); + // call constructor + returns = new wxLocale(szName, szShort, szLocale, bLoadDefault, bConvertEncoding); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLocale, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLocaleFromLanguage_constructor[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // %constructor wxLocaleFromLanguage(int language, int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING) + static int LUACALL wxLua_wxLocaleFromLanguage_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxLocale *returns; + // get number of arguments + int argCount = lua_gettop(L); + // int flags = wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING + int flags = (argCount >= 2 ? (int)wxlState.GetNumberType(2) : wxLOCALE_LOAD_DEFAULT | wxLOCALE_CONV_ENCODING); + // int language + int language = (int)wxlState.GetNumberType(1); + // call constructor + returns = new wxLocale(language, flags); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxLocale, returns); + + return 1; + } + + // static int GetSystemLanguage() + static int LUACALL wxLua_wxLocale_GetSystemLanguage(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // call GetSystemLanguage + returns = wxLocale::GetSystemLanguage(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // static wxString GetSystemEncodingName(); + static int LUACALL wxLua_wxLocale_GetSystemEncodingName(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // call GetSystemEncodingName + returns = wxLocale::GetSystemEncodingName(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLocale_GetInfo[] = { &s_wxluaarg_Enumeration, &s_wxluaarg_Enumeration, 0 }; + // static wxString GetInfo(wxLocaleInfo index, wxLocaleCategory cat); + static int LUACALL wxLua_wxLocale_GetInfo(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // wxLocaleCategory cat + wxLocaleCategory cat = (wxLocaleCategory)wxlState.GetEnumerationType(3); + // wxLocaleInfo index + wxLocaleInfo index = (wxLocaleInfo)wxlState.GetEnumerationType(2); + // call GetInfo + returns = wxLocale::GetInfo(index, cat); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + // bool IsOk() const + static int LUACALL wxLua_wxLocale_IsOk(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); + // call IsOk + returns = self->IsOk(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // wxString GetLocale() const + static int LUACALL wxLua_wxLocale_GetLocale(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); + // call GetLocale + returns = self->GetLocale(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + // int GetLanguage() const + static int LUACALL wxLua_wxLocale_GetLanguage(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // get this + wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); + // call GetLanguage + returns = self->GetLanguage(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // wxString GetSysName() const; + static int LUACALL wxLua_wxLocale_GetSysName(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); + // call GetSysName + returns = self->GetSysName(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + // wxString GetCanonicalName() const + static int LUACALL wxLua_wxLocale_GetCanonicalName(lua_State *L) + { + wxLuaState wxlState(L); + wxString returns; + // get this + wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); + // call GetCanonicalName + returns = self->GetCanonicalName(); + // push the result string + wxlState.lua_PushString(returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLocale_AddCatalogLookupPathPrefix[] = { &s_wxluaarg_String, 0 }; + // static void AddCatalogLookupPathPrefix(const wxString& prefix); + static int LUACALL wxLua_wxLocale_AddCatalogLookupPathPrefix(lua_State *L) + { + wxLuaState wxlState(L); + // const wxString prefix + const wxString prefix = wxlState.GetwxStringType(2); + // call AddCatalogLookupPathPrefix + wxLocale::AddCatalogLookupPathPrefix(prefix); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLocale_AddCatalog[] = { &s_wxluaarg_String, 0 }; + // bool AddCatalog(const wxString& szDomain); + static int LUACALL wxLua_wxLocale_AddCatalog(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxString szDomain + const wxString szDomain = wxlState.GetwxStringType(2); + // get this + wxLocale * self = (wxLocale *)wxlState.GetUserDataType(1, s_wxluatag_wxLocale); + // call AddCatalog + returns = self->AddCatalog(szDomain); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxLocale_AddCatalogLanguage[] = { &s_wxluaarg_String, &s_wxluaarg_Enumeration, &s_wxluaarg_String, 0 }; + // %rename AddCatalogLanguage bool AddCatalog(const wxString& szDomain, wxLanguage msgIdLanguage, const wxString& msgIdCharset); + static int LUACALL wxLua_wxLocale_AddCatalogLanguage(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxString msgIdCharset + const wxString msgIdCharset = wxlState.GetwxStringType(4); + // wxLanguage msgIdLanguage + wxLanguage msgIdLanguage = (wxLanguage)wxlState.GetEnumerationType(3); + // const wxString szDomain + const wxString szDomain = wxlState.GetwxStringType(2); + // ge... [truncated message content] |
From: John L. <jr...@us...> - 2007-03-13 05:01:07
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2508/wxLua/modules/wxbind/src Modified Files: image.cpp wx_bind.cpp Log Message: update image.i to wxWidgets 2.8 using headers Index: wx_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/wx_bind.cpp,v retrieving revision 1.85 retrieving revision 1.86 diff -C2 -d -r1.85 -r1.86 *** wx_bind.cpp 12 Mar 2007 23:12:37 -0000 1.85 --- wx_bind.cpp 13 Mar 2007 05:01:02 -0000 1.86 *************** *** 531,535 **** { "wxCLIP_CHILDREN", wxCLIP_CHILDREN }, { "wxCOLOURED", wxCOLOURED }, - { "wxDD_NEW_DIR_BUTTON", wxDD_NEW_DIR_BUTTON }, { "wxDOUBLE_BORDER", wxDOUBLE_BORDER }, { "wxEQUIV", wxEQUIV }, --- 531,534 ---- *************** *** 1742,1747 **** { "wxIDLE_PROCESS_ALL", wxIDLE_PROCESS_ALL }, { "wxIDLE_PROCESS_SPECIFIED", wxIDLE_PROCESS_SPECIFIED }, - { "wxIMAGE_RESOLUTION_CM", wxIMAGE_RESOLUTION_CM }, - { "wxIMAGE_RESOLUTION_INCHES", wxIMAGE_RESOLUTION_INCHES }, { "wxLEFT", wxLEFT }, { "wxLUAOBJECT_ARRAYINT", wxLUAOBJECT_ARRAYINT }, --- 1741,1744 ---- *************** *** 2290,2293 **** --- 2287,2294 ---- { "wxBMP_8BPP_PALETTE", wxBMP_8BPP_PALETTE }, { "wxBMP_8BPP_RED", wxBMP_8BPP_RED }, + { "wxIMAGE_QUALITY_HIGH", wxIMAGE_QUALITY_HIGH }, + { "wxIMAGE_QUALITY_NORMAL", wxIMAGE_QUALITY_NORMAL }, + { "wxIMAGE_RESOLUTION_CM", wxIMAGE_RESOLUTION_CM }, + { "wxIMAGE_RESOLUTION_INCHES", wxIMAGE_RESOLUTION_INCHES }, #endif // wxLUA_USE_wxImage && wxUSE_IMAGE *************** *** 2804,2807 **** --- 2805,2813 ---- #endif // (wxCHECK_VERSION(2,6,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + #if (wxUSE_LIBPNG) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + { "wxIMAGE_OPTION_PNG_BITDEPTH", wxIMAGE_OPTION_PNG_BITDEPTH }, + { "wxIMAGE_OPTION_PNG_FORMAT", wxIMAGE_OPTION_PNG_FORMAT }, + #endif // (wxUSE_LIBPNG) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + #if (wxUSE_LIBTIFF) && (wxLUA_USE_wxImage && wxUSE_IMAGE) { "wxIMAGE_OPTION_BITSPERSAMPLE", _T("BitsPerSample") }, *************** *** 6735,6738 **** --- 6741,6747 ---- { "wxImage", wxImage_methods, wxImage_methodCount, CLASSINFO(wxImage), &s_wxluatag_wxImage, "wxObject", NULL }, { "wxImageHandler", wxImageHandler_methods, wxImageHandler_methodCount, CLASSINFO(wxImageHandler), &s_wxluatag_wxImageHandler, "wxObject", NULL }, + { "wxImageHistogram", wxImageHistogram_methods, wxImageHistogram_methodCount, NULL, &s_wxluatag_wxImageHistogram, NULL, NULL }, + { "wxImageHistogram_iterator", wxImageHistogram_iterator_methods, wxImageHistogram_iterator_methodCount, NULL, &s_wxluatag_wxImageHistogram_iterator, NULL, NULL }, + { "wxImageHistogramEntry", wxImageHistogramEntry_methods, wxImageHistogramEntry_methodCount, NULL, &s_wxluatag_wxImageHistogramEntry, NULL, NULL }, { "wxXPMHandler", wxXPMHandler_methods, wxXPMHandler_methodCount, CLASSINFO(wxXPMHandler), &s_wxluatag_wxXPMHandler, "wxImageHandler", NULL }, #endif // wxLUA_USE_wxImage && wxUSE_IMAGE *************** *** 7434,7437 **** --- 7443,7453 ---- + #if wxLUA_USE_wxImage && wxUSE_IMAGE + wxLUA_IMPLEMENT_ENCAPSULATION(wxImageHistogram, wxImageHistogram) + wxLUA_IMPLEMENT_ENCAPSULATION(wxImageHistogram::iterator, wxImageHistogram_iterator) + wxLUA_IMPLEMENT_ENCAPSULATION(wxImageHistogramEntry, wxImageHistogramEntry) + #endif // wxLUA_USE_wxImage && wxUSE_IMAGE + + #if wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL wxLUA_IMPLEMENT_ENCAPSULATION(wxListItemAttr, wxListItemAttr) Index: image.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/image.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** image.cpp 9 Mar 2007 00:15:16 -0000 1.29 --- image.cpp 13 Mar 2007 05:01:02 -0000 1.30 *************** *** 36,39 **** --- 36,230 ---- + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Blur[] = { &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage Blur(int radius) + static int LUACALL wxLua_wxImage_Blur(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // int radius + int radius = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call Blur + // allocate a new object using the copy constructor + returns = new wxImage(self->Blur(radius)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_BlurHorizontal[] = { &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage BlurHorizontal(int radius) + static int LUACALL wxLua_wxImage_BlurHorizontal(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // int radius + int radius = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call BlurHorizontal + // allocate a new object using the copy constructor + returns = new wxImage(self->BlurHorizontal(radius)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_BlurVertical[] = { &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage BlurVertical(int radius) + static int LUACALL wxLua_wxImage_BlurVertical(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // int radius + int radius = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call BlurVertical + // allocate a new object using the copy constructor + returns = new wxImage(self->BlurVertical(radius)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_ConvertToGreyscale[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage ConvertToGreyscale( double lr = 0.299, double lg = 0.587, double lb = 0.114 ) const + static int LUACALL wxLua_wxImage_ConvertToGreyscale(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // get number of arguments + int argCount = lua_gettop(L); + // double lb = 0.114 + double lb = (argCount >= 4 ? (double)wxlState.GetNumberType(4) : 0.114); + // double lg = 0.587 + double lg = (argCount >= 3 ? (double)wxlState.GetNumberType(3) : 0.587); + // double lr = 0.299 + double lr = (argCount >= 2 ? (double)wxlState.GetNumberType(2) : 0.299); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call ConvertToGreyscale + // allocate a new object using the copy constructor + returns = new wxImage(self->ConvertToGreyscale(lr, lg, lb)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_ResampleBox[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage ResampleBox(int width, int height) const + static int LUACALL wxLua_wxImage_ResampleBox(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // int height + int height = (int)wxlState.GetNumberType(3); + // int width + int width = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call ResampleBox + // allocate a new object using the copy constructor + returns = new wxImage(self->ResampleBox(width, height)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_ResampleBicubic[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage ResampleBicubic(int width, int height) const + static int LUACALL wxLua_wxImage_ResampleBicubic(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // int height + int height = (int)wxlState.GetNumberType(3); + // int width + int width = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call ResampleBicubic + // allocate a new object using the copy constructor + returns = new wxImage(self->ResampleBicubic(width, height)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Rescale[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage& Rescale( int width, int height, int quality = wxIMAGE_QUALITY_NORMAL ) + static int LUACALL wxLua_wxImage_Rescale(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // get number of arguments + int argCount = lua_gettop(L); + // int quality = wxIMAGE_QUALITY_NORMAL + int quality = (argCount >= 4 ? (int)wxlState.GetNumberType(4) : wxIMAGE_QUALITY_NORMAL); + // int height + int height = (int)wxlState.GetNumberType(3); + // int width + int width = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call Rescale + returns = &self->Rescale(width, height, quality); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Scale[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // %wxchkver_2_8 wxImage Scale( int width, int height, int quality = wxIMAGE_QUALITY_NORMAL ) const + static int LUACALL wxLua_wxImage_Scale(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // get number of arguments + int argCount = lua_gettop(L); + // int quality = wxIMAGE_QUALITY_NORMAL + int quality = (argCount >= 4 ? (int)wxlState.GetNumberType(4) : wxIMAGE_QUALITY_NORMAL); + // int height + int height = (int)wxlState.GetNumberType(3); + // int width + int width = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call Scale + // allocate a new object using the copy constructor + returns = new wxImage(self->Scale(width, height, quality)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + + #if (wxLUA_USE_wxBitmap) && (wxLUA_USE_wxImage && wxUSE_IMAGE) static wxLuaArgTag s_wxluatagArray_wxLua_wxImageFromBitmap_constructor[] = { &s_wxluatag_wxBitmap, 0 }; *************** *** 59,62 **** --- 250,300 ---- + #if (wxLUA_USE_wxImage && wxUSE_IMAGE) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Rescale[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // !%wxchkver_2_8 wxImage& Rescale(int width, int height) + static int LUACALL wxLua_wxImage_Rescale(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // int height + int height = (int)wxlState.GetNumberType(3); + // int width + int width = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call Rescale + returns = &self->Rescale(width, height); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Scale[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // !%wxchkver_2_8 wxImage Scale(int width, int height) const + static int LUACALL wxLua_wxImage_Scale(lua_State *L) + { + wxLuaState wxlState(L); + wxImage *returns; + // int height + int height = (int)wxlState.GetNumberType(3); + // int width + int width = (int)wxlState.GetNumberType(2); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call Scale + // allocate a new object using the copy constructor + returns = new wxImage(self->Scale(width, height)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImage *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImage, returns); + + return 1; + } + + #endif // (wxLUA_USE_wxImage && wxUSE_IMAGE) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) + + #if (wxLUA_USE_wxList) && (wxLUA_USE_wxImage && wxUSE_IMAGE) // static wxList& GetHandlers() *************** *** 423,426 **** --- 661,682 ---- } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_ComputeHistogram[] = { &s_wxluatag_wxImageHistogram, 0 }; + // unsigned long ComputeHistogram(wxImageHistogram& histogram) const + static int LUACALL wxLua_wxImage_ComputeHistogram(lua_State *L) + { + wxLuaState wxlState(L); + unsigned long returns; + // wxImageHistogram histogram + wxImageHistogram * histogram = (wxImageHistogram *)wxlState.GetUserDataType(2, s_wxluatag_wxImageHistogram); + // get this + wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); + // call ComputeHistogram + returns = self->ComputeHistogram(*histogram); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_ConvertToMono[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // wxImage ConvertToMono(unsigned char r, unsigned char g, unsigned char b) const *************** *** 1115,1138 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Rescale[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; - // wxImage& Rescale(int width, int height) - static int LUACALL wxLua_wxImage_Rescale(lua_State *L) - { - wxLuaState wxlState(L); - wxImage *returns; - // int height - int height = (int)wxlState.GetNumberType(3); - // int width - int width = (int)wxlState.GetNumberType(2); - // get this - wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); - // call Rescale - returns = &self->Rescale(width, height); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxImage, returns); - - return 1; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_RotateHue[] = { &s_wxluaarg_Number, 0 }; // void RotateHue(double angle) --- 1371,1374 ---- *************** *** 1229,1255 **** } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_Scale[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; - // wxImage Scale(int width, int height) const - static int LUACALL wxLua_wxImage_Scale(lua_State *L) - { - wxLuaState wxlState(L); - wxImage *returns; - // int height - int height = (int)wxlState.GetNumberType(3); - // int width - int width = (int)wxlState.GetNumberType(2); - // get this - wxImage * self = (wxImage *)wxlState.GetUserDataType(1, s_wxluatag_wxImage); - // call Scale - // allocate a new object using the copy constructor - returns = new wxImage(self->Scale(width, height)); - // add the new object to the tracked memory list - wxLua_AddTrackedObject(wxlState, (wxImage *)returns); - // push the result datatype - wxlState.PushUserDataType(s_wxluatag_wxImage, returns); - - return 1; - } - static wxLuaArgTag s_wxluatagArray_wxLua_wxImage_SetAlpha[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; // void SetAlpha(int x, int y, unsigned char alpha) --- 1465,1468 ---- *************** *** 1480,1483 **** --- 1693,1708 ---- WXLUAMETHOD wxImage_methods[] = { + #if ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + { LuaMethod, "Blur", wxLua_wxImage_Blur, 1, 1, s_wxluatagArray_wxLua_wxImage_Blur }, + { LuaMethod, "BlurHorizontal", wxLua_wxImage_BlurHorizontal, 1, 1, s_wxluatagArray_wxLua_wxImage_BlurHorizontal }, + { LuaMethod, "BlurVertical", wxLua_wxImage_BlurVertical, 1, 1, s_wxluatagArray_wxLua_wxImage_BlurVertical }, + { LuaMethod, "ConvertToGreyscale", wxLua_wxImage_ConvertToGreyscale, 3, 0, s_wxluatagArray_wxLua_wxImage_ConvertToGreyscale }, + { LuaMethod, "ResampleBox", wxLua_wxImage_ResampleBox, 2, 2, s_wxluatagArray_wxLua_wxImage_ResampleBox }, + { LuaMethod, "ResampleBicubic", wxLua_wxImage_ResampleBicubic, 2, 2, s_wxluatagArray_wxLua_wxImage_ResampleBicubic }, + { LuaMethod, "Rescale", wxLua_wxImage_Rescale, 3, 2, s_wxluatagArray_wxLua_wxImage_Rescale }, + { LuaMethod, "Scale", wxLua_wxImage_Scale, 3, 2, s_wxluatagArray_wxLua_wxImage_Scale }, + #endif // ((wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) && (wxLUA_USE_wxImage && wxUSE_IMAGE) + + #if (wxLUA_USE_wxBitmap) && (wxLUA_USE_wxImage && wxUSE_IMAGE) { LuaConstructor, "wxImageFromBitmap", wxLua_wxImageFromBitmap_constructor, 1, 1, s_wxluatagArray_wxLua_wxImageFromBitmap_constructor }, *************** *** 1485,1488 **** --- 1710,1719 ---- + #if (wxLUA_USE_wxImage && wxUSE_IMAGE) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) + { LuaMethod, "Rescale", wxLua_wxImage_Rescale, 2, 2, s_wxluatagArray_wxLua_wxImage_Rescale }, + { LuaMethod, "Scale", wxLua_wxImage_Scale, 2, 2, s_wxluatagArray_wxLua_wxImage_Scale }, + #endif // (wxLUA_USE_wxImage && wxUSE_IMAGE) && ((!wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxImage && wxUSE_IMAGE)) + + #if (wxLUA_USE_wxList) && (wxLUA_USE_wxImage && wxUSE_IMAGE) { LuaMethod, "GetHandlers", wxLua_wxImage_GetHandlers, 0, 0, s_wxluaargArray_None }, *************** *** 1517,1520 **** --- 1748,1752 ---- { LuaMethod, "AddHandler", wxLua_wxImage_AddHandler, 1, 1, s_wxluatagArray_wxLua_wxImage_AddHandler }, { LuaMethod, "CleanUpHandlers", wxLua_wxImage_CleanUpHandlers, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "ComputeHistogram", wxLua_wxImage_ComputeHistogram, 1, 1, s_wxluatagArray_wxLua_wxImage_ComputeHistogram }, { LuaMethod, "ConvertToMono", wxLua_wxImage_ConvertToMono, 3, 3, s_wxluatagArray_wxLua_wxImage_ConvertToMono }, { LuaMethod, "Copy", wxLua_wxImage_Copy, 0, 0, s_wxluaargArray_None }, *************** *** 1555,1559 **** { LuaMethod, "Mirror", wxLua_wxImage_Mirror, 1, 0, s_wxluatagArray_wxLua_wxImage_Mirror }, { LuaMethod, "Replace", wxLua_wxImage_Replace, 6, 6, s_wxluatagArray_wxLua_wxImage_Replace }, - { LuaMethod, "Rescale", wxLua_wxImage_Rescale, 2, 2, s_wxluatagArray_wxLua_wxImage_Rescale }, { LuaMethod, "RotateHue", wxLua_wxImage_RotateHue, 1, 1, s_wxluatagArray_wxLua_wxImage_RotateHue }, { LuaMethod, "Rotate90", wxLua_wxImage_Rotate90, 1, 0, s_wxluatagArray_wxLua_wxImage_Rotate90 }, --- 1787,1790 ---- *************** *** 1561,1565 **** { LuaMethod, "SaveFileType", wxLua_wxImage_SaveFileType, 1, 1, s_wxluatagArray_wxLua_wxImage_SaveFileType }, { LuaMethod, "SaveMimeFile", wxLua_wxImage_SaveMimeFile, 2, 2, s_wxluatagArray_wxLua_wxImage_SaveMimeFile }, - { LuaMethod, "Scale", wxLua_wxImage_Scale, 2, 2, s_wxluatagArray_wxLua_wxImage_Scale }, { LuaMethod, "SetAlpha", wxLua_wxImage_SetAlpha, 3, 3, s_wxluatagArray_wxLua_wxImage_SetAlpha }, { LuaMethod, "SetAlphaData", wxLua_wxImage_SetAlphaData, 2, 0, s_wxluatagArray_wxLua_wxImage_SetAlphaData }, --- 1792,1795 ---- *************** *** 1582,1585 **** --- 1812,2235 ---- #if wxLUA_USE_wxImage && wxUSE_IMAGE // --------------------------------------------------------------------------- + // Bind class wxImageHistogramEntry + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxImageHistogramEntry' + int s_wxluatag_wxImageHistogramEntry = -1; + + // wxImageHistogramEntry() + static int LUACALL wxLua_wxImageHistogramEntry_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogramEntry *returns; + // call constructor + returns = new wxImageHistogramEntry(); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxImageHistogramEntry, returns); + + return 1; + } + + // %rename Index %member unsigned long index // GetIndex() and SetIndex(idx) + static int LUACALL wxLua_wxImageHistogramEntry_GetIndex(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxImageHistogramEntry *self = (wxImageHistogramEntry *) wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogramEntry); + // push the result number + lua_pushnumber(L, self->index); + // return the number of parameters + return 1; + } + + // %rename Index %member unsigned long index // GetIndex() and SetIndex(idx) + static int LUACALL wxLua_wxImageHistogramEntry_SetIndex(lua_State *L) + { + wxLuaState wxlState(L); + // get the number value + long val = (long)wxlState.GetNumberType(2); + // get this + wxImageHistogramEntry *self = (wxImageHistogramEntry *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogramEntry); + self->index = val; + // return the number of parameters + return 0; + } + + // %rename Value %member unsigned long value // GetValue() and SetValue(val) + static int LUACALL wxLua_wxImageHistogramEntry_GetValue(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxImageHistogramEntry *self = (wxImageHistogramEntry *) wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogramEntry); + // push the result number + lua_pushnumber(L, self->value); + // return the number of parameters + return 1; + } + + // %rename Value %member unsigned long value // GetValue() and SetValue(val) + static int LUACALL wxLua_wxImageHistogramEntry_SetValue(lua_State *L) + { + wxLuaState wxlState(L); + // get the number value + long val = (long)wxlState.GetNumberType(2); + // get this + wxImageHistogramEntry *self = (wxImageHistogramEntry *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogramEntry); + self->value = val; + // return the number of parameters + return 0; + } + + static int LUACALL wxLua_wxImageHistogramEntry_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxImageHistogramEntry_methods[] = { + { LuaConstructor, "wxImageHistogramEntry", wxLua_wxImageHistogramEntry_constructor, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetIndex", wxLua_wxImageHistogramEntry_GetIndex, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "index", wxLua_wxImageHistogramEntry_GetIndex, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetIndex", wxLua_wxImageHistogramEntry_SetIndex, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "index", wxLua_wxImageHistogramEntry_SetIndex, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "GetValue", wxLua_wxImageHistogramEntry_GetValue, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "value", wxLua_wxImageHistogramEntry_GetValue, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "SetValue", wxLua_wxImageHistogramEntry_SetValue, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "value", wxLua_wxImageHistogramEntry_SetValue, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxImageHistogramEntry", wxLua_wxImageHistogramEntry_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxImageHistogramEntry_methodCount = sizeof(wxImageHistogramEntry_methods)/sizeof(wxImageHistogramEntry_methods[0]); + #endif // wxLUA_USE_wxImage && wxUSE_IMAGE + + + #if wxLUA_USE_wxImage && wxUSE_IMAGE + // --------------------------------------------------------------------------- + // Bind class wxImageHistogram::iterator + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxImageHistogram::iterator' + int s_wxluatag_wxImageHistogram_iterator = -1; + + // %override wxLua_wxImageHistogram_iterator_Get_first + // %member long first + static int LUACALL wxLua_wxImageHistogram_iterator_Get_first(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *) wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // push the result number + lua_pushnumber(L, (*self)->first); // *** need to cast self to object from pointer + // return the number of parameters + return 1; + } + + // %override wxLua_wxImageHistogram_iterator_Set_first + // %member long first + static int LUACALL wxLua_wxImageHistogram_iterator_Set_first(lua_State *L) + { + wxLuaState wxlState(L); + // get the number value + long val = (long)wxlState.GetNumberType(2); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + (*self)->first = val; // *** need to cast self to object from pointer + // return the number of parameters + return 0; + } + + // %override wxLua_wxImageHistogram_iterator_Get_second + // %member wxImageHistogramEntry second + static int LUACALL wxLua_wxImageHistogram_iterator_Get_second(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *) wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImageHistogramEntry, &(*self)->second); // *** need to cast self to object from pointer + // return the number of parameters + return 1; + } + + // %override wxLua_wxImageHistogram_iterator_Set_second + // %member wxImageHistogramEntry second + static int LUACALL wxLua_wxImageHistogram_iterator_Set_second(lua_State *L) + { + wxLuaState wxlState(L); + // get the data type value + wxImageHistogramEntry* val = (wxImageHistogramEntry*)wxlState.GetUserDataType(2, s_wxluatag_wxImageHistogramEntry); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + (*self)->second = *val; // *** need to cast self to object from pointer + // return the number of parameters + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_iterator_op_eq[] = { &s_wxluatag_wxImageHistogram_iterator, 0 }; + // %operator bool operator==(const wxImageHistogram::iterator& other) const + static int LUACALL wxLua_wxImageHistogram_iterator_op_eq(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // const wxImageHistogram::iterator other + const wxImageHistogram::iterator * other = (const wxImageHistogram::iterator *)wxlState.GetUserDataType(2, s_wxluatag_wxImageHistogram_iterator); + // get this + wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // call op_eq + returns = (*self)==(*other); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // %operator wxImageHistogram::iterator& operator++() + static int LUACALL wxLua_wxImageHistogram_iterator_op_inc(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogram::iterator *returns; + // get this + wxImageHistogram::iterator * self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // call op_inc + returns = self; + *returns = (++(*self)); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); + + return 1; + } + + static int LUACALL wxLua_wxImageHistogram_iterator_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxImageHistogram_iterator_methods[] = { + { LuaMethod, "Get_first", wxLua_wxImageHistogram_iterator_Get_first, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "first", wxLua_wxImageHistogram_iterator_Get_first, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Set_first", wxLua_wxImageHistogram_iterator_Set_first, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "first", wxLua_wxImageHistogram_iterator_Set_first, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Get_second", wxLua_wxImageHistogram_iterator_Get_second, 0, 0, s_wxluaargArray_None }, + { LuaGetProp, "second", wxLua_wxImageHistogram_iterator_Get_second, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "Set_second", wxLua_wxImageHistogram_iterator_Set_second, 0, 0, s_wxluaargArray_None }, + { LuaSetProp, "second", wxLua_wxImageHistogram_iterator_Set_second, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "op_eq", wxLua_wxImageHistogram_iterator_op_eq, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_iterator_op_eq }, + { LuaMethod, "op_inc", wxLua_wxImageHistogram_iterator_op_inc, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxImageHistogram_iterator", wxLua_wxImageHistogram_iterator_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxImageHistogram_iterator_methodCount = sizeof(wxImageHistogram_iterator_methods)/sizeof(wxImageHistogram_iterator_methods[0]); + #endif // wxLUA_USE_wxImage && wxUSE_IMAGE + + + #if wxLUA_USE_wxImage && wxUSE_IMAGE + // --------------------------------------------------------------------------- + // Bind class wxImageHistogram + // --------------------------------------------------------------------------- + + // Lua MetaTable Tag for Class 'wxImageHistogram' + int s_wxluatag_wxImageHistogram = -1; + + // wxImageHistogram() + static int LUACALL wxLua_wxImageHistogram_constructor(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogram *returns; + // call constructor + returns = new wxImageHistogram(); + // push the constructed class pointer + wxlState.PushUserDataType(s_wxluatag_wxImageHistogram, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_MakeKey[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 }; + // static unsigned long MakeKey(unsigned char r, unsigned char g, unsigned char b) + static int LUACALL wxLua_wxImageHistogram_MakeKey(lua_State *L) + { + wxLuaState wxlState(L); + unsigned long returns; + // unsigned char b + unsigned char b = (char)wxlState.GetNumberType(4); + // unsigned char g + unsigned char g = (char)wxlState.GetNumberType(3); + // unsigned char r + unsigned char r = (char)wxlState.GetNumberType(2); + // call MakeKey + returns = wxImageHistogram::MakeKey(r, g, b); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // const wxImageHistogram::iterator begin() const + static int LUACALL wxLua_wxImageHistogram_begin(lua_State *L) + { + wxLuaState wxlState(L); + const wxImageHistogram::iterator *returns; + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call begin + // allocate a new object using the copy constructor + returns = new wxImageHistogram::iterator(self->begin()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImageHistogram::iterator *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); + + return 1; + } + + // void clear() + static int LUACALL wxLua_wxImageHistogram_clear(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call clear + self->clear(); + + return 0; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_count[] = { &s_wxluaarg_Number, 0 }; + // size_t count(long key) const + static int LUACALL wxLua_wxImageHistogram_count(lua_State *L) + { + wxLuaState wxlState(L); + size_t returns; + // long key + long key = (long)wxlState.GetNumberType(2); + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call count + returns = self->count(key); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + // bool empty() const + static int LUACALL wxLua_wxImageHistogram_empty(lua_State *L) + { + wxLuaState wxlState(L); + bool returns; + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call empty + returns = self->empty(); + // push the result flag + lua_pushboolean(L, returns); + + return 1; + } + + // const wxImageHistogram::iterator end() const + static int LUACALL wxLua_wxImageHistogram_end(lua_State *L) + { + wxLuaState wxlState(L); + const wxImageHistogram::iterator *returns; + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call end + // allocate a new object using the copy constructor + returns = new wxImageHistogram::iterator(self->end()); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImageHistogram::iterator *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_erase[] = { &s_wxluaarg_Number, 0 }; + // size_t erase(long key) + static int LUACALL wxLua_wxImageHistogram_erase(lua_State *L) + { + wxLuaState wxlState(L); + size_t returns; + // long key + long key = (long)wxlState.GetNumberType(2); + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call erase + returns = self->erase(key); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + static wxLuaArgTag s_wxluatagArray_wxLua_wxImageHistogram_find[] = { &s_wxluaarg_Number, 0 }; + // wxImageHistogram::iterator find(long key) + static int LUACALL wxLua_wxImageHistogram_find(lua_State *L) + { + wxLuaState wxlState(L); + wxImageHistogram::iterator *returns; + // long key + long key = (long)wxlState.GetNumberType(2); + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call find + // allocate a new object using the copy constructor + returns = new wxImageHistogram::iterator(self->find(key)); + // add the new object to the tracked memory list + wxLua_AddTrackedObject(wxlState, (wxImageHistogram::iterator *)returns); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImageHistogram_iterator, returns); + + return 1; + } + + // size_t size() const + static int LUACALL wxLua_wxImageHistogram_size(lua_State *L) + { + wxLuaState wxlState(L); + size_t returns; + // get this + wxImageHistogram * self = (wxImageHistogram *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram); + // call size + returns = self->size(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + static int LUACALL wxLua_wxImageHistogram_destructor(lua_State *) + { + return 0; + } + + + + // Map Lua Class Methods to C Binding Functions + WXLUAMETHOD wxImageHistogram_methods[] = { + { LuaConstructor, "wxImageHistogram", wxLua_wxImageHistogram_constructor, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "MakeKey", wxLua_wxImageHistogram_MakeKey, 3, 3, s_wxluatagArray_wxLua_wxImageHistogram_MakeKey }, + { LuaMethod, "begin", wxLua_wxImageHistogram_begin, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "clear", wxLua_wxImageHistogram_clear, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "count", wxLua_wxImageHistogram_count, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_count }, + { LuaMethod, "empty", wxLua_wxImageHistogram_empty, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "end", wxLua_wxImageHistogram_end, 0, 0, s_wxluaargArray_None }, + { LuaMethod, "erase", wxLua_wxImageHistogram_erase, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_erase }, + { LuaMethod, "find", wxLua_wxImageHistogram_find, 1, 1, s_wxluatagArray_wxLua_wxImageHistogram_find }, + { LuaMethod, "size", wxLua_wxImageHistogram_size, 0, 0, s_wxluaargArray_None }, + { LuaDelete, "wxImageHistogram", wxLua_wxImageHistogram_destructor, 0, 0, s_wxluaargArray_None }, + }; + + int wxImageHistogram_methodCount = sizeof(wxImageHistogram_methods)/sizeof(wxImageHistogram_methods[0]); + #endif // wxLUA_USE_wxImage && wxUSE_IMAGE + + + #if wxLUA_USE_wxImage && wxUSE_IMAGE + // --------------------------------------------------------------------------- // Bind class wxImageHandler // --------------------------------------------------------------------------- |
From: John L. <jr...@us...> - 2007-03-13 05:01:05
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2508/wxLua/bindings/wxwidgets Modified Files: defsutil.i gdi.i image.i override.hpp wx_datatypes.lua Log Message: update image.i to wxWidgets 2.8 using headers Index: defsutil.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/defsutil.i,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** defsutil.i 12 Mar 2007 23:12:31 -0000 1.34 --- defsutil.i 13 Mar 2007 05:01:00 -0000 1.35 *************** *** 488,492 **** %define wxCENTRE_ON_SCREEN %define wxCOLOURED - %define wxDD_NEW_DIR_BUTTON //%define wxED_BUTTONS_BOTTOM // for wxExtDialog? not used? //%define wxED_BUTTONS_RIGHT --- 488,491 ---- Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** wx_datatypes.lua 12 Mar 2007 23:12:31 -0000 1.54 --- wx_datatypes.lua 13 Mar 2007 05:01:01 -0000 1.55 *************** *** 1747,1750 **** --- 1747,1768 ---- Name = "wxImageHandler", }, + wxImageHistogram = { + Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", + DefType = "class", + IsNumber = false, + Name = "wxImageHistogram", + }, + ["wxImageHistogram::iterator"] = { + Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", + DefType = "class", + IsNumber = false, + Name = "wxImageHistogram::iterator", + }, + wxImageHistogramEntry = { + Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", + DefType = "class", + IsNumber = false, + Name = "wxImageHistogramEntry", + }, wxImageList = { BaseClass = "wxObject", Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** gdi.i 12 Mar 2007 23:12:31 -0000 1.41 --- gdi.i 13 Mar 2007 05:01:00 -0000 1.42 *************** *** 1134,1137 **** --- 1134,1138 ---- %define wxIMAGELIST_DRAW_SELECTED %define wxIMAGELIST_DRAW_FOCUSED + %define wxIMAGE_LIST_NORMAL %define wxIMAGE_LIST_SMALL Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.62 retrieving revision 1.63 diff -C2 -d -r1.62 -r1.63 *** override.hpp 9 Mar 2007 06:10:15 -0000 1.62 --- override.hpp 13 Mar 2007 05:01:00 -0000 1.63 *************** *** 3320,3323 **** --- 3320,3381 ---- %end + %override wxLua_wxImageHistogram_iterator_Get_first + // %member long first + static int LUACALL wxLua_wxImageHistogram_iterator_Get_first(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *) wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // push the result number + lua_pushnumber(L, (*self)->first); // *** need to cast self to object from pointer + // return the number of parameters + return 1; + } + %end + + %override wxLua_wxImageHistogram_iterator_Set_first + // %member long first + static int LUACALL wxLua_wxImageHistogram_iterator_Set_first(lua_State *L) + { + wxLuaState wxlState(L); + // get the number value + long val = (long)wxlState.GetNumberType(2); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + (*self)->first = val; // *** need to cast self to object from pointer + // return the number of parameters + return 0; + } + %end + + %override wxLua_wxImageHistogram_iterator_Get_second + // %member wxImageHistogramEntry second + static int LUACALL wxLua_wxImageHistogram_iterator_Get_second(lua_State *L) + { + wxLuaState wxlState(L); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *) wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + // push the result datatype + wxlState.PushUserDataType(s_wxluatag_wxImageHistogramEntry, &(*self)->second); // *** need to cast self to object from pointer + // return the number of parameters + return 1; + } + %end + + %override wxLua_wxImageHistogram_iterator_Set_second + // %member wxImageHistogramEntry second + static int LUACALL wxLua_wxImageHistogram_iterator_Set_second(lua_State *L) + { + wxLuaState wxlState(L); + // get the data type value + wxImageHistogramEntry* val = (wxImageHistogramEntry*)wxlState.GetUserDataType(2, s_wxluatag_wxImageHistogramEntry); + // get this + wxImageHistogram::iterator *self = (wxImageHistogram::iterator *)wxlState.GetUserDataType(1, s_wxluatag_wxImageHistogram_iterator); + (*self)->second = *val; // *** need to cast self to object from pointer + // return the number of parameters + return 0; + } + %end + // ---------------------------------------------------------------------------- // Overrides for mdi.i Index: image.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/image.i,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** image.i 12 Mar 2007 23:12:31 -0000 1.19 --- image.i 13 Mar 2007 05:01:00 -0000 1.20 *************** *** 8,15 **** // ============================================================================ - %enum - wxIMAGE_RESOLUTION_INCHES - wxIMAGE_RESOLUTION_CM - %endenum %define wxIMAGE_ALPHA_TRANSPARENT --- 8,11 ---- *************** *** 70,73 **** --- 66,70 ---- %define %string wxIMAGE_OPTION_QUALITY _T("quality") %define %string wxIMAGE_OPTION_FILENAME _T("FileName") + %define %string wxIMAGE_OPTION_RESOLUTION _T("Resolution") %define %string wxIMAGE_OPTION_RESOLUTIONX _T("ResolutionX") *************** *** 75,78 **** --- 72,84 ---- %define %string wxIMAGE_OPTION_RESOLUTIONUNIT _T("ResolutionUnit") + %enum + // constants used with wxIMAGE_OPTION_RESOLUTIONUNIT + wxIMAGE_RESOLUTION_INCHES + wxIMAGE_RESOLUTION_CM + + // Constants for wxImage::Scale() for determining the level of quality + wxIMAGE_QUALITY_NORMAL + wxIMAGE_QUALITY_HIGH + %endenum %class %delete wxImage, wxObject *************** *** 87,93 **** static void AddHandler(wxImageHandler* handler) static void CleanUpHandlers() ! //unsigned long ComputeHistogram(wxImageHistogram& histogram) const ! //wxBitmap ConvertToBitmap() const - deprecated wxImage ConvertToMono(unsigned char r, unsigned char g, unsigned char b) const wxImage Copy() const --- 93,103 ---- static void AddHandler(wxImageHandler* handler) + %wxchkver_2_8 wxImage Blur(int radius) + %wxchkver_2_8 wxImage BlurHorizontal(int radius) + %wxchkver_2_8 wxImage BlurVertical(int radius) static void CleanUpHandlers() ! unsigned long ComputeHistogram(wxImageHistogram& histogram) const ! //wxBitmap ConvertToBitmap() const - deprecated use wxBitmap constructor ! %wxchkver_2_8 wxImage ConvertToGreyscale( double lr = 0.299, double lg = 0.587, double lb = 0.114 ) const wxImage ConvertToMono(unsigned char r, unsigned char g, unsigned char b) const wxImage Copy() const *************** *** 118,122 **** wxImage GetSubImage(const wxRect& rect) const int GetWidth() const ! // note: we're tricking generator to not gag on RGB/HSVValue // %override [r, g, b] HSVtoRGB(double h, double s, double v) // static RGBValue HSVtoRGB(const HSVValue& hsv) --- 128,132 ---- wxImage GetSubImage(const wxRect& rect) const int GetWidth() const ! // note: we're tricking generator to not gag on RGB/HSVValue, so pretend to return an int // %override [r, g, b] HSVtoRGB(double h, double s, double v) // static RGBValue HSVtoRGB(const HSVValue& hsv) *************** *** 141,145 **** wxImage Mirror(bool horizontally = true) const void Replace(unsigned char r1, unsigned char g1, unsigned char b1, unsigned char r2, unsigned char g2, unsigned char b2) ! wxImage& Rescale(int width, int height) wxImage& Resize(const wxSize& size, const wxPoint& pos, int red = -1, int green = -1, int blue = -1) wxImage Rotate(double angle, const wxPoint& rotationCentre, bool interpolating = true, wxPoint* offsetAfterRotation = NULL) --- 151,158 ---- wxImage Mirror(bool horizontally = true) const void Replace(unsigned char r1, unsigned char g1, unsigned char b1, unsigned char r2, unsigned char g2, unsigned char b2) ! %wxchkver_2_8 wxImage ResampleBox(int width, int height) const ! %wxchkver_2_8 wxImage ResampleBicubic(int width, int height) const ! !%wxchkver_2_8 wxImage& Rescale(int width, int height) ! %wxchkver_2_8 wxImage& Rescale( int width, int height, int quality = wxIMAGE_QUALITY_NORMAL ) wxImage& Resize(const wxSize& size, const wxPoint& pos, int red = -1, int green = -1, int blue = -1) wxImage Rotate(double angle, const wxPoint& rotationCentre, bool interpolating = true, wxPoint* offsetAfterRotation = NULL) *************** *** 149,153 **** %rename SaveFileType bool SaveFile(const wxString& name, int type %rename SaveMimeFile bool SaveFile(const wxString& name, const wxString& mimetype) ! wxImage Scale(int width, int height) const wxImage Size(const wxSize& size, const wxPoint& pos, int red = -1, int green = -1, int blue = -1) const void SetAlpha(int x, int y, unsigned char alpha) --- 162,167 ---- %rename SaveFileType bool SaveFile(const wxString& name, int type %rename SaveMimeFile bool SaveFile(const wxString& name, const wxString& mimetype) ! !%wxchkver_2_8 wxImage Scale(int width, int height) const ! %wxchkver_2_8 wxImage Scale( int width, int height, int quality = wxIMAGE_QUALITY_NORMAL ) const wxImage Size(const wxSize& size, const wxPoint& pos, int red = -1, int green = -1, int blue = -1) const void SetAlpha(int x, int y, unsigned char alpha) *************** *** 170,173 **** --- 184,228 ---- //----------------------------------------------------------------------------- + // wxImageHistogram + + %class %noclassinfo %encapsulate wxImageHistogramEntry + wxImageHistogramEntry() + %rename Index %member unsigned long index // GetIndex() and SetIndex(idx) + %rename Value %member unsigned long value // GetValue() and SetValue(val) + %endclass + + %class %noclassinfo %encapsulate wxImageHistogram::iterator + %member long first + %member wxImageHistogramEntry second + + // operator used to compare with wxImageHistogram::end() iterator + %operator bool operator==(const wxImageHistogram::iterator& other) const + %operator wxImageHistogram::iterator& operator++() + %endclass + + %class %noclassinfo %encapsulate wxImageHistogram // wxImageHistogramBase actually a hash map + wxImageHistogram() + + // get the key in the histogram for the given RGB values + static unsigned long MakeKey(unsigned char r, unsigned char g, unsigned char b) + + // Use the function wxImage::FindFirstUnusedColour + //bool FindFirstUnusedColour(unsigned char *r, unsigned char *g, unsigned char *b, unsigned char startR = 1, unsigned char startG = 0, unsigned char startB = 0 ) const + + // Selected functions from the base wxHashMap class + const wxImageHistogram::iterator begin() const + void clear() + size_t count(long key) const + bool empty() const + const wxImageHistogram::iterator end() const + size_t erase(long key) + wxImageHistogram::iterator find(long key) + //Insert_Result insert(const value_type& v) + size_t size() const + //mapped_type& operator[](const key_type& key) + + %endclass + + //----------------------------------------------------------------------------- // wxImageHandler and derived classes *************** *** 290,293 **** --- 345,351 ---- %if wxUSE_LIBPNG + %define %string wxIMAGE_OPTION_PNG_FORMAT // wxT("PngFormat") + %define %string wxIMAGE_OPTION_PNG_BITDEPTH // wxT("PngBitDepth") + %enum wxPNG_TYPE_COLOUR |
From: John L. <jr...@us...> - 2007-03-13 05:01:05
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/include In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2508/wxLua/modules/wxbind/include Modified Files: wxbind.h Log Message: update image.i to wxWidgets 2.8 using headers Index: wxbind.h =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/include/wxbind.h,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** wxbind.h 12 Mar 2007 23:12:34 -0000 1.58 --- wxbind.h 13 Mar 2007 05:01:01 -0000 1.59 *************** *** 1212,1215 **** --- 1212,1218 ---- extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxImage; extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxImageHandler; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxImageHistogram; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxImageHistogram_iterator; + extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxImageHistogramEntry; extern WXDLLIMPEXP_DATA_WXBIND(int) s_wxluatag_wxXPMHandler; #endif // wxLUA_USE_wxImage && wxUSE_IMAGE *************** *** 2346,2349 **** --- 2349,2358 ---- extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxImageHandler_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxImageHandler_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxImageHistogram_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxImageHistogram_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxImageHistogram_iterator_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxImageHistogram_iterator_methodCount; + extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxImageHistogramEntry_methods[]; + extern WXDLLIMPEXP_DATA_WXBIND(int) wxImageHistogramEntry_methodCount; extern WXDLLIMPEXP_WXBIND WXLUAMETHOD wxXPMHandler_methods[]; extern WXDLLIMPEXP_DATA_WXBIND(int) wxXPMHandler_methodCount; *************** *** 2975,2978 **** --- 2984,2993 ---- #endif // wxLUA_USE_wxIcon + #if wxLUA_USE_wxImage && wxUSE_IMAGE + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxImageHistogram, wxImageHistogram) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxImageHistogram::iterator, wxImageHistogram_iterator) + wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxImageHistogramEntry, wxImageHistogramEntry) + #endif // wxLUA_USE_wxImage && wxUSE_IMAGE + #if wxLUA_USE_wxListCtrl && wxUSE_LISTCTRL wxLUA_DECLARE_ENCAPSULATION(WXDLLIMPEXP_WXBIND, wxListItemAttr, wxListItemAttr) |
From: John L. <jr...@us...> - 2007-03-13 05:01:05
|
Update of /cvsroot/wxlua/wxLua/docs In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2508/wxLua/docs Modified Files: wxluaref.html Log Message: update image.i to wxWidgets 2.8 using headers Index: wxluaref.html =================================================================== RCS file: /cvsroot/wxlua/wxLua/docs/wxluaref.html,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** wxluaref.html 9 Mar 2007 06:16:38 -0000 1.16 --- wxluaref.html 13 Mar 2007 05:01:01 -0000 1.17 *************** *** 271,279 **** <a href="#wxIcon">wxIcon</a><br> <a href="#wxIconBundle">wxIconBundle</a><br> ! wxIconLocation - (Not wrapped)<br> <a href="#wxIconizeEvent">wxIconizeEvent</a><br> <a href="#wxIdleEvent">wxIdleEvent</a><br> <a href="#wxImage">wxImage</a><br> <a href="#wxImageHandler">wxImageHandler</a><br> <a href="#wxImageList">wxImageList</a><br> <a href="#wxIndividualLayoutConstraint">wxIndividualLayoutConstraint</a><br> --- 271,282 ---- [...1185 lines suppressed...] + wxImageHistogram::iterator find(long key)<br> + //Insert_Result insert(const value_type& v)<br> + size_t size() const<br> + //mapped_type& operator[](const key_type& key)<br> + <br> + </blockquote><font color=#AA0000><i>%endclass</i></font><br> + <br> + //-----------------------------------------------------------------------------<br> // <a href="#wxImageHandler">wxImageHandler</a> and derived classes<br> <br> *************** *** 10067,10070 **** --- 10566,10572 ---- <i>%if</i> wxUSE_LIBPNG<br> <br> + <font color=#007755><i>%define</i> <i>%string</i> wxIMAGE_OPTION_PNG_FORMAT // wxT("PngFormat")</font><br> + <font color=#007755><i>%define</i> <i>%string</i> wxIMAGE_OPTION_PNG_BITDEPTH // wxT("PngBitDepth")</font><br> + <br> <font color=#007700><font size=+1>%<b><a name="enum">enum</a></b></font><blockquote> wxPNG_TYPE_COLOUR<br> |
From: John L. <jr...@us...> - 2007-03-13 05:01:04
|
Update of /cvsroot/wxlua/wxLua/bindings In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2508/wxLua/bindings Modified Files: genwxbind.lua Log Message: update image.i to wxWidgets 2.8 using headers Index: genwxbind.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/genwxbind.lua,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -d -r1.103 -r1.104 *** genwxbind.lua 9 Mar 2007 00:15:11 -0000 1.103 --- genwxbind.lua 13 Mar 2007 05:00:57 -0000 1.104 *************** *** 1221,1227 **** -- Read all the override files -- --------------------------------------------------------------------------- ! function ReadOverrideFileTable(overrideTable) ! for i = 1, #overrideTable do ! ReadOverrideFile(overrideTable[i]) end end --- 1221,1227 ---- -- Read all the override files -- --------------------------------------------------------------------------- ! function ReadOverrideFileTable(override_fileTable) ! for i = 1, #override_fileTable do ! ReadOverrideFile(override_fileTable[i]) end end *************** *** 2729,2733 **** -- GET MEMBER CODE local codeList = {} ! local funcName = "wxLua_"..parseObject.Name.."_"..memberGetFunc CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n") --- 2729,2733 ---- -- GET MEMBER CODE local codeList = {} ! local funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..memberGetFunc CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n") *************** *** 2763,2769 **** --- 2763,2771 ---- table.insert(codeList, " return 1;\n") table.insert(codeList, "}\n\n") + -- bind method local methodBinding = { + CFunctionName = funcName, Method = codeList, Map = " { LuaMethod, \""..memberGetFunc.."\", "..funcName..", 0, 0, s_wxluaargArray_None },\n", *************** *** 2778,2781 **** --- 2780,2789 ---- } + -- Override Generated Method Code + if overrideTable[methodBinding.CFunctionName] then + methodBinding.Method = overrideTable[methodBinding.CFunctionName] + overrideTableUsed[methodBinding.CFunctionName] = true + end + if not interface.objectData[o].BindTable[membercondition] then interface.objectData[o].BindTable[membercondition] = {} end table.insert(interface.objectData[o].BindTable[membercondition], methodBinding) *************** *** 2784,2788 **** -- SET MEMBER CODE codeList = {} ! local funcName = "wxLua_"..parseObject.Name.."_"..memberSetFunc CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n") --- 2792,2796 ---- -- SET MEMBER CODE codeList = {} ! local funcName = "wxLua_"..MakeVar(parseObject.Name).."_"..memberSetFunc CommentBindingTable(codeList, "// "..interface.lineData[member.LineNumber].Line.."\n") table.insert(codeList, "static int LUACALL "..funcName.."(lua_State *L)\n") *************** *** 2825,2828 **** --- 2833,2837 ---- methodBinding = { + CFunctionName = funcName, Method = codeList, Map = " { LuaMethod, \""..memberSetFunc.."\", "..funcName..", 0, 0, s_wxluaargArray_None },\n", *************** *** 2837,2840 **** --- 2846,2855 ---- } + -- Override Generated Method Code + if overrideTable[methodBinding.CFunctionName] then + methodBinding.Method = overrideTable[methodBinding.CFunctionName] + overrideTableUsed[methodBinding.CFunctionName] = true + end + if not interface.objectData[o].BindTable[membercondition] then interface.objectData[o].BindTable[membercondition] = {} end table.insert(interface.objectData[o].BindTable[membercondition], methodBinding) |
From: John L. <jr...@us...> - 2007-03-13 05:01:04
|
Update of /cvsroot/wxlua/wxLua/bindings/wxstc In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2508/wxLua/bindings/wxstc Modified Files: wxstc_datatypes.lua Log Message: update image.i to wxWidgets 2.8 using headers Index: wxstc_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxstc/wxstc_datatypes.lua,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** wxstc_datatypes.lua 9 Mar 2007 06:10:14 -0000 1.47 --- wxstc_datatypes.lua 13 Mar 2007 05:01:00 -0000 1.48 *************** *** 1018,1021 **** --- 1018,1027 ---- Name = "wxFile::OpenMode", }, + ["wxFile::dummy"] = { + Condition = "wxLUA_USE_wxFile && wxUSE_FILE", + DefType = "enum", + IsNumber = true, + Name = "wxFile::dummy", + }, wxFileConfig = { BaseClass = "wxConfigBase", *************** *** 1704,1707 **** --- 1710,1719 ---- Name = "wxIconBundle", }, + wxIconLocation = { + Condition = "wxLUA_USE_wxIcon", + DefType = "class", + IsNumber = false, + Name = "wxIconLocation", + }, wxIconizeEvent = { BaseClass = "wxEvent", *************** *** 1735,1738 **** --- 1747,1768 ---- Name = "wxImageHandler", }, + wxImageHistogram = { + Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", + DefType = "class", + IsNumber = false, + Name = "wxImageHistogram", + }, + ["wxImageHistogram::iterator"] = { + Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", + DefType = "class", + IsNumber = false, + Name = "wxImageHistogram::iterator", + }, + wxImageHistogramEntry = { + Condition = "wxLUA_USE_wxImage && wxUSE_IMAGE", + DefType = "class", + IsNumber = false, + Name = "wxImageHistogramEntry", + }, wxImageList = { BaseClass = "wxObject", *************** *** 2157,2160 **** --- 2187,2196 ---- Name = "wxMultiChoiceDialog", }, + wxNativeFontInfo = { + Condition = "wxLUA_USE_wxFont", + DefType = "class", + IsNumber = false, + Name = "wxNativeFontInfo", + }, wxNavigationKeyEvent = { BaseClass = "wxEvent", *************** *** 2317,2320 **** --- 2353,2362 ---- Name = "wxPathFormat", }, + wxPathList = { + BaseClass = "wxArrayString", + DefType = "class", + IsNumber = false, + Name = "wxPathList", + }, wxPathNormalize = { Condition = "wxLUA_USE_wxFileName", *************** *** 2673,2676 **** --- 2715,2725 ---- Name = "wxSimpleHelpProvider", }, + wxSimpleHtmlListBox = { + BaseClass = "wxHtmlWindowInterface", + Condition = "(wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxHTML && wxUSE_HTML)", + DefType = "class", + IsNumber = false, + Name = "wxSimpleHtmlListBox", + }, wxSingleChoiceDialog = { BaseClass = "wxDialog", *************** *** 2890,2893 **** --- 2939,2954 ---- Name = "wxStdDialogButtonSizer", }, + wxStockGDI = { + Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush)", + DefType = "class", + IsNumber = false, + Name = "wxStockGDI", + }, + ["wxStockGDI::Item"] = { + Condition = "(wxCHECK_VERSION(2,8,0)) && (wxLUA_USE_wxColourPenBrush)", + DefType = "enum", + IsNumber = true, + Name = "wxStockGDI::Item", + }, wxStreamBase = { Condition = "wxUSE_STREAMS", *************** *** 3014,3017 **** --- 3075,3084 ---- Name = "wxTaskBarIconEvent", }, + wxTempFile = { + Condition = "wxLUA_USE_wxFile && wxUSE_FILE", + DefType = "class", + IsNumber = false, + Name = "wxTempFile", + }, wxTextAttr = { Condition = "wxLUA_USE_wxTextCtrl && wxUSE_TEXTCTRL", |