From: John L. <jr...@us...> - 2007-06-30 00:12:55
|
Update of /cvsroot/wxlua/wxLua/bindings/wxwidgets In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv9448/wxLua/bindings/wxwidgets Modified Files: data.i gdi.i geometry.i image.i windows.i wx_datatypes.lua wx_rules.lua 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: wx_datatypes.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_datatypes.lua,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** wx_datatypes.lua 27 Jun 2007 19:56:28 -0000 1.80 --- wx_datatypes.lua 30 Jun 2007 00:12:20 -0000 1.81 *************** *** 3045,3048 **** --- 3045,3054 ---- Name = "wxRegionIterator", }, + wxRegionOp = { + Condition = "(wxLUA_USE_wxRegion) && (defined (wxHAS_REGION_COMBINE ))", + DefType = "enum", + IsNumber = true, + Name = "wxRegionOp", + }, wxRelationship = { Condition = "(wxLUA_USE_wxSizer) && (wxLUA_USE_wxLayoutConstraints && (!wxCHECK_VERSION(2,6,0)))", Index: image.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/image.i,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** image.i 25 Jun 2007 03:19:37 -0000 1.30 --- image.i 30 Jun 2007 00:12:20 -0000 1.31 *************** *** 206,211 **** %class %delete %noclassinfo %encapsulate wxImageHistogramEntry wxImageHistogramEntry() ! %rename Index %member unsigned long index // GetIndex() only, SetIndex(idx) is not allowed ! %rename Value %member unsigned long value // GetValue() and SetValue(val) %endclass --- 206,211 ---- %class %delete %noclassinfo %encapsulate wxImageHistogramEntry wxImageHistogramEntry() ! %member unsigned long index // GetIndex() only, SetIndex(idx) is not allowed ! %member unsigned long value // GetValue() and SetValue(val) %endclass Index: windows.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/windows.i,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** windows.i 26 Jun 2007 03:22:04 -0000 1.49 --- windows.i 30 Jun 2007 00:12:20 -0000 1.50 *************** *** 76,82 **** %class %delete %noclassinfo %encapsulate wxVisualAttributes ! %rename Font %member wxFont font ! %rename ColFg wxColour colFg ! %rename ColBg wxColour colBg %endclass --- 76,82 ---- %class %delete %noclassinfo %encapsulate wxVisualAttributes ! %member wxFont font ! %member wxColour colFg ! %member wxColour colBg %endclass Index: gdi.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/gdi.i,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** gdi.i 27 Jun 2007 03:11:27 -0000 1.60 --- gdi.i 30 Jun 2007 00:12:20 -0000 1.61 *************** *** 15,18 **** --- 15,20 ---- %include "wx/gdicmn.h" + %define wxDefaultCoord + %class %delete %noclassinfo %encapsulate wxPoint %define_object wxDefaultPosition *************** *** 29,46 **** void Set(int x, int y) ! %rename X %member int x // GetX() and SetX(int x) ! %rename Y %member int y // GetY() and SetY(int y) %operator wxPoint& operator=(const wxPoint& p) const ! %operator bool operator==(const wxPoint& p) const ! %operator bool operator!=(const wxPoint& p) const ! %operator wxPoint operator+(const wxPoint& p) const ! %operator wxPoint operator-(const wxPoint& p) const ! %operator wxPoint& operator+=(const wxPoint& p) ! %operator wxPoint& operator-=(const wxPoint& p) ! %rename op_add_assign_Size %operator wxPoint& operator+=(const wxSize& s) ! %rename op_sub_assign_Size %operator wxPoint& operator-=(const wxSize& s) ! %rename op_add_Size %operator wxPoint operator+(const wxSize& s) const ! %rename op_sub_Size %operator wxPoint operator-(const wxSize& s) const %endclass --- 31,56 ---- void Set(int x, int y) ! %rename X %member_func int x // GetX() and SetX(int x) ! %rename Y %member_func int y // GetY() and SetY(int y) %operator wxPoint& operator=(const wxPoint& p) const ! ! %operator bool operator==(const wxPoint& p) const //{ return x == p.x && y == p.y; } ! %operator bool operator!=(const wxPoint& p) const //{ return !(*this == p); } ! ! // arithmetic operations (component wise) ! %operator wxPoint operator+(const wxPoint& p) const //{ return wxPoint(x + p.x, y + p.y); } ! %operator wxPoint operator-(const wxPoint& p) const //{ return wxPoint(x - p.x, y - p.y); } ! ! %operator wxPoint& operator+=(const wxPoint& p) //{ x += p.x; y += p.y; return *this; } ! %operator wxPoint& operator-=(const wxPoint& p) //{ x -= p.x; y -= p.y; return *this; } ! ! %operator wxPoint& operator+=(const wxSize& s) //{ x += s.GetWidth(); y += s.GetHeight(); return *this; } ! %operator wxPoint& operator-=(const wxSize& s) //{ x -= s.GetWidth(); y -= s.GetHeight(); return *this; } ! ! %operator wxPoint operator+(const wxSize& s) const //{ return wxPoint(x + s.GetWidth(), y + s.GetHeight()); } ! %operator wxPoint operator-(const wxSize& s) const //{ return wxPoint(x - s.GetWidth(), y - s.GetHeight()); } ! ! %operator wxPoint operator-() const { return wxPoint(-x, -y); } %endclass *************** *** 80,83 **** --- 90,108 ---- void SetHeight(int height) void SetWidth(int width) + + %operator wxSize& operator=(const wxSize& s) const + + %operator bool operator==(const wxSize& sz) const //{ return x == sz.x && y == sz.y; } + %operator bool operator!=(const wxSize& sz) const //{ return x != sz.x || y != sz.y; } + + %operator wxSize operator+(const wxSize& sz) const //{ return wxSize(x + sz.x, y + sz.y); } + %operator wxSize operator-(const wxSize& sz) const //{ return wxSize(x - sz.x, y - sz.y); } + %operator wxSize operator/(int i) const //{ return wxSize(x / i, y / i); } + %operator wxSize operator*(int i) const //{ return wxSize(x * i, y * i); } + + %operator wxSize& operator+=(const wxSize& sz) //{ x += sz.x; y += sz.y; return *this; } + %operator wxSize& operator-=(const wxSize& sz) //{ x -= sz.x; y -= sz.y; return *this; } + %operator wxSize& operator/=(const int i) //{ x /= i; y /= i; return *this; } + %operator wxSize& operator*=(const int i) //{ x *= i; y *= i; return *this; } %endclass *************** *** 133,136 **** --- 158,167 ---- void SetY(int Y) wxRect Union(const wxRect& rect) const //wxRect& Union(const wxRect& rect); + + %operator wxRect& operator=(const wxRect& r) const + + %operator bool operator==(const wxRect& rect) const + %operator wxRect operator+(const wxRect& rect) const + %operator wxRect& operator+=(const wxRect& rect) %endclass *************** *** 159,162 **** --- 190,205 ---- %endenum + %if defined(wxHAS_REGION_COMBINE) // MSW and MAC + %enum wxRegionOp + wxRGN_AND // Creates the intersection of the two combined regions. + wxRGN_COPY // Creates a copy of the region + wxRGN_DIFF // Combines the parts of first region that are not in the second one + wxRGN_OR // Creates the union of two combined regions. + wxRGN_XOR // Creates the union of two regions except for any overlapping areas. + %endenum + + %define wxHAS_REGION_COMBINE 1 + %endif // defined(wxHAS_REGION_COMBINE) + %class %delete wxRegion, wxGDIObject wxRegion(long x = 0, long y = 0, long width = 0, long height = 0) *************** *** 167,170 **** --- 210,220 ---- void Clear() + + %if defined(wxHAS_REGION_COMBINE) // MSW and MAC + bool Combine(wxCoord x, wxCoord y, wxCoord w, wxCoord h, wxRegionOp op); + bool Combine(const wxRect& rect, wxRegionOp op); + bool Combine(const wxRegion& region, wxRegionOp op) + %endif // defined(wxHAS_REGION_COMBINE) + wxRegionContain Contains(long x, long y) wxRegionContain Contains(const wxPoint& pt) *************** *** 182,186 **** bool Intersect(const wxRegion& region) bool IsEmpty() const ! //%gtk bool Ok() const bool Subtract(long x, long y, long width, long height) bool Subtract(const wxRect& rect) --- 232,237 ---- bool Intersect(const wxRegion& region) bool IsEmpty() const ! %wxchkver_2_8 bool IsEqual(const wxRegion& region) const ! %wxchkver_2_8 bool Ok() const bool Subtract(long x, long y, long width, long height) bool Subtract(const wxRect& rect) *************** *** 195,198 **** --- 246,252 ---- bool Xor(const wxRect& rect) bool Xor(const wxRegion& region) + + %operator wxRegion& operator=(const wxRegion& r) const + // operator == just calls IsEqual() %endclass *************** *** 446,449 **** --- 500,506 ---- void SetUnderlined(const bool underlined) void SetWeight(int weight) + + %operator wxFont& operator=(const wxFont& f) const + %operator bool operator == (const wxFont& font) const %endclass *************** *** 625,628 **** --- 682,688 ---- void Set(unsigned long colRGB) %endif // %wxchkver_2_8 + + %operator wxColour& operator=(const wxColour& c) const + %operator bool operator == (const wxColour& c) const %endclass *************** *** 710,713 **** --- 770,776 ---- void SetStyle(int style) void SetWidth(int width) + + %operator wxPen& operator=(const wxPen& p) const + %operator bool operator == (const wxPen& p) const %endclass *************** *** 766,769 **** --- 829,835 ---- void SetStipple(const wxBitmap& bitmap) void SetStyle(int style) + + %operator wxBrush& operator=(const wxBrush& b) const + %operator bool operator == (const wxBrush& b) const %endclass *************** *** 904,907 **** --- 970,975 ---- void SetWidth(int w) //%win void SetSize(const wxSize& size) + + %operator wxIcon& operator=(const wxIcon& i) const %endclass *************** *** 1008,1011 **** --- 1076,1081 ---- %win void SetPalette(const wxPalette& palette) void SetWidth(int width) + + %operator wxBitmap& operator=(const wxBitmap& b) const %endclass *************** *** 1084,1087 **** --- 1154,1159 ---- //%win void SetDepth(int depth) //%win void SetSize(const wxSize& size) + + %operator wxCursor& operator=(const wxCursor& c) const %endclass *************** *** 1104,1107 **** --- 1176,1181 ---- bool Create(const wxBitmap& bitmap, const wxColour& colour) %win bool Create(const wxBitmap& bitmap, int index) + + %operator wxMask& operator=(const wxMask& m) const %endclass Index: wx_rules.lua =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/wx_rules.lua,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** wx_rules.lua 17 Jun 2007 18:36:06 -0000 1.30 --- wx_rules.lua 30 Jun 2007 00:12:20 -0000 1.31 *************** *** 145,152 **** #if defined(__MINGW32__) || defined(__GNUWIN32__) // FIX: "internal compiler error: output_operand: invalid expression as operand" ! const wxPoint wxLua_wxDefaultPositionHack = wxDefaultPosition; ! const wxSize wxLua_wxDefaultSizeHack = wxDefaultSize; ! #define wxDefaultPosition wxLua_wxDefaultPositionHack ! #define wxDefaultSize wxLua_wxDefaultSizeHack #endif //__MINGW32__ ]] --- 145,158 ---- #if defined(__MINGW32__) || defined(__GNUWIN32__) // FIX: "internal compiler error: output_operand: invalid expression as operand" ! // We set their value again later since some compilers (gcc) won't set their value yet ! static wxPoint wxLua_wxDefaultPosition = wxDefaultPosition; ! static wxSize wxLua_wxDefaultSize = wxDefaultSize; ! static wxEventType wxLua_wxEVT_COMMAND_DIRPICKER_CHANGED = wxEVT_COMMAND_DIRPICKER_CHANGED; ! static wxEventType wxLua_wxEVT_COMMAND_FILEPICKER_CHANGED = wxEVT_COMMAND_FILEPICKER_CHANGED; ! ! #define wxDefaultPosition wxLua_wxDefaultPosition ! #define wxDefaultSize wxLua_wxDefaultSize ! #define wxEVT_COMMAND_DIRPICKER_CHANGED wxLua_wxEVT_COMMAND_DIRPICKER_CHANGED ! #define wxEVT_COMMAND_FILEPICKER_CHANGED wxLua_wxEVT_COMMAND_FILEPICKER_CHANGED #endif //__MINGW32__ ]] *************** *** 221,224 **** --- 227,241 ---- wxLuaBinding_PreRegister = [[ + #if defined(__MINGW32__) || defined(__GNUWIN32__) + #undef wxDefaultPosition + #undef wxDefaultSize + #undef wxEVT_COMMAND_DIRPICKER_CHANGED + #undef wxEVT_COMMAND_FILEPICKER_CHANGED + wxLua_wxDefaultPosition = wxDefaultPosition; + wxLua_wxDefaultSize = wxDefaultSize; + wxLua_wxEVT_COMMAND_DIRPICKER_CHANGED = wxEVT_COMMAND_DIRPICKER_CHANGED; + wxLua_wxEVT_COMMAND_FILEPICKER_CHANGED = wxEVT_COMMAND_FILEPICKER_CHANGED; + #endif //__MINGW32__ + // ugly hack for wxWidgets >2.7 change to use wxStockGDI::GetXXX if (wxLua_wxBLACK == NULL) Index: geometry.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/geometry.i,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** geometry.i 25 Jun 2007 03:19:37 -0000 1.11 --- geometry.i 30 Jun 2007 00:12:20 -0000 1.12 *************** *** 47,52 **** //void ReadFrom( wxDataInputStream &stream ) ! %rename X %member wxInt32 m_x ! %rename Y %member wxInt32 m_y %operator wxPoint2DInt operator-() --- 47,52 ---- //void ReadFrom( wxDataInputStream &stream ) ! %rename X %member_func wxInt32 m_x ! %rename Y %member_func wxInt32 m_y %operator wxPoint2DInt operator-() *************** *** 89,94 **** wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) const ! %rename X %member wxDouble m_x ! %rename Y %member wxDouble m_y %operator wxPoint2DDouble operator-() --- 89,94 ---- wxDouble GetCrossProduct( const wxPoint2DDouble &vec ) const ! %rename X %member_func wxDouble m_x ! %rename Y %member_func wxDouble m_y %operator wxPoint2DDouble operator-() *************** *** 165,172 **** //void Scale( wxInt32 num , wxInt32 denum ) ! %rename X %member wxDouble m_x ! %rename Y %member wxDouble m_y ! %rename Width %member wxDouble m_width ! %rename Height %member wxDouble m_height //wxRect2DDouble& operator = (const wxRect2DDouble& rect) - use copy constructor --- 165,172 ---- //void Scale( wxInt32 num , wxInt32 denum ) ! %rename X %member_func wxDouble m_x ! %rename Y %member_func wxDouble m_y ! %rename Width %member_func wxDouble m_width ! %rename Height %member_func wxDouble m_height //wxRect2DDouble& operator = (const wxRect2DDouble& rect) - use copy constructor *************** *** 240,247 **** //void ReadFrom( wxDataInputStream &stream ) ! %rename X %member wxInt32 m_x ! %rename Y %member wxInt32 m_y ! %rename Width %member wxInt32 m_width ! %rename Height %member wxInt32 m_height //wxRect2DInt& operator = (const wxRect2DInt& rect) - use copy constructor --- 240,247 ---- //void ReadFrom( wxDataInputStream &stream ) ! %rename X %member_func wxInt32 m_x ! %rename Y %member_func wxInt32 m_y ! %rename Width %member_func wxInt32 m_width ! %rename Height %member_func wxInt32 m_height //wxRect2DInt& operator = (const wxRect2DInt& rect) - use copy constructor Index: data.i =================================================================== RCS file: /cvsroot/wxlua/wxLua/bindings/wxwidgets/data.i,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** data.i 25 Jun 2007 03:19:37 -0000 1.37 --- data.i 30 Jun 2007 00:12:20 -0000 1.38 *************** *** 123,126 **** --- 123,128 ---- void SetRefData(wxObjectRefData* data) void UnRef() + + //%operator wxObject& operator=(const wxObject& other) %endclass |