summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_edit.c
diff options
context:
space:
mode:
authorVyacheslav Reutskiy <v.reutskiy@samsung.com>2013-12-19 15:29:51 +0900
committerCedric BAIL <cedric.bail@samsung.com>2013-12-19 15:53:24 +0900
commit0ad1dfe4e596aeb194b205e63a771d26279a1846 (patch)
tree1e50b38b55e15d1cee045afdb469c82852b022e8 /src/lib/edje/edje_edit.c
parent891c34f50fe226f025af30dafbf46b33af850f9d (diff)
edje: edje_edit - adding getter and setter for text style
This commit will add API for working with text style. There are two functions will be added: 1. edje_edit_state_text_style_get 2. edje_edit_state_text_style_set Reviewers: cedric, seoz, raster Reviewed By: cedric CC: cedric Differential Revision: https://phab.enlightenment.org/D388 Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
Diffstat (limited to '')
-rw-r--r--src/lib/edje/edje_edit.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 3188f399a8..6c8f19a50f 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -4384,6 +4384,40 @@ FUNC_TEXT_BOOL(min, y);
4384FUNC_TEXT_BOOL(max, x); 4384FUNC_TEXT_BOOL(max, x);
4385FUNC_TEXT_BOOL(max, y); 4385FUNC_TEXT_BOOL(max, y);
4386 4386
4387EAPI const char *
4388edje_edit_state_text_style_get(Evas_Object *obj, const char *part, const char *state, double value)
4389{
4390 Edje_Part_Description_Text *txt;
4391
4392 GET_PD_OR_RETURN(NULL);
4393
4394 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
4395 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
4396 return NULL;
4397
4398 txt = (Edje_Part_Description_Text *)pd;
4399 return eina_stringshare_add(txt->text.style.str);
4400}
4401
4402EAPI Eina_Bool
4403edje_edit_state_text_style_set(Evas_Object *obj, const char *part, const char *state, double value, const char *style)
4404{
4405 Edje_Part_Description_Text *txt;
4406
4407 GET_PD_OR_RETURN(EINA_FALSE);
4408 if (!style) return EINA_FALSE;
4409
4410 if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
4411 (rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
4412 return EINA_FALSE;
4413
4414 txt = (Edje_Part_Description_Text *)pd;
4415 txt->text.style.str = eina_stringshare_add(style);
4416
4417 edje_object_calc_force(obj);
4418 return EINA_TRUE;
4419}
4420
4387EAPI Eina_List * 4421EAPI Eina_List *
4388edje_edit_fonts_list_get(Evas_Object *obj) 4422edje_edit_fonts_list_get(Evas_Object *obj)
4389{ 4423{