comparison tools/mb_c_source.m4 @ 78:3645e29e4986

Add runtime for Xlib.
author Thinker K.F. Li <thinker@branda.to>
date Wed, 20 Aug 2008 23:33:04 +0800
parents 9ab15ebc9061
children e548221c04eb
comparison
equal deleted inserted replaced
77:a6763f080da5 78:3645e29e4986
30 define([DECLARE_VARS], [divert([-1]) 30 define([DECLARE_VARS], [divert([-1])
31 define([DIMPORT],[IMPORT(]QUOTE($[]1)[,[D_])]) 31 define([DIMPORT],[IMPORT(]QUOTE($[]1)[,[D_])])
32 DIMPORT([ADD_LINEAR_PAINT]) 32 DIMPORT([ADD_LINEAR_PAINT])
33 DIMPORT([ADD_RADIAL_PAINT]) 33 DIMPORT([ADD_RADIAL_PAINT])
34 DIMPORT([COLOR_STOP]) 34 DIMPORT([COLOR_STOP])
35 define([REF_STOPS]) 35 define([REF_STOPS_RADIAL])
36 define([REF_STOPS_LINEAR])
36 define([ADD_PATH]) 37 define([ADD_PATH])
37 define([ADD_RECT]) 38 define([ADD_RECT])
38 define([ADD_COORD]) 39 define([ADD_COORD])
39 define([FILL_SHAPE]) 40 define([FILL_SHAPE])
40 define([STROKE_SHAPE]) 41 define([STROKE_SHAPE])
59 paint_radial_stops(obj->$1, n_$1_stops, stops); 60 paint_radial_stops(obj->$1, n_$1_stops, stops);
60 ])dnl 61 ])dnl
61 ]) 62 ])
62 63
63 define([S_COLOR_STOP],[]) 64 define([S_COLOR_STOP],[])
64 define([S_REF_STOPS],[dnl 65
66 define([S_REF_STOPS_RADIAL],[dnl
65 [ stops = (grad_stop_t *)malloc(sizeof(grad_stop_t) * n_$2_stops); 67 [ stops = (grad_stop_t *)malloc(sizeof(grad_stop_t) * n_$2_stops);
66 memcpy(stops, $2_stops, sizeof(grad_stop_t) * n_$2_stops); 68 memcpy(stops, $2_stops, sizeof(grad_stop_t) * n_$2_stops);
67 paint_radial_stops(obj->$1, n_$2_stops, stops); 69 paint_radial_stops(obj->$1, n_$2_stops, stops);
70 ]])
71
72 define([S_REF_STOPS_LINEAR],[dnl
73 [ stops = (grad_stop_t *)malloc(sizeof(grad_stop_t) * n_$2_stops);
74 memcpy(stops, $2_stops, sizeof(grad_stop_t) * n_$2_stops);
75 paint_linear_stops(obj->$1, n_$2_stops, stops);
68 ]]) 76 ]])
69 77
70 define([S_ADD_RECT],[[ 78 define([S_ADD_RECT],[[
71 obj->$1 = sh_rect_new($2, $3, $4, $5, 0, 0); 79 obj->$1 = sh_rect_new($2, $3, $4, $5, 0, 0);
72 rdman_add_shape(rdman, obj->$1, obj->$6); 80 rdman_add_shape(rdman, obj->$1, obj->$6);
102 define([SETUP_VARS],[divert([-1]) 110 define([SETUP_VARS],[divert([-1])
103 define([SIMPORT],[IMPORT(]QUOTE($[]1)[,[S_])]) 111 define([SIMPORT],[IMPORT(]QUOTE($[]1)[,[S_])])
104 SIMPORT([ADD_LINEAR_PAINT]) 112 SIMPORT([ADD_LINEAR_PAINT])
105 SIMPORT([ADD_RADIAL_PAINT]) 113 SIMPORT([ADD_RADIAL_PAINT])
106 SIMPORT([COLOR_STOP]) 114 SIMPORT([COLOR_STOP])
107 SIMPORT([REF_STOPS]) 115 SIMPORT([REF_STOPS_RADIAL])
116 SIMPORT([REF_STOPS_LINEAR])
108 SIMPORT([ADD_PATH],) 117 SIMPORT([ADD_PATH],)
109 SIMPORT([ADD_RECT]) 118 SIMPORT([ADD_RECT])
110 SIMPORT([ADD_COORD]) 119 SIMPORT([ADD_COORD])
111 SIMPORT([FILL_SHAPE]) 120 SIMPORT([FILL_SHAPE])
112 SIMPORT([STROKE_SHAPE]) 121 SIMPORT([STROKE_SHAPE])
145 define([CLEAR_VARS],[divert([-1]) 154 define([CLEAR_VARS],[divert([-1])
146 define([FIMPORT],[IMPORT(]QUOTE($[]1)[,[F_])]) 155 define([FIMPORT],[IMPORT(]QUOTE($[]1)[,[F_])])
147 FIMPORT([ADD_LINEAR_PAINT]) 156 FIMPORT([ADD_LINEAR_PAINT])
148 FIMPORT([ADD_RADIAL_PAINT]) 157 FIMPORT([ADD_RADIAL_PAINT])
149 define([COLOR_STOP]) 158 define([COLOR_STOP])
150 define([REF_STOPS]) 159 define([REF_STOPS_RADIAL])
160 define([REF_STOPS_LINEAR])
151 FIMPORT([ADD_PATH],) 161 FIMPORT([ADD_PATH],)
152 FIMPORT([ADD_RECT]) 162 FIMPORT([ADD_RECT])
153 define([ADD_COORD]) 163 define([ADD_COORD])
154 FIMPORT([FILL_SHAPE]) 164 FIMPORT([FILL_SHAPE])
155 FIMPORT([STROKE_SHAPE]) 165 FIMPORT([STROKE_SHAPE])