mini_arcade_core.runtime.window.window_adapter ============================================== .. py:module:: mini_arcade_core.runtime.window.window_adapter .. autoapi-nested-parse:: Module providing runtime adapters for window and scene management. Classes ------- .. autoapisummary:: mini_arcade_core.runtime.window.window_adapter.WindowAdapter Module Contents --------------- .. py:class:: WindowAdapter(backend: mini_arcade_core.backend.Backend) Bases: :py:obj:`mini_arcade_core.runtime.window.window_port.WindowPort` Manages multiple game windows (not implemented). .. py:attribute:: backend .. py:attribute:: size .. py:method:: set_virtual_resolution(width: int, height: int) Set the virtual resolution for rendering. :param width: Virtual width in pixels. :type width: int :param height: Virtual height in pixels. :type height: int .. py:method:: set_viewport_mode(mode: mini_arcade_core.engine.render.viewport.ViewportMode) Set the viewport mode for rendering. :param mode: The viewport mode to set. :type mode: ViewportMode .. py:method:: get_viewport() -> mini_arcade_core.engine.render.viewport.ViewportState Get the current viewport state. :return: The current ViewportState. :rtype: ViewportState .. py:method:: screen_to_virtual(x: float, y: float) -> tuple[float, float] Convert screen coordinates to virtual coordinates. :param x: X coordinate on the screen. :type x: float :param y: Y coordinate on the screen. :type y: float :return: Corresponding virtual coordinates (x, y). :rtype: tuple[float, float] .. py:method:: set_title(title) Set the window title. :param title: The new title for the window. :type title: str .. py:method:: set_clear_color(r, g, b) Set the clear color for the window. :param r: Red component (0-255). :type r: int :param g: Green component (0-255). :type g: int :param b: Blue component (0-255). :type b: int .. py:method:: on_window_resized(width: int, height: int) Handle window resized event. :param width: New width of the window. :type width: int :param height: New height of the window. :type height: int .. py:method:: get_virtual_size() -> tuple[int, int] Get the current virtual resolution size. :return: Tuple of (virtual_width, virtual_height). :rtype: tuple[int, int]