[cluttermm] Size: Move this to its own .hg/ccg files.



commit 86d52555ea4981ff77b1248c4fd28b5d2966f8ae
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Mar 21 10:52:45 2014 +0100

    Size: Move this to its own .hg/ccg files.

 clutter/src/filelist.am |    1 +
 clutter/src/size.ccg    |   41 +++++++++++++++++++++++++++++++++++
 clutter/src/size.hg     |   55 +++++++++++++++++++++++++++++++++++++++++++++++
 clutter/src/types.ccg   |   18 ---------------
 clutter/src/types.hg    |   28 ------------------------
 5 files changed, 97 insertions(+), 46 deletions(-)
---
diff --git a/clutter/src/filelist.am b/clutter/src/filelist.am
index 7a809e1..4ce02f7 100644
--- a/clutter/src/filelist.am
+++ b/clutter/src/filelist.am
@@ -51,6 +51,7 @@ files_hg =                    \
        script.hg               \
        scriptable.hg           \
        shader.hg               \
+       size.hg                 \
        stage.hg                \
        text.hg                 \
        texture.hg              \
diff --git a/clutter/src/size.ccg b/clutter/src/size.ccg
new file mode 100644
index 0000000..3d0f4c9
--- /dev/null
+++ b/clutter/src/size.ccg
@@ -0,0 +1,41 @@
+/* Copyright (C) 2014 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <clutter/clutter.h>
+
+namespace Clutter
+{
+
+Size::Size(float width, float height)
+{
+  gobject_.width = width;
+  gobject_.height = height;
+}
+
+Size::Size(int width, int height)
+{
+  gobject_.width = width;
+  gobject_.height = height;
+}
+
+Size::Size(double width, double height)
+{
+  gobject_.width = width;
+  gobject_.height = height;
+}
+
+} // namespace Clutter
diff --git a/clutter/src/size.hg b/clutter/src/size.hg
new file mode 100644
index 0000000..129c749
--- /dev/null
+++ b/clutter/src/size.hg
@@ -0,0 +1,55 @@
+/* Copyright (C) 2014 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <clutter/clutter.h>
+#include <cogl/cogl.h>
+
+_DEFS(cluttermm,clutter)
+
+namespace Clutter
+{
+
+/**
+ * A size in 2D space.
+ */
+class Size
+{
+  _CLASS_BOXEDTYPE_STATIC(Size, ClutterSize,  clutter_size_alloc, clutter_size_copy, clutter_size_free)
+public:
+  explicit Size(float width = 0, float height = 0);
+
+  //Prevents ambiguous calls to Size(ClutterSize*, bool)
+  Size(int width, int height);
+
+  /**
+   * Prevents calls to Size(double, double) being ambiguous.
+   * N.B. this will convert the input to floats, and rounding
+   * errors are possible.
+   */
+  Size(double width, double height);
+
+  _IGNORE(clutter_size_init, clutter_size_alloc, clutter_size_copy, clutter_size_free)
+
+  _WRAP_EQUAL(clutter_size_equals)
+  _MEMBER_GET(width, width, float, float)
+  _MEMBER_GET(height, height, float, float)
+  _MEMBER_SET(width, width, float, float)
+  _MEMBER_SET(height, height, float, float)
+
+};
+
+} // namespace Clutter
diff --git a/clutter/src/types.ccg b/clutter/src/types.ccg
index b2b988e..733a640 100644
--- a/clutter/src/types.ccg
+++ b/clutter/src/types.ccg
@@ -116,22 +116,4 @@ Point::Point(double x, double y)
   gobject_ = clutter_point_copy(point);
 }
 
-Size::Size(float width, float height)
-{
-  gobject_.width = width;
-  gobject_.height = height;
-}
-
-Size::Size(int width, int height)
-{
-  gobject_.width = width;
-  gobject_.height = height;
-}
-
-Size::Size(double width, double height)
-{
-  gobject_.width = width;
-  gobject_.height = height;
-}
-
 } // namespace Clutter
diff --git a/clutter/src/types.hg b/clutter/src/types.hg
index 6e889e3..1ec5b35 100644
--- a/clutter/src/types.hg
+++ b/clutter/src/types.hg
@@ -118,34 +118,6 @@ public:
   _MEMBER_SET(y, y, float, gfloat)
 };
 
-/**
- * A size in 2D space.
- */
-class Size
-{
-  _CLASS_BOXEDTYPE_STATIC(Size, ClutterSize,  clutter_size_alloc, clutter_size_copy, clutter_size_free)
-public:
-  explicit Size(float width = 0, float height = 0);
-
-  //Prevents ambiguous calls to Size(ClutterSize*, bool)
-  Size(int width, int height);
-
-  /**
-   * Prevents calls to Size(double, double) being ambiguous.
-   * N.B. this will convert the input to floats, and rounding
-   * errors are possible.
-   */
-  Size(double width, double height);
-
-  _IGNORE(clutter_size_init, clutter_size_alloc, clutter_size_copy, clutter_size_free)
-
-  _WRAP_EQUAL(clutter_size_equals)
-  _MEMBER_GET(width, width, float, float)
-  _MEMBER_GET(height, height, float, float)
-  _MEMBER_SET(width, width, float, float)
-  _MEMBER_SET(height, height, float, float)
-
-};
 
 class Knot
 {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]