From: ulgal-park Date: Tue, 20 Sep 2022 13:52:10 +0000 (+0900) Subject: Add refresh screen information event X-Git-Tag: accepted/tizen/unified/20220927.132354~13 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65b3c1e2564fb5a65ed2159717baed107a9c9a32;p=platform%2Fcore%2Fuifw%2Fmmi-manager.git Add refresh screen information event Change-Id: I122f38b076651d35cf6f0a64bf5a398b3e3fbc4e --- diff --git a/src/mmimgr/mmi-common.c b/src/mmimgr/mmi-common.c index 4cde852..7238613 100644 --- a/src/mmimgr/mmi-common.c +++ b/src/mmimgr/mmi-common.c @@ -35,3 +35,4 @@ MMI_API int MMI_PROVIDER_EVENT_VOICE_TOUCH = -1; MMI_API int MMI_VISION_EVENT_PROPAGATE = -1; MMI_API int MMI_VISION_EVENT_DROP = -1; MMI_API int MMI_VISION_EVENT_FINISH = -1; +MMI_API int MMI_EVENT_REFRESH_SCREEN_INFORM = -1; diff --git a/src/mmimgr/mmi-common.h b/src/mmimgr/mmi-common.h index d45094c..7d0d213 100644 --- a/src/mmimgr/mmi-common.h +++ b/src/mmimgr/mmi-common.h @@ -41,6 +41,7 @@ MMI_API extern int MMI_PROVIDER_EVENT_VOICE_TOUCH; MMI_API extern int MMI_VISION_EVENT_PROPAGATE; MMI_API extern int MMI_VISION_EVENT_DROP; MMI_API extern int MMI_VISION_EVENT_FINISH; +MMI_API extern int MMI_EVENT_REFRESH_SCREEN_INFORM; //TODO. not use mmi_vision_state, use mmi_event_vision_type typedef enum { @@ -290,6 +291,12 @@ typedef struct typedef struct { + double seconds; // refresh timer seconds value +} mmi_event_refresh_screen_inform; + + +typedef struct +{ int mode;// tooltip, grid int timestamp; const char *object_id; diff --git a/src/mmimgr/mmi-manager.c b/src/mmimgr/mmi-manager.c index 3e8820f..d7a370b 100644 --- a/src/mmimgr/mmi-manager.c +++ b/src/mmimgr/mmi-manager.c @@ -101,6 +101,7 @@ _flush_all_event_type() ecore_event_type_flush_internal(MMI_PROVIDER_EVENT_VISION); ecore_event_type_flush_internal(MMI_VISION_EVENT_PROPAGATE); ecore_event_type_flush_internal(MMI_VISION_EVENT_FINISH); + ecore_event_type_flush_internal(MMI_EVENT_REFRESH_SCREEN_INFORM); } void diff --git a/src/mmimgr/mmi-provider.c b/src/mmimgr/mmi-provider.c index f7d45ac..01c165c 100644 --- a/src/mmimgr/mmi-provider.c +++ b/src/mmimgr/mmi-provider.c @@ -265,6 +265,7 @@ _event_handler_init() MMI_VISION_EVENT_PROPAGATE = ecore_event_type_new(); MMI_VISION_EVENT_DROP = ecore_event_type_new(); MMI_VISION_EVENT_FINISH = ecore_event_type_new(); + MMI_EVENT_REFRESH_SCREEN_INFORM = ecore_event_type_new(); LOGD("MMI_PROVIDER_EVENT_KEY=%d\n", MMI_PROVIDER_EVENT_KEY); LOGD("MMI_PROVIDER_EVENT_GESTURE=%d\n", MMI_PROVIDER_EVENT_GESTURE); diff --git a/src/mmimgr/output_modality/mmi_output_modality.cpp b/src/mmimgr/output_modality/mmi_output_modality.cpp index 880d068..4377732 100644 --- a/src/mmimgr/output_modality/mmi_output_modality.cpp +++ b/src/mmimgr/output_modality/mmi_output_modality.cpp @@ -22,9 +22,16 @@ #include "TouchModule.h" #include "mmi-manager-dbg.h" #include "mmi_output_modality.h" +#include static TouchModule *g_touch_module = nullptr; +static void __refresh_screen_inform_event_free(void *data EINA_UNUSED, void *event) +{ + mmi_event_refresh_screen_inform *ev = (mmi_event_refresh_screen_inform *)event; + free(ev); +} + EXPORT_API void output_modality_initialize() { LOGD("initialize output modality"); @@ -53,9 +60,19 @@ EXPORT_API int output_modality_voice_touch(mmi_output_modality_voice_touch modal LOGD("voice touch by grid"); ret = g_touch_module->ClickByCoordinate(modality.coord_x, modality.coord_y); } else { + LOGE("mode(%d) is not supported", mode); return 0; } LOGD("voice touch done"); + mmi_event_refresh_screen_inform *ev = (mmi_event_refresh_screen_inform *)calloc(1, sizeof(mmi_event_refresh_screen_inform)); + if (ev == NULL) { + LOGE("mmi_event_refresh_screen_inform malloc failed"); + return -1; + } + + ev->seconds = 2.0; + ecore_event_add(MMI_EVENT_REFRESH_SCREEN_INFORM, ev, __refresh_screen_inform_event_free, NULL); + return ret; }