simvx.graphics.platform._sdl3¶
SDL3 windowing backend with multitouch support.
Module Contents¶
Classes¶
WindowBackend implementation using SDL3. |
Data¶
API¶
- simvx.graphics.platform._sdl3.__all__¶
[‘Sdl3Backend’]
- class simvx.graphics.platform._sdl3.Sdl3Backend[source]¶
WindowBackend implementation using SDL3.
Provides keyboard, mouse, and multitouch input. Touch events are delivered with window-relative coordinates via the touch_callback.
Initialization
- 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]¶
- property paused: bool¶
Whether the app is paused (backgrounded on mobile).
- set_lifecycle_callback(callback: collections.abc.Callable[[str], None] | None) None[source]¶
Set lifecycle event callback. Receives ‘paused’ or ‘resumed’.
- set_touch_callback(callback: collections.abc.Callable[[int, int, float, float, float], None] | None) None[source]¶
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.
- set_cursor_shape(shape: int) None[source]¶
Set cursor shape. 0=arrow, 1=ibeam, 2=crosshair, 3=hand, 4=hresize, 5=vresize.