From: Myungki Lee Date: Wed, 28 Dec 2016 05:36:55 +0000 (+0900) Subject: Support to receive cb when selected in viewer X-Git-Tag: submit/tizen_3.0/20170104.055639^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=170cbc12f31d2bddc1eaf64b46dca7b2e218e7fc;p=platform%2Fcore%2Fapi%2Fnotification.git Support to receive cb when selected in viewer - if user select a notification on quickpanel, receive a pressed event cb. if user swipe a notification on quickpanel, receive a deleted event cb. Change-Id: Ibe691e5af49ef1ecaee82b7363fef47ece00c096 Signed-off-by: Myungki Lee --- diff --git a/include/notification_internal.h b/include/notification_internal.h index e5ad7b93..6d5589ad 100644 --- a/include/notification_internal.h +++ b/include/notification_internal.h @@ -52,6 +52,8 @@ typedef enum _notification_ongoing_value_type { typedef enum _notification_event_type_extension { NOTIFICATION_EVENT_TYPE_HIDDEN_BY_USER = 100, NOTIFICATION_EVENT_TYPE_HIDDEN_BY_TIMEOUT = 101, + NOTIFICATION_EVENT_TYPE_PRESSED = 200, + NOTIFICATION_EVENT_TYPE_DELETED = 201, } notification_event_type_extension_e; GQuark notification_error_quark(void); diff --git a/src/notification_internal.c b/src/notification_internal.c index b02b5017..c7ef3360 100755 --- a/src/notification_internal.c +++ b/src/notification_internal.c @@ -1581,9 +1581,11 @@ EXPORT_API int notification_send_event(notification_h noti, int event_type) return NOTIFICATION_ERROR_INVALID_PARAMETER; if (!((event_type >= NOTIFICATION_EVENT_TYPE_CLICK_ON_BUTTON_1 - && event_type < NOTIFICATION_EVENT_TYPE_MAX) - || (event_type >= NOTIFICATION_EVENT_TYPE_HIDDEN_BY_USER - && event_type <= NOTIFICATION_EVENT_TYPE_HIDDEN_BY_TIMEOUT))) + && event_type < NOTIFICATION_EVENT_TYPE_MAX) || + (event_type >= NOTIFICATION_EVENT_TYPE_HIDDEN_BY_USER + && event_type <= NOTIFICATION_EVENT_TYPE_HIDDEN_BY_TIMEOUT) || + (event_type >= NOTIFICATION_EVENT_TYPE_PRESSED + && event_type <= NOTIFICATION_EVENT_TYPE_DELETED))) return NOTIFICATION_ERROR_INVALID_PARAMETER; ret = notification_get_event_flag(noti, &event_flag);