simvx.graphics.platform._base

Window backend protocol: duck-typing friendly contract.

Module Contents

Classes

WindowBackend

Protocol that all windowing backends must satisfy.

Data

API

simvx.graphics.platform._base.log

‘getLogger(…)’

simvx.graphics.platform._base.__all__

[‘WindowBackend’]

class simvx.graphics.platform._base.WindowBackend

Bases: typing.Protocol

Protocol that all windowing backends must satisfy.

supports_gamepads: bool

None

create_window(width: int, height: int, title: str, *, visible: bool = True) None
set_window_size(width: int, height: int) None
set_title(title: str) None
create_graphics_surface(instance: Any) Any
get_required_instance_extensions() list[str]
poll_events() None
should_close() bool
get_framebuffer_size() tuple[int, int]
get_window_size() tuple[int, int]
get_content_scale() tuple[float, float]
set_key_callback(callback: collections.abc.Callable[[int, int, int], None] | None) None
set_mouse_button_callback(callback: collections.abc.Callable[[int, int, int], None] | None) None
set_cursor_pos_callback(callback: collections.abc.Callable[[float, float], None] | None) None
set_char_callback(callback: collections.abc.Callable[[int], None] | None) None
set_scroll_callback(callback: collections.abc.Callable[[float, float], None] | None) None
set_resize_callback(callback: collections.abc.Callable[[int, int], None] | None) None
request_close() None
get_cursor_pos() tuple[float, float]
set_cursor_shape(shape: int) None
set_mouse_capture(mode: int) None
destroy() None
__slots__

()

classmethod __init_subclass__(*args, **kwargs)
classmethod __class_getitem__(item)