comparison src/event.c @ 408:7f7855df2af0

Make unittest built by automake and autoconf. ./configure --enable-testcase to build testcase.
author Thinker K.F. Li <thinker@branda.to>
date Tue, 07 Jul 2009 22:46:19 +0800
parents 6c350fc92ae3
children 1ee11bab38fa
comparison
equal deleted inserted replaced
407:92a459a1c5aa 408:7f7855df2af0
114 do { \ 114 do { \
115 if((a) < (s)) { \ 115 if((a) < (s)) { \
116 (w) += (s) - (a); \ 116 (w) += (s) - (a); \
117 (s) = (a); \ 117 (s) = (a); \
118 } else { \ 118 } else { \
119 (w) = MAX(w, (a) - (s) + 1); \ 119 (w) = MB_MAX(w, (a) - (s) + 1); \
120 } \ 120 } \
121 } while(0) 121 } while(0)
122 122
123 static 123 static
124 void area_extent(area_t *area, co_aix x, co_aix y) { 124 void area_extent(area_t *area, co_aix x, co_aix y) {
153 enum { MBO_DUMMY, 153 enum { MBO_DUMMY,
154 MBO_COORD, 154 MBO_COORD,
155 MBO_SHAPES=0x1000, 155 MBO_SHAPES=0x1000,
156 MBO_PATH, 156 MBO_PATH,
157 MBO_TEXT, 157 MBO_TEXT,
158 MBO_RECT 158 MBO_RECT,
159 MBO_IMAGE
159 }; 160 };
160 #define MBO_TYPE(x) (((mb_obj_t *)(x))->obj_type) 161 #define MBO_TYPE(x) (((mb_obj_t *)(x))->obj_type)
161 #define IS_MBO_SHAPES(x) (((mb_obj_t *)(x))->obj_type & MBO_SHAPES) 162 #define IS_MBO_SHAPES(x) (((mb_obj_t *)(x))->obj_type & MBO_SHAPES)
162 #define sh_get_geo(x) ((x)->geo) 163 #define sh_get_geo(x) ((x)->geo)
163 static int sh_pos_is_in(shape_t *shape, co_aix x, co_aix y) { 164 static int sh_pos_is_in(shape_t *shape, co_aix x, co_aix y) {