Revert "elm_layout: Implement Efl.Text"

This reverts commit 584e17ae84.

After talking to @herdsman (before xmas) we concluded that we
didn't necessarily want a generic version of efl_text_set/get
for elm_layout. Instead, each widget that should have a default
text part should implement text_set/get themselves (very simple).

Note that Efl.Ui.Text somehow does not "implement" efl_text when
looking at the eolian files. It works by composition.
This commit is contained in:
Jean-Philippe Andre 2017-01-04 20:07:42 +09:00
parent 401488cea7
commit 1ce8c1c3d1
4 changed files with 3 additions and 49 deletions

View File

@ -1270,7 +1270,6 @@ _elm_layout_efl_container_content_count(Eo *eo_obj EINA_UNUSED, Elm_Layout_Smart
return eina_list_count(sd->subs);
}
// FIXME: Remove from EO file, remove EOLIAN tag
EOLIAN static Eina_Bool
_elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const char *text)
{
@ -1327,7 +1326,7 @@ _elm_layout_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, const
return EINA_TRUE;
}
EOLIAN static const char *
EOLIAN static const char*
_elm_layout_text_get(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part)
{
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, NULL);
@ -1338,18 +1337,6 @@ _elm_layout_text_get(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part)
return edje_object_part_text_get(wd->resize_obj, part);
}
EOLIAN static void
_elm_layout_efl_text_text_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *text)
{
_elm_layout_text_set(obj, sd, NULL, text);
}
EOLIAN static const char *
_elm_layout_efl_text_text_get(Eo *obj, Elm_Layout_Smart_Data *sd)
{
return _elm_layout_text_get(obj, sd, NULL);
}
static void
_layout_box_subobj_init(Elm_Layout_Smart_Data *sd, Elm_Layout_Sub_Object_Data *sub_d, const char *part, Evas_Object *child)
{
@ -2061,18 +2048,6 @@ _elm_layout_efl_part_part(const Eo *obj, Elm_Layout_Smart_Data *sd,
return proxy;
}
EOLIAN static void
_elm_layout_internal_part_efl_text_text_set(Eo *obj, Elm_Part_Data *pd, const char *text)
{
ELM_PART_CALL(_elm_layout_text_set(pd->obj, pd->sd, pd->part, text));
}
EOLIAN static const char *
_elm_layout_internal_part_efl_text_text_get(Eo *obj, Elm_Part_Data *pd)
{
ELM_PART_RETURN_VAL(_elm_layout_text_get(pd->obj, pd->sd, pd->part));
}
ELM_PART_IMPLEMENT_DESTRUCTOR(elm_layout, ELM_LAYOUT, Elm_Layout_Smart_Data, Elm_Part_Data)
ELM_PART_IMPLEMENT_CONTENT_SET(elm_layout, ELM_LAYOUT, Elm_Layout_Smart_Data, Elm_Part_Data)
ELM_PART_IMPLEMENT_CONTENT_GET(elm_layout, ELM_LAYOUT, Elm_Layout_Smart_Data, Elm_Part_Data)

View File

@ -17,7 +17,7 @@ struct Elm.Layout_Part_Alias_Description
real_part: string; [[Target part name for the alias set on Elm.Layout_Part_Proxies_Description::real_part. An example of usage would be "default" on that field, with "elm.content.swallow" on this one]]
}
class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File, Efl.Text)
class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File)
{
[[Elementary layout class]]
legacy_prefix: elm_layout;
@ -355,7 +355,6 @@ class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File, Efl.Text)
Efl.Container.content { get; set; }
Efl.Container.content_unset;
Efl.Part.part;
Efl.Text.text { get; set; }
}
events {
theme,changed; [[Called when theme changed]]

View File

@ -1,4 +1,4 @@
class Elm.Layout.Internal.Part (Efl.Object, Efl.Container, Efl.Text)
class Elm.Layout.Internal.Part (Efl.Object, Efl.Container)
{
[[Elementary layout internal part class]]
data: Elm_Part_Data;
@ -6,6 +6,5 @@ class Elm.Layout.Internal.Part (Efl.Object, Efl.Container, Efl.Text)
Efl.Object.destructor;
Efl.Container.content { get; set; }
Efl.Container.content_unset;
Efl.Text.text { get; set; }
}
}

View File

@ -127,25 +127,6 @@ EAPI Eina_Bool elm_layout_mmap_set(Eo *obj, const Eina_File *file, const char *g
*/
EAPI void elm_layout_mmap_get(Eo *obj, const Eina_File **file, const char **group);
/**
* @brief Set the text of the given part.
*
* @param[in] part The TEXT part where to set the text.
* @param[in] text The text to set.
*
* @return @c true on success, @c false otherwise
*/
EAPI Eina_Bool elm_layout_text_set(Evas_Object *obj, const char * part, const char *text);
/**
* @brief Get the text set in the given part.
*
* @param[in] part The TEXT part where to set the text.
*
* @return The text to set.
*/
EAPI const char *elm_layout_text_get(const Evas_Object *obj, const char * part);
/**
* @brief Append child to layout box part.
*