From e0ea939af6859092ba39104ff5dd4bc2926ceb43 Mon Sep 17 00:00:00 2001 From: "gs86.lee" Date: Tue, 12 Jan 2016 18:43:18 +0900 Subject: [PATCH] Add API related with progressbar Change-Id: I95fef99e2ecab597e466dd0b2899d5b20342c1ae --- project/src/view.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/project/src/view.c b/project/src/view.c index e5a4448..5019a88 100644 --- a/project/src/view.c +++ b/project/src/view.c @@ -811,17 +811,16 @@ void view_set_label(Evas_Object *parent, const char *part) } /* - * @brief: Set a progressbar to given part + * @brief: Create a progressbar * @param[parent]: object has part to which you want to set this progressbar - * @param[part]: part name to which you want to set this progressbar */ -void view_set_prgressbar(Evas_Object *parent, const char *part) +Evas_Object *view_create_progressbar(Evas_Object *parent) { Evas_Object *progressbar = NULL; if (parent == NULL) { dlog_print(DLOG_ERROR, LOG_TAG, "parent is NULL."); - return; + return NULL; } progressbar = eext_circle_object_progressbar_add(parent, NULL); @@ -831,6 +830,29 @@ void view_set_prgressbar(Evas_Object *parent, const char *part) eext_circle_object_line_width_set(progressbar, 5); evas_object_show(progressbar); + return progressbar; +} + +/* + * @brief: Set a progressbar to given part + * @param[parent]: object has part to which you want to set this progressbar + * @param[part]: part name to which you want to set this progressbar + */ +void view_set_progressbar(Evas_Object *parent, const char *part) +{ + Evas_Object *progressbar = NULL; + + if (parent == NULL) { + dlog_print(DLOG_ERROR, LOG_TAG, "parent is NULL."); + return; + } + + progressbar = view_create_progressbar(parent); + if (progressbar == NULL) { + dlog_print(DLOG_ERROR, LOG_TAG, "parent is NULL."); + return; + } + elm_object_part_content_set(parent, part, progressbar); } -- 2.7.4