mini_arcade_core.backend ======================== .. py:module:: mini_arcade_core.backend .. autoapi-nested-parse:: Backend module for rendering and input abstraction. Defines the Backend interface and related types. This is the only part of the code that talks to SDL/pygame directly. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/mini_arcade_core/backend/backend/index /autoapi/mini_arcade_core/backend/config/index /autoapi/mini_arcade_core/backend/events/index /autoapi/mini_arcade_core/backend/keys/index /autoapi/mini_arcade_core/backend/sdl_map/index /autoapi/mini_arcade_core/backend/types/index /autoapi/mini_arcade_core/backend/utils/index /autoapi/mini_arcade_core/backend/viewport/index Classes ------- .. autoapisummary:: mini_arcade_core.backend.Backend Package Contents ---------------- .. py:class:: Backend Bases: :py:obj:`Protocol` Interface that any rendering/input backend must implement. mini-arcade-core only talks to this protocol, never to SDL/pygame directly. :ivar window (WindowProtocol): Window management interface. :ivar audio (AudioProtocol): Audio management interface. :ivar input (InputProtocol): Input management interface. :ivar render (RenderProtocol): Rendering interface. :ivar text (TextProtocol): Text rendering interface. :ivar capture (CaptureProtocol): Frame capture interface. .. py:attribute:: window :type: WindowProtocol .. py:attribute:: audio :type: AudioProtocol .. py:attribute:: input :type: InputProtocol .. py:attribute:: render :type: RenderProtocol .. py:attribute:: text :type: TextProtocol .. py:attribute:: capture :type: CaptureProtocol .. py:method:: init() Initialize the backend and open a window. Should be called once before the main loop. .. py:method:: set_viewport_transform(offset_x: int, offset_y: int, scale: float) Set the viewport transformation. :param offset_x: Horizontal offset. :type offset_x: int :param offset_y: Vertical offset. :type offset_y: int :param scale: Scaling factor. :type scale: float .. py:method:: clear_viewport_transform() Clear the viewport transformation (reset to defaults).