Add API related with progressbar 29/56729/1
authorgs86.lee <gs86.lee@samsung.com>
Tue, 12 Jan 2016 09:43:18 +0000 (18:43 +0900)
committergs86.lee <gs86.lee@samsung.com>
Tue, 12 Jan 2016 09:43:18 +0000 (18:43 +0900)
Change-Id: I95fef99e2ecab597e466dd0b2899d5b20342c1ae

project/src/view.c

index e5a4448..5019a88 100644 (file)
@@ -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);
 }