edje - add new color class apply func to force cc to apply now

This commit is contained in:
Carsten Haitzler 2021-05-06 13:06:23 +01:00
parent 694136e4c8
commit 2b91c4d9b8
2 changed files with 26 additions and 0 deletions

View File

@ -1452,6 +1452,16 @@ EAPI void edje_password_show_last_timeout_set(double password_show_last_timeout)
*/
EAPI Eina_Bool edje_color_class_set (const char *color_class, int r, int g, int b, int a, int r2, int g2, int b2, int a2, int r3, int g3, int b3, int a3);
/**
* @brief Applies changes mad when setting Edje color classes.
*
* This forces all changes to color classes made by (for example)
* edje_color_class_set() to actually take effect.
*
* @since 1.26
*/
EAPI void edje_color_class_apply (void);
/**
* @brief Gets Edje color class.
*

View File

@ -712,6 +712,22 @@ edje_color_class_set(const char *color_class, int r, int g, int b, int a, int r2
return result;
}
EAPI void
edje_color_class_apply(void)
{
Edje *ed;
EINA_INLIST_FOREACH(_edje_edjes, ed)
{
ed->dirty = EINA_TRUE;
ed->recalc_call = EINA_TRUE;
#ifdef EDJE_CALC_CACHE
ed->all_part_change = EINA_TRUE;
#endif
_edje_recalc(ed);
}
}
EOLIAN Eina_Bool
_edje_global_efl_gfx_color_class_color_class_set(Eo *obj EINA_UNUSED, void *pd EINA_UNUSED,
const char *color_class, Efl_Gfx_Color_Class_Layer layer, int r, int g, int b, int a)