}
/*
- * @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);
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);
}