1 /**
2  * @file lv_demo_smartwatch_notifications.h
3  *
4  */
5 
6 #ifndef LV_DEMO_SMARTWATCH_NOTIFICATIONS_H
7 #define LV_DEMO_SMARTWATCH_NOTIFICATIONS_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "lv_demo_smartwatch.h"
17 
18 #if LV_USE_DEMO_SMARTWATCH
19 
20 /*********************
21  *      DEFINES
22  *********************/
23 
24 /**********************
25  *      TYPEDEFS
26  **********************/
27 
28 /**********************
29  * GLOBAL PROTOTYPES
30  **********************/
31 
32 /**
33  * Create the notifications page. Called only once.
34  */
35 void lv_demo_smartwatch_notifications_create(void);
36 
37 /**
38  * Clear the notification list
39  */
40 void lv_demo_smartwatch_clear_notifications(void);
41 
42 /**
43  * Load the notifications screen
44  * @param anim_type     screen load animation to use
45  * @param time          animation time
46  * @param delay         delay time before loading the screen
47  */
48 void lv_demo_smartwatch_notifications_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay);
49 
50 /**
51  * Add a notification to the list
52  * @param app_id    id of the app sending the notification (sets icon from the inbuilt icon list)
53  * @param message   the notification message preview
54  * @param index     position of the message that will be returned when clicked
55  */
56 void lv_demo_smartwatch_add_notification(int app_id, const char * message, int index);
57 
58 /**
59  * Show a specific notification when in the notification screen
60  * @param app_id    id of the app sending the notification (sets icon from the inbuilt icon list)
61  * @param message   the notification message content
62  * @param time      the notification time
63  */
64 void lv_demo_smartwatch_show_notification(int app_id, const char * message, const char * time);
65 
66 /**
67  * Set the callback funtion when a notification is clicked
68  * @param cb callback function [user should call lv_demo_smartwatch_show_notification() to show the notification]
69  */
70 void lv_demo_smartwatch_set_notification_click_cb(lv_smartwatch_notification_click_cb_t cb);
71 
72 /**********************
73  *      MACROS
74  **********************/
75 
76 #endif /*LV_USE_DEMO_SMARTWATCH*/
77 
78 #ifdef __cplusplus
79 } /*extern "C"*/
80 #endif
81 
82 #endif /*LV_DEMO_SMARTWATCH_HOME_H*/
83