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

[‘WindowBackend’]

class simvx.graphics.platform._base.WindowBackend

Bases: typing.Protocol

Protocol that all windowing backends must satisfy.

create_window(width: int, height: int, title: str, *, visible: bool = True) None
set_window_size(width: int, height: int) None
create_vulkan_surface(instance: Any) Any
get_required_extensions() list[str]
poll_events() None
should_close() bool
get_framebuffer_size() tuple[int, int]
get_window_size() tuple[int, int]
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
get_cursor_pos() tuple[float, float]
set_cursor_shape(shape: int) None
destroy() None
__slots__

()

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