Eo * plug_type_proxy_get(const Eo *obj, Evas_Object *widget);
+// TIZEN_ONLY(20200623) : apply Tizen's color_class features
+static Eina_Bool _elm_widget_color_class_update(Eo *obj, Elm_Widget_Smart_Data *sd);
+//
+
static Eina_Bool _elm_widget_can_highlight_get_by_class(Eo *obj);
static Eina_Bool _accessible_object_on_scroll_is(Eo* obj);
// TIZEN_ONLY
_elm_widget_theme_helper(efl_ui_widget_theme_apply(obj), &err_default, &err_generic);
if (err_generic) return EFL_UI_THEME_APPLY_ERROR_GENERIC;
if (err_default) return EFL_UI_THEME_APPLY_ERROR_DEFAULT;
+
+ // TIZEN_ONLY(20200623) : apply Tizen's color_class features
+ if (sd->color_classes)
+ _elm_widget_color_class_update(obj, sd);
+ //
return EFL_UI_THEME_APPLY_ERROR_NONE;
}
eina_stringshare_del(sd->atspi_translation_domain);
///
+ // TIZEN_ONLY(20200623) : apply Tizen's color_class features
+ if (sd->color_classes)
+ ELM_SAFE_FREE(sd->color_classes, eina_hash_free);
+ //
+
if (sd->children)
{
eina_array_free(sd->children);
{
Eina_Bool int_ret = EINA_TRUE;
Eina_Stringshare *buf;
+ // TIZEN_ONLY(20200623) : apply Tizen's color_class features
+ Edje_Color_Class *cc = NULL;
+ API_ENTRY return EINA_FALSE;
+ //
int temp_color[3][4] = { { r, g, b, a },
{ r2, g2, b2, a2 },
{ r3, g3, b3, a3 } };
#undef TEMP_COLOR
+ // TIZEN_ONLY(20200623) : apply Tizen's color_class features
+ if (int_ret)
+ {
+ if (!sd->color_classes)
+ sd->color_classes = eina_hash_string_small_new(_edje_color_class_free);
+ else
+ cc = eina_hash_find(sd->color_classes, buf);
+ if (!cc)
+ {
+ cc = calloc(1, sizeof(Edje_Color_Class));
+ cc->name = eina_stringshare_add(buf);
+ eina_hash_direct_add(sd->color_classes, cc->name, cc);
+ }
+ cc->r = r; cc->g = g; cc->b = b; cc->a = a;
+ cc->r2 = r2; cc->g2 = g2; cc->b2 = b2; cc->a2 = a2;
+ cc->r3 = r3; cc->g3 = g3; cc->b3 = b3; cc->a3 = a3;
+ }
+ //
+
eina_stringshare_del(buf);
return int_ret;
_elm_widget_class_color_del(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, const char *color_class)
{
Eina_Stringshare *buf;
+ // TIZEN_ONLY(20200623) : apply Tizen's color_class features
+ Edje_Color_Class *cc = NULL;
+ //
if (!efl_isa(obj, EFL_UI_LAYOUT_BASE_CLASS)) return;
buf = _elm_widget_edje_class_get(obj, NULL, color_class);
+ // TIZEN_ONLY(20200623) : apply Tizen's color_class features
+ eina_hash_del(sd->color_classes, buf, cc);
+ //
edje_object_color_class_del(sd->resize_obj, buf);
eina_stringshare_del(buf);
}
_elm_widget_class_color_clear(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
{
if (!efl_isa(obj, EFL_UI_LAYOUT_BASE_CLASS)) return;
+ // TIZEN_ONLY(20200623) : apply Tizen's color_class features
+ ELM_SAFE_FREE(sd->color_classes, eina_hash_free);
+ //
edje_object_color_class_clear(sd->resize_obj);
}
eina_iterator_free(itr); \
return int_ret
+static Eina_Bool
+_elm_widget_color_class_update(Eo *obj, Elm_Widget_Smart_Data *sd)
+{
+ ELM_COLOR_CLASS_UPDATE(obj, sd->color_classes, (!sd) || (!sd->color_classes) || (!obj));
+}
#define CHECK_BOUND(x) \
if (x > 0xff) x = 0xff; \