elm_inwin: use macro for content set/get/unset

Summary: also, content_aliases is not necessary. it can use Layout's content_aliases.

Test Plan:
elementary_test -to inwin
elementary_test -to inwin2
elementary_test -to inwin3

Reviewers: Jaehyun_Cho, woohyun

Subscribers: herb, cedric

Differential Revision: https://phab.enlightenment.org/D5860

Reviewed-by: Cedric Bail <cedric@osg.samsung.com>
This commit is contained in:
YeongJong Lee 2018-04-06 09:28:20 -07:00 committed by Cedric Bail
parent 10fb87bbcd
commit 0e035b2e22
1 changed files with 2 additions and 29 deletions

View File

@ -20,12 +20,6 @@
#define MY_CLASS_NAME "Elm_Inwin"
#define MY_CLASS_NAME_LEGACY "elm_inwin"
static const Elm_Layout_Part_Alias_Description _content_aliases[] =
{
{"default", "elm.swallow.content"},
{NULL, NULL}
};
typedef struct {
} Elm_Inwin_Data;
@ -111,24 +105,6 @@ _elm_inwin_activate(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
elm_object_focus_set(obj, EINA_TRUE);
}
EOLIAN static Eina_Bool
_elm_inwin_efl_content_content_set(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED, Efl_Gfx *content)
{
return efl_content_set(efl_part(obj, _content_aliases[0].real_part), content);
}
EOLIAN static Efl_Gfx *
_elm_inwin_efl_content_content_get(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
{
return efl_content_get(efl_part(obj, _content_aliases[0].real_part));
}
EOLIAN static Efl_Gfx *
_elm_inwin_efl_content_content_unset(Eo *obj, Elm_Inwin_Data *pd EINA_UNUSED)
{
return efl_content_unset(efl_part(obj, _content_aliases[0].real_part));
}
EAPI void
elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
{
@ -158,13 +134,10 @@ _elm_inwin_class_constructor(Efl_Class *klass)
/* Internal EO APIs and hidden overrides */
ELM_LAYOUT_CONTENT_ALIASES_IMPLEMENT(elm_inwin)
ELM_PART_CONTENT_DEFAULT_GET(elm_inwin, _content_aliases[0].real_part)
ELM_PART_CONTENT_DEFAULT_IMPLEMENT(elm_inwin, Elm_Inwin_Data)
#define ELM_INWIN_EXTRA_OPS \
EFL_CANVAS_GROUP_ADD_OPS(elm_inwin), \
ELM_LAYOUT_SIZING_EVAL_OPS(elm_inwin), \
ELM_LAYOUT_CONTENT_ALIASES_OPS(elm_inwin), \
ELM_PART_CONTENT_DEFAULT_OPS(elm_inwin)
ELM_LAYOUT_SIZING_EVAL_OPS(elm_inwin)
#include "elm_inwin.eo.c"