From: John L. <jr...@us...> - 2007-08-01 03:21:57
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv14531/wxLua/bindings/wxwidgets Modified Files: wxcore_defsutils.i wxcore_override.hpp wxcore_sizer.i Log Message: Add the gl lib as a default fix some bindings that take int *var and return the value Index: wxcore_defsutils.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_defsutils.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxcore_defsutils.i 16 Jul 2007 19:34:25 -0000 1.1 --- wxcore_defsutils.i 1 Aug 2007 03:21:23 -0000 1.2 *************** *** 108,112 **** %function %rename wxExecuteStdoutStderr long wxExecute(const wxString& command, wxArrayString& output, wxArrayString& errors, int flags = 0) %function void wxExit() ! %function int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError *rc = NULL, int flags = 0) %function unsigned long wxGetProcessId() %function bool wxShell(const wxString& command = "") --- 108,115 ---- %function %rename wxExecuteStdoutStderr long wxExecute(const wxString& command, wxArrayString& output, wxArrayString& errors, int flags = 0) %function void wxExit() ! ! // %override [int, wxKillError rc] wxKill(long pid, wxSignal sig = wxSIGTERM, int flags = 0) ! // C++ Func: int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError *rc = NULL, int flags = 0) ! %function int wxKill(long pid, wxSignal sig = wxSIGTERM, int flags = 0) %function unsigned long wxGetProcessId() %function bool wxShell(const wxString& command = "") Index: wxcore_override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_override.hpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** wxcore_override.hpp 22 Jul 2007 04:38:28 -0000 1.2 --- wxcore_override.hpp 1 Aug 2007 03:21:23 -0000 1.3 *************** *** 792,798 **** // ---------------------------------------------------------------------------- ! // Overrides for defsutil.i // ---------------------------------------------------------------------------- %override wxLua_function_wxExecuteStdout // %function %rename wxExecuteStdout long wxExecute(const wxString& command, wxArrayString& output, int flags = 0) --- 792,825 ---- // ---------------------------------------------------------------------------- ! // Overrides for defsutils.i // ---------------------------------------------------------------------------- + %override wxLua_function_wxKill + // %function int wxKill(long pid, wxSignal sig = wxSIGTERM, wxKillError *rc = NULL, int flags = 0) + static int LUACALL wxLua_function_wxKill(lua_State *L) + { + wxLuaState wxlState(L); + int returns; + // get number of arguments + int argCount = lua_gettop(L); + // int flags = 0 + int flags = (argCount >= 3 ? (int)wxlua_getnumbertype(L, 3) : 0); + // wxKillError rc = NULL + wxKillError rc = wxKILL_OK; + //wxKillError * rc = (argCount >= 3 ? (wxKillError *)wxlState.ttouserdata(3) : NULL); + // wxSignal sig = wxSIGTERM + wxSignal sig = (argCount >= 2 ? (wxSignal)wxlua_getintegertype(L, 2) : wxSIGTERM); + // long pid + long pid = (long)wxlua_getnumbertype(L, 1); + // call wxKill + returns = (wxKill(pid, sig, &rc, flags)); + // push the result number + lua_pushnumber(L, returns); + lua_pushnumber(L, rc); + + return 2; + } + %end + %override wxLua_function_wxExecuteStdout // %function %rename wxExecuteStdout long wxExecute(const wxString& command, wxArrayString& output, int flags = 0) *************** *** 2453,2456 **** --- 2480,2501 ---- // Overrides for sizer.i // ---------------------------------------------------------------------------- + + %override wxLua_wxGBSizerItem_GetEndPos + // void GetEndPos(int& row, int& col) + static int LUACALL wxLua_wxGBSizerItem_GetEndPos(lua_State *L) + { + wxLuaState wxlState(L); + int col = 0; + int row = 0; + // get this + wxGBSizerItem * self = (wxGBSizerItem *)wxlState.GetUserDataType(1, s_wxluatag_wxGBSizerItem); + // call GetEndPos + self->GetEndPos(row, col); + lua_pushnumber(L, row); + lua_pushnumber(L, col); + return 2; + } + %end + // ---------------------------------------------------------------------------- // Overrides for thread.i Index: wxcore_sizer.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wxcore_sizer.i,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** wxcore_sizer.i 16 Jul 2007 19:34:25 -0000 1.1 --- wxcore_sizer.i 1 Aug 2007 03:21:23 -0000 1.2 *************** *** 290,294 **** bool Intersects(const wxGBSizerItem& other) bool Intersects(const wxGBPosition& pos, const wxGBSpan& span) ! void GetEndPos(int& row, int& col) wxGridBagSizer* GetGBSizer() const void SetGBSizer(wxGridBagSizer* sizer) --- 290,298 ---- bool Intersects(const wxGBSizerItem& other) bool Intersects(const wxGBPosition& pos, const wxGBSpan& span) ! ! // %override [row, col] wxGBSizerItem::GetEndPos() ! // C++ Func: void GetEndPos(int& row, int& col) ! void GetEndPos() ! wxGridBagSizer* GetGBSizer() const void SetGBSizer(wxGridBagSizer* sizer) |