From: John L. <jr...@us...> - 2006-10-11 03:24:06
|
Update of /cvsroot/wxlua/wxLua/modules/wxbind/src In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv11324/wxLua/modules/wxbind/src Modified Files: controls.cpp event.cpp gdi.cpp Log Message: osx fixes, compiles and runs now Index: event.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/event.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** event.cpp 5 Oct 2006 05:10:47 -0000 1.25 --- event.cpp 11 Oct 2006 03:24:02 -0000 1.26 *************** *** 214,218 **** evttype_idx = 4; ! if (wxlState.IsNumberType(3)) lastId = (int)lua_tonumber(L, 3); else --- 214,218 ---- evttype_idx = 4; ! if (wxlState.IsEnumerationType(3)) lastId = (int)lua_tonumber(L, 3); else *************** *** 223,227 **** } ! if (wxlState.IsNumberType(2)) winId = (int)lua_tonumber(L, 2); else --- 223,227 ---- } ! if (wxlState.IsEnumerationType(2)) winId = (int)lua_tonumber(L, 2); else *************** *** 238,242 **** evttype_idx = 3; ! if (wxlState.IsNumberType(2)) winId = (int)lua_tonumber(L, 2); else --- 238,242 ---- evttype_idx = 3; ! if (wxlState.IsEnumerationType(2)) winId = (int)lua_tonumber(L, 2); else *************** *** 262,266 **** } ! if (wxlState.IsNumberType(evttype_idx)) eventType = (int)lua_tonumber(L, evttype_idx); else --- 262,266 ---- } ! if (wxlState.IsEnumerationType(evttype_idx)) eventType = (int)lua_tonumber(L, evttype_idx); else Index: controls.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/controls.cpp,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** controls.cpp 9 Jun 2006 22:51:31 -0000 1.31 --- controls.cpp 11 Oct 2006 03:24:02 -0000 1.32 *************** *** 2530,2535 **** ! #if ((defined(__WXMSW__) || defined(__WXMAC__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) ! // %win|%mac|%wxchkver27 wxTextCtrl* GetEditControl() const static int LUACALL wxLua_wxListCtrl_GetEditControl(lua_State *L) { --- 2530,2535 ---- ! #if ((defined(__WXMSW__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) ! // %win|%wxchkver27 wxTextCtrl* GetEditControl() const static int LUACALL wxLua_wxListCtrl_GetEditControl(lua_State *L) { *************** *** 2546,2550 **** } ! #endif // ((defined(__WXMSW__) || defined(__WXMAC__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) --- 2546,2550 ---- } ! #endif // ((defined(__WXMSW__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) *************** *** 3729,3735 **** ! #if ((defined(__WXMSW__) || defined(__WXMAC__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) { LuaMethod, "GetEditControl", wxLua_wxListCtrl_GetEditControl, 0, 0, { 0 } }, ! #endif // ((defined(__WXMSW__) || defined(__WXMAC__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) --- 3729,3735 ---- ! #if ((defined(__WXMSW__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) { LuaMethod, "GetEditControl", wxLua_wxListCtrl_GetEditControl, 0, 0, { 0 } }, ! #endif // ((defined(__WXMSW__) || wxCHECK_VERSION(2,7,0)) && (wxLUA_USE_wxListCtrl)) && (wxLUA_USE_wxTextCtrl) Index: gdi.cpp =================================================================== RCS file: /cvsroot/wxlua/wxLua/modules/wxbind/src/gdi.cpp,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** gdi.cpp 12 Jun 2006 03:50:38 -0000 1.30 --- gdi.cpp 11 Oct 2006 03:24:02 -0000 1.31 *************** *** 3553,3556 **** --- 3553,3575 ---- int s_wxluatag_wxColour = -1; + + #if (!defined(__WXMAC__)) && (wxLUA_USE_wxColourPenBrush) + // !%mac long GetPixel() const + static int LUACALL wxLua_wxColour_GetPixel(lua_State *L) + { + wxLuaState wxlState(L); + long returns; + // get this + wxColour * self = (wxColour *)wxlState.GetUserDataType(1, s_wxluatag_wxColour); + // call GetPixel + returns = self->GetPixel(); + // push the result number + lua_pushnumber(L, returns); + + return 1; + } + + #endif // (!defined(__WXMAC__)) && (wxLUA_USE_wxColourPenBrush) + // wxColour(const unsigned char red, const unsigned char green, const unsigned char blue) static int LUACALL wxLua_wxColour_constructor(lua_State *L) *************** *** 3623,3641 **** } - // long GetPixel() const - static int LUACALL wxLua_wxColour_GetPixel(lua_State *L) - { - wxLuaState wxlState(L); - long returns; - // get this - wxColour * self = (wxColour *)wxlState.GetUserDataType(1, s_wxluatag_wxColour); - // call GetPixel - returns = self->GetPixel(); - // push the result number - lua_pushnumber(L, returns); - - return 1; - } - // unsigned char Green() const static int LUACALL wxLua_wxColour_Green(lua_State *L) --- 3642,3645 ---- *************** *** 3732,3740 **** // Map Lua Class Methods to C Binding Functions static WXLUAMETHOD s_wxColour_methods[] = { { LuaConstructor, "wxColour", wxLua_wxColour_constructor, 3, 3, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaConstructor, "wxNamedColour", wxLua_wxNamedColour_constructor, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaConstructor, "wxColourCopy", wxLua_wxColourCopy_constructor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaMethod, "Blue", wxLua_wxColour_Blue, 0, 0, { 0 } }, - { LuaMethod, "GetPixel", wxLua_wxColour_GetPixel, 0, 0, { 0 } }, { LuaMethod, "Green", wxLua_wxColour_Green, 0, 0, { 0 } }, { LuaMethod, "Ok", wxLua_wxColour_Ok, 0, 0, { 0 } }, --- 3736,3748 ---- // Map Lua Class Methods to C Binding Functions static WXLUAMETHOD s_wxColour_methods[] = { + + #if (!defined(__WXMAC__)) && (wxLUA_USE_wxColourPenBrush) + { LuaMethod, "GetPixel", wxLua_wxColour_GetPixel, 0, 0, { 0 } }, + #endif // (!defined(__WXMAC__)) && (wxLUA_USE_wxColourPenBrush) + { LuaConstructor, "wxColour", wxLua_wxColour_constructor, 3, 3, { &s_wxluaarg_Number, &s_wxluaarg_Number, &s_wxluaarg_Number, 0 } }, { LuaConstructor, "wxNamedColour", wxLua_wxNamedColour_constructor, 1, 1, { &s_wxluaarg_String, 0 } }, { LuaConstructor, "wxColourCopy", wxLua_wxColourCopy_constructor, 1, 1, { &s_wxluatag_wxColour, 0 } }, { LuaMethod, "Blue", wxLua_wxColour_Blue, 0, 0, { 0 } }, { LuaMethod, "Green", wxLua_wxColour_Green, 0, 0, { 0 } }, { LuaMethod, "Ok", wxLua_wxColour_Ok, 0, 0, { 0 } }, |