From 8f25e286e0c9d250e81362fb972a47e03a5c6419 Mon Sep 17 00:00:00 2001 From: lixianjing Date: Tue, 25 May 2021 10:38:41 +0800 Subject: [PATCH] add ui_feedback_deinit --- docs/changes.md | 3 +++ src/base/ui_feedback.c | 7 +++++++ src/base/ui_feedback.h | 10 ++++++++++ 3 files changed, 20 insertions(+) diff --git a/docs/changes.md b/docs/changes.md index 9c5d313b1..10e110902 100644 --- a/docs/changes.md +++ b/docs/changes.md @@ -1,5 +1,8 @@ # 最新动态 +2021/05/25 + * 增加ui\_feedback\_deinit。 + 2021/05/23 * style支持feedback/focusable。 diff --git a/src/base/ui_feedback.c b/src/base/ui_feedback.c index a359e3cff..1be782de7 100644 --- a/src/base/ui_feedback.c +++ b/src/base/ui_feedback.c @@ -40,3 +40,10 @@ ret_t ui_feedback_init(ui_on_feedback_t on_feedback, void* ctx) { return RET_OK; } + +ret_t ui_feedback_deinit(void) { + s_on_feedback = NULL; + s_on_feedback_ctx = NULL; + + return RET_OK; +} diff --git a/src/base/ui_feedback.h b/src/base/ui_feedback.h index a05f23a5a..ba04a9578 100644 --- a/src/base/ui_feedback.h +++ b/src/base/ui_feedback.h @@ -60,6 +60,16 @@ ret_t ui_feedback_request(widget_t* widget, event_t* evt); */ ret_t ui_feedback_init(ui_on_feedback_t on_feedback, void* ctx); +/** + * @method ui_feedback_deinit + * ~初始化。 + * + * @annotation ["static"] + * + * @return {ret_t} 返回RET_OK表示成功,否则表示失败。 + */ +ret_t ui_feedback_deinit(void); + END_C_DECLS #endif /*TK_UI_FEEDBACK_H*/