display.h 359 B

1234567891011121314151617181920212223
  1. #pragma once
  2. #include <array>
  3. #include <memory>
  4. class Display {
  5. private:
  6. bool quit_{false};
  7. bool play_{true};
  8. public:
  9. Display(const unsigned width, const unsigned height);
  10. // Copy frame to display
  11. void refresh(
  12. std::array<uint8_t*, 3> planes, std::array<size_t, 3> pitches);
  13. // Handle events
  14. void input();
  15. bool get_quit();
  16. bool get_play();
  17. };