gnomemm r2110 - in cluttermm_tutorial/trunk: . examples/actor examples/actor_group examples/actor_transformations examples/custom_actor examples/full_example



Author: siavashs
Date: Mon Mar 16 18:01:52 2009
New Revision: 2110
URL: http://svn.gnome.org/viewvc/gnomemm?rev=2110&view=rev

Log:
Fixe the build and updated to use the new API

* trunk/INSTALL: Autoupdated by autoconf
* trunk/Makefile.am: Disabled effects example (should be updated to use
Clutter::Animation when t's wrapped)
* trunk/examples/actor/main.cc:
* trunk/examples/actor_group/main.cc:
* trunk/examples/actor_transformations/main.cc:
* trunk/examples/custom_actor/triangle_actor.cc:
* trunk/examples/full_example/main.cc: Updated to use new API

Modified:
   cluttermm_tutorial/trunk/ChangeLog
   cluttermm_tutorial/trunk/Makefile.am
   cluttermm_tutorial/trunk/examples/actor/main.cc
   cluttermm_tutorial/trunk/examples/actor_group/main.cc
   cluttermm_tutorial/trunk/examples/actor_transformations/main.cc
   cluttermm_tutorial/trunk/examples/custom_actor/triangle_actor.cc
   cluttermm_tutorial/trunk/examples/full_example/main.cc

Modified: cluttermm_tutorial/trunk/Makefile.am
==============================================================================
--- cluttermm_tutorial/trunk/Makefile.am	(original)
+++ cluttermm_tutorial/trunk/Makefile.am	Mon Mar 16 18:01:52 2009
@@ -33,7 +33,6 @@
 	examples/behaviour/example		\
 	examples/custom_actor/example		\
 	examples/custom_container/example	\
-	examples/effects/example		\
 	examples/full_example/example		\
 	examples/multiline_text_entry/example	\
 	examples/score/example			\
@@ -54,7 +53,6 @@
 	examples/custom_container/examplebox.cc	\
 	examples/custom_container/examplebox.h	\
 	examples/custom_container/main.cc
-examples_effects_example_SOURCES		= examples/effects/main.cc
 examples_full_example_example_SOURCES		= examples/full_example/main.cc
 examples_multiline_text_entry_example_SOURCES =		\
 	examples/multiline_text_entry/main.cc		\

Modified: cluttermm_tutorial/trunk/examples/actor/main.cc
==============================================================================
--- cluttermm_tutorial/trunk/examples/actor/main.cc	(original)
+++ cluttermm_tutorial/trunk/examples/actor/main.cc	Mon Mar 16 18:01:52 2009
@@ -37,7 +37,7 @@
 
   // Add a label to the stage:
   const Glib::RefPtr<Clutter::Actor> label =
-    Clutter::Label::create("Sans 12", "Some Text", actor_color);
+    Clutter::Text::create("Sans 12", "Some Text", actor_color);
   label->set_size(500, 500);
   label->set_position(20, 150);
   stage->add_actor(label);

Modified: cluttermm_tutorial/trunk/examples/actor_group/main.cc
==============================================================================
--- cluttermm_tutorial/trunk/examples/actor_group/main.cc	(original)
+++ cluttermm_tutorial/trunk/examples/actor_group/main.cc	Mon Mar 16 18:01:52 2009
@@ -43,8 +43,8 @@
   rect->show();
 
   // Add a label to the group:
-  const Glib::RefPtr<Clutter::Label>
-    label = Clutter::Label::create("Sans 9", "Some Text", actor_color);
+  const Glib::RefPtr<Clutter::Text>
+    label = Clutter::Text::create("Sans 9", "Some Text", actor_color);
   label->set_position(0, 60);
   group->add_actor (label);
   label->show();

Modified: cluttermm_tutorial/trunk/examples/actor_transformations/main.cc
==============================================================================
--- cluttermm_tutorial/trunk/examples/actor_transformations/main.cc	(original)
+++ cluttermm_tutorial/trunk/examples/actor_transformations/main.cc	Mon Mar 16 18:01:52 2009
@@ -40,8 +40,8 @@
   rect->set_rotation(Clutter::X_AXIS, -20, 0, 0, 0);
 
   // Add a label to the stage:
-  const Glib::RefPtr<Clutter::Label> label =
-      Clutter::Label::create("Sans 12", "Some Text", actor_color);
+  const Glib::RefPtr<Clutter::Text> label =
+      Clutter::Text::create("Sans 12", "Some Text", actor_color);
   label->set_size(500, 500);
   label->set_position(20, 150);
   stage->add_actor(label);

Modified: cluttermm_tutorial/trunk/examples/custom_actor/triangle_actor.cc
==============================================================================
--- cluttermm_tutorial/trunk/examples/custom_actor/triangle_actor.cc	(original)
+++ cluttermm_tutorial/trunk/examples/custom_actor/triangle_actor.cc	Mon Mar 16 18:01:52 2009
@@ -50,20 +50,20 @@
   cogl_push_matrix();
   cogl_set_source_color(color);
 
-  ClutterFixed coords[6];
+  Cogl::Fixed coords[6];
 
   // Paint a triangle.  The parent paint call will have translated us into
   // position so paint from 0, 0.
-  coords[0] = CLUTTER_INT_TO_FIXED(0);
-  coords[1] = CLUTTER_INT_TO_FIXED(0);
+  coords[0] = COGL_FIXED_FROM_INT(0);
+  coords[1] = COGL_FIXED_FROM_INT(0);
 
-  coords[2] = CLUTTER_INT_TO_FIXED(0);
-  coords[3] = CLUTTER_INT_TO_FIXED(geom.get_height());
+  coords[2] = COGL_FIXED_FROM_INT(0);
+  coords[3] = COGL_FIXED_FROM_INT(geom.get_height());
 
-  coords[4] = CLUTTER_INT_TO_FIXED(geom.get_width());
+  coords[4] = COGL_FIXED_FROM_INT(geom.get_width());
   coords[5] = coords[3];
 
-  cogl_path_polygon(coords, G_N_ELEMENTS(coords) / 2);
+  cogl_path_polygon((float*)coords, G_N_ELEMENTS(coords) / 2);
   cogl_path_fill();
 
   cogl_pop_matrix();

Modified: cluttermm_tutorial/trunk/examples/full_example/main.cc
==============================================================================
--- cluttermm_tutorial/trunk/examples/full_example/main.cc	(original)
+++ cluttermm_tutorial/trunk/examples/full_example/main.cc	Mon Mar 16 18:01:52 2009
@@ -58,7 +58,7 @@
   Glib::RefPtr<Clutter::Stage> stage_;
 
   // For showing the filename:
-  Glib::RefPtr<Clutter::Label> label_filename_;
+  Glib::RefPtr<Clutter::Text> label_filename_;
 
   // For rotating all images around an ellipse::
   Glib::RefPtr<Clutter::Timeline> timeline_rotation_;
@@ -96,7 +96,7 @@
   items_             (),
   front_item_        (items_.end()),
   stage_             (Clutter::Stage::get_default()),
-  label_filename_    (Clutter::Label::create()),
+  label_filename_    (Clutter::Text::create()),
   timeline_rotation_ (Clutter::Timeline::create(60 /*frames*/, 30 /*fps*/))
 {
   stage_->set_size(800, 600);
@@ -191,7 +191,7 @@
         sigc::bind(sigc::mem_fun(*this, &Example::on_texture_button_press), p));
 
     const Glib::RefPtr<Clutter::Alpha> alpha =
-        Clutter::Alpha::create(timeline_rotation_, &Clutter::Alpha::sine_inc_func);
+        Clutter::Alpha::create(timeline_rotation_, CLUTTER_EASE_OUT_SINE);
 
     p->behaviour = Clutter::BehaviourEllipse
         ::create(alpha, 320, ELLIPSE_Y, // x, y
@@ -234,7 +234,7 @@
   const Glib::RefPtr<Clutter::Actor> actor = front_item_->texture;
   timeline_moveup_ = Clutter::Timeline::create(60 /*frames*/, 30 /*fps*/);
   const Glib::RefPtr<Clutter::Alpha> alpha =
-      Clutter::Alpha::create(timeline_moveup_, &Clutter::Alpha::sine_inc_func);
+      Clutter::Alpha::create(timeline_moveup_, CLUTTER_EASE_OUT_SINE);
  
   // Scale the item from its normal scale to approximately twice the normal scale:
   double scale_start = 0.0;



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