From: John L. <jr...@us...> - 2007-06-30 00:12:54
|
Update of /cvsroot/wxlua/wxLua/bindings/wxlua In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9448/wxLua/bindings/wxlua Modified Files: override.hpp wxlua.i Log Message: Fix for MingW added in wxWidgets bindings for wxDefaultPoint and wxEVT_FILEPICKER/DIRPICKER... Rename the functions to get the type names from wxLua to match closer to the lua type() function, wxlua.i Change op_add_assign to just op_iadd (others as well) = op_assign is now op_set Index: wxlua.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/wxlua.i,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlua.i 28 Jun 2007 21:52:55 -0000 1.5 --- wxlua.i 30 Jun 2007 00:12:20 -0000 1.6 *************** *** 16,21 **** // --------------------------------------------------------------------------- // Get information about the status of wxLua. - // - // Please take special note of // Get a table of all tracked top level windows that wxLua will Destroy() --- 16,19 ---- *************** *** 87,101 **** // Is this lua_type() (or in lua the type() function) considered equivalent ! %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) ! // %override wxString wxlua_typename(int wxluaarg_tag) ! // C++ Func: wxString wxlua_getwxluatypename(int wxluaarg_tag) ! // Returns the tag name for both the predefined (negative) as well as the ! // binding class tags. (C function only does predefined tags) ! %function wxString wxlua_typename(int wxluaarg_tag) ! // %override int wxlua_type(void* object) ! // Get the wxlua type (tag) of the object, this is the arg tags number ! %function int wxlua_type(void* object) // --------------------------------------------------------------------------- --- 85,102 ---- // Is this lua_type() (or in lua the type() function) considered equivalent ! %rename iswxluatype %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) ! // %override [wxlua_typename, wxlua_type#, lua_typename, lua_type#] type(void* object) ! // Given any type of object, returns four values: ! // wxlua name of the type - wxLuaState::GetLuaTagName(wxlua_type) ! // wxlua number of the type - wxlua_getwxluatype(lua_type(L, stack_idx)) or wxlua_ttag ! // lua name of the type - lua_typename(L, lua_type(L, stack_idx)) ! // lua number of the type - lua_type(L, stack_idx) ! %function wxString type(void* object) ! // %override wString typename(int wxluaarg_tag) ! // Returns the wxLua tag name for both the predefined (negative) as well as the ! // binding class tag numbers. ! %function wxString typename(int wxluaarg_tag) // --------------------------------------------------------------------------- Index: override.hpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxlua/override.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** override.hpp 28 Jun 2007 21:52:55 -0000 1.4 --- override.hpp 30 Jun 2007 00:12:20 -0000 1.5 *************** *** 120,156 **** %end ! %override wxLua_function_wxlua_typename ! // %function wxString wxlua_getwxluatypename(int wxluaarg_tag) ! static int LUACALL wxLua_function_wxlua_typename(lua_State *L) { wxLuaState wxlState(L); - wxString returns; - // int wxluaarg_tag - int wxluaarg_tag = (int)wxlua_getnumbertype(L, 1); - // call wxlua_getwxluatypename - returns = wxlState.GetLuaTagName(wxluaarg_tag); //wxlua_getwxluatypename(wxluaarg_tag); - // push the result string - wxlState.lua_PushString(returns); ! return 1; } %end ! %override wxLua_function_wxlua_type ! // %function int wxlua_wxluatype(int wxluaarg_tag) ! static int LUACALL wxLua_function_wxlua_type(lua_State *L) { wxLuaState wxlState(L); wxString returns; // int wxluaarg_tag ! int wxluaarg_tag = wxlua_ttag(L, 1); ! if (wxluaarg_tag == WXLUA_NOTAG) ! { ! int ltype = lua_type(L, 1); ! wxluaarg_tag = wxlua_getwxluatype(ltype); ! } ! ! // push the result number ! lua_pushnumber(L, wxluaarg_tag); return 1; --- 120,167 ---- %end ! %override wxLua_function_type ! // %function int type(int wxluaarg_tag) ! static int LUACALL wxLua_function_type(lua_State *L) { wxLuaState wxlState(L); ! int ltype = lua_type(L, 1); ! const char* ltypename = lua_typename(L, ltype); ! ! int wxluaarg_tag = WXLUA_NOTAG; ! ! // this may a wxLua data ! if (ltype == LUA_TUSERDATA) ! wxluaarg_tag = wxlua_ttag(L, 1); ! ! // I guess it wasn't or isn't a userdata ! if (wxluaarg_tag == WXLUA_NOTAG) ! wxluaarg_tag = wxlua_getwxluatype(ltype); ! ! wxString tagName = wxlState.GetLuaTagName(wxluaarg_tag); //wxlua_getwxluatypename(wxluaarg_tag); ! ! // push the results ! lua_pushstring(L, wx2lua(tagName)); ! lua_pushnumber(L, wxluaarg_tag); ! ! lua_pushstring(L, ltypename); ! lua_pushnumber(L, ltype); ! ! return 4; } %end ! %override wxLua_function_typename ! // %function wxString typename(int wxluaarg_tag) ! static int LUACALL wxLua_function_typename(lua_State *L) { wxLuaState wxlState(L); wxString returns; // int wxluaarg_tag ! int wxluaarg_tag = (int)wxlua_getnumbertype(L, 1); ! // call wxlua_getwxluatypename ! returns = wxlState.GetLuaTagName(wxluaarg_tag); //wxlua_getwxluatypename(wxluaarg_tag); ! // push the result string ! wxlState.lua_PushString(returns); return 1; |