rt_bool_t rtgui_staticline_event_handler(struct rtgui_widget* widget, struct rtgui_event* event) { struct rtgui_staticline* staticline; RT_ASSERT(widget != RT_NULL); staticline = (struct rtgui_staticline*) widget; switch (event->type) { case RTGUI_EVENT_PAINT: #ifndef RTGUI_USING_SMALL_SIZE if (widget->on_draw != RT_NULL) widget->on_draw(widget, event); else #endif rtgui_theme_draw_staticline(staticline); break; } return RT_FALSE; }
rt_bool_t rtgui_staticline_event_handler(struct rtgui_object* object, struct rtgui_event* event) { struct rtgui_staticline* staticline; RTGUI_WIDGET_EVENT_HANDLER_PREPARE staticline = RTGUI_STATICLINE(object); switch (event->type) { case RTGUI_EVENT_PAINT: #ifndef RTGUI_USING_SMALL_SIZE if (widget->on_draw != RT_NULL) widget->on_draw(RTGUI_OBJECT(widget), event); else #endif rtgui_theme_draw_staticline(staticline); break; default: return rtgui_widget_event_handler(object, event); } return RT_FALSE; }