Mercurial > MadButterfly
changeset 101:d6f9af55b0d0
More documentation.
1. main page
2. copyright
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 10 Sep 2008 13:35:56 +0800 |
parents | 1a1dda98730c |
children | c4f7bd52fec2 |
files | COPYING.h Doxyfile README.h src/animate.h src/shape_path.c src/shapes.h tools/svg2code.py |
diffstat | 7 files changed, 96 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/COPYING.h Wed Sep 10 13:35:56 2008 +0800 @@ -0,0 +1,32 @@ +/*! \page copyright Copyright + * \verbatim + * + * Copyright (c) 2008 + * The MadButterfly Project. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * \endverbatim + */
--- a/Doxyfile Wed Sep 10 10:02:31 2008 +0800 +++ b/Doxyfile Wed Sep 10 13:35:56 2008 +0800 @@ -611,7 +611,7 @@ # directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = img # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/README.h Wed Sep 10 13:35:56 2008 +0800 @@ -0,0 +1,27 @@ +/*! \mainpage + * + * \image html madbutterfly.png + * + * MadButterfly ( http://www.assembla.com/spaces/MadButtefly) is a toolkit + * for GUI environment. It is designed for embedded + * system. It make GUI designers and programmers work seperately. Designer + * export their artifacts to files with SVG format. MadButterfly provides + * a tool to translate graphics in SVG into C code and a framework that + * programmer can manipulate graphics. It works like a Javascript programmer + * to manipulate DOM object. Programmers using MadButterfly manipulate + * objects corresponding to SVG tags to interact with users of application. + * + * \section SVG What is SVG? + * SVG is a W3C standard, you can find it at + * http://www.w3.org/Graphics/SVG/ . MadButterfly implements SVG Tiny 1.2, + * at http://www.w3.org/TR/SVGMobile12/ . SVG is a vector graphics file + * format with XML techinology. Major browsers, except IE, support to view + * SVG files. SVG graphics can also be embedded in HTML pages. Another + * project, MadSwatter; brother of MadButterfly, is running on Firefox + * as a platform and using SVG techinology to construct it's functions. + * (see, http://www.assembla.com/spaces/MadSwatter ) + * + * Inkscape is an open source project to provide a vector graphics editor. + * Inkscape saves graphics in SVG format. You can use it to design your + * graphics that can be used with MadBufferfly. + */
--- a/src/animate.h Wed Sep 10 10:02:31 2008 +0800 +++ b/src/animate.h Wed Sep 10 13:35:56 2008 +0800 @@ -5,6 +5,10 @@ #include "mb_timer.h" #include "paint.h" +/*! \defgroup anim Animation + * \brief Animation is a set of functions to make graph moving. + * @{ + */ typedef struct _mb_progm mb_progm_t; typedef struct _mb_word mb_word_t; typedef struct _mb_action mb_action_t; @@ -28,5 +32,6 @@ extern mb_action_t *mb_visibility_new(int visib, coord_t *coord, mb_word_t *word); +/* @} */ #endif /* __ANIMATE_H_ */
--- a/src/shape_path.c Wed Sep 10 10:02:31 2008 +0800 +++ b/src/shape_path.c Wed Sep 10 13:35:56 2008 +0800 @@ -713,8 +713,6 @@ /*! \brief Transform a path from user space to device space. * - * \todo associate coord_t with shape objects and transform them - * automatically. */ void sh_path_transform(shape_t *shape) { sh_path_t *path;
--- a/src/shapes.h Wed Sep 10 10:02:31 2008 +0800 +++ b/src/shapes.h Wed Sep 10 13:35:56 2008 +0800 @@ -1,10 +1,16 @@ +/*! \file + * \brief Declare interfaces of shapes. + * + * \todo Add ellipse shape. + * \todo Add circle shape. + */ #ifndef __SHAPES_H_ #define __SHAPES_H_ #include <cairo.h> #include "mb_types.h" -/* Define a shape +/*! \page define_shape How to Define Shapes * * A shape must include * - *_new() and *_free() @@ -14,32 +20,43 @@ * - struct of shape must include an shape_t as type of first member. * * Must modify - * - event.c:draw_shape_path - * - redraw_man.c:clean_shape - * - redraw_man.c:draw_shape - * - * \todo Add arc for path shape. - * \todo Add ellipse shape. - * \todo Add circle shape. + * - event.c::draw_shape_path() + * - redraw_man.c::clean_shape() + * - redraw_man.c::draw_shape() */ +/*! \defgroup shapes Shapes + * @{ + */ +/*! \defgroup shape_path Shape of Path + * @{ + */ extern shape_t *sh_path_new(char *data); extern void sh_path_transform(shape_t *shape); extern void sh_path_draw(shape_t *shape, cairo_t *cr); +/* @} */ - +/*! \defgroup shape_text Shape of Text + * @{ + */ extern shape_t *sh_text_new(const char *txt, co_aix x, co_aix y, co_aix font_size, cairo_font_face_t *face); extern void sh_text_set_text(shape_t *shape, const char *txt); extern void sh_text_transform(shape_t *shape); extern void sh_text_draw(shape_t *shape, cairo_t *cr); +/* @} */ +/*! \defgroup shape_rect Shape of Rectangle + * @{ + */ extern shape_t *sh_rect_new(co_aix x, co_aix y, co_aix w, co_aix h, co_aix rx, co_aix ry); extern void sh_rect_transform(shape_t *shape); extern void sh_rect_draw(shape_t *shape, cairo_t *cr); extern void sh_rect_set(shape_t *shape, co_aix x, co_aix y, co_aix w, co_aix h, co_aix rx, co_aix ry); +/* @} */ +/* @} */ #endif /* __SHAPES_H_ */
--- a/tools/svg2code.py Wed Sep 10 10:02:31 2008 +0800 +++ b/tools/svg2code.py Wed Sep 10 13:35:56 2008 +0800 @@ -196,6 +196,11 @@ if shape.hasAttribute('transform'): shape_coord_id = shape_id + '_coord' + ## \page shape_coord Coordinate Transformation for Shapes. + # + # svg2code.py add a coord_t for a shape if transform attribute + # of it's tag is setted. The name of coord_t object is + # <shape_id> + "_coord". print >> codefo, 'dnl' print >> codefo, 'ADD_COORD([%s], [%s])dnl' % ( shape_coord_id, coord_id)