use new object type implementation.

git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1402 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
bernard.xiong
2011-05-13 10:53:51 +00:00
parent 169c31fc4f
commit 8457439dc1
61 changed files with 282 additions and 655 deletions

View File

@@ -32,20 +32,11 @@ static void _rtgui_label_destructor(rtgui_label_t *label)
label->text = RT_NULL;
}
rtgui_type_t *rtgui_label_type_get(void)
{
static rtgui_type_t *label_type = RT_NULL;
if (!label_type)
{
label_type = rtgui_type_create("label", RTGUI_WIDGET_TYPE,
sizeof(rtgui_label_t),
RTGUI_CONSTRUCTOR(_rtgui_label_constructor),
RTGUI_DESTRUCTOR(_rtgui_label_destructor));
}
return label_type;
}
DEFINE_CLASS_TYPE(label, "label",
RTGUI_WIDGET_TYPE,
_rtgui_label_constructor,
_rtgui_label_destructor,
sizeof(struct rtgui_label));
rt_bool_t rtgui_label_event_handler(struct rtgui_widget* widget, struct rtgui_event* event)
{