comparison nodejs/shapes.cc @ 1053:df6ee4568ca2

Rename X_njs_MB_* to njs_mb_* for nodejs plugin.
author Thinker K.F. Li <thinker@codemud.net>
date Wed, 24 Nov 2010 15:44:28 +0800
parents 2b492008ce26
children
comparison
equal deleted inserted replaced
1052:1f93f38688c2 1053:df6ee4568ca2
280 shape_t * 280 shape_t *
281 xnjsmb_path_new(njs_runtime_t *rt, const char *d) { 281 xnjsmb_path_new(njs_runtime_t *rt, const char *d) {
282 redraw_man_t *rdman; 282 redraw_man_t *rdman;
283 shape_t *sh; 283 shape_t *sh;
284 284
285 rdman = X_njs_MB_rdman(rt); 285 rdman = njs_mb_rdman(rt);
286 sh = rdman_shape_path_new(rdman, d); 286 sh = rdman_shape_path_new(rdman, d);
287 /* Code generator supposes that callee should free the memory */ 287 /* Code generator supposes that callee should free the memory */
288 free((void *)d); 288 free((void *)d);
289 289
290 return sh; 290 return sh;
293 shape_t * 293 shape_t *
294 xnjsmb_stext_new(njs_runtime_t *rt, const char *txt, float x, float y) { 294 xnjsmb_stext_new(njs_runtime_t *rt, const char *txt, float x, float y) {
295 redraw_man_t *rdman; 295 redraw_man_t *rdman;
296 shape_t *sh; 296 shape_t *sh;
297 297
298 rdman = X_njs_MB_rdman(rt); 298 rdman = njs_mb_rdman(rt);
299 sh = rdman_shape_stext_new(rdman, txt, x, y); 299 sh = rdman_shape_stext_new(rdman, txt, x, y);
300 /* Code generator supposes that callee should free the memory */ 300 /* Code generator supposes that callee should free the memory */
301 free((void *)txt); 301 free((void *)txt);
302 302
303 return sh; 303 return sh;
306 shape_t * 306 shape_t *
307 xnjsmb_image_new(njs_runtime_t *rt, float x, float y, float w, float h) { 307 xnjsmb_image_new(njs_runtime_t *rt, float x, float y, float w, float h) {
308 redraw_man_t *rdman; 308 redraw_man_t *rdman;
309 shape_t *sh; 309 shape_t *sh;
310 310
311 rdman = X_njs_MB_rdman(rt); 311 rdman = njs_mb_rdman(rt);
312 sh = rdman_shape_image_new(rdman, x, y, w, h); 312 sh = rdman_shape_image_new(rdman, x, y, w, h);
313 313
314 return sh; 314 return sh;
315 } 315 }
316 316
318 xnjsmb_rect_new(njs_runtime_t *rt, float x, float y, float w, float h, 318 xnjsmb_rect_new(njs_runtime_t *rt, float x, float y, float w, float h,
319 float rx, float ry, const char **err) { 319 float rx, float ry, const char **err) {
320 redraw_man_t *rdman; 320 redraw_man_t *rdman;
321 shape_t *sh; 321 shape_t *sh;
322 322
323 rdman = X_njs_MB_rdman(rt); 323 rdman = njs_mb_rdman(rt);
324 sh = rdman_shape_rect_new(rdman, x, y, w, h, rx, ry); 324 sh = rdman_shape_rect_new(rdman, x, y, w, h, rx, ry);
325 if(sh == NULL) { 325 if(sh == NULL) {
326 *err = "Can not create a sh_rect_t"; 326 *err = "Can not create a sh_rect_t";
327 return NULL; 327 return NULL;
328 } 328 }