summaryrefslogtreecommitdiffstats
path: root/base/gfx/point.h
diff options
context:
space:
mode:
Diffstat (limited to 'base/gfx/point.h')
-rw-r--r--base/gfx/point.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/base/gfx/point.h b/base/gfx/point.h
index 3e09a81..3acb425 100644
--- a/base/gfx/point.h
+++ b/base/gfx/point.h
@@ -30,11 +30,17 @@
#ifndef BASE_GFX_POINT_H__
#define BASE_GFX_POINT_H__
+#include "build/build_config.h"
+
#ifdef UNIT_TEST
#include <iostream>
#endif
+#if defined(OS_WIN)
typedef struct tagPOINT POINT;
+#elif defined(OS_MACOSX)
+#include <ApplicationServices/ApplicationServices.h>
+#endif
namespace gfx {
@@ -45,7 +51,11 @@ class Point {
public:
Point();
Point(int x, int y);
+#if defined(OS_WIN)
explicit Point(const POINT& point);
+#elif defined(OS_MACOSX)
+ explicit Point(const CGPoint& point);
+#endif
~Point() {}
@@ -68,7 +78,11 @@ class Point {
return !(*this == rhs);
}
+#if defined(OS_WIN)
POINT ToPOINT() const;
+#elif defined(OS_MACOSX)
+ CGPoint ToCGPoint() const;
+#endif
private:
int x_;