gnomemm r2052 - in cluttermm/branches/cluttermm-0.8: . clutter/src
- From: murrayc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r2052 - in cluttermm/branches/cluttermm-0.8: . clutter/src
- Date: Tue, 17 Feb 2009 08:40:50 +0000 (UTC)
Author: murrayc
Date: Tue Feb 17 08:40:50 2009
New Revision: 2052
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2052&view=rev
Log:
More back-porting from trunk.
Modified:
cluttermm/branches/cluttermm-0.8/ChangeLog
cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.ccg
cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.hg
cluttermm/branches/cluttermm-0.8/clutter/src/types.ccg
cluttermm/branches/cluttermm-0.8/clutter/src/types.hg
Modified: cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.ccg
==============================================================================
--- cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.ccg (original)
+++ cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.ccg Tue Feb 17 08:40:50 2009
@@ -93,9 +93,14 @@
return timeline;
}
-Glib::RefPtr<Timeline> EffectTemplate::path(const Glib::RefPtr<Actor>& actor, const ClutterKnot* knots, guint n_knots, const SlotEffectCompleteFunc& func)
+Glib::RefPtr<Timeline> EffectTemplate::path(const Glib::RefPtr<Actor>& actor,
+ const Glib::ArrayHandle<Knot>& knots,
+ const SlotEffectCompleteFunc& func)
{
- Glib::RefPtr<Timeline> timeline(Glib::wrap(clutter_effect_path(gobj(), actor->gobj(), knots, n_knots, NULL, NULL), true));
+ // Note: Don't copy this code if you don't understand WHY the cast works here.
+ const Glib::RefPtr<Timeline> timeline = Glib::wrap(clutter_effect_path(
+ gobj(), actor->gobj(), reinterpret_cast<const ClutterKnot*>(knots.data()),
+ knots.size(), 0, 0), true);
CompleteCallback::create(timeline, actor, func);
return timeline;
}
@@ -115,5 +120,3 @@
}
} // namespace Clutter
-
-//vim: ts=2,sw=2
Modified: cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.hg
==============================================================================
--- cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.hg (original)
+++ cluttermm/branches/cluttermm-0.8/clutter/src/effecttemplate.hg Tue Feb 17 08:40:50 2009
@@ -59,7 +59,9 @@
// TODO: Use C++ container for knots
_WRAP_METHOD_DOCS_ONLY(clutter_effect_path)
- Glib::RefPtr<Timeline> path(const Glib::RefPtr<Actor>& actor, const ClutterKnot* knots, guint n_knots, const SlotEffectCompleteFunc& func);
+ Glib::RefPtr<Timeline> path(const Glib::RefPtr<Actor>& actor,
+ const Glib::ArrayHandle<Knot>& knots,
+ const SlotEffectCompleteFunc& func);
_WRAP_METHOD_DOCS_ONLY(clutter_effect_scale)
Glib::RefPtr<Timeline> scale(const Glib::RefPtr<Actor>& actor, double x_scale_end, double y_scale_end, const SlotEffectCompleteFunc& func);
@@ -72,5 +74,3 @@
};
} // namespace Clutter
-
-//vim: ts=2,sw=2
Modified: cluttermm/branches/cluttermm-0.8/clutter/src/types.ccg
==============================================================================
--- cluttermm/branches/cluttermm-0.8/clutter/src/types.ccg (original)
+++ cluttermm/branches/cluttermm-0.8/clutter/src/types.ccg Tue Feb 17 08:40:50 2009
@@ -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/branches/cluttermm-0.8/clutter/src/types.hg
==============================================================================
--- cluttermm/branches/cluttermm-0.8/clutter/src/types.hg (original)
+++ cluttermm/branches/cluttermm-0.8/clutter/src/types.hg Tue Feb 17 08:40:50 2009
@@ -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]