Skip to main content

Module platform

Module platform 

Source
Expand description

Platform window bridging for baseview.

Bridges truce’s RawWindowHandle to baseview’s HasRawWindowHandle (raw-window-handle 0.5), and provides scale factor querying and wgpu surface creation.

Structs§

EditorScale
Shared, mutable editor scale factor.
ParentWindow
Newtype bridging truce’s RawWindowHandle to baseview’s HasRawWindowHandle (raw-window-handle 0.5).

Functions§

create_wgpu_surface
Bridge a baseview raw-window-handle 0.5 to a wgpu-compatible SurfaceTargetUnsafe using rwh 0.6 types.
main_screen_scale
note_linux_scale_factor
Record the display scale factor observed from baseview on Linux. Editors should call this from their WindowEvent::Resized handlers so subsequent pre-window queries match what baseview is delivering. No-op on non-Linux.
query_backing_scale
to_physical_px
Convert a logical extent (in points) to physical pixels.