From: John L. <jr...@us...> - 2007-06-30 00:12:32
|
Update of /cvsroot/wxlua/wxLua/modules/wxlua/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9448/wxLua/modules/wxlua/src Modified Files: wxlua_bind.cpp 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_bind.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxlua/src/wxlua_bind.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** wxlua_bind.cpp 28 Jun 2007 21:52:57 -0000 1.5 --- wxlua_bind.cpp 30 Jun 2007 00:12:26 -0000 1.6 *************** *** 839,845 **** static wxLuaBindCFunc s_wxluafunc_wxLua_function_GetTrackedWindows[1] = {{ wxLua_function_GetTrackedWindows, WXLUAMETHOD_CFUNCTION, 0, 0, s_wxluaargArray_None }}; ! static wxLuaArgTag s_wxluatagArray_wxLua_function_wxlua_iswxluatype[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; ! // %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) ! static int LUACALL wxLua_function_wxlua_iswxluatype(lua_State *L) { int returns; --- 839,845 ---- static wxLuaBindCFunc s_wxluafunc_wxLua_function_GetTrackedWindows[1] = {{ wxLua_function_GetTrackedWindows, WXLUAMETHOD_CFUNCTION, 0, 0, s_wxluaargArray_None }}; ! static wxLuaArgTag s_wxluatagArray_wxLua_function_iswxluatype[] = { &s_wxluaarg_Number, &s_wxluaarg_Number, NULL }; ! // %rename iswxluatype %function int wxlua_iswxluatype(int luatype, int wxluaarg_tag) ! static int LUACALL wxLua_function_iswxluatype(lua_State *L) { int returns; *************** *** 855,887 **** return 1; } ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxlua_iswxluatype[1] = {{ wxLua_function_wxlua_iswxluatype, WXLUAMETHOD_CFUNCTION, 2, 2, s_wxluatagArray_wxLua_function_wxlua_iswxluatype }}; ! static wxLuaArgTag s_wxluatagArray_wxLua_function_wxlua_type[] = { &s_wxluaarg_LightUserData, NULL }; ! // %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; } ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxlua_type[1] = {{ wxLua_function_wxlua_type, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatagArray_wxLua_function_wxlua_type }}; ! static wxLuaArgTag s_wxluatagArray_wxLua_function_wxlua_typename[] = { &s_wxluaarg_Number, NULL }; ! // %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); --- 855,898 ---- return 1; } ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_iswxluatype[1] = {{ wxLua_function_iswxluatype, WXLUAMETHOD_CFUNCTION, 2, 2, s_wxluatagArray_wxLua_function_iswxluatype }}; ! static wxLuaArgTag s_wxluatagArray_wxLua_function_type[] = { &s_wxluaarg_LightUserData, NULL }; ! // %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; } ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_type[1] = {{ wxLua_function_type, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatagArray_wxLua_function_type }}; ! static wxLuaArgTag s_wxluatagArray_wxLua_function_typename[] = { &s_wxluaarg_Number, NULL }; ! // %override wxLua_function_typename ! // %function wxString typename(int wxluaarg_tag) ! static int LUACALL wxLua_function_typename(lua_State *L) { wxLuaState wxlState(L); *************** *** 897,901 **** } ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_wxlua_typename[1] = {{ wxLua_function_wxlua_typename, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatagArray_wxLua_function_wxlua_typename }}; // --------------------------------------------------------------------------- --- 908,912 ---- } ! static wxLuaBindCFunc s_wxluafunc_wxLua_function_typename[1] = {{ wxLua_function_typename, WXLUAMETHOD_CFUNCTION, 1, 1, s_wxluatagArray_wxLua_function_typename }}; // --------------------------------------------------------------------------- *************** *** 913,919 **** { "GetTrackedUserData", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_GetTrackedUserData, 1, NULL }, { "GetTrackedWindows", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_GetTrackedWindows, 1, NULL }, ! { "wxlua_iswxluatype", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxlua_iswxluatype, 1, NULL }, ! { "wxlua_type", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxlua_type, 1, NULL }, ! { "wxlua_typename", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_wxlua_typename, 1, NULL }, { 0, 0, 0, 0 }, --- 924,930 ---- { "GetTrackedUserData", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_GetTrackedUserData, 1, NULL }, { "GetTrackedWindows", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_GetTrackedWindows, 1, NULL }, ! { "iswxluatype", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_iswxluatype, 1, NULL }, ! { "type", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_type, 1, NULL }, ! { "typename", WXLUAMETHOD_CFUNCTION, s_wxluafunc_wxLua_function_typename, 1, NULL }, { 0, 0, 0, 0 }, |