comparison tools/mb_c_source.m4 @ 130:3a4d6179e6a9

change mb_c_source.m4 and mb_c_header.m4 to specify parent for SVG object
author Thinker K.F. Li <thinker@branda.to>
date Tue, 16 Sep 2008 21:23:34 +0800
parents cf8ccf06e397
children 6ce68c1f7405
comparison
equal deleted inserted replaced
129:ba581d8a4b9b 130:3a4d6179e6a9
265 #include "mb/redraw_man.h" 265 #include "mb/redraw_man.h"
266 #include "mb/shapes.h" 266 #include "mb/shapes.h"
267 #include "mb/paint.h" 267 #include "mb/paint.h"
268 #include "$1.h" 268 #include "$1.h"
269 269
270 $1_t *$1_new(redraw_man_t *rdman) { 270 $1_t *$1_new(redraw_man_t *rdman, coord_t *parent_coord) {
271 $1_t *obj; 271 $1_t *obj;
272 grad_stop_t *stops = NULL;]DECLARE_VARS 272 grad_stop_t *stops = NULL;]DECLARE_VARS
273 $2[]dnl 273 $2[]dnl
274 [ 274 [
275 obj = ($1_t *)malloc(sizeof($1_t)); 275 obj = ($1_t *)malloc(sizeof($1_t));
276 if(obj == NULL) return NULL; 276 if(obj == NULL) return NULL;
277 ]SETUP_VARS 277 ]SETUP_VARS
278 obj->root_coord = rdman_coord_new(rdman, rdman->root_coord); 278 obj->root_coord = rdman_coord_new(rdman, parent_coord);
279 $2 279 $2
280 [ return obj; 280 [ return obj;
281 } 281 }
282 282
283 void $1_free($1_t *obj) { 283 void $1_free($1_t *obj) {