This should probably be replaced by a well defined signal.
Note: If edje sends signals on swallow/unswallow and text set/unset we
could simplify some of the elementary code, eg. for button's icon
handling. The theme should be handling the padding automatically, it's
not the elementary widget's role
Ref T5315
EDJE_TEXT_EFFECT_SHADOW_DIRECTION_RIGHT = (0x7 << 4) /**< right shadow direction value */
} Edje_Text_Effect;
-/**
- * @typedef (*Edje_Text_Change_Cb)
- *
- * Callback prototype for Edje_Text_Change.
- * @param data User provided data to pass to the callback
- * @param obj The Evas_Object
- * @param part The edje part
- */
-typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *obj, const char *part);
-/**
- * @}
- */
/**
* @defgroup Edje_Text_Selection Edje Text Selection
*/
EAPI int edje_object_thaw(Edje_Object *obj);
+/**
+ * @typedef (*Edje_Text_Change_Cb)
+ *
+ * Callback prototype for Edje_Text_Change.
+ * @param data User provided data to pass to the callback
+ * @param obj The Evas_Object
+ * @param part The edje part
+ */
+typedef void (*Edje_Text_Change_Cb) (void *data, Evas_Object *obj, const char *part);
+/**
+ * @}
+ */
+
+/**
+ * @brief Sets the object text callback.
+ *
+ * This function sets the callback to be called when the text changes.
+ *
+ * @param[in] obj The object.
+ * @param[in] func The callback function to handle the text change
+ * @param[in] data The data associated to the callback function.
+ */
+EAPI void edje_object_text_change_cb_set(Edje_Object *obj, Edje_Text_Change_Cb func, void *data);
+
/**
}
/* TEXT PART APIS BEGIN ---------------------------------------------- */
- @property text_change_cb {
- set {
- [[Sets the object text callback.
-
- This function sets the callback to be called when the text changes.]]
- }
- values {
- func: Edje.Text.Change_Cb; [[The callback function to handle the text change]]
- data: void_ptr; [[The data associated to the callback function.]]
- }
- }
@property item_provider {
set {
[[Sets the function that provides item objects for named items in an edje entry text
ed->item_provider.data = data;
}
-/* FIXDOC: New Function */
-EOLIAN void
-_edje_object_text_change_cb_set(Eo *obj EINA_UNUSED, Edje *ed, Edje_Text_Change_Cb func, void *data)
+EAPI void
+edje_object_text_change_cb_set(Eo *obj, Edje_Text_Change_Cb func, void *data)
{
unsigned short i;
+ Edje *ed;
+ ed = _edje_fetch(obj);
+ if (!ed) return;
ed->text_change.func = func;
ed->text_change.data = data;