Modify widget_app event function 45/298445/1
authorChanggyu Choi <changyu.choi@samsung.com>
Thu, 7 Sep 2023 04:57:38 +0000 (13:57 +0900)
committerChanggyu Choi <changyu.choi@samsung.com>
Thu, 7 Sep 2023 04:57:38 +0000 (13:57 +0900)
To support timezone changed event, this patch modifies these functions.

Change-Id: I8a0e0ae88c0303e5368361498517679ed58650e7
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
src/efl_base/widget_app.cc

index 11da6d1..c35a6a1 100644 (file)
@@ -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<int>(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)