e96173576978237946b05b57ddb7a2e203ef1e63
[profile/ivi/taskmanager.git] / src / _progressbar.c
1  /*
2   * Copyright 2012  Samsung Electronics Co., Ltd
3   *
4   * Licensed under the Flora License, Version 1.0 (the License);
5   * you may not use this file except in compliance with the License.
6   * You may obtain a copy of the License at
7   *
8   *     http://www.tizenopensource.org/license
9   *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an AS IS BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16
17
18 #include "taskmanager.h"
19 #include "_util_log.h"
20 #include "_util_efl.h"
21
22 void _del_progressbar(void *data)
23 {
24         struct appdata *ad = (struct appdata *)data;
25         retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
26
27         if (ad->popup_progressbar) {
28                 evas_object_hide(ad->popup_progressbar);
29                 evas_object_del(ad->popup_progressbar);
30                 ad->popup_progressbar = NULL;
31         }
32 }
33
34 void _show_progressbar(void *data)
35 {
36         struct appdata *ad = (struct appdata *)data;
37         retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
38
39         if (ad->popup_progressbar)
40                 _del_progressbar(ad);
41
42         ad->popup_progressbar = _add_progressbar(ad->win, "list_process",
43                         ad->root_w, ad->root_h);
44
45         evas_object_show(ad->popup_progressbar);
46 }