[−][src]Trait iced_native::window::Backend
A graphics backend that can render to windows.
Associated Types
type Settings: Default
The settings of the backend.
type Renderer: Renderer
The iced renderer of the backend.
type Surface
The surface of the backend.
type SwapChain
The swap chain of the backend.
Required methods
fn new(settings: Self::Settings) -> (Self, Self::Renderer)
Creates a new Backend
and an associated iced renderer.
fn create_surface<W: HasRawWindowHandle>(&mut self, window: &W) -> Self::Surface
Crates a new Surface
for the given window.
fn create_swap_chain(
&mut self,
surface: &Self::Surface,
width: u32,
height: u32
) -> Self::SwapChain
&mut self,
surface: &Self::Surface,
width: u32,
height: u32
) -> Self::SwapChain
fn draw<T: AsRef<str>>(
&mut self,
renderer: &mut Self::Renderer,
swap_chain: &mut Self::SwapChain,
output: &<Self::Renderer as Renderer>::Output,
scale_factor: f64,
overlay: &[T]
) -> MouseCursor
&mut self,
renderer: &mut Self::Renderer,
swap_chain: &mut Self::SwapChain,
output: &<Self::Renderer as Renderer>::Output,
scale_factor: f64,
overlay: &[T]
) -> MouseCursor
Draws the output primitives to the next frame of the given SwapChain
.