1 /**
2  * @file lv_calendar_header_dropdown.h
3  *
4  */
5 
6 #ifndef LV_CALENDAR_HEADER_DROPDOWN_H
7 #define LV_CALENDAR_HEADER_DROPDOWN_H
8 
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 /*********************
14  *      INCLUDES
15  *********************/
16 #include "../../../core/lv_obj.h"
17 #if LV_USE_CALENDAR_HEADER_DROPDOWN
18 
19 /*********************
20  *      DEFINES
21  *********************/
22 
23 /**********************
24  *      TYPEDEFS
25  **********************/
26 extern const lv_obj_class_t lv_calendar_header_dropdown_class;
27 
28 /**********************
29  * GLOBAL PROTOTYPES
30  **********************/
31 
32 /**
33  * Create a calendar header with drop-drowns to select the year and month
34  * @param parent    pointer to a calendar object.
35  * @return          the created header
36  */
37 lv_obj_t * lv_calendar_header_dropdown_create(lv_obj_t * parent);
38 
39 /**
40  * Sets a custom calendar year list
41  * @param parent        pointer to a calendar object
42  * @param years_list    pointer to an const char array with the years list, see lv_dropdown set_options for more information.
43  *                      E.g. `const char * years = "2023\n2022\n2021\n2020\n2019"
44  *                      Only the pointer will be saved so this variable can't be local which will be destroyed later.
45  */
46 void lv_calendar_header_dropdown_set_year_list(lv_obj_t * parent, const char * years_list);
47 
48 /**********************
49  *      MACROS
50  **********************/
51 
52 #endif /*LV_USE_CALENDAR_HEADER_ARROW*/
53 
54 #ifdef __cplusplus
55 } /*extern "C"*/
56 #endif
57 
58 #endif /*LV_CALENDAR_HEADER_DROPDOWN_H*/
59