add widget_dispatch_simple_event

This commit is contained in:
lixianjing 2020-01-07 11:36:15 +08:00
parent da9ae82a78
commit c4d1963a9c
2 changed files with 8 additions and 0 deletions

View File

@ -3888,3 +3888,10 @@ bitmap_t* widget_take_snapshot(widget_t* widget) {
return bitmap;
}
#endif /*WITH_NANOVG_GPU*/
ret_t widget_dispatch_simple_event(widget_t* widget, uint32_t type) {
event_t e = event_init(type, widget);
return_value_if_fail(widget != NULL, RET_BAD_PARAMS);
return widget_dispatch(widget, &e);
}

View File

@ -2252,6 +2252,7 @@ ret_t widget_focus_up(widget_t* widget);
ret_t widget_focus_down(widget_t* widget);
ret_t widget_focus_left(widget_t* widget);
ret_t widget_focus_right(widget_t* widget);
ret_t widget_dispatch_simple_event(widget_t* widget, uint32_t type);
ret_t widget_set_focused_internal(widget_t* widget, bool_t focused);