From f2efb7fc0d2b8d9242d1a74663d53a0fc58d362b Mon Sep 17 00:00:00 2001 From: subhransu mohanty Date: Wed, 24 Jul 2019 18:37:35 +0900 Subject: [PATCH] move tizen specific structure to its own header don't polute the common header and then put work around to fixit. just create a new header and use it instead. Change-Id: I651fac5d3f5dbf13a5d8d5b76ab177d9e55d6bb4 --- src/lib/elementary/elm_entry.c | 2 +- src/lib/elementary/elm_module_tizen_helper.h | 61 ++++++++++++++++++++++ .../elementary/copypasteUI_ctxpopup/cbhm_helper.h | 2 +- 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 src/lib/elementary/elm_module_tizen_helper.h diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c index c299012..8ee73f9 100644 --- a/src/lib/elementary/elm_entry.c +++ b/src/lib/elementary/elm_entry.c @@ -23,7 +23,7 @@ /************************************************************* * TIZEN_ONLY_FEATURE : Tizen Copy & Paste feature with CBHM * *************************************************************/ -#include "elm_module_helper.h" +#include "elm_module_tizen_helper.h" /******* * END * *******/ diff --git a/src/lib/elementary/elm_module_tizen_helper.h b/src/lib/elementary/elm_module_tizen_helper.h new file mode 100644 index 0000000..f43fb6b --- /dev/null +++ b/src/lib/elementary/elm_module_tizen_helper.h @@ -0,0 +1,61 @@ +#ifndef ELM_MODULE_TIZEN_HELPER_H +#define ELM_MODULE_TIZEN_HELPER_H +// special header to share structure between entry and module + +typedef void (*cpfunc)(void *data, Evas_Object *obj, void *event_info); + +struct _Elm_Entry_Extension_data +{ + Evas_Object *popup; + Evas_Object *ent; + Evas_Object *caller; + Eina_Rectangle *viewport_rect; + Evas_Coord_Rectangle selection_rect; + Eina_List *items; + cpfunc select; + cpfunc copy; + cpfunc cut; + cpfunc paste; + cpfunc cancel; + cpfunc selectall; + cpfunc cnpinit; + cpfunc keep_selection; + cpfunc paste_translation; + cpfunc is_selected_all; + Elm_Config *_elm_config; + Eina_Bool password : 1; + Eina_Bool editable : 1; + Eina_Bool have_selection: 1; + Eina_Bool selmode : 1; + Eina_Bool context_menu : 1; + Elm_Cnp_Mode cnp_mode : 2; + Eina_Bool popup_showing : 1; + Eina_Bool mouse_up : 1; + Eina_Bool mouse_move : 1; + Eina_Bool mouse_down : 1; + Eina_Bool entry_move : 1; + Eina_Bool popup_clicked : 1; + Eina_Bool cursor_handler_shown : 1; + Eina_Bool ent_scroll : 1; + Evas_Object *ctx_par; + Evas_Object *start_handler; + Evas_Object *end_handler; + Evas_Object *cursor_handler; + Ecore_Timer *show_timer; + char *source_text; + char *target_text; +#ifdef HAVE_ELEMENTARY_WL2 + Eldbus_Proxy *cbhm_proxy; +#endif + /* For setting color class parent relation to copypaste popup */ + Evas_Object *entry_edje; + + /* For checking wearable profile */ + char profile_wear; +}; + +typedef struct _Elm_Entry_Extension_data Elm_Entry_Extension_data; + +void elm_entry_extension_module_data_get(Evas_Object *obj,Elm_Entry_Extension_data *ext_mod); + +#endif //ELM_MODULE_TIZEN_HELPER_H \ No newline at end of file diff --git a/src/modules/elementary/copypasteUI_ctxpopup/cbhm_helper.h b/src/modules/elementary/copypasteUI_ctxpopup/cbhm_helper.h index 18d13c4..ccb4949 100644 --- a/src/modules/elementary/copypasteUI_ctxpopup/cbhm_helper.h +++ b/src/modules/elementary/copypasteUI_ctxpopup/cbhm_helper.h @@ -8,7 +8,7 @@ #include #include #include "elm_priv.h" -#include "elm_module_helper.h" +#include "elm_module_tizen_helper.h" #ifdef HAVE_ELEMENTARY_X #include -- 2.7.4