elements.h 771 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include <stdint.h>
  3. #include "canvas.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. /*
  8. * Draw scrollbar on canvas.
  9. * width 3px, height equal to canvas height
  10. * @param pos - current element of total elements
  11. * @param total - total elements
  12. */
  13. void elements_scrollbar(Canvas* canvas, uint8_t pos, uint8_t total);
  14. /*
  15. * Draw rounded frame
  16. * @param x, y - top left corner coordinates
  17. * @param width, height - frame width and height
  18. */
  19. void elements_frame(Canvas* canvas, uint8_t x, uint8_t y, uint8_t width, uint8_t height);
  20. /*
  21. * Draw multiline text
  22. * @param x, y - top left corner coordinates
  23. * @param text - string (possible multiline)
  24. */
  25. void elements_multiline_text(Canvas* canvas, uint8_t x, uint8_t y, char* text);
  26. #ifdef __cplusplus
  27. }
  28. #endif