forked from enlightenment/efl
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.
This commit is contained in:
parent
0706ae31b1
commit
136a6b4464
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue