asge::event::_internal
Classes & Structs
Typedefs
using _SystemEvent = std::variant< UnknownEvent, QuitEvent, WindowEvent, KeyboardEvent, MouseMotionEvent, MouseButtonEvent, MouseWheelEvent >using ProcessFn = std::function< void(SystemEvent *, SDL_Event const &)>Variables
constexpr bool is_any_same_v = is_any_same<T, U...>::valueFunctions
template<std::uint32_t Start, std::uint32_t Stop> constexpr bool IsIncluded(std::uint32_t inType) noexceptTrue if inType falls within the [Start, Stop) offset range.
template<SystemEventType Set> constexpr bool IsValidSysType(std::uint32_t inType) noexceptTrue if inType's numeric value belongs to Set's EventType offset range.
template<SystemEventType SysT> SystemEventType CheckOne(EventType inEventType) noexceptReturns SysT if inEventType belongs to it, otherwise UKNOWN.
template<SystemEventType... SysTypes> SystemEventType ToSysEventTypeImpl(EventType inEventType) noexceptTries each SysTypes in turn, returning the first that matches inEventType.
SystemEventType ToSysEventType(EventType inEventType) noexceptClassifies inEventType into its owning SystemEventType (QUIT/KEYBOARD/WINDOW/MOUSE).
SystemEvent ProcessEvent(void const *inPlftEvent) noexceptTranslates a platform event (e.g.
SDL) into an asge SystemEvent.
inPlftEvent | Pointer to the platform event, or nullptr. |
Maps a raw SDL event type value to asge's EventType.
input::Keycode ToKeycode(SDL_Keycode inSdlKeycode) noexceptTranslates an SDL keycode into asge's dense internal Keycode.
SDL_Keycode ToSdlKeycode(input::Keycode inKeycode) noexceptThe inverse of ToKeycode.
Keycode::UNKNOWN maps to SDLK_UNKNOWN.
void ProcessEvent_SDL(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexceptClassifies inSdlEvent and routes it to the matching __process* function.
template<typename TEvent, typename SIEvent> void __processCommonEvent_SDL(TEvent &inSysEvent, std::uint32_t inType, SIEvent const &inSiEvent) noexceptFills the timestamp/type fields every asge event struct shares.
void __processQuit(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexceptTranslates an SDL quit event into inSysEvent.
void __processWindow(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexceptTranslates an SDL window event into inSysEvent.
void __processKeyboard(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexceptTranslates an SDL key up/down event into inSysEvent.
void __processMouse(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexceptTranslates an SDL motion/button/wheel event into inSysEvent.
std::unordered_map< SystemEventType, ProcessFn > const & GetProcessMap()Lazily-built dispatch table from SystemEventType to its SDL processing function.