Mercurial > MadButterfly
annotate tools/mb_c_header.m4 @ 67:3f2872a1a2fe
clear objects in *_free() for generated code
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 13 Aug 2008 08:05:50 +0800 |
parents | c668c5c3ceae |
children | a6150b4e0667 |
rev | line source |
---|---|
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
1 changequote(`[', `]')dnl |
63 | 2 divert([-1]) |
3 | |
4 define([ADD_LINEAR_PAINT],[[ | |
5 paint_t *$1; | |
6 ]]) | |
7 | |
8 define([ADD_RADIAL_PAINT],[[ | |
9 paint_t *$1; | |
10 ]]) | |
11 define([ADD_PATH],[ | |
12 [ shape_t *$1; | |
13 ]]) | |
14 define([ADD_RECT],[ | |
15 [ shape_t *$1; | |
16 ]]) | |
17 define([ADD_COORD],[ | |
18 [ coord_t *$1; | |
19 ]]) | |
20 define([COLOR_STOP],[ ]) | |
21 | |
22 define([REF_STOPS],) | |
64 | 23 define([FILL_SHAPE],[[ |
24 paint_t *$1_fill; | |
25 ]]) | |
26 define([STROKE_SHAPE],[[ | |
27 paint_t *$1_stroke; | |
28 ]]) | |
63 | 29 define([FILL_SHAPE_WITH_PAINT],) |
30 define([STROKE_SHAPE_WITH_PAINT],) | |
31 | |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
32 define([MADBUTTERFLY],[dnl |
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
33 [#ifndef __$1_H_ |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
34 #define __$1_H_ |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
35 |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
36 typedef struct $1 $1_t; |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
37 |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
38 struct $1 { |
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
39 coord_t *root_coord;] |
63 | 40 $2[]dnl |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
41 [}; |
62
7d976d925431
Generate C header files for SVG files.
Thinker K.F. Li <thinker@branda.to>
parents:
diff
changeset
|
42 |
67
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
43 extern $1_t *$1_new(redraw_mant_t *rdman); |
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
44 extern void $1_free($1_t *obj); |
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
45 |
3f2872a1a2fe
clear objects in *_free() for generated code
Thinker K.F. Li <thinker@branda.to>
parents:
64
diff
changeset
|
46 #endif /* __$1_H_ */] |
63 | 47 ]) |
48 divert[]dnl |