2 * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef __QUICKPANEL_NOTI_LIST_ITEM_H__
20 #define __QUICKPANEL_NOTI_LIST_ITEM_H__
22 #include <notification.h>
23 #include "noti_node.h"
24 #include "vi_manager.h"
26 #define STATE_NORMAL 1
27 #define STATE_DELETING 0
29 #define E_DATA_NOTI_LIST_ITEM_H "noti_list_item"
31 typedef Evas_Object *(*creater_cb)(notification_h, Evas_Object *);
32 typedef void (*action_cb)(noti_node_item *, notification_ly_type_e, Evas_Object *);
33 typedef void (*response_cb)(noti_node_item *, Evas_Object *);
35 typedef enum _qp_notilistitem_state_type {
36 NOTILISTITEM_STATE_NORMAL = 0,
37 NOTILISTITEM_STATE_GETSTURE_WAIT,
38 NOTILISTITEM_STATE_GETSTURE_CANCELED,
39 NOTILISTITEM_STATE_DELETED,
40 } qp_notilistitem_state_type;
42 typedef struct _Noti_View_H {
51 typedef struct _noti_list_item_h {
54 notification_ly_type_e layout;
55 noti_node_item *noti_node;
57 response_cb selected_cb;
58 response_cb button_1_cb;
59 response_cb deleted_cb;
62 Ecore_Animator *animator;
69 int need_to_cancel_press;
70 qp_notilistitem_state_type state;
73 Evas_Object *noti_list_item_create(Evas_Object *parent, notification_h noti);
74 void noti_list_item_update(Evas_Object *item);
75 void noti_list_item_remove(Evas_Object *item);
77 void noti_list_item_node_set(Evas_Object *item, noti_node_item *noti_node);
78 void *noti_list_item_node_get(Evas_Object *item);
79 int noti_list_item_get_status(Evas_Object *item);
80 void noti_list_item_set_status(Evas_Object *item, int status);
82 void noti_list_item_set_item_selected_cb(Evas_Object *item, response_cb selected_cb);
83 void noti_list_item_set_item_button_1_cb(Evas_Object *item, response_cb callback);
84 void noti_list_item_set_item_deleted_cb(Evas_Object *item, response_cb callback);
86 noti_list_item_h *noti_list_item_handler_get(Evas_Object *item);