mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-12-26 09:08:25 +00:00
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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user