mini_arcade_native_backend.mapping.events

Event mapping between native backend events and core events. This module defines the NativeEventMapper class, which is responsible for translating events received from the native backend into the standardized event format used by the mini-arcade core.

Classes

NativeEventMapper

Maps native backend events to core events.

Module Contents

class mini_arcade_native_backend.mapping.events.NativeEventMapper(native_mod: mini_arcade_native_backend._native)

Maps native backend events to core events.

Parameters:

native_mod (module) – The native backend module providing event definitions.

to_core(ev: mini_arcade_native_backend._native.Event) mini_arcade_core.backend.events.Event

Maps a native event to a core event.

Parameters:

ev (native.Event) – The native event to map.

Returns:

The mapped core event.

Return type:

Event