lvgl.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /**
  2. * @file lvgl.h
  3. * Include all LittleV GL related headers
  4. */
  5. #ifndef LVGL_H
  6. #define LVGL_H
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. /***************************
  11. * CURRENT VERSION OF LVGL
  12. ***************************/
  13. #define LVGL_VERSION_MAJOR 7
  14. #define LVGL_VERSION_MINOR 11
  15. #define LVGL_VERSION_PATCH 0
  16. #define LVGL_VERSION_INFO ""
  17. /*********************
  18. * INCLUDES
  19. *********************/
  20. #include "src/lv_misc/lv_log.h"
  21. #include "src/lv_misc/lv_task.h"
  22. #include "src/lv_misc/lv_math.h"
  23. #include "src/lv_misc/lv_async.h"
  24. #include "src/lv_hal/lv_hal.h"
  25. #include "src/lv_core/lv_obj.h"
  26. #include "src/lv_core/lv_group.h"
  27. #include "src/lv_core/lv_indev.h"
  28. #include "src/lv_core/lv_refr.h"
  29. #include "src/lv_core/lv_disp.h"
  30. #include "src/lv_themes/lv_theme.h"
  31. #include "src/lv_font/lv_font.h"
  32. #include "src/lv_font/lv_font_loader.h"
  33. #include "src/lv_font/lv_font_fmt_txt.h"
  34. #include "src/lv_misc/lv_printf.h"
  35. #include "src/lv_widgets/lv_btn.h"
  36. #include "src/lv_widgets/lv_imgbtn.h"
  37. #include "src/lv_widgets/lv_img.h"
  38. #include "src/lv_widgets/lv_label.h"
  39. #include "src/lv_widgets/lv_line.h"
  40. #include "src/lv_widgets/lv_page.h"
  41. #include "src/lv_widgets/lv_cont.h"
  42. #include "src/lv_widgets/lv_list.h"
  43. #include "src/lv_widgets/lv_chart.h"
  44. #include "src/lv_widgets/lv_table.h"
  45. #include "src/lv_widgets/lv_checkbox.h"
  46. #include "src/lv_widgets/lv_cpicker.h"
  47. #include "src/lv_widgets/lv_bar.h"
  48. #include "src/lv_widgets/lv_slider.h"
  49. #include "src/lv_widgets/lv_led.h"
  50. #include "src/lv_widgets/lv_btnmatrix.h"
  51. #include "src/lv_widgets/lv_keyboard.h"
  52. #include "src/lv_widgets/lv_dropdown.h"
  53. #include "src/lv_widgets/lv_roller.h"
  54. #include "src/lv_widgets/lv_textarea.h"
  55. #include "src/lv_widgets/lv_canvas.h"
  56. #include "src/lv_widgets/lv_win.h"
  57. #include "src/lv_widgets/lv_tabview.h"
  58. #include "src/lv_widgets/lv_tileview.h"
  59. #include "src/lv_widgets/lv_msgbox.h"
  60. #include "src/lv_widgets/lv_objmask.h"
  61. #include "src/lv_widgets/lv_gauge.h"
  62. #include "src/lv_widgets/lv_linemeter.h"
  63. #include "src/lv_widgets/lv_switch.h"
  64. #include "src/lv_widgets/lv_arc.h"
  65. #if LV_USE_ANIMATION
  66. #include "src/lv_widgets/lv_spinner.h"
  67. #endif
  68. #include "src/lv_widgets/lv_calendar.h"
  69. #include "src/lv_widgets/lv_spinbox.h"
  70. #include "src/lv_draw/lv_img_cache.h"
  71. #include "src/lv_api_map.h"
  72. /*********************
  73. * DEFINES
  74. *********************/
  75. /**********************
  76. * TYPEDEFS
  77. **********************/
  78. /**********************
  79. * GLOBAL PROTOTYPES
  80. **********************/
  81. /**********************
  82. * MACROS
  83. **********************/
  84. /** Gives 1 if the x.y.z version is supported in the current version
  85. * Usage:
  86. *
  87. * - Require v6
  88. * #if LV_VERSION_CHECK(6,0,0)
  89. * new_func_in_v6();
  90. * #endif
  91. *
  92. *
  93. * - Require at least v5.3
  94. * #if LV_VERSION_CHECK(5,3,0)
  95. * new_feature_from_v5_3();
  96. * #endif
  97. *
  98. *
  99. * - Require v5.3.2 bugfixes
  100. * #if LV_VERSION_CHECK(5,3,2)
  101. * bugfix_in_v5_3_2();
  102. * #endif
  103. *
  104. * */
  105. #define LV_VERSION_CHECK(x,y,z) (x == LVGL_VERSION_MAJOR && (y < LVGL_VERSION_MINOR || (y == LVGL_VERSION_MINOR && z <= LVGL_VERSION_PATCH)))
  106. /**
  107. * Wrapper functions for VERSION macros
  108. */
  109. static inline int lv_version_major(void)
  110. {
  111. return LVGL_VERSION_MAJOR;
  112. }
  113. static inline int lv_version_minor(void)
  114. {
  115. return LVGL_VERSION_MINOR;
  116. }
  117. static inline int lv_version_patch(void)
  118. {
  119. return LVGL_VERSION_PATCH;
  120. }
  121. static inline const char *lv_version_info(void)
  122. {
  123. return LVGL_VERSION_INFO;
  124. }
  125. #ifdef __cplusplus
  126. }
  127. #endif
  128. #endif /*LVGL_H*/