From 9014f2f8b96dc55a8ee5cb9309e6d94a4325da86 Mon Sep 17 00:00:00 2001 From: Changgyu Choi Date: Thu, 7 Sep 2023 13:57:38 +0900 Subject: [PATCH] Modify widget_app event function To support timezone changed event, this patch modifies these functions. Change-Id: I8a0e0ae88c0303e5368361498517679ed58650e7 Signed-off-by: Changgyu Choi --- src/efl_base/widget_app.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/efl_base/widget_app.cc b/src/efl_base/widget_app.cc index 11da6d1..c35a6a1 100644 --- a/src/efl_base/widget_app.cc +++ b/src/efl_base/widget_app.cc @@ -40,7 +40,7 @@ namespace { constexpr const int kIconifyTimeout = 500; constexpr const char kFeatureShellAppWidget[] = "http://tizen.org/feature/shell.appwidget"; -constexpr int APP_EVENT_MAX = 7; +constexpr int APP_EVENT_MAX = static_cast(IAppCore::IEvent::Type::END); constexpr IAppCore::IEvent::Type __app_event_converter[APP_EVENT_MAX] = { [APP_EVENT_LOW_MEMORY] = IAppCore::IEvent::Type::LOW_MEMORY, [APP_EVENT_LOW_BATTERY] = IAppCore::IEvent::Type::LOW_BATTERY, @@ -50,6 +50,8 @@ constexpr IAppCore::IEvent::Type __app_event_converter[APP_EVENT_MAX] = { [APP_EVENT_REGION_FORMAT_CHANGED] = IAppCore::IEvent::Type::REGION_CHANGE, [APP_EVENT_SUSPENDED_STATE_CHANGED] = IAppCore::IEvent::Type::SUSPENDED_STATE_CHANGE, + [APP_EVENT_UPDATE_REQUESTED] = IAppCore::IEvent::Type::UPDATE_REQUESTED, + [APP_EVENT_TIME_ZONE_CHANGED] = IAppCore::IEvent::Type::TIME_ZONE_CHANGED, }; class AppWidget : public WidgetBase { @@ -384,7 +386,7 @@ API int widget_app_add_event_handler(app_event_handler_h* event_handler, return WIDGET_ERROR_INVALID_PARAMETER; if (event_type < APP_EVENT_LOW_MEMORY || - event_type > APP_EVENT_REGION_FORMAT_CHANGED) + event_type > APP_EVENT_TIME_ZONE_CHANGED) return WIDGET_ERROR_INVALID_PARAMETER; if (event_type == APP_EVENT_DEVICE_ORIENTATION_CHANGED) -- 2.7.4