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[source]

‘getLogger(…)’

simvx.graphics.platform._base.__all__

[‘WindowBackend’]

class simvx.graphics.platform._base.WindowBackend[source]

Bases: typing.Protocol

Protocol that all windowing backends must satisfy.

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

()

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