Skip to main content

Module cotis_traits

Module cotis_traits 

Source
Expand description

Cotis context and interactivity trait implementations for crate::renderer::CotisWgpuRenderer.

These impls connect the renderer to the Cotis application framework. They are defined here rather than in crate::renderer to keep the renderer module focused on GPU/window logic.

TraitBehavior
cotis_utils::traits::CotisWindowContextReturns physical window dimensions in pixels from winit inner_size.
cotis_utils::traits::CotisFrameContextReturns elapsed time since the previous frame.
cotis_utils::traits::CotisRenderContextProvided automatically via blanket impl when window and frame contexts are implemented.
cotis_utils::text::RendererTextMeasuringProviderGlyphon measurement with DPI-scaled font metrics. font_id is ignored; always uses Family::SansSerif.
cotis_utils::interactivity::mouse::MouseProviderReads cursor position, button state, and scroll delta from crate::input::InputSnapshot.
cotis_utils::interactivity::keyboard::SimpleKeyboardProviderReads pressed keys from crate::input::InputSnapshot.
cotis_utils::interactivity::keyboard::SimpleTextProviderReads IME/preedit characters from crate::input::InputSnapshot.