view nodejs/shapes.m4 @ 1248:2f9fa5d59e67

Add data_monitor meta-class to monitor accessing on domview_ui. - The monitoring is to prevent from reentry triggered by DOM events. - call 'do*' methods of a monitored class would try to lock domview_ui at first. - The method would not be executed actually if being fault to lock. - You can make monitor to print debug message with environment variable - DATA_MONITOR_DBG=1, or - DATA_MONITOR_DBG=2
author Thinker K.F. Li <thinker@codemud.net>
date Tue, 11 Jan 2011 10:04:14 +0800
parents 2b492008ce26
children
line wrap: on
line source

define([PROJ_PREFIX], [xnjsmb_auto_])dnl
dnl
STRUCT([shape], [shape_t],
       [ACCESSOR([stroke_width],
		 [xnjsmb_shape_stroke_width_get],
		 [xnjsmb_shape_stroke_width_set])],
       [METHOD([show], [xnjsmb_shape_show], (SELF), 0, []),
        METHOD([hide], [xnjsmb_shape_hide], (SELF), 0, []),
	METHOD([remove], [xnjsmb_shape_remove], (SELF), 0, [])])

STRUCT([path], [shape_t], [], [],
       (([INHERIT], [shape]), ([STMOD], [xnjsmb_shape_mod])))

STRUCT([stext], [shape_t], [],
       [METHOD([set_text], [xnjsmb_sh_stext_set_text],
       			    (SELF, STR([txt])), 1, []),
        METHOD([set_style], [xnjsmb_sh_stext_set_style],
	       (SELF, ARRAY([blks]), ERR), 1, [])],
       (([INHERIT], [shape]), ([STMOD], [xnjsmb_shape_mod])))

STRUCT([image], [shape_t], [], [],
       (([INHERIT], [shape]), ([STMOD], [xnjsmb_shape_mod])))

STRUCT([rect], [shape_t], [],
       [METHOD([set], [xnjsmb_sh_rect_set],
	       (SELF, NUMBER(x), NUMBER(y), NUMBER(w), NUMBER(h),
	        NUMBER(rx), NUMBER(ry)), 6, [])],
       (([INHERIT], [shape]), ([STMOD], [xnjsmb_shape_mod])))