# HG changeset patch # User Thinker K.F. Li # Date 1221095698 -28800 # Node ID 98c83441d7d66c4885ae0073107b52dc18876f4e # Parent 19f09c343dccd3cef1785be42f28c7828cb29caf - diff -r 19f09c343dcc -r 98c83441d7d6 dox/MadButterfly_Clutter.h --- /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. + */ diff -r 19f09c343dcc -r 98c83441d7d6 src/animate.h --- 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); +/* @} */ /* @} */ diff -r 19f09c343dcc -r 98c83441d7d6 src/redraw_man.c --- 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; diff -r 19f09c343dcc -r 98c83441d7d6 src/shape_text.c --- 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. */ }