simvx.graphics.platform._glfw

GLFW windowing backend.

Module Contents

Classes

GlfwBackend

WindowBackend implementation using GLFW.

Data

API

simvx.graphics.platform._glfw.__all__

[‘GlfwBackend’]

class simvx.graphics.platform._glfw.GlfwBackend

WindowBackend implementation using GLFW.

Initialization

create_window(width: int, height: int, title: str, *, visible: bool = True) 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_scroll_callback(callback: collections.abc.Callable[[float, float], None] | None) None
set_char_callback(callback: collections.abc.Callable[[int], None] | None) None
set_cursor_shape(shape: int) None

Set cursor shape. 0=arrow, 1=ibeam, 2=crosshair, 3=hand, 4=hresize, 5=vresize.

get_cursor_pos() tuple[float, float]
poll_gamepads() list[tuple[int, dict[str, bool], dict[str, float]]]

Poll all connected gamepads. Returns list of (id, buttons, axes).

set_window_size(width: int, height: int) None
request_close() None

Signal the window to close at the next poll_events cycle.

destroy() None