载入中...
搜索中...
未找到
Event.h
浏览该文件的文档.
1#pragma once
2
4
5#if __has_include(<SDL2/SDL_events.h>)
6#include <SDL2/SDL_events.h>
7#else
8#include <SDL_events.h>
9#endif
10#include <map>
11
13
16public:
18 Event();
20 virtual ~Event();
21
27 void pump() override;
28
38 Message *wait() override;
39
43 void clear() override;
44
45private:
46 void wakeWaiters() override;
52 Message *convert(const SDL_Event &e);
53 Uint32 wakeEventType_ = static_cast<Uint32>(-1);
54
55}; // Event
56
57} // namespace eve::platform_event::sdl
A named event carrying an ordered list of Variant payloads. Pushed messages are heap-allocated; the q...
EVENGINE_API_FOUNDATION public API.
Event public API.
Definition Event.h:15
Message * wait() override
Waits for the next event (indefinitely). Useful for creating games where the screen and game state on...
Definition Event.cpp:56
void clear() override
Clears the event queue.
Definition Event.cpp:78
void pump() override
Pumps the event queue. This function gathers all the pending input information from devices and place...
Definition Event.cpp:41
virtual ~Event()
Releases Event resources.
Definition Event.cpp:39
Event()
Constructs a Event.
Definition Event.cpp:29