载入中...
搜索中...
未找到
Event.h
浏览该文件的文档.
1#pragma once
2
3#include "event/Event.h"
4
5#include <SDL2/SDL_events.h>
6#include <map>
7
8namespace eve::event::sdl
9{
10
11class Event final : public eve::event::Event
12{
13public:
14 Event();
15 virtual ~Event();
16
22 void pump() override;
23
29 Message *wait() override;
30
34 void clear() override;
35
36private:
37 void wakeWaiters() override;
39 Message *convert(const SDL_Event &e);
40 Uint32 wakeEventType_ = static_cast<Uint32>(-1);
41
42}; // Event
43
44} // eve::event::sdl
45
46
A named event carrying an ordered list of Variant payloads. Pushed messages are heap-allocated; the q...
Definition Event.h:56
void pump() override
Pumps the event queue. This function gathers all the pending input information from devices and place...
Definition Event.cpp:31
void clear() override
Clears the event queue.
Definition Event.cpp:73
Message * wait() override
Waits for the next event (indefinitely). Useful for creating games where the screen and game state on...
Definition Event.cpp:47