comparison src/mb_types.h @ 57:ab028c9f0930

Ability to hidden shapes and action of visibility.
author Thinker K.F. Li <thinker@branda.to>
date Sun, 10 Aug 2008 20:25:14 +0800
parents 581a03196093
children 1ca417f741f1
comparison
equal deleted inserted replaced
56:e444a8c01735 57:ab028c9f0930
39 39
40 area_t *cur_area, *last_area; 40 area_t *cur_area, *last_area;
41 area_t areas[2]; 41 area_t areas[2];
42 }; 42 };
43 #define GEF_DIRTY 0x1 43 #define GEF_DIRTY 0x1
44 #define GEF_HIDDEN 0x2
44 45
45 extern int is_overlay(area_t *r1, area_t *r2); 46 extern int is_overlay(area_t *r1, area_t *r2);
46 extern void area_init(area_t *area, int n_pos, co_aix pos[][2]); 47 extern void area_init(area_t *area, int n_pos, co_aix pos[][2]);
47 extern void geo_init(geo_t *g); 48 extern void geo_init(geo_t *g);
48 extern void geo_from_positions(geo_t *g, int n_pos, co_aix pos[][2]); 49 extern void geo_from_positions(geo_t *g, int n_pos, co_aix pos[][2]);
87 struct _coord *sibling; 88 struct _coord *sibling;
88 89
89 STAILQ(shape_t) members; /*!< All shape_t objects in this coord. */ 90 STAILQ(shape_t) members; /*!< All shape_t objects in this coord. */
90 } coord_t; 91 } coord_t;
91 #define COF_DIRTY 0x1 92 #define COF_DIRTY 0x1
93 #define COF_HIDDEN 0x2
92 94
93 extern void coord_init(coord_t *co, coord_t *parent); 95 extern void coord_init(coord_t *co, coord_t *parent);
94 extern void coord_trans_pos(coord_t *co, co_aix *x, co_aix *y); 96 extern void coord_trans_pos(coord_t *co, co_aix *x, co_aix *y);
95 extern co_aix coord_trans_size(coord_t *co, co_aix size); 97 extern co_aix coord_trans_size(coord_t *co, co_aix size);
96 extern void compute_aggr_of_coord(coord_t *coord); 98 extern void compute_aggr_of_coord(coord_t *coord);
97 extern void update_aggr_matrix(coord_t *start); 99 extern void update_aggr_matrix(coord_t *start);
98 extern coord_t *preorder_coord_subtree(coord_t *root, coord_t *last); 100 extern coord_t *preorder_coord_subtree(coord_t *root, coord_t *last);
101 #define coord_hide(co) do { co->flags |= COF_HIDDEN; } while(0)
102 #define coord_show(co) do { co->flags &= ~COF_HIDDEN; } while(0)
99 103
100 104
101 /*! \brief A grahpic shape. 105 /*! \brief A grahpic shape.
102 * 106 *
103 * \dot 107 * \dot