changeset 104:98c83441d7d6

-
author Thinker K.F. Li <thinker@branda.to>
date Thu, 11 Sep 2008 09:14:58 +0800
parents 19f09c343dcc
children 8d97455811a8
files dox/MadButterfly_Clutter.h src/animate.h src/redraw_man.c src/shape_text.c
diffstat 4 files changed, 29 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dox/MadButterfly_Clutter.h	Thu Sep 11 09:14:58 2008 +0800
@@ -0,0 +1,21 @@
+/*! \page mb_clutter What is MadButterfly different from Clutter.
+ *
+ * Maybe some people would ask, "why don't you just use Clutter?"
+ * The anwser is the author of MadButterfly know name of Clutter,
+ * but he don't know what is Clutter exactly when he start the project.
+ * The author of MadButterfly is some kind of cowboy, he make things
+ * just because he have some ideas.  Actually, he know what Clutter
+ * just one week after starting the project.  Some guy send him a
+ * video from Andre Schmidt.  Andre implements a software to control
+ * volumne of sound card as a concept proving for idea of using
+ * SVG as a media to connect UI designers and application programmers.
+ * The work of Andre is based on Clutter.  It is first time the author
+ * of MadButterfly know what Clutter is exactly.
+ *
+ * Although, they are so similar.  We can also find some thing different.
+ * Clutter is heavily depend on OpenGL/OpenGL ES.  Most embedded systems
+ * do not have OpenGL included.  MadButterfly have a static/compile time
+ * SVG to C translator.  MadButterfly is focus on implementing mechanism
+ * to adapt SVG to C and other languages.  Clutter is about more and more
+ * heavy.
+ */
--- a/src/animate.h	Wed Sep 10 13:44:07 2008 +0800
+++ b/src/animate.h	Thu Sep 11 09:14:58 2008 +0800
@@ -22,6 +22,9 @@
 extern void mb_progm_start(mb_progm_t *progm, mb_tman_t *tman,
 			   mb_timeval_t *now);
 extern void mb_progm_abort(mb_progm_t *progm, mb_tman_t *tman);
+/*! \defgroup ani_actions Animation Actions
+ * @{
+ */
 extern mb_action_t *mb_shift_new(co_aix x, co_aix y, coord_t *coord,
 				 mb_word_t *word);
 extern mb_action_t *mb_chgcolor_new(co_comp_t r, co_comp_t g,
@@ -31,6 +34,7 @@
 enum { VIS_VISIBLE, VIS_HIDDEN };
 extern mb_action_t *mb_visibility_new(int visib, coord_t *coord,
 				      mb_word_t *word);
+/* @} */
 
 /* @} */
 
--- a/src/redraw_man.c	Wed Sep 10 13:44:07 2008 +0800
+++ b/src/redraw_man.c	Thu Sep 11 09:14:58 2008 +0800
@@ -300,8 +300,8 @@
 int rdman_remove_shape(redraw_man_t *rdman, shape_t *shape) {
     STAILQ_REMOVE(rdman->all_geos, geo_t, next, shape->geo);
     subject_free(&rdman->ob_factory, shape->geo->mouse_event);
+    sh_detach_geo(shape);
     elmpool_elm_free(rdman->geo_pool, shape->geo);
-    sh_detach_geo(shape);
     rdman->n_geos--;
     sh_detach_coord(shape);
     return OK;
--- a/src/shape_text.c	Wed Sep 10 13:44:07 2008 +0800
+++ b/src/shape_text.c	Thu Sep 11 09:14:58 2008 +0800
@@ -6,6 +6,7 @@
 #include "mb_types.h"
 #include "shapes.h"
 
+#define ASSERT(x)
 #define OK 0
 #define ERR -1
 
@@ -119,9 +120,7 @@
     y = text->y;
     coord_trans_pos(shape->coord, &x, &y);
     r = get_extents(text, &extents);
-    if(r != OK)
-	/*! \todo announce error. change return type? */
-	return;
+    ASSERT(r == OK);
 
     text->d_x = x;
     text->d_y = y;
@@ -134,6 +133,7 @@
     poses[1][0] = poses[0][0] + extents.width + 10 + shape->stroke_width;
     poses[1][1] = poses[0][1] + extents.height + 10 + shape->stroke_width;
     geo_from_positions(shape->geo, 2, poses);
+    /*! \todo Support ratation for shape_text. */
 }