oboo_calendar.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /**
  2. * @file oboo_calendar.h
  3. *
  4. */
  5. #ifndef OBBO_CALENDAR_H
  6. #define OBBO_CALENDAR_H
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /*********************
  11. * INCLUDES
  12. *********************/
  13. /*********************
  14. * DEFINES
  15. *********************/
  16. /**********************
  17. * TYPEDEFS
  18. **********************/
  19. /**********************
  20. * GLOBAL PROTOTYPES
  21. **********************/
  22. /**
  23. * Initializes the calendar styles and create a calendar
  24. * @param parent create the calendar on this parent
  25. * @aparam x position in x
  26. * @aparam y position in y
  27. * @aparam w width
  28. * @aparam h height
  29. * @return the created calendar object (lv_calendar)
  30. */
  31. lv_obj_t * oboo_calendar_create(lv_obj_t * parent, uint32_t x, uint32_t y, uint32_t w, uint32_t h);
  32. /**
  33. * Set the some day
  34. * @param calendar pointer to calendar (return value of `oboo_calendar_create`)
  35. * @param year the current year (e.g. 2018)
  36. * @param month the current month (e.g. 7 [1..12])
  37. * @param day the current day (e.g. 23 [1..31])
  38. */
  39. void oboo_calendar_set_day(lv_obj_t * calendar, uint32_t year, uint8_t month, uint8_t day);
  40. /**
  41. * Set events for the calendar
  42. * @param calendar pointer to calendar (return value of `oboo_calendar_create`)
  43. * @param events an array with the events. Only the pointer is saved so the array can't be a local variable
  44. * @param event_cnt number of events in the array
  45. */
  46. void oboo_calendar_set_events(lv_obj_t * calendar, lv_calendar_date_t * events, uint32_t event_cnt);
  47. /**
  48. * Clear the events
  49. * @param calendar pointer to calendar (return value of `oboo_calendar_create`)
  50. */
  51. void obbo_calendar_clear_events(lv_obj_t * calendar);
  52. /**********************
  53. * MACROS
  54. **********************/
  55. #ifdef __cplusplus
  56. } /* extern "C" */
  57. #endif
  58. #endif /*OBBO_CALENDAR_H*/