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