|
| | Event () |
| | Constructs a Event.
|
| |
| virtual | ~Event () |
| | Releases Event resources.
|
| |
| 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. @ownership Ownership of the returned Message transfers to the caller. @lifetime Valid until caller deletion; independent of the native event. @thread Platform event thread only. @reentrancy Registered sinks run synchronously during conversion.
|
| |
| void | clear () override |
| | Clears the event queue.
|
| |
| | Module_REG (PlatformEvent) |
| |
| virtual | ~PlatformEvent () |
| | Platform event.
|
| |
| void | push (Message *msg) |
| | Queues a message. Thread-safe: workers may push completions for the main loop to poll.
|
| |
| void | push (std::unique_ptr< Message > msg) |
| | Queues an owning message handle; ownership transfers to the queue.
|
| |
| 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. @ownership Ownership transfers to the caller, which must delete the message. @lifetime Valid until caller deletion; independent of subsequent queue mutation. @thread Thread-safe queue operation; observer callbacks run after unlocking. @reentrancy Poll observers may re-enter the queue.
|
| |
| std::unique_ptr< Message > | pollOwned () |
| | Pops the oldest message into an RAII handle, or returns null.
|
| |
| 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.
|
| |
| void | setPollObserver (std::function< void(const Message &)> observer) |
| | Sets an observer invoked for every message consumed via poll*().
|
| |
| const std::function< void(const Message &)> & | pollObserver () const |
| | Current poll observer, or empty if none.
|
| |
| eve::Subscription | subscribePoll (std::function< void(const Message &)> callback) |
| | Subscribe to every message consumed by poll/pollOwned.
|
| |
| std::uint64_t | pollObserverFailureCount () const noexcept |
| | Number of contained poll-listener exceptions since construction.
|
| |
| std::unique_ptr< Message > | waitOwned () |
| | Blocking wait returning an RAII handle.
|
| |
| virtual | ~Module () |
| | Module.
|
| |
| virtual std::string | getName () const =0 |
| | Returns the name.
|
| |