1 #ifndef DONUT_EVENTS_EVENT_PUMP_HPP
2 #define DONUT_EVENTS_EVENT_PUMP_HPP
Persistent system for polling Event data and other user input from the host environment on demand.
Definition: EventPump.hpp:23
std::string getClipboardText() const
Get the current text contained in the clipboard.
EventPump & operator=(const EventPump &)=delete
Copying an event pump is not allowed, since it manages global state.
EventPump()
Construct an event pump.
void startTextInput()
Start accepting text input events in the current text input rectangle.
std::span< const Event > getLatestPolledEvents() const noexcept
Get the latest events in the internal event buffer that were polled using pollEvents().
EventPump(const EventPump &)=delete
Copying an event pump is not allowed, since it manages global state.
EventPump & operator=(EventPump &&)=delete
Moving an event pump is not allowed, since it manages global state.
std::span< const Event > pollEvents()
Poll events from the environment and update the internal event buffer.
EventPump(EventPump &&)=delete
Moving an event pump is not allowed, since it manages global state.
void stopTextInput()
Stop accepting text input events.
void setRelativeMouseMode(bool relativeMouseMode)
Enable or disable relative mouse mode.
bool hasScreenKeyboardSupport() const noexcept
Check if the application supports a screen keyboard.
void setTextInputRectangle(ivec2 offset, ivec2 size)
Set the input rectangle for text input.
Data structure containing information about an event.
Definition: Event.hpp:339