return int_ret;
}
+EAPI void
+elm_color_class_del(const char *color_class)
+{
+ edje_color_class_del(color_class);
+}
+
EAPI Eina_Bool
elm_object_color_class_color_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a)
{
return eo_do_ret(obj, int_ret, elm_obj_widget_class_color3_get(color_class, r, g, b, a));
}
+
+EAPI void
+elm_object_color_class_del(Evas_Object *obj, const char *color_class)
+{
+ eo_do(obj, elm_obj_widget_class_color_del(color_class));
+}
+
+EAPI void
+elm_object_color_class_clear(Evas_Object *obj)
+{
+ eo_do(obj, elm_obj_widget_class_color_clear());
+}
//
EAPI Eina_Bool elm_color_class_color3_get(const char *color_class, int *r, int *g, int *b, int *a);
/**
+ * @brief Delete elementary color class.
+ *
+ * This function deletes any values at the process level for the
+ * specified color class.
+ * @note Deleting the color class will revert it to the
+ * values defined in the theme file.
+ *
+ * @param[in] color_class The name of color class.
+ *
+ * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
+ */
+EAPI void elm_color_class_del(const char *color_class);
+
+/**
* @brief Set the color of color class for a given widget.
*
* @note These color values are expected to be premultiplied by @p a.
* @endif
*/
EAPI Eina_Bool elm_object_color_class_color3_get(Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a);
+
+/**
+ * @brief Delete the color class for the Elementary widget.
+ *
+ * Deleting the color class will revert it to the values defined by
+ * elm_color_class_set() or the theme file.
+ *
+ * @param[in] color_class The name of color class.
+ *
+ * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
+ */
+EAPI void elm_object_color_class_del(Evas_Object *obj, const char *color_class);
+
+/**
+ * @brief Delete all color classes for the Elementary widget item.
+ *
+ * This function deletes any color classes defined for the Elementary widget item.
+ * Clearing color classes will revert the color of all parts to the values
+ * defined by elm_color_class_set() or the theme file.]]
+ *
+ * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
+ */
+EAPI void elm_object_color_class_del(Evas_Object *obj, const char *color_class);
//
return int_ret;
}
+EOLIAN void
+_elm_widget_class_color_del(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd, const char *color_class)
+{
+ edje_object_color_class_del(sd->resize_obj, color_class);
+}
+
+EOLIAN void
+_elm_widget_class_color_clear(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *sd)
+{
+ edje_object_color_class_clear(sd->resize_obj);
+}
+
#define ELM_COLOR_CLASS_UPDATE(obj, hash, cond) \
Evas_Object *edje = NULL; \
Eina_Iterator *itr; \
{
ELM_COLOR_CLASS_GET(obj, r3, g3, b3, a3);
}
+
+static Evas_Object *
+_elm_widget_item_edje_get(Eo *obj, Elm_Widget_Item_Data *sd)
+{
+ if (!sd)
+ sd = eo_data_scope_get(obj, ELM_WIDGET_ITEM_CLASS);
+
+ if (eo_isa(sd->view, ELM_LAYOUT_CLASS))
+ return elm_layout_edje_get(sd->view);
+ else if (eo_isa(sd->view, EDJE_OBJECT_CLASS))
+ return sd->view;
+
+ return NULL;
+}
+
+EOLIAN void
+_elm_widget_item_class_color_del(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd, const char *color_class)
+{
+ Evas_Object *edje;
+ Edje_Color_Class *cc = NULL;
+
+ if (!color_class) return;
+
+ eina_hash_del(sd->color_classes, color_class, cc);
+
+ edje = _elm_widget_item_edje_get(obj, sd);
+ if (!edje) return;
+
+ edje_object_color_class_del(edje, color_class);
+}
+
+EOLIAN void
+_elm_widget_item_class_color_clear(Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd)
+{
+ Evas_Object *edje;
+ ELM_SAFE_FREE(sd->color_classes, eina_hash_free);
+
+ edje = _elm_widget_item_edje_get(obj, sd);
+ if (!edje) return;
+
+ edje_object_color_class_clear(edje);
+}
//
/* TIZEN_ONLY(20161025): Apply color_class parent-child relationship */
a: int;
}
}
+ class_color_del {
+ params {
+ @in color_class: const(char)*;
+ }
+ }
+ class_color_clear {
+ }
//
}
implements {
a: int; [[The alpha value.]]
}
}
+ class_color_del {
+ [[Delete the color class for the Elementary widget item.
+
+ Deleting the color class will revert it to the values defined by
+ elm_color_class_set() or the theme file.]]
+ legacy: elm_object_item_color_class_del;
+ params {
+ @in color_class: const(char)*;
+ }
+ }
+ class_color_clear {
+ [[Delete all color classes for the Elementary widget item.
+
+ This function deletes any color classes defined for the Elementary widget item.
+ Clearing color classes will revert the color of all parts to the values
+ defined by elm_color_class_set() or the theme file.]]
+ legacy: elm_object_item_color_class_clear;
+ }
//
}
implements {