sync with private git. updated the license and the boilerplates
[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.1 (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://floralicense.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_NONE = -1,
24         QP_ITEM_TYPE_SETTING = 0,
25         QP_ITEM_TYPE_BRIGHTNESS,
26         QP_ITEM_TYPE_ONGOING_NOTI,
27         QP_ITEM_TYPE_MINICTRL_ONGOING,
28         QP_ITEM_TYPE_MINICTRL_TOP,
29         QP_ITEM_TYPE_MINICTRL_MIDDLE,
30         QP_ITEM_TYPE_MINICTRL_LOW,
31         QP_ITEM_TYPE_NOTI_GROUP,
32         QP_ITEM_TYPE_NOTI,
33         QP_ITEM_TYPE_BAR,
34         QP_ITEM_TYPE_MAX,
35 } qp_item_type_e;
36
37 typedef struct _qp_item_data qp_item_data;
38 typedef struct _qp_item_count {
39         int group;
40         int ongoing;
41         int noti;
42         int minicontrol;
43 } qp_item_count;
44
45
46 qp_item_data *quickpanel_list_util_item_new(qp_item_type_e type, void *data);
47 void quickpanel_list_util_item_set_tag(Evas_Object *item, qp_item_data *qid);
48 void quickpanel_list_util_item_del_tag(Evas_Object *item);
49
50 void *quickpanel_list_util_item_get_data(qp_item_data *qid);
51 void quickpanel_list_util_item_set_data(qp_item_data *qid, void *data);
52 int quickpanel_list_util_item_compare(const void *data1, const void *data2);
53
54 void quickpanel_list_util_item_unpack_by_type(Evas_Object *list
55                 , qp_item_type_e type);
56 void quickpanel_list_util_item_unpack_by_object(Evas_Object *list
57                 , Evas_Object *item);
58
59 void quickpanel_list_util_sort_insert(Evas_Object *list,
60                                         Evas_Object *new_obj);
61
62 #endif /* _QP_LIST_UTIL_DEF_ */
63