From: Changgyu Choi Date: Thu, 7 Sep 2023 04:57:38 +0000 (+0900) Subject: Modify widget_app event function X-Git-Tag: accepted/tizen/unified/20230908.083301~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9014f2f8b96dc55a8ee5cb9309e6d94a4325da86;p=platform%2Fcore%2Fappfw%2Fappcore-widget.git Modify widget_app event function To support timezone changed event, this patch modifies these functions. Change-Id: I8a0e0ae88c0303e5368361498517679ed58650e7 Signed-off-by: Changgyu Choi --- 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)