2 * Copyright (c) 2016 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 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 #ifndef _LOCKSCREEN_EVENTS_H_
17 #define _LOCKSCREEN_EVENTS_H_
19 #include <Elementary.h>
23 LOCKSCREEN_EVENT_TYPE_NOTIFICATION = (1 << 0),
24 LOCKSCREEN_EVENT_TYPE_MINICONTROLLER = (1 << 1)
25 } lockscreen_event_type_e;
28 * @brief Event fired when lockscreen's events change.
30 extern int LOCKSCREEN_EVENT_EVENTS_CHANGED;
33 * @brief lockscreen event handle
35 typedef struct lockscreen_event lockscreen_event_t;
38 * @brief Initialize event support
40 * @return: 0 on success, other value on failure.
42 int lockscreen_events_init(void);
45 * @brief Denitialize event support.
47 void lockscreen_events_shutdown(void);
50 * @brief Gets main event icon
52 const char *lockscreen_event_icon_get(const lockscreen_event_t *event);
55 * @brief Get secondary event icon
57 const char *lockscreen_event_sub_icon_get(const lockscreen_event_t *event);
60 * @brief Get event title
62 const char *lockscreen_event_title_get(const lockscreen_event_t *event);
65 * @brief Get event textual content.
67 const char *lockscreen_event_content_get(const lockscreen_event_t *event);
70 * @brief Gets time when event was posted.
72 time_t lockscreen_event_time_get(const lockscreen_event_t *event);
75 * @brief Result of launch true if launch has successed, false otherwise
77 typedef void (*Launch_Result_Cb)(bool result);
80 * @brief Launch application which posted the event
82 bool lockscreen_event_launch(lockscreen_event_t *event, Launch_Result_Cb cb);
85 * @brief Get event type.
87 lockscreen_event_type_e lockscreen_event_type_get(const lockscreen_event_t *event);
90 * @brief Gets list of all displayed events.
92 * @note list elements are only until LOCKSCREEN_EVENT_NOTIFICATIONS_CHANGED is fired.
93 * @note should be free with eina_list_free
95 Eina_List *lockscreen_events_get(void);
98 * @brief Inticates if any events for lockscreen are currently posted.
100 bool lockscreen_events_exists(void);
103 * @brief Creates minicontroller for given event.
105 Evas_Object *lockscreen_event_minicontroller_create(lockscreen_event_t *event, Evas_Object *parent);
108 * @brief Clears event
110 void lockscreen_event_remove(lockscreen_event_t *event);
113 * @brief Clears all events
115 void lockscreen_events_remove_all(void);