1#ifndef INPUTEVENTGENERATOR_HH
2#define INPUTEVENTGENERATOR_HH
12class CommandController;
13class EventDistributor;
47 void handle(
const SDL_Event& evt);
48 void handleKeyDown(
const SDL_KeyboardEvent& key, uint32_t unicode);
49 void handleText(
const char*
utf8);
50 void setGrabInput(
bool grab);
53 int signalEvent(
const Event& event)
override;
59 struct EscapeGrabCmd final :
Command {
61 void execute(std::span<const TclObject> tokens,
TclObject& result)
override;
62 [[nodiscard]] std::string help(std::span<const TclObject> tokens)
const override;
65 enum EscapeGrabState {
67 ESCAPE_GRAB_WAIT_LOST,
69 } escapeGrabState = ESCAPE_GRAB_WAIT_CMD;
72 void setNewOsdControlButtonState(
73 unsigned newState,
const Event& origEvent);
74 void triggerOsdControlEventsFromJoystickAxisMotion(
75 unsigned axis,
int value,
const Event& origEvent);
76 void triggerOsdControlEventsFromJoystickHat(
77 int value,
const Event& origEvent);
78 void osdControlChangeButton(
79 bool up,
unsigned changedButtonMask,
const Event& origEvent);
80 void triggerOsdControlEventsFromJoystickButtonEvent(
81 unsigned button,
bool up,
const Event& origEvent);
82 void triggerOsdControlEventsFromKeyEvent(
86 unsigned osdControlButtonsState = unsigned(~0);
89 static inline bool androidButtonA =
false;
90 static inline bool androidButtonB =
false;
This class contains settings that are used by several other class (including some singletons).
KeyCode
Constants that identify keys and key modifiers.
This file implemented 3 utility functions:
constexpr void repeat(T n, Op op)
Repeat the given operation 'op' 'n' times.