34template <
typename T,
typename Callback>
54template <
typename T,
typename Predicate,
typename Callback>
76[[nodiscard]] MAYAFLUX_API std::shared_ptr<Vruta::BroadcastSource<bool>>
audio_output_tick();
79 std::shared_ptr<std::vector<uint8_t>>
data;
107[[nodiscard]] MAYAFLUX_API std::shared_ptr<Vruta::BroadcastSource<WindowFrame>>
window_frame_tick(
108 const std::shared_ptr<Core::Window>&
window);
116template <
typename T,
typename Callback>
121 const std::string&
name =
"");
141 std::function<std::optional<T>()> fn,
142 const std::string&
name =
"");
155 std::function<std::optional<T>()> fn,
156 const std::string&
name =
"");
160#include "BroadcastEvents.inl"
std::weak_ptr< Core::Window > window
Awaitable single-value broadcast channel for cross-thread signal delivery.
Coroutine type for event-driven suspension.
Token-based multimodal task scheduling system for unified coroutine processing.
Vruta::Event on_signal_matching(std::shared_ptr< Vruta::BroadcastSource< T > > source, Predicate predicate, Callback callback)
Creates an Event coroutine that fires only when a predicate matches.
std::shared_ptr< Vruta::BroadcastSource< WindowFrame > > window_frame_tick(const std::shared_ptr< Core::Window > &window)
Create a BroadcastSource<bool> ticking once per captured window frame.
std::shared_ptr< Vruta::Event > subscribe(Vruta::EventManager &events, std::shared_ptr< Vruta::BroadcastSource< T > > source, Callback callback, const std::string &name="")
Call callback with every value source signals, registered on events.
Vruta::Event on_signal(std::shared_ptr< Vruta::BroadcastSource< T > > source, Callback callback)
Creates an Event coroutine that fires on every signal from a BroadcastSource.
std::shared_ptr< Vruta::BroadcastSource< T > > frame_results(Vruta::TaskScheduler &scheduler, std::function< std::optional< T >()> fn, const std::string &name="")
Broadcast of what fn returns, taken once per graphics frame.
std::shared_ptr< Vruta::BroadcastSource< bool > > audio_output_tick()
Create a BroadcastSource<bool> ticking once per audio output cycle.
std::shared_ptr< std::vector< uint8_t > > data