Changing notification level of ticker window(100->150)
[apps/home/quickpanel.git] / daemon / list_util.h
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 #ifndef _QP_LIST_UTIL_DEF_
18 #define _QP_LIST_UTIL_DEF_
19
20 #include <Elementary.h>
21
22 typedef enum {
23         QP_ITEM_TYPE_SETTING = 0,
24         QP_ITEM_TYPE_TOGGLE,
25         QP_ITEM_TYPE_ONGOING_NOTI,
26         QP_ITEM_TYPE_MINICTRL_TOP,
27         QP_ITEM_TYPE_MINICTRL_MIDDLE,
28         QP_ITEM_TYPE_MINICTRL_LOW,
29         QP_ITEM_TYPE_NOTI_GROUP,
30         QP_ITEM_TYPE_NOTI,
31 } qp_item_type_e;
32
33 typedef struct _qp_item_data qp_item_data;
34 typedef struct _qp_item_count {
35         int group;
36         int ongoing;
37         int noti;
38         int minicontrol;
39 } qp_item_count;
40
41
42 qp_item_data *quickpanel_list_util_item_new(qp_item_type_e type, void *data);
43
44 void *quickpanel_list_util_item_get_data(qp_item_data *qid);
45
46 int quickpanel_list_util_item_compare(const void *data1, const void *data2);
47
48 void quickpanel_list_util_item_del_by_type(Evas_Object *list,
49                                 const Elm_Object_Item *refer_item,
50                                 qp_item_type_e type);
51
52 void quickpanel_list_util_item_update_by_type(Evas_Object *list,
53                                 Elm_Object_Item *refer_item,
54                                 qp_item_type_e type);
55
56 Elm_Object_Item *quickpanel_list_util_find_item_by_type(Evas_Object *list,
57                                         void *data,
58                                         Elm_Object_Item *refer_item,
59                                         qp_item_type_e type);
60
61 Elm_Object_Item *quickpanel_list_util_sort_insert(Evas_Object *list,
62                                         const Elm_Genlist_Item_Class *itc,
63                                         const void *item_data,
64                                         Elm_Object_Item *parent,
65                                         Elm_Genlist_Item_Type type,
66                                         Evas_Smart_Cb func,
67                                         const void *func_data);
68
69 qp_item_count *quickpanel_list_util_get_item_count(void);
70 void quickpanel_list_util_add_count(qp_item_data *qid);
71 void quickpanel_list_util_del_count(qp_item_data *qid);
72 void quickpanel_list_util_del_count_by_itemtype(qp_item_type_e type);
73
74 #endif /* _QP_LIST_UTIL_DEF_ */
75