* Fix the ability to change the edje file source of an edje object
inside a callback - it worked but you couldn't swallow/set text etc.
+2012-01-03 Tom Hacohen (TAsn)
+
+ * Entry: Added edje_object_part_text_style_user_set/get that'll use
+ the new corresponding textblock functions.
+
EAPI const char *edje_object_part_text_get (const Evas_Object *obj, const char *part);
/**
+ * @brief Set the style of the
+ *
+ * @param obj A valid Evas_Object handle
+ * @param part The part name
+ * @param style The style to set (textblock conventions).
+ *
+ * This function sets the style associated with the textblock part.
+ *
+ * @since 1.2.0
+ */
+EAPI void edje_object_part_text_style_user_set(Evas_Object *obj, const char *part, const char *style);
+
+/**
+ * @brief Return the text of the object part.
+ *
+ * @param obj A valid Evas_Object handle
+ * @param part The part name
+ *
+ * @return The text string
+ *
+ * This function returns the style associated with the textblock part.
+ *
+ * @since 1.2.0
+ */
+EAPI const char *edje_object_part_text_style_user_get(Evas_Object *obj, const char *part);
+
+/**
* @brief Sets the raw (non escaped) text for an object part.
*
* @param obj A valid Evas Object handle
return EINA_TRUE;
}
+EAPI void
+edje_object_part_text_style_user_set(Evas_Object *obj, const char *part,
+ const char *style)
+{
+ Edje *ed;
+ Edje_Real_Part *rp;
+ Evas_Textblock_Style *ts;
+
+ ed = _edje_fetch(obj);
+ if ((!ed) || (!part) || (!style)) return;
+ rp = _edje_real_part_recursive_get(ed, (char *)part);
+ if (!rp) return;
+ if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return;
+
+ ts = evas_textblock_style_new();
+ evas_textblock_style_set(ts, style);
+ evas_object_textblock_style_user_set(rp->object, ts);
+}
+
+EAPI const char *
+edje_object_part_text_style_user_get(Evas_Object *obj, const char *part)
+{
+ Edje *ed;
+ Edje_Real_Part *rp;
+ const Evas_Textblock_Style *ts;
+
+ ed = _edje_fetch(obj);
+ if ((!ed) || (!part)) return NULL;
+ rp = _edje_real_part_recursive_get(ed, (char *)part);
+ if (!rp) return NULL;
+ if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return NULL;
+
+ ts = evas_object_textblock_style_user_get(rp->object);
+ if (ts)
+ return evas_textblock_style_get(ts);
+ else
+ return NULL;
+}
+
EAPI Eina_Bool
edje_object_part_text_set(Evas_Object *obj, const char *part, const char *text)
{