Add refresh screen information event 08/281708/1
authorulgal-park <ulgal.park@samsung.com>
Tue, 20 Sep 2022 13:52:10 +0000 (22:52 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Wed, 21 Sep 2022 03:32:36 +0000 (12:32 +0900)
Change-Id: I122f38b076651d35cf6f0a64bf5a398b3e3fbc4e

src/mmimgr/mmi-common.c
src/mmimgr/mmi-common.h
src/mmimgr/mmi-manager.c
src/mmimgr/mmi-provider.c
src/mmimgr/output_modality/mmi_output_modality.cpp

index 4cde852..7238613 100644 (file)
@@ -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;
index d45094c..7d0d213 100644 (file)
@@ -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;
index 3e8820f..d7a370b 100644 (file)
@@ -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
index f7d45ac..01c165c 100644 (file)
@@ -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);
index 880d068..4377732 100644 (file)
 #include "TouchModule.h"
 #include "mmi-manager-dbg.h"
 #include "mmi_output_modality.h"
+#include <Ecore.h>
 
 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;
 }