gnomemm r1560 - in cluttermm/trunk: . clutter/src examples tools/m4



Author: arminb
Date: Thu Jun 12 18:16:42 2008
New Revision: 1560
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1560&view=rev

Log:
2008-06-12  Armin Burgmeier  <armin openismus com>

	* clutter/src/types.hg:
	* clutter/src/types.ccg: Wrapped ClutterVertex, ClutterGeometry.

	* clutter/src/texture.hg: Removed the constructor taking a pixbuf,
	since it was removed in clutter, instead added constructors taking a
	filename or an actor, respectively.

	* clutter/src/actor.hg:
	* clutter/src/actor.ccg: Wrapped new/remaining functions and signals.

	* clutter/src/clutter_signals.defs: Regenerated because the
	"unrealized" signal of ClutterActor was renamed to "unrealize".

	* tools/m4/convert_cluttermm.m4: Added conversions between
	ClutterShader* and Clutter::Shader.

	* examples/embed-gtk.cc:
	* examples/test-actors.cc: Create textures from file instead of from
	pixbuf, to make them compile again.


Modified:
   cluttermm/trunk/ChangeLog
   cluttermm/trunk/clutter/src/actor.ccg
   cluttermm/trunk/clutter/src/actor.hg
   cluttermm/trunk/clutter/src/clutter_signals.defs
   cluttermm/trunk/clutter/src/texture.hg
   cluttermm/trunk/clutter/src/types.ccg
   cluttermm/trunk/clutter/src/types.hg
   cluttermm/trunk/examples/embed-gtk.cc
   cluttermm/trunk/examples/test-actors.cc
   cluttermm/trunk/tools/m4/convert_cluttermm.m4

Modified: cluttermm/trunk/clutter/src/actor.ccg
==============================================================================
--- cluttermm/trunk/clutter/src/actor.ccg	(original)
+++ cluttermm/trunk/clutter/src/actor.ccg	Thu Jun 12 18:16:42 2008
@@ -20,6 +20,61 @@
 namespace Clutter
 {
 
+ActorBox::ActorBox(Unit x1, Unit y1, Unit x2, Unit y2)
+{
+  gobject_.x1 = x1;
+  gobject_.y1 = y1;
+  gobject_.x2 = x2;
+  gobject_.y2 = y2;
+}
+
+Geometry Actor::get_geometry() const
+{
+  Geometry geom;
+  clutter_actor_get_geometry(const_cast<ClutterActor*>(gobj()), geom.gobj());
+  return geom;
+}
+
+ActorBox Actor::get_paint_area() const
+{
+  ActorBox box;
+  clutter_actor_get_paint_area(const_cast<ClutterActor*>(gobj()), box.gobj());
+  return box;
+}
+
+void Actor::get_abs_allocation_vertices(Vertex vertices[4]) const
+{
+  clutter_actor_get_abs_allocation_vertices(const_cast<ClutterActor*>(gobj()), reinterpret_cast<ClutterVertex*>(vertices));
+}
+
+void Actor::get_allocation_vertices(Vertex vertices[4]) const
+{
+  clutter_actor_get_allocation_vertices(const_cast<ClutterActor*>(gobj()), NULL, reinterpret_cast<ClutterVertex*>(vertices));
+}
+
+void Actor::get_allocation_vertices(const Glib::RefPtr<Actor>& ancestor, Vertex vertices[4]) const
+{
+  clutter_actor_get_allocation_vertices(const_cast<ClutterActor*>(gobj()), Glib::unwrap(ancestor), reinterpret_cast<ClutterVertex*>(vertices));
+}
+
+ActorBox Actor::get_allocation_box() const
+{
+  ActorBox box;
+  clutter_actor_get_allocation_box(const_cast<ClutterActor*>(gobj()), box.gobj());
+  return box;
+}
+
+void Actor::apply_relative_transform_to_point(const Vertex& point, Vertex& vertex) const
+{
+  clutter_actor_apply_relative_transform_to_point(const_cast<ClutterActor*>(gobj()), NULL, const_cast<ClutterVertex*>(point.gobj()), vertex.gobj());
+}
+
+Geometry Actor::get_allocation_geometry() const
+{
+  Geometry geom;
+  clutter_actor_get_allocation_geometry(const_cast<ClutterActor*>(gobj()), geom.gobj());
+  return geom;
+}
 
 } //namespace Clutter
 

Modified: cluttermm/trunk/clutter/src/actor.hg
==============================================================================
--- cluttermm/trunk/clutter/src/actor.hg	(original)
+++ cluttermm/trunk/clutter/src/actor.hg	Thu Jun 12 18:16:42 2008
@@ -18,6 +18,8 @@
 #include <glibmm/object.h>
 #include <cluttermm/color.h>
 #include <cluttermm/scriptable.h>
+#include <cluttermm/shader.h>
+#include <clutter/clutter-actor.h> // For ClutterActorBox
 #include <clutter/clutter-event.h> //For Clutter*Event
  
 _DEFS(cluttermm,clutter)
@@ -34,6 +36,22 @@
 typedef ClutterScrollEvent ScrollEvent;
 typedef ClutterCrossingEvent CrossingEvent;
 
+class ActorBox
+{
+  _CLASS_BOXEDTYPE_STATIC(ActorBox, ClutterActorBox)
+public:
+  ActorBox(Unit x1, Unit y1, Unit x2, Unit y2);
+
+  _MEMBER_GET(x1, x1, Unit, ClutterUnit)
+  _MEMBER_SET(x1, x1, Unit, ClutterUnit)
+  _MEMBER_GET(y1, y1, Unit, ClutterUnit)
+  _MEMBER_SET(y1, y1, Unit, ClutterUnit)
+  _MEMBER_GET(x2, x2, Unit, ClutterUnit)
+  _MEMBER_SET(x2, x2, Unit, ClutterUnit)
+  _MEMBER_GET(y2, y2, Unit, ClutterUnit)
+  _MEMBER_SET(y2, y2, Unit, ClutterUnit)
+};
+
 class Actor : public Glib::Object, public Scriptable
 {
   _CLASS_GOBJECT(Actor, ClutterActor, CLUTTER_ACTOR, Glib::Object, GObject)
@@ -55,14 +73,17 @@
   _WRAP_METHOD(void unrealize(), clutter_actor_unrealize)
   _WRAP_METHOD(void paint(), clutter_actor_paint)
   _WRAP_METHOD(void queue_redraw(), clutter_actor_queue_redraw)
+  _WRAP_METHOD(void queue_relayout(), clutter_actor_queue_relayout)
 
   //TODO: Check that we don't want to wrap this: _WRAP_METHOD(void destroy(), clutter_actor_destroy)
+  //_IGNORE(clutter_actor_destroy)
 
-  //TODO: If these are output parameters, then they probably need to be hand-coded:
-  //TODO: _WRAP_METHOD(void request_coords(const Glib::RefPtr<ActorBox>& box), clutter_actor_request_coords)
-  //TODO: _WRAP_METHOD(void query_coords(const Glib::RefPtr<ActorBox>& box), clutter_actor_query_coords)
-  _WRAP_METHOD(void set_geometry(const ClutterGeometry *geometry), clutter_actor_set_geometry)
-  _WRAP_METHOD(void get_geometry(ClutterGeometry *geometry), clutter_actor_get_geometry)
+  _WRAP_METHOD(Glib::RefPtr<Actor> get_stage(), clutter_actor_get_stage)
+  _WRAP_METHOD(Glib::RefPtr<const Actor> get_stage() const, clutter_actor_get_stage)
+#m4 _CONVERSION(`const Geometry&', `const ClutterGeometry*', `($3).gobj()')
+  _WRAP_METHOD(void set_geometry(const Geometry& geometry), clutter_actor_set_geometry)
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_geometry)
+  Geometry get_geometry() const;
   //_WRAP_METHOD(void get_coords(int *x_1, int *y_1, int *x_2, int *y_2) const, clutter_actor_get_coords)
   _WRAP_METHOD(void set_size(int width, int height), clutter_actor_set_size)
   _WRAP_METHOD(void set_sizeu(Unit width, Unit height), clutter_actor_set_sizeu)
@@ -93,8 +114,10 @@
 
   _WRAP_METHOD(void set_rotation(RotateAxis axis, double angle, int x, int y, int z), clutter_actor_set_rotation)
   _WRAP_METHOD(void set_rotationx(RotateAxis axis, Fixed angle, int x, int y, int z), clutter_actor_set_rotationx)
+  _WRAP_METHOD(void set_rotationu(RotateAxis axis, double angle, Unit x, Unit y, Unit z), clutter_actor_set_rotationu)
   _WRAP_METHOD(double get_rotation(RotateAxis axis, int& x, int& y, int& z) const, clutter_actor_get_rotation)
   _WRAP_METHOD(Fixed get_rotationx(RotateAxis axis, int& x, int& y, int& z) const, clutter_actor_get_rotationx)
+  _WRAP_METHOD(double get_rotationu(RotateAxis axis, Unit& x, Unit& y, Unit& z) const, clutter_actor_get_rotationu)
   _WRAP_METHOD(void set_opacity (guint8 opacity), clutter_actor_set_opacity)
   _WRAP_METHOD(guint8 get_opacity() const, clutter_actor_get_opacity)
   _WRAP_METHOD(void set_name(const gchar           *name), clutter_actor_set_name)
@@ -115,6 +138,50 @@
   _WRAP_METHOD(void lower(const Glib::RefPtr<Actor>& above), clutter_actor_lower)
   _WRAP_METHOD(void raise_top (), clutter_actor_raise_top)
   _WRAP_METHOD(void lower_bottom(), clutter_actor_lower_bottom)
+
+  _WRAP_METHOD(Glib::RefPtr<Shader> get_shader(), clutter_actor_get_shader)
+  _WRAP_METHOD(Glib::RefPtr<const Shader> get_shader() const, clutter_actor_get_shader, constversion)
+  _WRAP_METHOD(void set_shader(const Glib::RefPtr<Shader>& shader), clutter_actor_set_shader)
+  _WRAP_METHOD(void set_shader_param(const Glib::ustring& param, float value), clutter_actor_set_shader_param)
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_paint_area)
+  ActorBox get_paint_area() const;
+  _WRAP_METHOD(bool is_rotated() const, clutter_actor_is_rotated)
+  _WRAP_METHOD(bool is_scaled() const, clutter_actor_is_scaled)
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_vertices)
+  void get_allocation_vertices(Vertex vertices[4]) const;
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_vertices)
+  void get_allocation_vertices(const Glib::RefPtr<Actor>& ancestor, Vertex vertices[4]) const;
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_abs_allocation_vertices)
+  void get_abs_allocation_vertices(Vertex vertices[4]) const;
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_box)
+  ActorBox get_allocation_box() const;
+#m4 _CONVERSION(`const ActorBox&', `const ClutterActorBox*',`($3).gobj()')
+  _WRAP_METHOD(void allocate(const ActorBox& box, bool absolute_origin_changed), clutter_actor_allocate)
+
+#m4 _CONVERSION(`const Vertex&',`ClutterVertex*',`const_cast<ClutterVertex*>(($3).gobj())')
+#m4 _CONVERSION(`Vertex&',`ClutterVertex*',`($3).gobj()')
+  _WRAP_METHOD(void apply_relative_transform_to_point(const Glib::RefPtr<Actor>& ancestor, const Vertex& point, Vertex& vertex) const, clutter_actor_apply_relative_transform_to_point)
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_vertices)
+  void apply_relative_transform_to_point(const Vertex& point, Vertex& vertex) const;
+
+  _WRAP_METHOD(void get_preferred_size(Unit& min_width_p, Unit& min_height_p, Unit& natural_width_p, Unit& natural_height_p) const, clutter_actor_get_preferred_size)
+  _WRAP_METHOD(void get_preferred_width(Unit for_height, Unit& min_width_p, Unit& natural_width_p) const, clutter_actor_get_preferred_width)
+  _WRAP_METHOD(void get_preferred_height(Unit for_width, Unit& min_height_p, Unit& natural_height_p) const, clutter_actor_get_preferred_height)
+  _WRAP_METHOD(guint8 get_paint_opacity() const, clutter_actor_get_paint_opacity)
+  _WRAP_METHOD(void move_anchor_point_from_gravity(Gravity gravity), clutter_actor_move_anchor_point_from_gravity)
+  _WRAP_METHOD(void move_anchor_point(int anchor_x, int anchor_y), clutter_actor_move_anchor_point)
+  _WRAP_METHOD(void move_anchor_pointu(Unit anchor_x, Unit anchor_y), clutter_actor_move_anchor_pointu)
+
+  _WRAP_METHOD(bool get_fixed_position_set() const, clutter_actor_get_fixed_position_set)
+  _WRAP_METHOD(void set_fixed_position_set(bool is_set), clutter_actor_set_fixed_position_set)
+  _WRAP_METHOD(void get_transformed_position(int& x, int& y) const, clutter_actor_get_transformed_position)
+  _WRAP_METHOD(void get_transformed_positionu(Unit& x, Unit& y) const, clutter_actor_get_transformed_positionu)
+  _WRAP_METHOD(void get_transformed_size(guint& width, guint& height) const, clutter_actor_get_transformed_size)
+  _WRAP_METHOD(void get_transformed_sizeu(Unit& width, Unit& height) const, clutter_actor_get_transformed_sizeu)
+  _WRAP_METHOD(void get_allocation_coords(int& x1, int& y1, int& x2, int& y2) const, clutter_actor_get_allocation_coords)
+  _WRAP_METHOD_DOCS_ONLY(clutter_actor_get_allocation_geometry)
+  Geometry get_allocation_geometry() const;
+
   _WRAP_METHOD(void set_depth(int depth), clutter_actor_set_depth)
   _WRAP_METHOD(void set_depthu(Unit depth), clutter_actor_set_depthu)
   _WRAP_METHOD(int get_depth() const, clutter_actor_get_depth)
@@ -124,28 +191,17 @@
   _WRAP_METHOD(void get_scalex(Fixed& scale_x, Fixed& scale_y) const, clutter_actor_get_scalex)
   _WRAP_METHOD(void get_scale(double& scale_x, double& scale_y) const, clutter_actor_get_scale)
 
-  //TODO:: removed? _WRAP_METHOD(void set_scale_with_gravityx(Fixed scale_x, Fixed scale_y, ClutterGravity gravity), clutter_actor_set_scale_with_gravityx)
-
-  //TODO:: removed? _WRAP_METHOD(void set_scale_with_gravity(float scale_x, float scale_y, ClutterGravity gravity), clutter_actor_set_scale_with_gravity)
-
   //_WRAP_METHOD(void get_abs_size(guint& width, guint& height) const, clutter_actor_get_abs_size)
   _WRAP_METHOD(void get_size(guint& width, guint& height) const, clutter_actor_get_size)
   _WRAP_METHOD(void get_sizeu(Unit& width, Unit& height) const, clutter_actor_get_sizeu)
   _WRAP_METHOD(void move_by(int dx, int dy), clutter_actor_move_by)
   _WRAP_METHOD(void move_byu(Unit dx, Unit dy), clutter_actor_move_byu)
 
-  //TODO: _WRAP_METHOD(void get_vertices(ClutterVertex verts[4]) const, clutter_actor_get_vertices)
-
-//TODO: typedef (or wrap) ClutterVertex.
-#m4 _CONVERSION(`const ClutterVertex&',`ClutterVertex*',`const_cast<ClutterVertex*>(&($3))')
-#m4 _CONVERSION(`ClutterVertex&',`ClutterVertex*',`&($3)')
-  _WRAP_METHOD(void apply_transform_to_point(const ClutterVertex& point, ClutterVertex& vertex), clutter_actor_apply_transform_to_point)
-  _WRAP_METHOD(void transform_stage_point(Unit x, Unit y, Unit& x_out, Unit& y_out), clutter_actor_transform_stage_point)
-
+  _WRAP_METHOD(void apply_transform_to_point(const Vertex& point, Vertex& vertex) const, clutter_actor_apply_transform_to_point)
+  _WRAP_METHOD(void transform_stage_point(Unit x, Unit y, Unit& x_out, Unit& y_out) const, clutter_actor_transform_stage_point)
 
   _WRAP_METHOD(bool event(ClutterEvent* event, bool capture), clutter_actor_event)
-  //TODO: _WRAP_METHOD(Glib::RefPtr<Actor> clutter_get_actor_by_gid(guint32 id), clutter_get_actor_by_gid)
-  //TODO: _WRAP_METHOD(Glib::RefPtr<const Actor> clutter_get_actor_by_gid(guint32 id) const, clutter_get_actor_by_gid, constversion)
+  _WRAP_METHOD(static Glib::RefPtr<Actor> get_actor_by_gid(guint32 id), clutter_get_actor_by_gid)
 
   _WRAP_METHOD(void set_anchor_point(int anchor_x, int anchor_y), clutter_actor_set_anchor_point)
   _WRAP_METHOD(void get_anchor_point(int& anchor_x, int& anchor_y) const, clutter_actor_get_anchor_point)
@@ -166,10 +222,14 @@
   _WRAP_SIGNAL(bool event(Event* event), "event")
   _WRAP_SIGNAL(void focus_out(), "focus_out")
   _WRAP_SIGNAL(void focus_in(), "focus_in")
-  //TODO: _WRAP_SIGNAL(void parent_set(const Glib::RefPtr<Actor>& old_parent), "parent_set")
+  #m4 _CONVERSION(`ClutterActor*', `const Glib::RefPtr<Actor>&', `Glib::wrap(($3),true)')
+  _WRAP_SIGNAL(void parent_set(const Glib::RefPtr<Actor>& old_parent), "parent_set")
   _WRAP_SIGNAL(bool scroll_event(ScrollEvent* event), "scroll_event")
   _WRAP_SIGNAL(bool key_press_event(KeyEvent* event), "key_press_event")
   _WRAP_SIGNAL(bool captured_event(Event* event), "captured_event")
+  _WRAP_SIGNAL(void paint(), "paint")
+  _WRAP_SIGNAL(void realize(), "realize")
+  _WRAP_SIGNAL(void unrealize(), "unrealize")
 
   protected:
   // according to the clutter docs, these functions should never be called

Modified: cluttermm/trunk/clutter/src/clutter_signals.defs
==============================================================================
--- cluttermm/trunk/clutter/src/clutter_signals.defs	(original)
+++ cluttermm/trunk/clutter/src/clutter_signals.defs	Thu Jun 12 18:16:42 2008
@@ -141,7 +141,7 @@
   (when "last")
 )
 
-(define-signal unrealized
+(define-signal unrealize
   (of-object "ClutterActor")
   (return-type "void")
   (when "last")
@@ -491,7 +491,7 @@
   (return-type "void")
   (when "last")
   (parameters
-    '("ClutterKnot*" "p0")
+    '("const-ClutterKnot*" "p0")
   )
 )
 
@@ -690,7 +690,7 @@
   (return-type "void")
   (when "last")
   (parameters
-    '("ClutterKnot*" "p0")
+    '("const-ClutterKnot*" "p0")
   )
 )
 

Modified: cluttermm/trunk/clutter/src/texture.hg
==============================================================================
--- cluttermm/trunk/clutter/src/texture.hg	(original)
+++ cluttermm/trunk/clutter/src/texture.hg	Thu Jun 12 18:16:42 2008
@@ -39,32 +39,22 @@
 
 protected:
   _CTOR_DEFAULT()
-  _WRAP_CTOR(Texture(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), clutter_texture_new_from_pixbuf)
+  _WRAP_CTOR(Texture(const Glib::ustring& filename), clutter_texture_new_from_file)
+  _WRAP_CTOR(Texture(const Glib::RefPtr<Actor>& actor), clutter_texture_new_from_actor)
 
 public:
 #m4 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Texture>',`Glib::wrap((ClutterTexture*)$3)')
 
   _WRAP_CREATE()
-  _WRAP_CREATE(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+  _WRAP_CREATE(const Glib::ustring& filename);
+  _WRAP_CREATE(const Glib::RefPtr<Actor>& actor);
 
-//  _WRAP_METHOD(bool set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf), clutter_texture_set_pixbuf, errthrow)
-//  _WRAP_METHOD(Glib::RefPtr<Gdk::Pixbuf> get_pixbuf() const, clutter_texture_get_pixbuf)
   _WRAP_METHOD(void get_base_size(gint& width, gint& height) const, clutter_texture_get_base_size)
   _WRAP_METHOD(bool set_from_rgb_data(const guchar* data, bool has_alpha, int width, int height, int rowstride, int bpp, TextureFlags flags), clutter_texture_set_from_rgb_data, errthrow)
   _WRAP_METHOD(bool set_from_yuv_data(const guchar* data, int width, int height, TextureFlags flags), clutter_texture_set_from_yuv_data, errthrow)
 
   _WRAP_SIGNAL(void size_change(gint width, gint height), "size_change")
   _WRAP_SIGNAL(void pixbuf_change(), "pixbuf_change")
-
-protected:
-//  _WRAP_METHOD(bool is_tiled() const, clutter_texture_is_tiled)
-//  _WRAP_METHOD(void get_n_tiles(gint& n_x_tiles, gint& n_y_tiles), clutter_texture_get_n_tiles)
-//  _WRAP_METHOD(void get_y_tile_detail(int y_index, int& pos, int& size, int& waste) const, clutter_texture_get_y_tile_detail)
-//  _WRAP_METHOD(void get_x_tile_detail(int x_index, int& pos, int& size, int& waste) const, clutter_texture_get_x_tile_detail)
-//  _WRAP_METHOD(bool has_generated_tiles() const, clutter_texture_has_generated_tiles)
-//  _WRAP_METHOD(void bind_tile(int index), clutter_texture_bind_tile)
-
-
 };
 
 } // namespace Clutter

Modified: cluttermm/trunk/clutter/src/types.ccg
==============================================================================
--- cluttermm/trunk/clutter/src/types.ccg	(original)
+++ cluttermm/trunk/clutter/src/types.ccg	Thu Jun 12 18:16:42 2008
@@ -0,0 +1,39 @@
+/* Copyright (C) 2007 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library 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-types.h>
+
+namespace Clutter
+{
+
+Vertex::Vertex(Unit x, Unit y, Unit z)
+{
+  gobject_.x = x;
+  gobject_.y = y;
+  gobject_.z = z;
+}
+
+Geometry::Geometry(int x, int y, unsigned int width, unsigned int height)
+{
+  gobject_.x = x;
+  gobject_.y = y;
+  gobject_.width = width;
+  gobject_.height = height;
+}
+
+}
+

Modified: cluttermm/trunk/clutter/src/types.hg
==============================================================================
--- cluttermm/trunk/clutter/src/types.hg	(original)
+++ cluttermm/trunk/clutter/src/types.hg	Thu Jun 12 18:16:42 2008
@@ -33,5 +33,36 @@
 _WRAP_ENUM(RotateDirection, ClutterRotateDirection, NO_GTYPE)
 _WRAP_ENUM(RotateAxis, ClutterRotateAxis, NO_GTYPE)
 _WRAP_ENUM(Gravity, ClutterGravity, NO_GTYPE)
+
+class Vertex
+{
+  _CLASS_BOXEDTYPE_STATIC(Vertex, ClutterVertex)
+public:
+  Vertex(Unit x, Unit y, Unit z);
+
+  _MEMBER_GET(x, x, Unit, ClutterUnit)
+  _MEMBER_SET(x, x, Unit, ClutterUnit)
+  _MEMBER_GET(y, y, Unit, ClutterUnit)
+  _MEMBER_SET(y, y, Unit, ClutterUnit)
+  _MEMBER_GET(z, z, Unit, ClutterUnit)
+  _MEMBER_SET(z, z, Unit, ClutterUnit)
+};
+
+class Geometry
+{
+  _CLASS_BOXEDTYPE_STATIC(Geometry, ClutterGeometry)
+public:
+  Geometry(int x, int y, unsigned int width, unsigned int height);
+
+  _MEMBER_GET(x, x, int, gint)
+  _MEMBER_SET(x, x, int, gint)
+  _MEMBER_GET(y, y, int, gint)
+  _MEMBER_SET(y, y, int, gint)
+  _MEMBER_GET(width, width, unsigned int, guint)
+  _MEMBER_SET(width, width, unsigned int, guint)
+  _MEMBER_GET(height, height, unsigned int, guint)
+  _MEMBER_SET(height, height, unsigned int, guint)
+};
+
 }
 

Modified: cluttermm/trunk/examples/embed-gtk.cc
==============================================================================
--- cluttermm/trunk/examples/embed-gtk.cc	(original)
+++ cluttermm/trunk/examples/embed-gtk.cc	Thu Jun 12 18:16:42 2008
@@ -28,11 +28,9 @@
 
 	pentry = &entry;
 
-	Glib::RefPtr<Gdk::Pixbuf> pixbuf = Gdk::Pixbuf::create_from_file("actor.png");
-
 	Clutter::Gtk::Embed embed;
 
-	Glib::RefPtr<Clutter::Texture> texture = Clutter::Texture::create(pixbuf);
+	Glib::RefPtr<Clutter::Texture> texture = Clutter::Texture::create("actor.png");
 	texture->set_opacity(50);
 
 	label = Clutter::Label::create("Sans 10", "Enter some text in the Entry and click 'Apply' to update this text!");

Modified: cluttermm/trunk/examples/test-actors.cc
==============================================================================
--- cluttermm/trunk/examples/test-actors.cc	(original)
+++ cluttermm/trunk/examples/test-actors.cc	Thu Jun 12 18:16:42 2008
@@ -138,7 +138,7 @@
     Glib::RefPtr<Clutter::Stage> stage = Clutter::Stage::get_default ();
     stage->set_size (800, 600);
 
-    Glib::RefPtr<Gdk::Pixbuf> pixbuf;
+    /*Glib::RefPtr<Gdk::Pixbuf> pixbuf;
     try
     {
         pixbuf = Gdk::Pixbuf::create_from_file ("actor.png");
@@ -148,7 +148,7 @@
         std::cerr << ex.what () << std::endl;
         std::cerr << "You may need to run this example from the 'examples' directory" << std::endl;
         return 1;
-    }
+    }*/
 
     stage->set_title ("Actors Test");
     stage->set_color (stage_color);
@@ -197,7 +197,7 @@
         // Create a texture from pixbuf, then clone it to save resources
         if (i == 0)
         {
-            oh->hands.push_back (Clutter::Texture::create (pixbuf));
+            oh->hands.push_back (Clutter::Texture::create ("actor.png"));
         }
         else
         {

Modified: cluttermm/trunk/tools/m4/convert_cluttermm.m4
==============================================================================
--- cluttermm/trunk/tools/m4/convert_cluttermm.m4	(original)
+++ cluttermm/trunk/tools/m4/convert_cluttermm.m4	Thu Jun 12 18:16:42 2008
@@ -4,6 +4,10 @@
 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Actor>',`Glib::wrap($3)')
 _CONVERSION(`ClutterActor*',`Glib::RefPtr<const Actor>',`Glib::wrap($3)')
 
+_CONVERSION(`const Glib::RefPtr<Shader>&',`ClutterShader*',__CONVERT_REFPTR_TO_P)
+_CONVERSION(`ClutterShader*',`Glib::RefPtr<Shader>', `Glib::wrap($3)')
+_CONVERSION(`ClutterShader*',`Glib::RefPtr<const Shader>', `Glib::wrap($3)')
+
 _CONVERSION(`const Glib::RefPtr<Timeline>&',`ClutterTimeline*',__CONVERT_REFPTR_TO_P)
 _CONVERSION(`ClutterTimeline*',`Glib::RefPtr<Timeline>',`Glib::wrap($3)')
 _CONVERSION(`ClutterTimeline*',`Glib::RefPtr<const Timeline>',`Glib::wrap($3)')



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