simvx.graphics.platform._sdl3

SDL3 windowing backend with multitouch support.

Module Contents

Classes

Sdl3Backend

WindowBackend implementation using SDL3.

Data

API

simvx.graphics.platform._sdl3.__all__

[‘Sdl3Backend’]

simvx.graphics.platform._sdl3.log

‘getLogger(…)’

class simvx.graphics.platform._sdl3.Sdl3Backend

WindowBackend implementation using SDL3.

Provides keyboard, mouse, and multitouch input. Touch events are delivered with window-relative coordinates via the touch_callback.

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_touch_callback(callback: collections.abc.Callable[[int, int, float, float, float], None] | None) None

Set touch event callback.

Args: callback: (finger_id, action, x, y, pressure) where action is 0=down, 1=up, 2=move. x,y are in window pixel coordinates.

get_cursor_pos() tuple[float, float]
set_cursor_shape(shape: int) None
set_window_size(width: int, height: int) None
request_close() None
poll_gamepads() list[tuple[int, dict[str, bool], dict[str, float]]]
destroy() None