From: John L. <jr...@us...> - 2007-06-06 23:43:30
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4156/wxLua/bindings/wxwidgets Modified Files: appframe.i override.hpp wx_datatypes.lua Log Message: Rename structs WXLUACLASS, WXLUAMETHOD, WXLUADEFINE, WXLUASTRING, WXLUAEVENT to wxLuaBindClass, wxLuaBindMethod, wxLuaBindDefine, wxLuaBindString, wxLuaBindEvent Fix %renamed listCtrl:SetItemString to now use overload SetItem Fix recursion in traversing the base class methods Add IntArray_FromLuaTable for binding generator to do (int n, int* items) from a table Use NULL in bindings for items that are *pointers for clarity Use sizeof(struct name) instead of sizeof(array[0]) in bindings Rename wxLuaBinding GetLuaClassList to just GetClassArray since it's a C array Index: appframe.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/appframe.i,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** appframe.i 1 Jun 2007 18:19:46 -0000 1.34 --- appframe.i 6 Jun 2007 23:42:54 -0000 1.35 *************** *** 289,295 **** virtual void SetStatusText(const wxString& text, int number = 0) ! // %override void wxFrame::SetStatusWidths(lua table with number indexes and values) // C++ Func: virtual void SetStatusWidths(int n, int *widths) ! virtual void SetStatusWidths(LuaTable intTable) void SetToolBar(wxToolBar* toolBar) --- 289,295 ---- virtual void SetStatusText(const wxString& text, int number = 0) ! // void wxFrame::SetStatusWidths(lua table with number indexes and values) // C++ Func: virtual void SetStatusWidths(int n, int *widths) ! virtual void SetStatusWidths(IntArray_FromLuaTable intTable) void SetToolBar(wxToolBar* toolBar) *************** *** 346,356 **** virtual void SetStatusText(const wxString& text, int i = 0) ! // %override void wxStatusBar::SetStatusWidths(lua table with number indexes and values) // C++ Func: virtual void SetStatusWidths(int n, int *widths) ! virtual void SetStatusWidths(LuaTable intTable) ! // %override void wxStatusBar::SetStatusStyles(lua table with number indexes and values) // C++ Func: virtual void SetStatusStyles(int n, int *styles) ! virtual void SetStatusStyles(LuaTable intTable) %endclass --- 346,356 ---- virtual void SetStatusText(const wxString& text, int i = 0) ! // void wxStatusBar::SetStatusWidths(lua table with number indexes and values) // C++ Func: virtual void SetStatusWidths(int n, int *widths) ! virtual void SetStatusWidths(IntArray_FromLuaTable intTable) ! // void wxStatusBar::SetStatusStyles(lua table with number indexes and values) // C++ Func: virtual void SetStatusStyles(int n, int *styles) ! virtual void SetStatusStyles(IntArray_FromLuaTable intTable) %endclass Index: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** wx_datatypes.lua 19 May 2007 02:05:45 -0000 1.61 --- wx_datatypes.lua 6 Jun 2007 23:42:56 -0000 1.62 *************** *** 49,52 **** --- 49,57 ---- Name = "HANDLE", }, + IntArray_FromLuaTable = { + DefType = "special", + IsNumber = true, + Name = "IntArray_FromLuaTable", + }, LPCVOID = { DefType = "number", Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/override.hpp,v retrieving revision 1.68 retrieving revision 1.69 diff -C2 -d -r1.68 -r1.69 *** override.hpp 5 Jun 2007 21:07:20 -0000 1.68 --- override.hpp 6 Jun 2007 23:42:54 -0000 1.69 *************** *** 25,58 **** %end - %override wxLua_wxFrame_SetStatusWidths - // virtual void SetStatusWidths(int n, int *widths) - static int LUACALL wxLua_wxFrame_SetStatusWidths(lua_State *L) - { - wxLuaState wxlState(L); - int count = 0; wxLuaSmartIntArray ptr; int *choices; ptr = choices = wxlState.GetIntArray(2, count); - // get this - wxFrame *self = (wxFrame *)wxlState.GetUserDataType(1, s_wxluatag_wxFrame); - // call SetStatusWidths - self->SetStatusWidths(count, choices); - // return the number of parameters - return 0; - } - %end - - %override wxLua_wxStatusBar_SetStatusWidths - // virtual void SetStatusWidths(int n, int *widths) - static int LUACALL wxLua_wxStatusBar_SetStatusWidths(lua_State *L) - { - wxLuaState wxlState(L); - int count = 0; wxLuaSmartIntArray ptr; int *choices; ptr = choices = wxlState.GetIntArray(2, count); - // get this - wxStatusBar *self = (wxStatusBar *)wxlState.GetUserDataType(1, s_wxluatag_wxStatusBar); - // call SetStatusWidths - self->SetStatusWidths(count, choices); - // return the number of parameters - return 0; - } - %end - %override wxLua_wxStatusBar_SetFieldsCount // virtual void SetFieldsCount(int number = 1, int* widths = NULL) --- 25,28 ---- *************** *** 79,102 **** %end - %override wxLua_wxStatusBar_SetStatusStyles - // virtual void SetStatusStyles(int n, int* styles) - static int LUACALL wxLua_wxStatusBar_SetStatusStyles(lua_State *L) - { - wxLuaState wxlState(L); - int count = 0; wxLuaSmartIntArray ptr; int *styles; ptr = styles = wxlState.GetIntArray(2, count); - // get this - wxStatusBar *self = (wxStatusBar *)wxlState.GetUserDataType(1, s_wxluatag_wxStatusBar); - // call SetStatusStyles - self->SetStatusStyles(count, styles); - // return the number of parameters - return 0; - } - %end - %override wxLua_wxAcceleratorTable_constructor // wxAcceleratorTable(int n, wxAcceleratorEntry* entries) static int LUACALL wxLua_wxAcceleratorTable_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxAcceleratorEntry *pItems = NULL; --- 49,57 ---- %end %override wxLua_wxAcceleratorTable_constructor // wxAcceleratorTable(int n, wxAcceleratorEntry* entries) static int LUACALL wxLua_wxAcceleratorTable_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxAcceleratorEntry *pItems = NULL; *************** *** 894,898 **** static int LUACALL wxLua_wxString_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxString* returns; --- 849,853 ---- static int LUACALL wxLua_wxString_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxString* returns; *************** *** 916,920 **** static int LUACALL wxLua_wxClassInfo_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxClassInfo *returns; --- 871,875 ---- static int LUACALL wxLua_wxClassInfo_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxClassInfo *returns; *************** *** 949,953 **** wxObject *pObject = (wxObject *)wxlState.ttouserdata( 1 ); ! const WXLUACLASS *pClass = wxlState.GetLuaClass(className); if (pClass && pClass->pClassInfo) { --- 904,908 ---- wxObject *pObject = (wxObject *)wxlState.ttouserdata( 1 ); ! const wxLuaBindClass *pClass = wxlState.GetLuaClass(className); if (pClass && pClass->pClassInfo) { *************** *** 991,995 **** static int LUACALL wxLua_wxTextValidator_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxTextValidator *returns; --- 946,950 ---- static int LUACALL wxLua_wxTextValidator_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxTextValidator *returns; *************** *** 1081,1085 **** static int LUACALL wxLua_wxGenericValidatorBool_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; --- 1036,1040 ---- static int LUACALL wxLua_wxGenericValidatorBool_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; *************** *** 1101,1105 **** static int LUACALL wxLua_wxGenericValidatorString_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; --- 1056,1060 ---- static int LUACALL wxLua_wxGenericValidatorString_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; *************** *** 1121,1125 **** static int LUACALL wxLua_wxGenericValidatorInt_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; --- 1076,1080 ---- static int LUACALL wxLua_wxGenericValidatorInt_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; *************** *** 1141,1145 **** static int LUACALL wxLua_wxGenericValidatorArray_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; --- 1096,1100 ---- static int LUACALL wxLua_wxGenericValidatorArray_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxGenericValidator *returns; *************** *** 1183,1187 **** static int LUACALL wxLua_wxStringList_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxStringList *returns; --- 1138,1142 ---- static int LUACALL wxLua_wxStringList_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxStringList *returns; *************** *** 1401,1405 **** static int LUACALL wxLua_wxBusyCursor_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxBusyCursor *returns; --- 1356,1360 ---- static int LUACALL wxLua_wxBusyCursor_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxBusyCursor *returns; *************** *** 1503,1507 **** static int LUACALL wxLua_wxSingleChoiceDialog_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxSingleChoiceDialog *returns; --- 1458,1462 ---- static int LUACALL wxLua_wxSingleChoiceDialog_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxSingleChoiceDialog *returns; *************** *** 2426,2430 **** static int LUACALL wxLua_wxBitmapFromData_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxBitmap *returns; --- 2381,2385 ---- static int LUACALL wxLua_wxBitmapFromData_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxBitmap *returns; *************** *** 2457,2461 **** static int LUACALL wxLua_wxBitmapFromXPMData_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxBitmap *returns; --- 2412,2416 ---- static int LUACALL wxLua_wxBitmapFromXPMData_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxBitmap *returns; *************** *** 3077,3081 **** static int LUACALL wxLua_wxImageFromData_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxImage *returns; --- 3032,3036 ---- static int LUACALL wxLua_wxImageFromData_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxImage *returns; *************** *** 3105,3109 **** static int LUACALL wxLua_wxImageFromBitmap_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxImage *returns; --- 3060,3064 ---- static int LUACALL wxLua_wxImageFromBitmap_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxImage *returns; *************** *** 3443,3447 **** static int LUACALL wxLua_wxCreateMenu_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxMenu *returns; --- 3398,3402 ---- static int LUACALL wxLua_wxCreateMenu_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxMenu *returns; *************** *** 3569,3573 **** static int LUACALL wxLua_wxMenuItem_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxMenuItem *returns; --- 3524,3528 ---- static int LUACALL wxLua_wxMenuItem_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxMenuItem *returns; *************** *** 3734,3738 **** static int LUACALL wxLua_wxPrintPreview_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxPrintPreview *returns; --- 3689,3693 ---- static int LUACALL wxLua_wxPrintPreview_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxPrintPreview *returns; *************** *** 4394,4398 **** static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxLuaObject *returns; --- 4349,4353 ---- static int LUACALL wxLua_wxLuaObject_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxLuaObject *returns; *************** *** 4440,4444 **** static int LUACALL wxLua_wxLuaPrintout_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxLuaPrintout *returns; --- 4395,4399 ---- static int LUACALL wxLua_wxLuaPrintout_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxLuaPrintout *returns; *************** *** 4464,4468 **** static int LUACALL wxLua_wxLuaHtmlWindow_constructor(lua_State *L) { ! wxlua_removetableforcall(L); wxLuaState wxlState(L); wxLuaHtmlWindow *returns; --- 4419,4423 ---- static int LUACALL wxLua_wxLuaHtmlWindow_constructor(lua_State *L) { ! wxluabind_removetableforcall(L); wxLuaState wxlState(L); wxLuaHtmlWindow *returns; |