simvx.graphics.platform._glfw

GLFW windowing backend.

Module Contents

Classes

GlfwBackend

WindowBackend implementation using GLFW.

Data

API

simvx.graphics.platform._glfw.log[source]

‘getLogger(…)’

simvx.graphics.platform._glfw.__all__

[‘GlfwBackend’]

class simvx.graphics.platform._glfw.GlfwBackend[source]

WindowBackend implementation using GLFW.

Initialization

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

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

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

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

set_window_size(width: int, height: int) None[source]
request_close() None[source]

Signal the window to close at the next poll_events cycle.

set_fullscreen(fullscreen: bool) None[source]

Toggle fullscreen mode. Stores windowed position/size for restore.

is_fullscreen() bool[source]
destroy() None[source]