summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/IntPoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/IntPoint.h')
-rw-r--r--WebCore/platform/graphics/IntPoint.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/WebCore/platform/graphics/IntPoint.h b/WebCore/platform/graphics/IntPoint.h
index 1bfeeaa..e6d4816 100644
--- a/WebCore/platform/graphics/IntPoint.h
+++ b/WebCore/platform/graphics/IntPoint.h
@@ -29,10 +29,15 @@
#include "IntSize.h"
#include <wtf/Platform.h>
+#if PLATFORM(QT)
+#include <QDataStream>
+#endif
+
#if PLATFORM(CG)
typedef struct CGPoint CGPoint;
#endif
+
#if PLATFORM(MAC)
#ifdef NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES
typedef struct CGPoint NSPoint;
@@ -51,9 +56,6 @@ QT_END_NAMESPACE
#elif PLATFORM(GTK)
typedef struct _GdkPoint GdkPoint;
#endif
-#if PLATFORM(SYMBIAN)
-class TPoint;
-#endif
#if PLATFORM(WX)
class wxPoint;
@@ -78,6 +80,7 @@ public:
void setX(int x) { m_x = x; }
void setY(int y) { m_y = y; }
+ void move(const IntSize& s) { move(s.width(), s.height()); }
void move(int dx, int dy) { m_x += dx; m_y += dy; }
IntPoint expandedTo(const IntPoint& other) const
@@ -119,10 +122,6 @@ public:
IntPoint(const GdkPoint&);
operator GdkPoint() const;
#endif
-#if PLATFORM(SYMBIAN)
- IntPoint(const TPoint&);
- operator TPoint() const;
-#endif
#if PLATFORM(WX)
IntPoint(const wxPoint&);
@@ -176,6 +175,23 @@ inline bool operator!=(const IntPoint& a, const IntPoint& b)
return a.x() != b.x() || a.y() != b.y();
}
+#if PLATFORM(QT)
+inline QDataStream& operator<<(QDataStream& stream, const IntPoint& point)
+{
+ stream << point.x() << point.y();
+ return stream;
+}
+
+inline QDataStream& operator>>(QDataStream& stream, IntPoint& point)
+{
+ int x, y;
+ stream >> x >> y;
+ point.setX(x);
+ point.setY(y);
+ return stream;
+}
+#endif
+
} // namespace WebCore
#endif // IntPoint_h