icon.h 740 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #pragma once
  2. #include <stdint.h>
  3. #include <stdbool.h>
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct IconData IconData;
  8. typedef struct Icon Icon;
  9. /*
  10. * Allocate icon instance with const icon data.
  11. * always returns Icon or stops system if not enough memory
  12. */
  13. Icon* icon_alloc(const IconData* data);
  14. /*
  15. * Release icon instance
  16. */
  17. void icon_free(Icon* icon);
  18. /*
  19. * Get icon width
  20. */
  21. uint8_t icon_get_width(Icon* icon);
  22. /*
  23. * Get icon height
  24. */
  25. uint8_t icon_get_height(Icon* icon);
  26. /*
  27. * Check if icon is animated
  28. */
  29. bool icon_is_animated(Icon* icon);
  30. /*
  31. * Start icon animation
  32. */
  33. void icon_start_animation(Icon* icon);
  34. /*
  35. * Stop icon animation
  36. */
  37. void icon_stop_animation(Icon* icon);
  38. #ifdef __cplusplus
  39. }
  40. #endif