1 /** 2 * @file lv_demo_smartwatch_private.h 3 * 4 */ 5 6 #ifndef LV_DEMO_SMARTWATCH_PRIVATE_H 7 #define LV_DEMO_SMARTWATCH_PRIVATE_H 8 9 #ifdef __cplusplus 10 extern "C" 11 { 12 #endif 13 14 /********************* 15 * INCLUDES 16 *********************/ 17 #include "../../lvgl.h" 18 19 20 #if LV_USE_DEMO_SMARTWATCH 21 22 23 /********************* 24 * DEFINES 25 *********************/ 26 27 LV_IMAGE_DECLARE(img_weather_day_0); /* assets/dy-0.png */ 28 LV_IMAGE_DECLARE(img_weather_day_1); /* assets/dy-1.png */ 29 LV_IMAGE_DECLARE(img_weather_day_2); /* assets/dy-2.png */ 30 LV_IMAGE_DECLARE(img_weather_day_3); /* assets/dy-3.png */ 31 LV_IMAGE_DECLARE(img_weather_day_4); /* assets/dy-4.png */ 32 LV_IMAGE_DECLARE(img_weather_day_5); /* assets/dy-5.png */ 33 LV_IMAGE_DECLARE(img_weather_day_6); /* assets/dy-6.png */ 34 LV_IMAGE_DECLARE(img_weather_day_7); /* assets/dy-7.png */ 35 36 LV_IMAGE_DECLARE(img_weather_night_0); /* assets/nt-0.png */ 37 LV_IMAGE_DECLARE(img_weather_night_1); /* assets/nt-1.png */ 38 LV_IMAGE_DECLARE(img_weather_night_2); /* assets/nt-2.png */ 39 LV_IMAGE_DECLARE(img_weather_night_3); /* assets/nt-3.png */ 40 LV_IMAGE_DECLARE(img_weather_night_4); /* assets/nt-4.png */ 41 LV_IMAGE_DECLARE(img_weather_night_5); /* assets/nt-5.png */ 42 LV_IMAGE_DECLARE(img_weather_night_6); /* assets/nt-6.png */ 43 LV_IMAGE_DECLARE(img_weather_night_7); /* assets/nt-7.png */ 44 45 LV_IMAGE_DECLARE(img_facebook_icon); /* assets/facebook.png */ 46 LV_IMAGE_DECLARE(img_instagram_icon); /* assets/instagram.png */ 47 LV_IMAGE_DECLARE(img_kakao_icon); /* assets/kakao.png */ 48 LV_IMAGE_DECLARE(img_line_icon); /* assets/line.png */ 49 LV_IMAGE_DECLARE(img_mail_icon); /* assets/mail.png */ 50 LV_IMAGE_DECLARE(img_messenger_icon); /* assets/messenger.png */ 51 LV_IMAGE_DECLARE(img_penguin_icon); /* assets/penguin.png */ 52 LV_IMAGE_DECLARE(img_skype_icon); /* assets/skype.png */ 53 LV_IMAGE_DECLARE(img_sms_icon); /* assets/sms.png */ 54 LV_IMAGE_DECLARE(img_telegram_icon); /* assets/telegram.png */ 55 LV_IMAGE_DECLARE(img_twitter_icon); /* assets/twitter.png */ 56 LV_IMAGE_DECLARE(img_viber_icon); /* assets/viber.png */ 57 LV_IMAGE_DECLARE(img_vkontakte_icon); /* assets/vkontakte.png */ 58 LV_IMAGE_DECLARE(img_weibo_icon); /* assets/weibo.png */ 59 LV_IMAGE_DECLARE(img_whatsapp_icon); /* assets/whatsapp.png */ 60 LV_IMAGE_DECLARE(img_wechat_icon); /* assets/wechat.png */ 61 LV_IMAGE_DECLARE(img_chrns_icon); /* assets/chrns.png */ 62 63 LV_IMAGE_DECLARE(img_brightness_icon); /* assets/brightness.png */ 64 LV_IMAGE_DECLARE(img_scrolling_icon); /* assets/scrolling.png */ 65 LV_IMAGE_DECLARE(img_timeout_icon); /* assets/timeout.png */ 66 LV_IMAGE_DECLARE(img_bat_icon); /* assets/bat.png */ 67 LV_IMAGE_DECLARE(img_info_icon); /* assets/info.png */ 68 LV_IMAGE_DECLARE(img_play_icon); /* assets/play.png */ 69 LV_IMAGE_DECLARE(img_left_arrow_icon); /* assets/left-arrow.png */ 70 LV_IMAGE_DECLARE(img_right_arrow_icon); /* assets/right-arrow.png */ 71 LV_IMAGE_DECLARE(img_bt_icon); /* assets/bt.png */ 72 LV_IMAGE_DECLARE(img_search_icon); /* assets/search.png */ 73 LV_IMAGE_DECLARE(img_camera_icon); /* assets/camera.png */ 74 LV_IMAGE_DECLARE(img_notify_icon); /* assets/notify.png */ 75 LV_IMAGE_DECLARE(img_setting_icon); /* assets/setting.png */ 76 LV_IMAGE_DECLARE(img_play_pause_g_icon); /* assets/play_pause_g.png */ 77 LV_IMAGE_DECLARE(img_previous_g_icon); /* assets/previous_g.png */ 78 LV_IMAGE_DECLARE(img_next_g_icon); /* assets/next_g.png */ 79 LV_IMAGE_DECLARE(img_bluetooth_g_icon); /* assets/bluetooth_g.png */ 80 LV_IMAGE_DECLARE(img_search_g_icon); /* assets/search_g.png */ 81 LV_IMAGE_DECLARE(img_volupe_up_g_icon); /* assets/volupe_up_g.png */ 82 LV_IMAGE_DECLARE(img_volume_down_g_icon); /* assets/volume_down_g.png */ 83 LV_IMAGE_DECLARE(img_qr_icon); /* assets/qr_icon.png */ 84 LV_IMAGE_DECLARE(img_twitter_x_icon); /* assets/twitter_x.png */ 85 LV_IMAGE_DECLARE(img_battery_plugged_icon); /* assets/battery_plugged.png */ 86 LV_IMAGE_DECLARE(img_ble_app_icon); /* assets/ble_app.png */ 87 LV_IMAGE_DECLARE(img_battery_state_icon); /* assets/battery_state.png */ 88 LV_IMAGE_DECLARE(img_answer_icon); /* assets/answer.png */ 89 LV_IMAGE_DECLARE(img_app_info_icon); /* assets/app_info.png */ 90 LV_IMAGE_DECLARE(img_smartwatch_icon); /* assets/smartwatch.png */ 91 LV_IMAGE_DECLARE(img_vol_up_icon); /* assets/vol_up.png */ 92 LV_IMAGE_DECLARE(img_vol_down_icon); /* assets/vol_down.png */ 93 LV_IMAGE_DECLARE(img_pay_icon); /* assets/pay.png */ 94 LV_IMAGE_DECLARE(img_web_icon); /* assets/web.png */ 95 LV_IMAGE_DECLARE(img_kenya_icon); /* assets/kenya.png */ 96 LV_IMAGE_DECLARE(img_lvgl_logo_icon); /* assets/lvgl_logo.png */ 97 LV_IMAGE_DECLARE(img_lvgl_logo_black_icon); /* assets/lvgl_logo_black.png */ 98 LV_IMAGE_DECLARE(img_lvgl_logo_red_icon); /* assets/lvgl_logo_red.png */ 99 LV_IMAGE_DECLARE(img_lvgl_logo_green_icon); /* assets/lvgl_logo_green.png */ 100 LV_IMAGE_DECLARE(img_lvgl_logo_blue_icon); /* assets/lvgl_logo_blue.png */ 101 LV_IMAGE_DECLARE(img_game_icon); /* assets/game_icon.png */ 102 LV_IMAGE_DECLARE(img_language_icon); /* assets/language.png */ 103 LV_IMAGE_DECLARE(img_file_manager_icon); /* assets/file_manager.png */ 104 LV_IMAGE_DECLARE(img_drive_icon); /* assets/drive.png */ 105 LV_IMAGE_DECLARE(img_file_icon); /* assets/file.png */ 106 LV_IMAGE_DECLARE(img_directory_icon); /* assets/directory.png */ 107 LV_IMAGE_DECLARE(img_back_file_icon); /* assets/back_file.png */ 108 LV_IMAGE_DECLARE(img_clock_icon); /* assets/clock.png */ 109 LV_IMAGE_DECLARE(img_bin_icon); /* assets/bin.png */ 110 LV_IMAGE_DECLARE(img_up_arrow_icon); /* assets/up_arrow.png */ 111 LV_IMAGE_DECLARE(img_screen_rotate_icon); /* assets/screen_rotate.png */ 112 LV_IMAGE_DECLARE(img_wechat_pay_icon); /* assets/wechat_pay.png */ 113 LV_IMAGE_DECLARE(img_alipay_icon); /* assets/alipay.png */ 114 LV_IMAGE_DECLARE(img_paypal_icon); /* assets/paypal.png */ 115 LV_IMAGE_DECLARE(img_digital_preview); /* assets/digital_preview.png */ 116 LV_IMAGE_DECLARE(img_alert_icon); /* assets/alert.png */ 117 LV_IMAGE_DECLARE(img_general_settings_icon); /* assets/general_settings.png */ 118 LV_IMAGE_DECLARE(img_notifications_app_icon); /* assets/notifications_app.png */ 119 LV_IMAGE_DECLARE(img_weather_app_icon); /* assets/weather_app.png */ 120 LV_IMAGE_DECLARE(img_note_icon); /* assets/note.png */ 121 LV_IMAGE_DECLARE(img_application_icon); /* assets/application.png */ 122 LV_IMAGE_DECLARE(img_cloud_icon); /* assets/cloud.png */ 123 LV_IMAGE_DECLARE(img_chat_icon); /* assets/chat.png */ 124 125 /********************** 126 * TYPEDEFS 127 **********************/ 128 129 /********************** 130 * GLOBAL PROTOTYPES 131 **********************/ 132 133 /********************** 134 * GLOBAL VARIABLES 135 **********************/ 136 137 /** 138 * Load the home screen 139 * @param anim_type screen load animation to use 140 * @param time animation time 141 * @param delay delay time before loading the screen 142 */ 143 void lv_demo_smartwatch_home_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 144 145 /** 146 * Load the settings screen 147 * @param anim_type screen load animation to use 148 * @param time animation time 149 * @param delay delay time before loading the screen 150 */ 151 void lv_demo_smartwatch_settings_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 152 153 /** 154 * Load the control panel screen 155 * @param anim_type screen load animation to use 156 * @param time animation time 157 * @param delay delay time before loading the screen 158 */ 159 void lv_demo_smartwatch_control_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 160 161 /** 162 * Load the weather screen 163 * @param anim_type screen load animation to use 164 * @param time animation time 165 * @param delay delay time before loading the screen 166 */ 167 void lv_demo_smartwatch_weather_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 168 169 /** 170 * Load the app list screen 171 * @param anim_type screen load animation to use 172 * @param time animation time 173 * @param delay delay time before loading the screen 174 */ 175 void lv_demo_smartwatch_list_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 176 177 /** 178 * Load the notifications screen 179 * @param anim_type screen load animation to use 180 * @param time animation time 181 * @param delay delay time before loading the screen 182 */ 183 void lv_demo_smartwatch_notifications_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 184 185 /** 186 * Load the qr screen 187 * @param anim_type screen load animation to use 188 * @param time animation time 189 * @param delay delay time before loading the screen 190 */ 191 void lv_demo_smartwatch_qr_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 192 193 /** 194 * Load the easter egg screen 195 * @param anim_type screen load animation to use 196 * @param time animation time 197 * @param delay delay time before loading the screen 198 */ 199 void lv_demo_smartwatch_easter_egg_load(lv_screen_load_anim_t anim_type, uint32_t time, uint32_t delay); 200 201 202 /** 203 * Function that handles animation of circular scrolling 204 * @param e event 205 */ 206 void lv_demo_smartwatch_scroll_event(lv_event_t * e); 207 208 /** 209 * Notify the app list that the screen is loading. 210 * This is used to set the circular scroll mode and scrollbar mode of the app list. 211 */ 212 void lv_demo_smartwatch_app_list_loading(void); 213 214 /** 215 * Set whether to enable circular scroll on lists 216 * @param state enable or disable 217 */ 218 void lv_demo_smartwatch_set_circular_scroll(bool state); 219 220 /** 221 * Get the scrollbar mode 222 * @return current scrollbar mode 223 */ 224 lv_scrollbar_mode_t lv_demo_smartwatch_get_scrollbar_mode(void); 225 226 /** 227 * Set the scrollbar mode 228 * @param mode scrollbar mode 229 */ 230 void lv_demo_smartwatch_set_scrollbar_mode(lv_scrollbar_mode_t mode); 231 232 /** 233 * Set whether to load app list 234 * @param state enable or disable 235 */ 236 void lv_demo_smartwatch_set_load_app_list(bool state); 237 238 /** 239 * Get whether to load app list 240 * @return state whether to load app list or not 241 */ 242 bool lv_demo_smartwatch_get_load_app_list(void); 243 244 245 /** 246 * Get the app list tile object 247 * @return pointer to the app list tile object 248 */ 249 lv_obj_t * lv_demo_smartwatch_get_tile_app_list(void); 250 251 252 /** 253 * Get the controls tile object 254 * @return pointer to the controls tile object 255 */ 256 lv_obj_t * lv_demo_smartwatch_get_tile_control(void); 257 258 /** 259 * Update the brightness slider in the controls screen 260 * @param value new value of the slider 261 */ 262 void lv_demo_smartwatch_update_brightness_slider(uint8_t value); 263 264 /********************** 265 * MACROS 266 **********************/ 267 268 #endif /*LV_USE_DEMO_SMARTWATCH*/ 269 270 #ifdef __cplusplus 271 } /*extern "C"*/ 272 #endif 273 274 #endif /*LV_DEMO_SMARTWATCH_PRIVATE_H*/ 275