From 4632d48d6b0b8fe947ddcb1c09b5adb7c47b7ad6 Mon Sep 17 00:00:00 2001 From: WooHyun Jung Date: Mon, 7 Oct 2019 16:15:45 +0900 Subject: [PATCH] edje_util: restore tizen only APIs to legacy edje_util Several tizen only APIs should not be opened with new efl interface. This patch restores them to the original location(i.e edje_util). Plus, Edje_Cursor is also restored back to Edje_Common.h @tizen_fix Change-Id: I3a2b0a96256bfe73e81cb482a9591529af95d5a2 --- src/lib/edje/Edje_Common.h | 339 ++++++++++++++++++++++++++++- src/lib/edje/edje_util.c | 114 ++++++---- src/lib/edje/efl_canvas_layout.eo | 260 ---------------------- src/lib/edje/efl_canvas_layout_eo.legacy.c | 132 ----------- src/lib/edje/efl_canvas_layout_eo.legacy.h | 318 --------------------------- src/lib/edje/efl_canvas_layout_types.eot | 14 -- 6 files changed, 394 insertions(+), 783 deletions(-) diff --git a/src/lib/edje/Edje_Common.h b/src/lib/edje/Edje_Common.h index 20558c0..202a72b 100644 --- a/src/lib/edje/Edje_Common.h +++ b/src/lib/edje/Edje_Common.h @@ -8,17 +8,17 @@ */ //TIZEN_ONLY(20190530): fix migration build errors //This enum move to lib/edje/edje_type.eot -//typedef enum -//{ -// EDJE_CURSOR_MAIN = 0, /**< Main cursor state */ -// EDJE_CURSOR_SELECTION_BEGIN, /**< Selection begin cursor state */ -// EDJE_CURSOR_SELECTION_END, /**< Selection end cursor state */ -// EDJE_CURSOR_PREEDIT_START, /**< Pre-edit start cursor state */ -// EDJE_CURSOR_PREEDIT_END, /**< Pre-edit end cursor state */ -// EDJE_CURSOR_USER, /**< User cursor state */ -// EDJE_CURSOR_USER_EXTRA /**< User extra cursor state */ -//} Edje_Cursor; -// +typedef enum +{ + EDJE_CURSOR_MAIN = 0, /**< Main cursor state */ + EDJE_CURSOR_SELECTION_BEGIN, /**< Selection begin cursor state */ + EDJE_CURSOR_SELECTION_END, /**< Selection end cursor state */ + EDJE_CURSOR_PREEDIT_START, /**< Pre-edit start cursor state */ + EDJE_CURSOR_PREEDIT_END, /**< Pre-edit end cursor state */ + EDJE_CURSOR_USER, /**< User cursor state */ + EDJE_CURSOR_USER_EXTRA /**< User extra cursor state */ +} Edje_Cursor; + /** All Text auto capital mode type values * @@ -2672,6 +2672,323 @@ EAPI void edje_object_part_text_thaw (Evas_Object *obj, * END * *******/ +/*********************************************************************************** +* TIZEN_ONLY_FEATURE: API for handling text properties of Edje * +***********************************************************************************/ +/** + * @brief Sets the object text min calculation policy. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. + * + * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif + * @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] state_name The state name + * @param[in] min_x The min width policy + * @param[in] min_y The min height policy + * + * @return @c true on success, or @c false on error + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_text_min_policy_set(Evas_Object *obj, const char *part, const char *state_name, Eina_Bool min_x, Eina_Bool min_y); + +/** + * @brief Gets the object text min calculation policy. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. + * + * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif + * @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] state_name The state name + * @param[out] min_x The min width policy + * @param[out] min_y The min height policy + * + * @return @c true on success, or @c false on error + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_text_min_policy_get(const Evas_Object *obj, const char *part, const char *state_name, Eina_Bool *min_x, Eina_Bool *min_y); + +/** + * @brief Sets the valign for text. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] valign The valign 0.0~1.0. -1.0 for respect EDC's align value. + * + * @return @c true, on success or @c false, on error + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_text_valign_set(Evas_Object *obj, const char *part, double valign); + +/** + * @brief Gets the valign for text. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * + * @return The valign 0.0~1.0. -1.0 for respect EDC's align value. + * + * @ingroup Edje_Object_Group + */ +EAPI double edje_object_part_text_valign_get(const Evas_Object *obj, const char *part); + +/** + * @brief Sets the duration for text's marquee. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] duration The duration. 0.0 for respect EDC's duration value. + * + * @return @c true, on success or @c false, on error + * + * @ingroup Edje_Object_Group + */ +/******* +* END * +*******/ + +/*********************************************************************************** +* TIZEN_ONLY_FEATURE: ellipsize.marquee, ellipsize.fade for TEXTBLOCK, TEXT part. * +***********************************************************************************/ +/** + * @brief Sets the duration for text's marquee. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] duration The duration. 0.0 for respect EDC's duration value. + * + * @return @c true, on success or @c false, on error + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_text_marquee_duration_set(Evas_Object *obj, const char *part, double duration); + +/** + * @brief Gets the duration for text's marquee. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * + * @return The duration. 0.0 for respect EDC's duration value. + * + * @ingroup Edje_Object_Group + */ +EAPI double edje_object_part_text_marquee_duration_get(const Evas_Object *obj, const char *part); + +/** + * @brief Sets the speed for text's marquee. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] speed The speed. 0.0 for respect EDC's speed value. + * + * @return @c true, on success or @c false, on error + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_text_marquee_speed_set(Evas_Object *obj, const char *part, double speed); + +/** + * @brief Gets the speed for text's marquee. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * + * @return The speed. 0.0 for respect EDC's speed value. + * + * @ingroup Edje_Object_Group + */ +EAPI double edje_object_part_text_marquee_speed_get(const Evas_Object *obj, const char *part); + +/** + * @brief Sets the always mode for text's marquee. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] always The always mode + * + * @return @c true, on success or @c false, on error + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_text_marquee_always_set(Evas_Object *obj, const char *part, Eina_Bool always); + +/** + * @brief Gets the always mode for text's marquee. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * + * @return The always mode + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_text_marquee_always_get(const Evas_Object *obj, const char *part); +/******* +* END * +*******/ +/*********************************************************************************** + * TIZEN_ONLY_FEATURE: apply Tizen's color_class features. * + ***********************************************************************************/ +/** + * @brief Sets the parent object for color class. + * + * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif + * @internal + * + * @param[in] obj The object. + * @param[in] parent The parent object for color class + * + * @ingroup Edje_Object_Group + */ +EAPI void edje_object_color_class_parent_set(Evas_Object *obj, Efl_Object *parent) EINA_ARG_NONNULL(2); + +/** + * @brief Unsets the parent object for color class. + * + * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif + * @internal + * @param[in] obj The object. + * + * @ingroup Edje_Object_Group + */ +EAPI void edje_object_color_class_parent_unset(Evas_Object *obj); +/******* +* END * +*******/ +/*********************************************************************************** + * TIZEN_ONLY_FEATURE: API for handling common properties of Edje * + ***********************************************************************************/ +/** + * @brief Sets the valign for a common description. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] valign The valign 0.0~1.0. -1.0 for respect EDC's align value. + * + * @return @c true, on success or @c false, on error + * + * @ingroup Edje_Object_Group + */ +EAPI Eina_Bool edje_object_part_valign_set(Evas_Object *obj, const char *part, double valign); + +/** + * @brief Gets the valign for a common description. + * + * Do not use this API without understanding whats going on. It is made for + * internal usage. @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * + * @return The valign 0.0~1.0. -1.0 for respect EDC's align value. + * + * @ingroup Edje_Object_Group + */ +EAPI double edje_object_part_valign_get(const Evas_Object *obj, const char *part); + +/******* + * END * + *******/ +/********************************************************************************** + * TIZEN_ONLY(20171128): add additional cursor function for improving performance * + **********************************************************************************/ +/** + * @brief Get a position of the given cursor + * + * @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] cur cursor type + * @param[out] x w + * @param[out] y h + * + * @ingroup Edje_Object_Group + */ +EAPI void edje_object_part_text_cursor_coord_get(Evas_Object *obj, const char *part, Edje_Cursor cur, int *x, int *y); + +/** + * @brief Get a size of the given cursor + * + * @internal + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[in] cur cursor type + * @param[out] w w + * @param[out] h h + * + * @ingroup Edje_Object_Group + */ +EAPI void edje_object_part_text_cursor_size_get(Evas_Object *obj, const char *part, Edje_Cursor cur, int *w, int *h); +/******* + * END * + *******/ +/********************************************************************* + * TIZEN_ONLY(20161110): keep cursor position on mouse down and move * + *********************************************************************/ +/** + * @brief Returns the cursor geometry of the part relative to the edje object. + * The cursor geometry is kept in mouse down and move. + * + * @internal @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 + * @endif + * + * @param[in] obj The object. + * @param[in] part The part name + * @param[out] x Cursor X position + * @param[out] y Cursor Y position + * @param[out] w Cursor width + * @param[out] h Cursor height + * + * @ingroup Edje_Object_Group + */ +EAPI void edje_object_part_text_cursor_on_mouse_geometry_get(const Evas_Object *obj, const char *part, int *x, int *y, int *w, int *h); +/******* + * END * + *******/ + /** * @} */ diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c index 7197959..09fa7d5 100644 --- a/src/lib/edje/edje_util.c +++ b/src/lib/edje/edje_util.c @@ -2626,10 +2626,11 @@ _efl_canvas_layout_part_text_cursor_coord_set(Eo *obj EINA_UNUSED, Edje *ed, con /********************************************************************************** * TIZEN_ONLY(20171128): add additional cursor function for improving performance * **********************************************************************************/ -EOLIAN void -_efl_canvas_layout_part_text_cursor_coord_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Edje_Cursor cur, Evas_Coord *x, Evas_Coord *y) +EAPI void +edje_object_part_text_cursor_coord_get(Evas_Object *obj, const char *part, Edje_Cursor cur, int *x, int *y) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); if ((!ed) || (!part)) return; rp = _edje_real_part_recursive_get(&ed, part); @@ -2642,10 +2643,11 @@ _efl_canvas_layout_part_text_cursor_coord_get(Eo *obj EINA_UNUSED, Edje *ed, con } } -EOLIAN void -_efl_canvas_layout_part_text_cursor_size_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Edje_Cursor cur, Evas_Coord *w, Evas_Coord *h) +EAPI void +edje_object_part_text_cursor_size_get(Evas_Object *obj, const char *part, Edje_Cursor cur, int *w, int *h) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); if ((!ed) || (!part)) return; rp = _edje_real_part_recursive_get(&ed, part); @@ -6944,13 +6946,14 @@ edje_object_part_text_get(const Edje_Object *obj, const char *part) /*********************************************************************************** * TIZEN_ONLY_FEATURE: API for handling text properties of Edje * ***********************************************************************************/ -EOLIAN Eina_Bool -_efl_canvas_layout_part_text_min_policy_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part, const char *state_name, Eina_Bool min_x, Eina_Bool min_y) +EAPI Eina_Bool +edje_object_part_text_min_policy_set(Evas_Object *obj, const char *part, const char *state_name, Eina_Bool min_x, Eina_Bool min_y) { Edje_Real_Part *rp; Edje_Part_Description_Text *desc; + Edje *ed = _edje_fetch(obj); - if ((!part) || (!state_name)) return EINA_FALSE; + if ((!ed) || (!part) || (!state_name)) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -6968,13 +6971,14 @@ _efl_canvas_layout_part_text_min_policy_set(Eo *eo_obj EINA_UNUSED, Edje *ed, co return EINA_TRUE; } -EOLIAN Eina_Bool -_efl_canvas_layout_part_text_min_policy_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part, const char *state_name, Eina_Bool *min_x, Eina_Bool *min_y) +EAPI Eina_Bool +edje_object_part_text_min_policy_get(const Evas_Object *obj, const char *part, const char *state_name, Eina_Bool *min_x, Eina_Bool *min_y) { Edje_Real_Part *rp; Edje_Part_Description_Text *desc; + Edje *ed = _edje_fetch(obj); - if ((!part) || (!state_name) || (!min_x && !min_y)) return EINA_FALSE; + if ((!ed) || (!part) || (!state_name) || (!min_x && !min_y)) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -6992,13 +6996,14 @@ _efl_canvas_layout_part_text_min_policy_get(Eo *eo_obj EINA_UNUSED, Edje *ed, co return EINA_TRUE; } -EOLIAN Eina_Bool -_efl_canvas_layout_part_text_valign_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part, double valign) +EAPI Eina_Bool +edje_object_part_text_valign_set(Evas_Object *obj, const char *part, double valign) { Edje_Real_Part *rp; Edje_Part_Description_Text *desc; + Edje *ed = _edje_fetch(obj); - if (!part) return EINA_FALSE; + if (!ed || !part) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7024,13 +7029,14 @@ _efl_canvas_layout_part_text_valign_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const return EINA_FALSE; } -EOLIAN double -_efl_canvas_layout_part_text_valign_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part) +EAPI double +edje_object_part_text_valign_get(const Evas_Object *obj, const char *part) { Edje_Real_Part *rp; Edje_Part_Description_Text *desc; + Edje *ed = _edje_fetch(obj); - if (!part) return -1.0; + if (!ed || !part) return -1.0; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return -1.0; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7059,12 +7065,13 @@ _efl_canvas_layout_part_text_valign_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const /*********************************************************************************** * TIZEN_ONLY_FEATURE: ellipsize.marquee, ellipsize.fade for TEXTBLOCK, TEXT part. * ***********************************************************************************/ -EOLIAN Eina_Bool -_efl_canvas_layout_part_text_marquee_duration_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part, double duration) +EAPI Eina_Bool +edje_object_part_text_marquee_duration_set(Evas_Object *obj, const char *part, double duration) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); - if (!part) return EINA_FALSE; + if (!ed || !part) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7081,13 +7088,14 @@ _efl_canvas_layout_part_text_marquee_duration_set(Eo *eo_obj EINA_UNUSED, Edje * return EINA_FALSE; } -EOLIAN double -_efl_canvas_layout_part_text_marquee_duration_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part) +EAPI double +edje_object_part_text_marquee_duration_get(const Evas_Object *obj, const char *part) { Edje_Real_Part *rp; Edje_Part_Description_Text *desc; + Edje *ed = _edje_fetch(obj); - if (!part) return -1.0; + if (!ed || !part) return -1.0; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return -1.0; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7110,12 +7118,13 @@ _efl_canvas_layout_part_text_marquee_duration_get(Eo *eo_obj EINA_UNUSED, Edje * return -1.0; } -EOLIAN Eina_Bool -_efl_canvas_layout_part_text_marquee_speed_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part, double speed) +EAPI Eina_Bool +edje_object_part_text_marquee_speed_set(Evas_Object *obj, const char *part, double speed) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); - if (!part) return EINA_FALSE; + if (!ed || !part) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7132,13 +7141,14 @@ _efl_canvas_layout_part_text_marquee_speed_set(Eo *eo_obj EINA_UNUSED, Edje *ed, return EINA_FALSE; } -EOLIAN double -_efl_canvas_layout_part_text_marquee_speed_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part) +EAPI double +edje_object_part_text_marquee_speed_get(const Evas_Object *obj, const char *part) { Edje_Real_Part *rp; Edje_Part_Description_Text *desc; + Edje *ed = _edje_fetch(obj); - if (!part) return -1.0; + if (!ed || !part) return -1.0; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return -1.0; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7161,12 +7171,13 @@ _efl_canvas_layout_part_text_marquee_speed_get(Eo *eo_obj EINA_UNUSED, Edje *ed, return -1.0; } -EOLIAN Eina_Bool -_efl_canvas_layout_part_text_marquee_always_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part, Eina_Bool always) +EAPI Eina_Bool +edje_object_part_text_marquee_always_set(Evas_Object *obj, const char *part, Eina_Bool always) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); - if (!part) return EINA_FALSE; + if (!ed || !part) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7186,12 +7197,13 @@ _efl_canvas_layout_part_text_marquee_always_set(Eo *eo_obj EINA_UNUSED, Edje *ed return EINA_FALSE; } -EOLIAN Eina_Bool -_efl_canvas_layout_part_text_marquee_always_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part) +EAPI Eina_Bool +edje_object_part_text_marquee_always_get(const Evas_Object *obj, const char *part) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); - if (!part) return EINA_FALSE; + if (!ed || !part) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; if ((rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) && @@ -7259,10 +7271,11 @@ _edje_object_color_class_child_remove(Evas_Object *obj, Evas_Object *child) evas_object_event_callback_del_full(obj, EVAS_CALLBACK_DEL, _edje_object_color_class_parent_del_cb, NULL); } -EOLIAN void -_efl_canvas_layout_color_class_parent_set(Eo *obj, Edje *ed, Efl_Object *parent) +EAPI void +edje_object_color_class_parent_set(Evas_Object *obj, Efl_Object *parent) { - if (!parent) return; + Edje *ed = _edje_fetch(obj); + if (!ed || !parent) return; if (ed->cc_parent) _edje_object_color_class_child_remove(ed->cc_parent, obj); @@ -7282,9 +7295,12 @@ _efl_canvas_layout_color_class_parent_set(Eo *obj, Edje *ed, Efl_Object *parent) _edje_recalc(ed); } -EOLIAN void -_efl_canvas_layout_color_class_parent_unset(Eo *obj, Edje *ed) +EAPI void +edje_object_color_class_parent_unset(Evas_Object *obj) { + Edje *ed = _edje_fetch(obj); + if (!ed) return; + if (ed->cc_parent) _edje_object_color_class_child_remove(ed->cc_parent, obj); ed->cc_parent = NULL; evas_object_event_callback_del_full(obj, EVAS_CALLBACK_DEL, _edje_object_color_class_child_del_cb, NULL); @@ -7304,13 +7320,14 @@ _efl_canvas_layout_color_class_parent_unset(Eo *obj, Edje *ed) /*********************************************************************************** * TIZEN_ONLY_FEATURE: API for handling common properties of Edje * ***********************************************************************************/ -EOLIAN Eina_Bool -_efl_canvas_layout_part_valign_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part, double valign) +EAPI Eina_Bool +edje_object_part_valign_set(Evas_Object *obj, const char *part, double valign) { Edje_Real_Part *rp; FLOAT_T va; + Edje *ed = _edje_fetch(obj); - if (!part) return EINA_FALSE; + if (!ed || !part) return EINA_FALSE; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return EINA_FALSE; @@ -7331,12 +7348,13 @@ _efl_canvas_layout_part_valign_set(Eo *eo_obj EINA_UNUSED, Edje *ed, const char return EINA_TRUE; } -EOLIAN double -_efl_canvas_layout_part_valign_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const char *part) +EAPI double +edje_object_part_valign_get(const Evas_Object *obj, const char *part) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); - if (!part) return -1.0; + if (!ed || !part) return -1.0; rp = _edje_real_part_recursive_get(&ed, part); if (!rp) return -1.0; @@ -7352,10 +7370,11 @@ _efl_canvas_layout_part_valign_get(Eo *eo_obj EINA_UNUSED, Edje *ed, const char /********************************************************************* * TIZEN_ONLY(20161110): keep cursor position on mouse down and move * *********************************************************************/ -EOLIAN void -_efl_canvas_layout_part_text_cursor_on_mouse_geometry_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h) +EAPI void +edje_object_part_text_cursor_on_mouse_geometry_get(const Evas_Object *obj, const char *part, int *x, int *y, int *w, int *h) { Edje_Real_Part *rp; + Edje *ed = _edje_fetch(obj); if (x) *x = 0; if (y) *y = 0; @@ -7413,5 +7432,4 @@ edje_object_part_text_thaw(Evas_Object *obj, const char *part) * END * *******/ - /* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ diff --git a/src/lib/edje/efl_canvas_layout.eo b/src/lib/edje/efl_canvas_layout.eo index fa54282..b27c7ae 100644 --- a/src/lib/edje/efl_canvas_layout.eo +++ b/src/lib/edje/efl_canvas_layout.eo @@ -81,266 +81,6 @@ class @beta Efl.Canvas.Layout extends Efl.Canvas.Group implements Efl.File, Efl. } return: bool; [[$false if $content was not a child or can not be removed.]] } - - /*********************************************************************************** - * TIZEN_ONLY_FEATURE: API for handling text properties of Edje * - ***********************************************************************************/ - @property part_text_min_policy { - set { - [[Sets the object text min calculation policy. - - Do not use this API without understanding whats going on. - It is made for internal usage. - - \@if MOBILE \@since_tizen 3.0 - \@elseif WEARABLE \@since_tizen 3.0 - \@endif - \@internal - ]] - return: bool; [[$true on success, or $false on error]] - } - get { - [[Gets the object text min calculation policy. - - Do not use this API without understanding whats going on. - It is made for internal usage. - - \@if MOBILE \@since_tizen 3.0 - \@elseif WEARABLE \@since_tizen 3.0 - \@endif - \@internal - ]] - return: bool; [[$true on success, or $false on error]] - } - keys { - part: string; [[The part name]] - state_name: string; [[The state name]] - } - values { - min_x: bool; [[The min width policy]] - min_y: bool; [[The min height policy]] - } - } - @property part_text_valign { - set { - [[Sets the valign for text. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - return: bool; [[$true, on success or $false, on error]] - } - get { - [[Gets the valign for text. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - } - keys { - part: string; [[The part name]] - } - values { - valign: double; [[The valign 0.0~1.0. -1.0 for respect EDC's align value.]] - } - } - /******* - * END * - *******/ - /*********************************************************************************** - * TIZEN_ONLY_FEATURE: ellipsize.marquee, ellipsize.fade for TEXTBLOCK, TEXT part. * - ***********************************************************************************/ - @property part_text_marquee_duration { - set { - [[Sets the duration for text's marquee. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - return: bool; [[$true, on success or $false, on error]] - } - get { - [[Gets the duration for text's marquee. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - } - keys { - part: string; [[The part name]] - } - values { - duration: double; [[The duration. 0.0 for respect EDC's duration value.]] - } - } - @property part_text_marquee_speed { - set { - [[Sets the speed for text's marquee. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - return: bool; [[$true, on success or $false, on error]] - } - get { - [[Gets the speed for text's marquee. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - } - keys { - part: string; [[The part name]] - } - values { - speed: double; [[The speed. 0.0 for respect EDC's speed value.]] - } - } - @property part_text_marquee_always { - set { - [[Sets the always mode for text's marquee. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - return: bool; [[$true, on success or $false, on error]] - } - get { - [[Gets the always mode for text's marquee. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - } - keys { - part: string; [[The part name]] - } - values { - always: bool; [[The always mode]] - } - } - /******* - * END * - *******/ - /*********************************************************************************** - * TIZEN_ONLY_FEATURE: apply Tizen's color_class features. * - ***********************************************************************************/ - color_class_parent_set { - [[Sets the parent object for color class. - - \@if MOBILE \@since_tizen 3.0 - \@elseif WEARABLE \@since_tizen 3.0 - \@endif - \@internal - ]] - params { - @in parent: Efl.Object; [[The parent object for color class]] - } - } - color_class_parent_unset { - [[Unsets the parent object for color class. - - \@if MOBILE \@since_tizen 3.0 - \@elseif WEARABLE \@since_tizen 3.0 - \@endif - \@internal - ]] - } - /******* - * END * - *******/ - /*********************************************************************************** - * TIZEN_ONLY_FEATURE: API for handling common properties of Edje * - ***********************************************************************************/ - @property part_valign { - set { - [[Sets the valign for a common description. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - return: bool; [[$true, on success or $false, on error]] - } - get { - [[Gets the valign for a common description. - - Do not use this API without understanding whats going on. - It is made for internal usage. - \@internal - ]] - } - keys { - part: string; [[The part name]] - } - values { - valign: double; [[The valign 0.0~1.0. -1.0 for respect EDC's align value.]] - } - } - /******* - * END * - *******/ - /********************************************************************************** - * TIZEN_ONLY(20171128): add additional cursor function for improving performance * - **********************************************************************************/ - part_text_cursor_coord_get { - [[Get a position of the given cursor - - \@internal - ]] - params { - @in part: string; [[The part name]] - @in cur: Edje.Cursor; [[cursor type]] - @out x: int; [[w]] - @out y: int; [[h]] - } - } - part_text_cursor_size_get { - [[Get a size of the given cursor - - \@internal - ]] - params { - @in part: string; [[The part name]] - @in cur: Edje.Cursor; [[cursor type]] - @out w: int; [[w]] - @out h: int; [[h]] - } - } - /******* - * END * - *******/ - /********************************************************************* - * TIZEN_ONLY(20161110): keep cursor position on mouse down and move * - *********************************************************************/ - part_text_cursor_on_mouse_geometry_get @const { - [[Returns the cursor geometry of the part relative to the edje - object. The cursor geometry is kept in mouse down and move. - - \@internal - \@if MOBILE \@since_tizen 3.0 - \@elseif WEARABLE \@since_tizen 3.0 - \@endif - ]] - params { - @in part: string; [[The part name]] - @out x: int; [[Cursor X position]] - @out y: int; [[Cursor Y position]] - @out w: int; [[Cursor width]] - @out h: int; [[Cursor height]] - } - } - /******* - * END * - *******/ } events { part,invalid @beta: string; [[Emitted when trying to use an invalid part. diff --git a/src/lib/edje/efl_canvas_layout_eo.legacy.c b/src/lib/edje/efl_canvas_layout_eo.legacy.c index c0e37f0..f55e5d5 100644 --- a/src/lib/edje/efl_canvas_layout_eo.legacy.c +++ b/src/lib/edje/efl_canvas_layout_eo.legacy.c @@ -34,135 +34,3 @@ edje_object_content_remove(Efl_Canvas_Layout *obj, Efl_Gfx_Entity *content) { return efl_canvas_layout_content_remove(obj, content); } - -/*********************************************************************************** - * TIZEN_ONLY_FEATURE: API for handling text properties of Edje * - ***********************************************************************************/ -EAPI Eina_Bool -edje_object_part_text_min_policy_set(Efl_Canvas_Layout *obj, const char *part, const char *state_name, Eina_Bool min_x, Eina_Bool min_y) -{ - return efl_canvas_layout_part_text_min_policy_set(obj, part, state_name, min_x, min_y); -} - -EAPI Eina_Bool -edje_object_part_text_min_policy_get(const Efl_Canvas_Layout *obj, const char *part, const char *state_name, Eina_Bool *min_x, Eina_Bool *min_y) -{ - return efl_canvas_layout_part_text_min_policy_get(obj, part, state_name, min_x, min_y); -} - -EAPI Eina_Bool -edje_object_part_text_valign_set(Efl_Canvas_Layout *obj, const char *part, double valign) -{ - return efl_canvas_layout_part_text_valign_set(obj, part, valign); -} - -EAPI double -edje_object_part_text_valign_get(const Efl_Canvas_Layout *obj, const char *part) -{ - return efl_canvas_layout_part_text_valign_get(obj, part); -} -/******* - * END * - *******/ - -/*********************************************************************************** - * TIZEN_ONLY_FEATURE: ellipsize.marquee, ellipsize.fade for TEXTBLOCK, TEXT part. * - ***********************************************************************************/ -EAPI Eina_Bool -edje_object_part_text_marquee_duration_set(Efl_Canvas_Layout *obj, const char *part, double duration) -{ - return efl_canvas_layout_part_text_marquee_duration_set(obj, part, duration); -} - -EAPI double -edje_object_part_text_marquee_duration_get(const Efl_Canvas_Layout *obj, const char *part) -{ - return efl_canvas_layout_part_text_marquee_duration_get(obj, part); -} - -EAPI Eina_Bool -edje_object_part_text_marquee_speed_set(Efl_Canvas_Layout *obj, const char *part, double speed) -{ - return efl_canvas_layout_part_text_marquee_speed_set(obj, part, speed); -} - -EAPI double -edje_object_part_text_marquee_speed_get(const Efl_Canvas_Layout *obj, const char *part) -{ - return efl_canvas_layout_part_text_marquee_speed_get(obj, part); -} - -EAPI Eina_Bool -edje_object_part_text_marquee_always_set(Efl_Canvas_Layout *obj, const char *part, Eina_Bool always) -{ - return efl_canvas_layout_part_text_marquee_always_set(obj, part, always); -} - -EAPI Eina_Bool -edje_object_part_text_marquee_always_get(const Efl_Canvas_Layout *obj, const char *part) -{ - return efl_canvas_layout_part_text_marquee_always_get(obj, part); -} -/******* - * END * - *******/ - -/*********************************************************************************** - * TIZEN_ONLY_FEATURE: apply Tizen's color_class features. * - ***********************************************************************************/ -EAPI void -edje_object_color_class_parent_set(Efl_Canvas_Layout *obj, Efl_Object *parent) -{ - efl_canvas_layout_color_class_parent_set(obj, parent); -} - -EAPI void -edje_object_color_class_parent_unset(Efl_Canvas_Layout *obj) -{ - efl_canvas_layout_color_class_parent_unset(obj); -} -/******* - * END * - *******/ - -/*********************************************************************************** - * TIZEN_ONLY_FEATURE: API for handling common properties of Edje * - ***********************************************************************************/ -EAPI Eina_Bool -edje_object_part_valign_set(Efl_Canvas_Layout *obj, const char *part, double valign) -{ - return efl_canvas_layout_part_valign_set(obj, part, valign); -} - -EAPI double -edje_object_part_valign_get(const Efl_Canvas_Layout *obj, const char *part) -{ - return efl_canvas_layout_part_valign_get(obj, part); -} - -EAPI void -edje_object_part_text_cursor_coord_get(Efl_Canvas_Layout *obj, const char *part, Edje_Cursor cur, int *x, int *y) -{ - efl_canvas_layout_part_text_cursor_coord_get(obj, part, cur, x, y); -} - -EAPI void -edje_object_part_text_cursor_size_get(Efl_Canvas_Layout *obj, const char *part, Edje_Cursor cur, int *w, int *h) -{ - efl_canvas_layout_part_text_cursor_size_get(obj, part, cur, w, h); -} -/******* - * END * - *******/ - -/********************************************************************************** - * TIZEN_ONLY(20171128): add additional cursor function for improving performance * - **********************************************************************************/ -EAPI void -edje_object_part_text_cursor_on_mouse_geometry_get(const Efl_Canvas_Layout *obj, const char *part, int *x, int *y, int *w, int *h) -{ - efl_canvas_layout_part_text_cursor_on_mouse_geometry_get(obj, part, x, y, w, h); -} -/******* - * END * - *******/ diff --git a/src/lib/edje/efl_canvas_layout_eo.legacy.h b/src/lib/edje/efl_canvas_layout_eo.legacy.h index aa78465..057bd77 100644 --- a/src/lib/edje/efl_canvas_layout_eo.legacy.h +++ b/src/lib/edje/efl_canvas_layout_eo.legacy.h @@ -112,322 +112,4 @@ EAPI Eina_Error edje_object_layout_load_error_get(const Efl_Canvas_Layout *obj); */ EAPI Eina_Bool edje_object_content_remove(Efl_Canvas_Layout *obj, Efl_Gfx_Entity *content); -/*********************************************************************************** -* TIZEN_ONLY_FEATURE: API for handling text properties of Edje * -***********************************************************************************/ -/** - * @brief Sets the object text min calculation policy. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. - * - * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif - * @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] state_name The state name - * @param[in] min_x The min width policy - * @param[in] min_y The min height policy - * - * @return @c true on success, or @c false on error - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_text_min_policy_set(Efl_Canvas_Layout *obj, const char *part, const char *state_name, Eina_Bool min_x, Eina_Bool min_y); - -/** - * @brief Gets the object text min calculation policy. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. - * - * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif - * @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] state_name The state name - * @param[out] min_x The min width policy - * @param[out] min_y The min height policy - * - * @return @c true on success, or @c false on error - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_text_min_policy_get(const Efl_Canvas_Layout *obj, const char *part, const char *state_name, Eina_Bool *min_x, Eina_Bool *min_y); - -/** - * @brief Sets the valign for text. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] valign The valign 0.0~1.0. -1.0 for respect EDC's align value. - * - * @return @c true, on success or @c false, on error - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_text_valign_set(Efl_Canvas_Layout *obj, const char *part, double valign); - -/** - * @brief Gets the valign for text. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * - * @return The valign 0.0~1.0. -1.0 for respect EDC's align value. - * - * @ingroup Edje_Object_Group - */ -EAPI double edje_object_part_text_valign_get(const Efl_Canvas_Layout *obj, const char *part); - -/** - * @brief Sets the duration for text's marquee. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] duration The duration. 0.0 for respect EDC's duration value. - * - * @return @c true, on success or @c false, on error - * - * @ingroup Edje_Object_Group - */ -/******* -* END * -*******/ - -/*********************************************************************************** -* TIZEN_ONLY_FEATURE: ellipsize.marquee, ellipsize.fade for TEXTBLOCK, TEXT part. * -***********************************************************************************/ -/** - * @brief Sets the duration for text's marquee. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] duration The duration. 0.0 for respect EDC's duration value. - * - * @return @c true, on success or @c false, on error - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_text_marquee_duration_set(Efl_Canvas_Layout *obj, const char *part, double duration); - -/** - * @brief Gets the duration for text's marquee. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * - * @return The duration. 0.0 for respect EDC's duration value. - * - * @ingroup Edje_Object_Group - */ -EAPI double edje_object_part_text_marquee_duration_get(const Efl_Canvas_Layout *obj, const char *part); - -/** - * @brief Sets the speed for text's marquee. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] speed The speed. 0.0 for respect EDC's speed value. - * - * @return @c true, on success or @c false, on error - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_text_marquee_speed_set(Efl_Canvas_Layout *obj, const char *part, double speed); - -/** - * @brief Gets the speed for text's marquee. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * - * @return The speed. 0.0 for respect EDC's speed value. - * - * @ingroup Edje_Object_Group - */ -EAPI double edje_object_part_text_marquee_speed_get(const Efl_Canvas_Layout *obj, const char *part); - -/** - * @brief Sets the always mode for text's marquee. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] always The always mode - * - * @return @c true, on success or @c false, on error - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_text_marquee_always_set(Efl_Canvas_Layout *obj, const char *part, Eina_Bool always); - -/** - * @brief Gets the always mode for text's marquee. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * - * @return The always mode - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_text_marquee_always_get(const Efl_Canvas_Layout *obj, const char *part); -/******* -* END * -*******/ -/*********************************************************************************** - * TIZEN_ONLY_FEATURE: apply Tizen's color_class features. * - ***********************************************************************************/ -/** - * @brief Sets the parent object for color class. - * - * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif - * @internal - * - * @param[in] obj The object. - * @param[in] parent The parent object for color class - * - * @ingroup Edje_Object_Group - */ -EAPI void edje_object_color_class_parent_set(Efl_Canvas_Layout *obj, Efl_Object *parent) EINA_ARG_NONNULL(2); - -/** - * @brief Unsets the parent object for color class. - * - * @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 @endif - * @internal - * @param[in] obj The object. - * - * @ingroup Edje_Object_Group - */ -EAPI void edje_object_color_class_parent_unset(Efl_Canvas_Layout *obj); -/******* -* END * -*******/ -/*********************************************************************************** - * TIZEN_ONLY_FEATURE: API for handling common properties of Edje * - ***********************************************************************************/ -/** - * @brief Sets the valign for a common description. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] valign The valign 0.0~1.0. -1.0 for respect EDC's align value. - * - * @return @c true, on success or @c false, on error - * - * @ingroup Edje_Object_Group - */ -EAPI Eina_Bool edje_object_part_valign_set(Efl_Canvas_Layout *obj, const char *part, double valign); - -/** - * @brief Gets the valign for a common description. - * - * Do not use this API without understanding whats going on. It is made for - * internal usage. @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * - * @return The valign 0.0~1.0. -1.0 for respect EDC's align value. - * - * @ingroup Edje_Object_Group - */ -EAPI double edje_object_part_valign_get(const Efl_Canvas_Layout *obj, const char *part); - -/******* - * END * - *******/ -/********************************************************************************** - * TIZEN_ONLY(20171128): add additional cursor function for improving performance * - **********************************************************************************/ -/** - * @brief Get a position of the given cursor - * - * @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] cur cursor type - * @param[out] x w - * @param[out] y h - * - * @ingroup Edje_Object_Group - */ -EAPI void edje_object_part_text_cursor_coord_get(Efl_Canvas_Layout *obj, const char *part, Edje_Cursor cur, int *x, int *y); - -/** - * @brief Get a size of the given cursor - * - * @internal - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[in] cur cursor type - * @param[out] w w - * @param[out] h h - * - * @ingroup Edje_Object_Group - */ -EAPI void edje_object_part_text_cursor_size_get(Efl_Canvas_Layout *obj, const char *part, Edje_Cursor cur, int *w, int *h); -/******* - * END * - *******/ -/********************************************************************* - * TIZEN_ONLY(20161110): keep cursor position on mouse down and move * - *********************************************************************/ -/** - * @brief Returns the cursor geometry of the part relative to the edje object. - * The cursor geometry is kept in mouse down and move. - * - * @internal @if MOBILE @since_tizen 3.0 @elseif WEARABLE @since_tizen 3.0 - * @endif - * - * @param[in] obj The object. - * @param[in] part The part name - * @param[out] x Cursor X position - * @param[out] y Cursor Y position - * @param[out] w Cursor width - * @param[out] h Cursor height - * - * @ingroup Edje_Object_Group - */ -EAPI void edje_object_part_text_cursor_on_mouse_geometry_get(const Efl_Canvas_Layout *obj, const char *part, int *x, int *y, int *w, int *h); -/******* - * END * - *******/ - - #endif diff --git a/src/lib/edje/efl_canvas_layout_types.eot b/src/lib/edje/efl_canvas_layout_types.eot index 8a393b3..b3eee20 100644 --- a/src/lib/edje/efl_canvas_layout_types.eot +++ b/src/lib/edje/efl_canvas_layout_types.eot @@ -21,17 +21,3 @@ enum @beta Efl.Canvas.Layout_Part_Type vector = 17, [[Vector @since 1.18.]] last = 18 [[Last type value.]] } - -//TIZEN_ONLY(20190530): fix migration build errors -//This enum come form Edje_Common.h -enum Edje.Cursor -{ - main = 0, - selection_begin, - selection_end, - preedit_start, - preedit_end, - user, - user_extra -} -// -- 2.7.4