Loading...
Searching...
No Matches
Callback.h
Go to the documentation of this file.
1//
2// Created by Dave Smith on 3/21/26.
3//
4
5#ifndef CALLBACK_H
6#define CALLBACK_H
7
8#include <functional>
10
11namespace ml
12{
13 class EventReceiver;
14
31 using EventCallback = std::function<void(const std::optional<sf::Event>&)>;
32
45 using Callback = std::function<void()>;
46
48 using SystemCallback = std::function<void(EventReceiver*, const std::optional<sf::Event>&)>;
49 using FilterCallback = std::function<bool(EventReceiver&)>;
51
52} // namespace ml
53
54#endif // CALLBACK_H
Base class for all event-receiving traits.
std::function< void(const std::optional< sf::Event > &)> EventCallback
Callback type for event handlers that receive the raw SFML event.
Definition Callback.h:31
std::function< void()> Callback
Callback type for no-argument event handlers.
Definition Callback.h:45
Definition Component.h:18