summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Gala <i.gala@samsung.com>2014-09-22 16:17:18 +0300
committerIgor Gala <i.gala@samsung.com>2014-09-23 12:09:05 +0300
commite95b4bef091206e82ced667fb718036c979b5643 (patch)
tree96bf660ab5e4c745ca4bb28e857cd68adb1abc4d
parent2460477de1a775f15460e9271168cd7d984e3173 (diff)
Combobox: added new API for setting style for base view.
-rw-r--r--src/lib/ewe_combobox.c17
-rw-r--r--src/lib/ewe_combobox.eo11
-rw-r--r--src/lib/ewe_combobox_legacy.h16
3 files changed, 43 insertions, 1 deletions
diff --git a/src/lib/ewe_combobox.c b/src/lib/ewe_combobox.c
index 9902f21..4797afb 100644
--- a/src/lib/ewe_combobox.c
+++ b/src/lib/ewe_combobox.c
@@ -382,6 +382,23 @@ _ewe_combobox_item_style_set(Eo *obj EINA_UNUSED,
382 return EINA_TRUE; 382 return EINA_TRUE;
383} 383}
384 384
385EOLIAN static Eina_Bool
386_ewe_combobox_style_set(Eo *obj EINA_UNUSED,
387 Ewe_Combobox_Smart_Data *sd EINA_UNUSED,
388 Eina_Stringshare *style)
389{
390 Eina_Bool res;
391 Eina_Stringshare *st;
392 if (!style)
393 return EINA_FALSE;
394
395 st = eina_stringshare_printf("ewe/combobox/%s", style);
396 res = edje_object_file_set(sd->combobox, EWE_THEME, st);
397
398 eina_stringshare_del(st);
399 return res;
400}
401
385/*------------------------Smart functions ----------------------------*/ 402/*------------------------Smart functions ----------------------------*/
386 403
387EOLIAN static void 404EOLIAN static void
diff --git a/src/lib/ewe_combobox.eo b/src/lib/ewe_combobox.eo
index 81b1dc8..b888feb 100644
--- a/src/lib/ewe_combobox.eo
+++ b/src/lib/ewe_combobox.eo
@@ -134,7 +134,18 @@ class Ewe_Combobox (Elm_Widget)
134 @in Eina_Stringshare *style; /*@New items style*/ 134 @in Eina_Stringshare *style; /*@New items style*/
135 } 135 }
136 } 136 }
137 style_set {
138 /*@
139 Set style of the combobox.
140
141 @return EINA_TRUE on success, EINA_FALSE otherwise
137 142
143 @ingroup combobox*/
144 return: Eina_Bool;
145 params {
146 @in Eina_Stringshare *style; /*@New combobox style*/
147 }
148 }
138 } 149 }
139 150
140 implements { 151 implements {
diff --git a/src/lib/ewe_combobox_legacy.h b/src/lib/ewe_combobox_legacy.h
index bd5992f..834f9f7 100644
--- a/src/lib/ewe_combobox_legacy.h
+++ b/src/lib/ewe_combobox_legacy.h
@@ -122,7 +122,7 @@ ewe_combobox_select_item_get(Evas_Object *obj);
122/** 122/**
123 * Sets select combobox item. 123 * Sets select combobox item.
124 * 124 *
125 * @param item obj combobox object 125 * @param obj The combobox object
126 * @param index The combobox index 126 * @param index The combobox index
127 * @return EINA_TRUE on success, EINA_FALSE otherwise 127 * @return EINA_TRUE on success, EINA_FALSE otherwise
128 * 128 *
@@ -135,6 +135,7 @@ ewe_combobox_select_item_set(Evas_Object *obj,
135/** 135/**
136 * Sets the style for combobox item. 136 * Sets the style for combobox item.
137 * 137 *
138 * @param obj The combobox obj
138 * @param item The combobox item 139 * @param item The combobox item
139 * @param style The name of style 140 * @param style The name of style
140 * @return EINA_TRUE on success, EINA_FALSE otherwise 141 * @return EINA_TRUE on success, EINA_FALSE otherwise
@@ -146,4 +147,17 @@ ewe_combobox_item_style_set(Evas_Object *obj,
146 Ewe_Combobox_Item *item, 147 Ewe_Combobox_Item *item,
147 Eina_Stringshare *style); 148 Eina_Stringshare *style);
148 149
150/**
151 * Sets the style for combobox.
152 *
153 * @param obj The combobox obj
154 * @param style The name of style
155 * @return EINA_TRUE on success, EINA_FALSE otherwise
156 *
157 * @ingroup combobox
158 */
159EAPI Eina_Bool
160ewe_combobox_style_set(Evas_Object *obj,
161 Eina_Stringshare *style);
162
149#endif /* EWE_COMBOBOX_LEGACY_H */ 163#endif /* EWE_COMBOBOX_LEGACY_H */