Update changed code
[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
19
20 #include "taskmanager.h"
21 #include "_util_log.h"
22 #include "_util_efl.h"
23
24 void _del_progressbar(void *data)
25 {
26         struct appdata *ad = (struct appdata *)data;
27         retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
28
29         if (ad->popup_progressbar) {
30                 evas_object_hide(ad->popup_progressbar);
31                 evas_object_del(ad->popup_progressbar);
32                 ad->popup_progressbar = NULL;
33         }
34 }
35
36 void _show_progressbar(void *data)
37 {
38         struct appdata *ad = (struct appdata *)data;
39         retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
40
41         if (ad->popup_progressbar)
42                 _del_progressbar(ad);
43
44         ad->popup_progressbar = _add_progressbar(ad->win, "list_process",
45                         ad->root_w, ad->root_h);
46
47         evas_object_show(ad->popup_progressbar);
48 }