lv_calendar.h
API reference for lv_calendar.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_calendar_private.h
Functions
lv_calendar_set_today_date
Set the today's year, month and day at once
void lv_calendar_set_today_date(lv_obj_t *obj, uint32_t year, uint32_t month, uint32_t day)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
year | uint32_t | today's year |
month | uint32_t | today's month [1..12] |
day | uint32_t | today's day [1..31] |
lv_calendar_set_today_year
Set the today's year
void lv_calendar_set_today_year(lv_obj_t *obj, uint32_t year)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
year | uint32_t | today's year |
lv_calendar_set_today_month
Set the today's year
void lv_calendar_set_today_month(lv_obj_t *obj, uint32_t month)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
month | uint32_t | today's month [1..12] |
lv_calendar_set_today_day
Set the today's year
void lv_calendar_set_today_day(lv_obj_t *obj, uint32_t day)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
day | uint32_t | today's day [1..31] |
lv_calendar_set_month_shown
Set the currently shown year and month at once
void lv_calendar_set_month_shown(lv_obj_t *obj, uint32_t year, uint32_t month)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
year | uint32_t | shown year |
month | uint32_t | shown month [1..12] |
lv_calendar_set_shown_year
Set the currently shown year
void lv_calendar_set_shown_year(lv_obj_t *obj, uint32_t year)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
year | uint32_t | shown year |
lv_calendar_set_shown_month
Set the currently shown month
void lv_calendar_set_shown_month(lv_obj_t *obj, uint32_t month)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
month | uint32_t | shown month [1..12] |
lv_calendar_set_highlighted_dates
Set the highlighted dates
void lv_calendar_set_highlighted_dates(lv_obj_t *obj, lv_calendar_date_t highlighted[], size_t date_num)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
highlighted | lv_calendar_date_t | pointer to an lv_calendar_date_t array containing the dates. Only the pointer will be saved so this variable can't be local which will be destroyed later. |
date_num | size_t | number of dates in the array |
lv_calendar_set_day_names
Set the name of the days
void lv_calendar_set_day_names(lv_obj_t *obj, const char **day_names)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a calendar object |
day_names | const char ** | pointer to an array with the names. E.g. const char * days[7] = {"Sun", "Mon", ...} Only the pointer will be saved so this variable can't be local which will be destroyed later. |
Structs
struct
lv_calendar_date_t
Represents a date on the calendar object (platform-agnostic).
Used by 4 functions
lv_calendar_set_highlighted_dates— paramhighlightedlv_calendar_get_pressed_date— paramdatelv_calendar_get_day_name— paramgregorianlv_calendar_gregorian_to_chinese— paramgregorian_time
Variables
lv_calendar_class
const lv_obj_class_t lv_calendar_classDependencies
Indirect dependencies
lv_anim.hlv_area.hlv_array.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.hlv_display.hlv_draw.hlv_draw_arc.hlv_draw_blur.hlv_draw_buf.hlv_draw_image.hlv_draw_label.hlv_draw_line.hlv_draw_rect.hlv_draw_triangle.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_group.hlv_image_decoder.hlv_image_dsc.hlv_indev.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_obj.hlv_obj_class.hlv_obj_draw.hlv_obj_event.hlv_obj_pos.hlv_obj_property.hlv_obj_property_names.hlv_obj_scroll.hlv_obj_style.hlv_obj_style_gen.hlv_obj_tree.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_style_properties.hlv_symbol_def.hlv_text.hlv_tick.hlv_timer.hlv_types.h
How is this guide?
Last updated on