summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-18 00:29:02 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-23 11:16:45 +0900
commit5cfd6988946dbfe84d348653c1fdcbe3356d50a4 (patch)
tree50833a376a9a1f5e171e282a2624f81c3edc2557 /src/lib/elementary/efl_ui_win.c
parente9dffa723d82ffd4a4538df1d87232963cd8316f (diff)
win: Remove types socket and fake from EO
Fake: This should never have had the fake_canvas_set API. It already can not work after efl_finalize. And Ecore_Evas isn't part of EO API so it doesn't make sense at this point to try to expose the fake window as part of EO API. Socket: This is the only type of window that implements socket_listen. So we can just move this function to a new subclass. NOTE: Socket & plug are currently broken, even in 1.20 (at least for me)! Ref T5322
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/efl_ui_win.c59
1 files changed, 31 insertions, 28 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 59e3c9207c..87cbbbe014 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -6486,18 +6486,6 @@ _efl_ui_win_stack_pop_to(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd)
6486 // win32/osx ? 6486 // win32/osx ?
6487} 6487}
6488 6488
6489EOLIAN static Eina_Bool
6490_efl_ui_win_socket_listen(Eo *obj EINA_UNUSED, Efl_Ui_Win_Data *sd, const char *svcname, int svcnum, Eina_Bool svcsys)
6491{
6492 if (!sd->ee) return EINA_FALSE;
6493 if (sd->type != EFL_UI_WIN_SOCKET_IMAGE) return EINA_FALSE;
6494
6495 if (!ecore_evas_extn_socket_listen(sd->ee, svcname, svcnum, svcsys))
6496 return EINA_FALSE;
6497
6498 return EINA_TRUE;
6499}
6500
6501EAPI Eina_Bool 6489EAPI Eina_Bool
6502elm_win_trap_set(const Elm_Win_Trap *t) 6490elm_win_trap_set(const Elm_Win_Trap *t)
6503{ 6491{
@@ -7901,16 +7889,6 @@ elm_win_window_id_get(const Evas_Object *obj)
7901 return _elm_win_window_id_get(sd); 7889 return _elm_win_window_id_get(sd);
7902} 7890}
7903 7891
7904EAPI void
7905elm_win_fake_canvas_set(Evas_Object *obj, Ecore_Evas *oee)
7906{
7907 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
7908 if (!sd) return;
7909
7910 sd->ee = oee;
7911 _elm_win_need_frame_adjust(sd, ecore_evas_engine_name_get(oee));
7912}
7913
7914EAPI Evas_Object * 7892EAPI Evas_Object *
7915elm_win_main_menu_get(Evas_Object *obj) 7893elm_win_main_menu_get(Evas_Object *obj)
7916{ 7894{
@@ -7963,17 +7941,29 @@ elm_win_aspect_get(const Eo *obj)
7963 7941
7964/* legacy APIs */ 7942/* legacy APIs */
7965 7943
7944static void
7945_fake_canvas_set(Evas_Object *obj, Ecore_Evas *oee)
7946{
7947 Efl_Ui_Win_Data *sd = efl_data_scope_safe_get(obj, MY_CLASS);
7948 if (!sd) return;
7949
7950 sd->ee = oee;
7951 _elm_win_need_frame_adjust(sd, ecore_evas_engine_name_get(oee));
7952}
7953
7966EAPI Evas_Object * 7954EAPI Evas_Object *
7967elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type) 7955elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
7968{ 7956{
7969 if (type == ELM_WIN_INLINED_IMAGE) 7957 const Efl_Class *klass = MY_CLASS;
7958
7959 switch ((int) type)
7970 { 7960 {
7971 return efl_add(EFL_UI_WIN_INLINED_CLASS, parent, 7961 case ELM_WIN_INLINED_IMAGE: klass = EFL_UI_WIN_INLINED_CLASS; break;
7972 efl_canvas_object_legacy_ctor(efl_added), 7962 case ELM_WIN_SOCKET_IMAGE: klass = EFL_UI_WIN_SOCKET_CLASS; break;
7973 efl_ui_win_name_set(efl_added, name)); 7963 default: break;
7974 } 7964 }
7975 7965
7976 return efl_add(MY_CLASS, parent, 7966 return efl_add(klass, parent,
7977 efl_canvas_object_legacy_ctor(efl_added), 7967 efl_canvas_object_legacy_ctor(efl_added),
7978 efl_ui_win_name_set(efl_added, name), 7968 efl_ui_win_name_set(efl_added, name),
7979 efl_ui_win_type_set(efl_added, type)); 7969 efl_ui_win_type_set(efl_added, type));
@@ -7984,7 +7974,7 @@ elm_win_fake_add(Ecore_Evas *ee)
7984{ 7974{
7985 return efl_add(MY_CLASS, NULL, 7975 return efl_add(MY_CLASS, NULL,
7986 efl_canvas_object_legacy_ctor(efl_added), 7976 efl_canvas_object_legacy_ctor(efl_added),
7987 elm_win_fake_canvas_set(efl_added, ee), 7977 _fake_canvas_set(efl_added, ee),
7988 efl_ui_win_name_set(efl_added, NULL), 7978 efl_ui_win_name_set(efl_added, NULL),
7989 efl_ui_win_type_set(efl_added, ELM_WIN_FAKE)); 7979 efl_ui_win_type_set(efl_added, ELM_WIN_FAKE));
7990} 7980}
@@ -8169,7 +8159,20 @@ elm_win_keygrab_unset(Elm_Win *obj, const char *key,
8169 EFL_INPUT_MODIFIER_NONE); 8159 EFL_INPUT_MODIFIER_NONE);
8170} 8160}
8171 8161
8162EAPI Eina_Bool
8163elm_win_socket_listen(Efl_Ui_Win *obj, const char *svcname, int svcnum, Eina_Bool svcsys)
8164{
8165 return efl_ui_win_socket_listen(obj, svcname, svcnum, svcsys);
8166}
8167
8172// deprecated 8168// deprecated
8169
8170EAPI void
8171elm_win_fake_canvas_set(Evas_Object *obj EINA_UNUSED, Ecore_Evas *oee EINA_UNUSED)
8172{
8173 ERR("Calling deprecrated function '%s'", __FUNCTION__);
8174}
8175
8173EAPI void 8176EAPI void
8174elm_win_name_set(Evas_Object *obj, const char *name) 8177elm_win_name_set(Evas_Object *obj, const char *name)
8175{ 8178{