jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=136a6b44643c16473b88e1bf1a4820f0915d6a0d

commit 136a6b44643c16473b88e1bf1a4820f0915d6a0d
Author: Jean-Philippe Andre <[email protected]>
Date:   Wed Jun 29 10:58:57 2016 +0900

    evas: Add & fix legacy APIs for text filters
    
    Those are marked as EINA_DEPRECATED since they are for legacy only,
    and EDC is the preferred method.
    Note: these are new in EFL 1.18.
    
    I would rather have not added them as legacy APIs. This patch is
    here to align to Tizen which added them by mistake. Also, remove
    the "name" argument from filter_program_set as it's not required,
    and also not there in Tizen's code base.
    
    Sorry for the mess.
---
 src/lib/evas/Evas_Legacy.h              | 16 ++++++++++++++++
 src/lib/evas/canvas/evas_filter_mixin.c |  5 ++---
 src/lib/evas/canvas/evas_object_text.c  |  6 ++++--
 3 files changed, 22 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/Evas_Legacy.h b/src/lib/evas/Evas_Legacy.h
index 7dc867b..982a29b 100644
--- a/src/lib/evas/Evas_Legacy.h
+++ b/src/lib/evas/Evas_Legacy.h
@@ -6608,3 +6608,19 @@ EAPI const Evas_Map *evas_object_map_get(const 
Evas_Object *obj);
 EAPI void evas_object_map_enable_set(Evas_Object *obj, Eina_Bool enabled);
 
 #include "canvas/efl_gfx_map.eo.legacy.h"
+
+/**
+ * @brief Apply an evas filter program on this text object.
+ *
+ * Note: the preferred method for filters is to edit EDC styles, rather than
+ * calling this API directly.
+ */
+EAPI void evas_object_text_filter_program_set(Evas_Object *obj, const char 
*code) EINA_DEPRECATED;
+
+/**
+ * @brief Set a named source object for an evas filter program.
+ *
+ * Note: the preferred method for filters is to edit EDC styles, rather than
+ * calling this API directly.
+ */
+EAPI void evas_object_text_filter_source_set(Evas_Object *obj, const char 
*name, Evas_Object *source) EINA_DEPRECATED;
diff --git a/src/lib/evas/canvas/evas_filter_mixin.c 
b/src/lib/evas/canvas/evas_filter_mixin.c
index f2296f6..46ab765 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -361,9 +361,8 @@ 
_efl_canvas_filter_internal_efl_gfx_filter_filter_program_set(Eo *eo_obj, Evas_F
    Eina_Bool alpha;
 
    if (!pd) return;
-   if ((pd->data->code == code) && (!name || (pd->data->name == name))) return;
-   if (pd->data->code && code && !strcmp(code, pd->data->code) &&
-       pd->data->name && name && !strcmp(name, pd->data->name)) return;
+   if (eina_streq(pd->data->code, code) && eina_streq(pd->data->name, name))
+     return;
 
    evas_object_async_block(obj);
    fcow = FCOW_BEGIN(pd);
diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 59ffdc6..55b3dd5 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2340,12 +2340,14 @@ _evas_text_efl_gfx_filter_filter_program_set(Eo *obj, 
Evas_Text_Data *pd EINA_UN
    efl_gfx_filter_program_set(eo_super(obj, MY_CLASS), code, name);
 }
 
+/* deprecated */
 EAPI void
-evas_object_text_filter_program_set(Evas_Object *obj, const char *code, const 
char *name)
+evas_object_text_filter_program_set(Evas_Object *obj, const char *code)
 {
-   efl_gfx_filter_program_set(obj, code, name);
+   efl_gfx_filter_program_set(obj, code, NULL);
 }
 
+/* deprecated */
 EAPI void
 evas_object_text_filter_source_set(Evas_Object *obj, const char *name, 
Evas_Object *source)
 {

-- 


Reply via email to