← API Reference Namespace

asge::event::_internal

Classes & Structs

Typedefs

#using ProcessFn = std::function< void(SystemEvent *, SDL_Event const &)>

Variables

#constexpr bool is_any_same_v = is_any_same<T, U...>::value

Functions

#template<std::uint32_t Start, std::uint32_t Stop> constexpr bool IsIncluded(std::uint32_t inType) noexcept

True if inType falls within the [Start, Stop) offset range.

#template<SystemEventType Set> constexpr bool IsValidSysType(std::uint32_t inType) noexcept

True if inType's numeric value belongs to Set's EventType offset range.

#template<SystemEventType SysT> SystemEventType CheckOne(EventType inEventType) noexcept

Returns SysT if inEventType belongs to it, otherwise UKNOWN.

#template<SystemEventType... SysTypes> SystemEventType ToSysEventTypeImpl(EventType inEventType) noexcept

Tries each SysTypes in turn, returning the first that matches inEventType.

#SystemEventType ToSysEventType(EventType inEventType) noexcept

Classifies inEventType into its owning SystemEventType (QUIT/KEYBOARD/WINDOW/MOUSE).

#SystemEvent ProcessEvent(void const *inPlftEvent) noexcept

Translates a platform event (e.g.

SDL) into an asge SystemEvent.

Parameters
inPlftEvent

Pointer to the platform event, or nullptr.

#EventType ToEventType(std::uint32_t inType) noexcept

Maps a raw SDL event type value to asge's EventType.

#input::Keycode ToKeycode(SDL_Keycode inSdlKeycode) noexcept

Translates an SDL keycode into asge's dense internal Keycode.

#SDL_Keycode ToSdlKeycode(input::Keycode inKeycode) noexcept

The inverse of ToKeycode.

Keycode::UNKNOWN maps to SDLK_UNKNOWN.

#void ProcessEvent_SDL(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexcept

Classifies 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) noexcept

Fills the timestamp/type fields every asge event struct shares.

#void __processQuit(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexcept

Translates an SDL quit event into inSysEvent.

#void __processWindow(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexcept

Translates an SDL window event into inSysEvent.

#void __processKeyboard(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexcept

Translates an SDL key up/down event into inSysEvent.

#void __processMouse(SystemEvent *inSysEvent, SDL_Event const &inSdlEvent) noexcept

Translates 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.