icon_animation_i.h 806 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. /**
  2. * @file icon_animation_i.h
  3. * GUI: internal IconAnimation API
  4. */
  5. #pragma once
  6. #include "icon_animation.h"
  7. #include <furi.h>
  8. struct IconAnimation {
  9. const Icon* icon;
  10. uint8_t frame;
  11. bool animating;
  12. osTimerId_t timer;
  13. IconAnimationCallback callback;
  14. void* callback_context;
  15. };
  16. /** Get pointer to current frame data
  17. *
  18. * @param instance IconAnimation instance
  19. *
  20. * @return pointer to current frame XBM bitmap data
  21. */
  22. const uint8_t* icon_animation_get_data(IconAnimation* instance);
  23. /** Advance to next frame
  24. *
  25. * @param instance IconAnimation instance
  26. */
  27. void icon_animation_next_frame(IconAnimation* instance);
  28. /** IconAnimation timer callback
  29. *
  30. * @param context pointer to IconAnimation
  31. */
  32. void icon_animation_timer_callback(void* context);