system_context_fltk.h 813 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. //
  3. // Copyright (c) 2019-2025 Ivan Baidakou (basiliscos) (the dot dmol at gmail dot com)
  4. //
  5. // Distributed under the MIT Software License
  6. //
  7. #include "rotor/arc.hpp"
  8. #include "rotor/fltk/export.h"
  9. #include "rotor/system_context.h"
  10. namespace rotor {
  11. namespace fltk {
  12. struct supervisor_fltk_t;
  13. /** \struct system_context_fltk_t
  14. * \brief The FLTK system context to allow rotor messaging with fltk-backend.
  15. */
  16. struct ROTOR_FLTK_API system_context_fltk_t : system_context_t {
  17. using system_context_t::system_context_t;
  18. private:
  19. void enqueue(message_ptr_t message) noexcept;
  20. friend supervisor_fltk_t;
  21. };
  22. /** \brief intrusive pointer type for fltk system context */
  23. using system_context_ptr_t = rotor::intrusive_ptr_t<system_context_fltk_t>;
  24. } // namespace fltk
  25. } // namespace rotor