Loading...
Searching...
No Matches
Callback.h
Go to the documentation of this file.
1// Copyright (c) 2025 Dave R. Smith. All rights reserved.
2// Malena Framework — Proprietary Software. See LICENSE for terms.
3
4//
5// Created by Dave Smith on 3/21/26.
6//
7
8#ifndef MALENA_CALLBACK_H
9#define MALENA_CALLBACK_H
10
12#include <functional>
13#include <SFML/Window/Event.hpp>
14#include <optional>
15namespace ml
16{
17 class EventReceiver;
18
35 using EventCallback = std::function<void(const std::optional<sf::Event>&)>;
36
49 using Callback = std::function<void()>;
50
52 using SystemCallback = std::function<void(EventReceiver*, const std::optional<sf::Event>&)>;
53 using FilterCallback = std::function<bool(EventReceiver&)>;
55
56} // namespace ml
57
58#endif // MALENA_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:35
std::function< void()> Callback
Callback type for no-argument event handlers.
Definition Callback.h:49
Definition Component.h:22