Revert "elm_layout: Implement Efl.Text"
authorJean-Philippe Andre <jp.andre@samsung.com>
Wed, 4 Jan 2017 11:07:42 +0000 (20:07 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Thu, 5 Jan 2017 01:37:19 +0000 (10:37 +0900)
This reverts commit 584e17ae84750b0c8a9bc92f41c767073a41fc94.

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.

src/lib/elementary/elm_layout.c
src/lib/elementary/elm_layout.eo
src/lib/elementary/elm_layout_internal_part.eo
src/lib/elementary/elm_layout_legacy.h

index bf5ce99..b5d2f56 100644 (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)
index 4b00616..37f1ad1 100644 (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]]
index 5ad95ce..4ce15a3 100644 (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; }
    }
 }
index 779907f..c9654d2 100644 (file)
@@ -128,25 +128,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.
  *
  * Once the object is appended, it will become child of the layout. Its