gnomemm r1902 - in cluttermm/trunk: . clutter/src
- From: daniel svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1902 - in cluttermm/trunk: . clutter/src
- Date: Mon, 22 Dec 2008 15:35:04 +0000 (UTC)
Author: daniel
Date: Mon Dec 22 15:35:04 2008
New Revision: 1902
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1902&view=rev
Log:
* clutter/src/types.{ccg,hg} (Knot::set_*): Implement manually
to avoid pointless indirection in argument passing.
(Geometry::set_*): ditto.
(Knot::set_xy): New convenience accessor.
(Geometry::set_xy): ditto,
(Geometry::set_size): ditto.
Modified:
cluttermm/trunk/ChangeLog
cluttermm/trunk/clutter/src/types.ccg
cluttermm/trunk/clutter/src/types.hg
Modified: cluttermm/trunk/clutter/src/types.ccg
==============================================================================
--- cluttermm/trunk/clutter/src/types.ccg (original)
+++ cluttermm/trunk/clutter/src/types.ccg Mon Dec 22 15:35:04 2008
@@ -26,9 +26,20 @@
gobject_.y = y;
}
-bool Knot::operator==(const Knot& knot) const
+void Knot::set_x(int x)
{
- return clutter_knot_equal(gobj(), knot.gobj());
+ gobject_.x = x;
+}
+
+void Knot::set_y(int y)
+{
+ gobject_.y = y;
+}
+
+void Knot::set_xy(int x, int y)
+{
+ gobject_.x = x;
+ gobject_.y = y;
}
Vertex::Vertex(Unit x, Unit y, Unit z)
@@ -42,9 +53,40 @@
{
gobject_.x = x;
gobject_.y = y;
+ gobject_.width = width;
+ gobject_.height = height;
+}
+
+void Geometry::set_x(int x)
+{
+ gobject_.x = x;
+}
+
+void Geometry::set_y(int y)
+{
+ gobject_.y = y;
+}
+
+void Geometry::set_xy(int x, int y)
+{
+ gobject_.x = x;
+ gobject_.y = y;
+}
+
+void Geometry::set_width(unsigned int width)
+{
gobject_.width = width;
+}
+
+void Geometry::set_height(unsigned int height)
+{
gobject_.height = height;
}
+void Geometry::set_size(unsigned int width, unsigned int height)
+{
+ gobject_.width = width;
+ gobject_.height = height;
}
+} // namespace Clutter
Modified: cluttermm/trunk/clutter/src/types.hg
==============================================================================
--- cluttermm/trunk/clutter/src/types.hg (original)
+++ cluttermm/trunk/clutter/src/types.hg Mon Dec 22 15:35:04 2008
@@ -48,11 +48,15 @@
Knot(int x, int y);
_MEMBER_GET(x, x, int, int)
- _MEMBER_SET(x, x, int, int)
+ void set_x(int x);
_MEMBER_GET(y, y, int, int)
- _MEMBER_SET(y, y, int, int)
+ void set_y(int y);
+ void set_xy(int x, int y);
- bool operator==(const Knot& knot) const;
+#m4begin
+ _WRAP_EQUAL(clutter_knot_equal)
+#m4end
+ _IGNORE(clutter_knot_equal)
};
class Vertex
@@ -76,14 +80,16 @@
Geometry(int x, int y, unsigned int width = 0, unsigned int height = 0);
_MEMBER_GET(x, x, int, gint)
- _MEMBER_SET(x, x, int, gint)
+ void set_x(int x);
_MEMBER_GET(y, y, int, gint)
- _MEMBER_SET(y, y, int, gint)
+ void set_y(int y);
+ void set_xy(int x, int y);
+
_MEMBER_GET(width, width, unsigned int, guint)
- _MEMBER_SET(width, width, unsigned int, guint)
+ void set_width(unsigned int width);
_MEMBER_GET(height, height, unsigned int, guint)
- _MEMBER_SET(height, height, unsigned int, guint)
+ void set_height(unsigned int height);
+ void set_size(unsigned int width, unsigned int height);
};
-}
-
+} // namespace Clutter
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]