Mercurial > MadButterfly
comparison src/redraw_man.c @ 30:e06a4a667ce2
Accept mouse/pointer event and hint the shape that the pointer is over.
- add find_shape_at_pos()
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Tue, 05 Aug 2008 12:40:45 +0800 |
parents | f56c96b035a8 |
children | d82749f77108 |
comparison
equal
deleted
inserted
replaced
29:f56c96b035a8 | 30:e06a4a667ce2 |
---|---|
48 | 48 |
49 new_buf = realloc(*buf, n_size); | 49 new_buf = realloc(*buf, n_size); |
50 if(new_buf == NULL) | 50 if(new_buf == NULL) |
51 return ERR; | 51 return ERR; |
52 | 52 |
53 if(new_buf != *buf) | 53 *buf = new_buf; |
54 *buf = new_buf; | |
55 | 54 |
56 return OK; | 55 return OK; |
57 } | 56 } |
58 | 57 |
59 static int add_dirty_geo(redraw_man_t *rdman, geo_t *geo) { | 58 static int add_dirty_geo(redraw_man_t *rdman, geo_t *geo) { |
140 elmpool_free(rdman->shnode_pool); | 139 elmpool_free(rdman->shnode_pool); |
141 if(rdman->dirty_coords) | 140 if(rdman->dirty_coords) |
142 free(rdman->dirty_coords); | 141 free(rdman->dirty_coords); |
143 if(rdman->dirty_geos) | 142 if(rdman->dirty_geos) |
144 free(rdman->dirty_geos); | 143 free(rdman->dirty_geos); |
144 if(rdman->gen_geos) | |
145 free(rdman->gen_geos); | |
145 } | 146 } |
146 | 147 |
147 | 148 |
148 #define ASSERT(x) | 149 #define ASSERT(x) |
149 /* | 150 /* |
708 rdman->n_dirty_areas = 0; | 709 rdman->n_dirty_areas = 0; |
709 | 710 |
710 return OK; | 711 return OK; |
711 } | 712 } |
712 | 713 |
714 int rdman_force_clean(redraw_man_t *rdman) { | |
715 int r; | |
716 | |
717 r = clean_rdman_dirties(rdman); | |
718 | |
719 return r; | |
720 } | |
721 | |
713 shnode_t *shnode_new(redraw_man_t *rdman, shape_t *shape) { | 722 shnode_t *shnode_new(redraw_man_t *rdman, shape_t *shape) { |
714 shnode_t *node; | 723 shnode_t *node; |
715 | 724 |
716 node = (shnode_t *)elmpool_elm_alloc(rdman->shnode_pool); | 725 node = (shnode_t *)elmpool_elm_alloc(rdman->shnode_pool); |
717 if(node) { | 726 if(node) { |