diff options
author | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-25 11:29:24 +0900 |
---|---|---|
committer | Jean-Philippe Andre <jp.andre@samsung.com> | 2017-09-25 11:30:28 +0900 |
commit | 2e36535190905e38e51133d2d710a71005200c4c (patch) | |
tree | 03702abfe7f4b503a0d06c0a4d030ab657b57707 | |
parent | f76569a8b137a51901b21c4f91cb06cf4d09f41a (diff) |
inwin: Fix inwin (default content set/get/unset)
Thanks @JackDanielZ for the report!
This makes efl_content_set/get/unset APIs work on the inwin, even though
this is a legacy-only widget (at least right now).
Diffstat (limited to '')
-rw-r--r-- | src/lib/elementary/elm_inwin.c | 24 | ||||
-rw-r--r-- | src/lib/elementary/elm_inwin.eo | 4 |
2 files changed, 25 insertions, 3 deletions
diff --git a/src/lib/elementary/elm_inwin.c b/src/lib/elementary/elm_inwin.c index 67cea5f87d..82a134643c 100644 --- a/src/lib/elementary/elm_inwin.c +++ b/src/lib/elementary/elm_inwin.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include "elm_inwin.eo.h" | 12 | #include "elm_inwin.eo.h" |
13 | #include "elm_widget_inwin.h" | 13 | #include "elm_widget_inwin.h" |
14 | #include "elm_widget_layout.h" | 14 | #include "elm_widget_layout.h" |
15 | #include "elm_part_helper.h" | ||
15 | 16 | ||
16 | #define MY_CLASS ELM_INWIN_CLASS | 17 | #define MY_CLASS ELM_INWIN_CLASS |
17 | #define MY_CLASS_PFX elm_inwin | 18 | #define MY_CLASS_PFX elm_inwin |
@@ -188,6 +189,23 @@ _elm_inwin_efl_ui_focus_manager_move(Eo *obj, Elm_Inwin_Data *pd, Efl_Ui_Focus_D | |||
188 | return efl_ui_focus_manager_focus_get(obj); | 189 | return efl_ui_focus_manager_focus_get(obj); |
189 | } | 190 | } |
190 | 191 | ||
192 | EOLIAN static Eina_Bool | ||
193 | _elm_inwin_efl_container_content_set(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED, Efl_Gfx *content) | ||
194 | { | ||
195 | return efl_content_set(efl_part(obj, "default"), content); | ||
196 | } | ||
197 | |||
198 | EOLIAN static Efl_Gfx * | ||
199 | _elm_inwin_efl_container_content_get(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED) | ||
200 | { | ||
201 | return efl_content_get(efl_part(obj, "default")); | ||
202 | } | ||
203 | |||
204 | EOLIAN static Efl_Gfx * | ||
205 | _elm_inwin_efl_container_content_unset(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED) | ||
206 | { | ||
207 | return efl_content_unset(efl_part(obj, "default")); | ||
208 | } | ||
191 | 209 | ||
192 | EAPI void | 210 | EAPI void |
193 | elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) | 211 | elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content) |
@@ -218,11 +236,13 @@ _elm_inwin_class_constructor(Efl_Class *klass) | |||
218 | 236 | ||
219 | /* Internal EO APIs and hidden overrides */ | 237 | /* Internal EO APIs and hidden overrides */ |
220 | 238 | ||
221 | ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(MY_CLASS_PFX) | 239 | ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(elm_inwin) |
240 | ELM_PART_CONTENT_DEFAULT_SET(elm_inwin, "default") | ||
222 | 241 | ||
223 | #define ELM_INWIN_EXTRA_OPS \ | 242 | #define ELM_INWIN_EXTRA_OPS \ |
224 | EFL_CANVAS_GROUP_ADD_OPS(elm_inwin), \ | 243 | EFL_CANVAS_GROUP_ADD_OPS(elm_inwin), \ |
225 | ELM_LAYOUT_SIZING_EVAL_OPS(elm_inwin), \ | 244 | ELM_LAYOUT_SIZING_EVAL_OPS(elm_inwin), \ |
226 | ELM_LAYOUT_CONTENT_ALIASES_OPS(MY_CLASS_PFX) | 245 | ELM_LAYOUT_CONTENT_ALIASES_OPS(elm_inwin), \ |
246 | ELM_PART_CONTENT_DEFAULT_OPS(elm_inwin) | ||
227 | 247 | ||
228 | #include "elm_inwin.eo.c" | 248 | #include "elm_inwin.eo.c" |
diff --git a/src/lib/elementary/elm_inwin.eo b/src/lib/elementary/elm_inwin.eo index 52fcd2c1c6..5c1eeba409 100644 --- a/src/lib/elementary/elm_inwin.eo +++ b/src/lib/elementary/elm_inwin.eo | |||
@@ -1,4 +1,4 @@ | |||
1 | class Elm.Inwin (Efl.Ui.Layout, Efl.Ui.Focus.Manager) | 1 | class Elm.Inwin (Efl.Ui.Layout, Efl.Ui.Focus.Manager, Efl.Container) |
2 | { | 2 | { |
3 | [[Elementary inwin class]] | 3 | [[Elementary inwin class]] |
4 | legacy_prefix: elm_inwin; | 4 | legacy_prefix: elm_inwin; |
@@ -27,5 +27,7 @@ class Elm.Inwin (Efl.Ui.Layout, Efl.Ui.Focus.Manager) | |||
27 | Elm.Widget.focus_manager_create; | 27 | Elm.Widget.focus_manager_create; |
28 | Efl.Gfx.visible { set; } | 28 | Efl.Gfx.visible { set; } |
29 | Efl.Ui.Focus.Manager.move; | 29 | Efl.Ui.Focus.Manager.move; |
30 | Efl.Container.content { get; set; } | ||
31 | Efl.Container.content_unset; | ||
30 | } | 32 | } |
31 | } | 33 | } |