Edje entry: Replaced style_user_set/get with push/pop/peek.

SVN revision: 68955
This commit is contained in:
Tom Hacohen 2012-03-07 14:03:43 +00:00
parent 45993d284f
commit ebc6c8d071
3 changed files with 37 additions and 6 deletions

View File

@ -376,3 +376,9 @@
* Entry: Added double click and triple click.
Double click selects a word.
Triple click selects a line.
2012-03-07 Tom Hacohen (TAsn)
* Entry: Replaced edje_object_part_text_style_user_set/get
with edje_object_part_text_style_user_set/get to correspond to
textblock's recent changes.

View File

@ -2481,7 +2481,7 @@ EAPI const char *edje_object_part_text_get (const Evas_Object *obj, c
*
* @since 1.2.0
*/
EAPI void edje_object_part_text_style_user_set(Evas_Object *obj, const char *part, const char *style);
EAPI void edje_object_part_text_style_user_push(Evas_Object *obj, const char *part, const char *style);
/**
* @brief Return the text of the object part.
@ -2495,7 +2495,17 @@ EAPI void edje_object_part_text_style_user_set(Evas_Object *obj, const char *par
*
* @since 1.2.0
*/
EAPI const char *edje_object_part_text_style_user_get(Evas_Object *obj, const char *part);
EAPI const char *edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part);
/**
* @brief Delete the top style form the user style stack.
*
* @param obj A valid Evas_Object handle
* @param part The part name
*
* @since 1.2.0
*/
EAPI void edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part);
/**
* @brief Sets the raw (non escaped) text for an object part.

View File

@ -1059,7 +1059,7 @@ _edje_object_part_text_raw_append(Evas_Object *obj, Edje_Real_Part *rp, const ch
}
EAPI void
edje_object_part_text_style_user_set(Evas_Object *obj, const char *part,
edje_object_part_text_style_user_push(Evas_Object *obj, const char *part,
const char *style)
{
Edje *ed;
@ -1074,12 +1074,27 @@ edje_object_part_text_style_user_set(Evas_Object *obj, const char *part,
ts = evas_textblock_style_new();
evas_textblock_style_set(ts, style);
evas_object_textblock_style_user_set(rp->object, ts);
evas_object_textblock_style_user_push(rp->object, ts);
evas_textblock_style_free(ts);
}
EAPI void
edje_object_part_text_style_user_pop(Evas_Object *obj, const char *part)
{
Edje *ed;
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(ed, part);
if (!rp) return;
if (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK) return;
evas_object_textblock_style_user_pop(rp->object);
}
EAPI const char *
edje_object_part_text_style_user_get(Evas_Object *obj, const char *part)
edje_object_part_text_style_user_peek(const Evas_Object *obj, const char *part)
{
Edje *ed;
Edje_Real_Part *rp;
@ -1091,7 +1106,7 @@ edje_object_part_text_style_user_get(Evas_Object *obj, const 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);
ts = evas_object_textblock_style_user_peek(rp->object);
if (ts)
return evas_textblock_style_get(ts);
else