载入中...
搜索中...
未找到
eve::event::sdl::Event类 参考final
#include <Event.h>
类 eve::event::sdl::Event 继承关系图:
Public 成员函数 | |
| Event () | |
| virtual | ~Event () |
| void | pump () override |
| Pumps the event queue. This function gathers all the pending input information from devices and places it on the event queue. Normally not needed if you poll for events. | |
| Message * | wait () override |
| Waits for the next event (indefinitely). Useful for creating games where the screen and game state only needs updating when the user interacts with the window. | |
| void | clear () override |
| Clears the event queue. | |
Public 成员函数 继承自 eve::event::Event | |
| Module_REG (Event) | |
| void | push (Message *msg) |
| Queues a message. Thread-safe: workers may push completions for the main loop to poll. | |
| void | pushData (std::string name, std::string data="") |
| Script helper: pushes an event with an optional string payload. | |
| Message * | poll () |
| Pops the oldest message, or nullptr if the queue is empty (caller must delete). | |
| std::string | pollName () |
| Script helper: pops one message and returns its name, or "" if none. | |
| std::string | getLastData () const |
| First string arg of the message most recently returned by pollName/pollData. | |
| std::string | pollData () |
| Pops one message and returns its first string arg (or ""). Name is discarded — use pollName when you need the type. | |
Public 成员函数 继承自 eve::Module | |
| virtual | ~Module () |
| virtual std::string | getName () const =0 |
额外继承的成员函数 | |
Protected 属性 继承自 eve::event::Event | |
| std::mutex | queueMu_ |
| std::queue< Message * > | queue |
| std::string | lastData_ |
详细描述
构造及析构函数说明
◆ Event()
◆ ~Event()
|
virtual |
重载 eve::event::Event .
成员函数说明
◆ clear()
|
overridevirtual |
Clears the event queue.
重载 eve::event::Event .
◆ pump()
|
overridevirtual |
Pumps the event queue. This function gathers all the pending input information from devices and places it on the event queue. Normally not needed if you poll for events.
实现了 eve::event::Event.
引用了 eve::event::IPlatformEventSink::onPumpFinished(), eve::event::Event::push() , 以及 eve::cap::query().
◆ wait()
|
overridevirtual |
Waits for the next event (indefinitely). Useful for creating games where the screen and game state only needs updating when the user interacts with the window.
实现了 eve::event::Event.
该类的文档由以下文件生成:
Public 成员函数 继承自