diff options
Diffstat (limited to 'native/src')
| -rw-r--r-- | native/src/window/renderer.rs | 55 | 
1 files changed, 0 insertions, 55 deletions
| diff --git a/native/src/window/renderer.rs b/native/src/window/renderer.rs deleted file mode 100644 index b0cc0134..00000000 --- a/native/src/window/renderer.rs +++ /dev/null @@ -1,55 +0,0 @@ -use crate::MouseCursor; - -use raw_window_handle::HasRawWindowHandle; - -/// A graphics backend that can render to windows. -pub trait Backend: Sized { -    /// The settings of the backend. -    type Settings: Default; - -    /// The iced renderer of the backend. -    type Renderer: crate::Renderer; - -    /// The surface of the backend. -    type Surface; - -    /// The target of the backend. -    type Target; - -    /// Creates a new [`Gpu`] and an associated iced renderer. -    /// -    /// [`Gpu`]: trait.Gpu.html -    fn new(settings: Self::Settings) -> (Self, Self::Renderer); - -    /// Crates a new [`Surface`] for the given window. -    /// -    /// [`Surface`]: #associatedtype.Surface -    fn create_surface<W: HasRawWindowHandle>( -        &mut self, -        window: &W, -    ) -> Self::Surface; - -    /// Crates a new [`Target`] for the given [`Surface`]. -    /// -    /// [`Target`]: #associatedtype.Target -    /// [`Surface`]: #associatedtype.Surface -    fn create_target( -        &mut self, -        surface: &Self::Surface, -        width: u32, -        height: u32, -        scale_factor: f64, -    ) -> Self::Target; - -    /// Draws the output primitives to the given [`Target`]. -    /// -    /// [`Target`]: #associatedtype.Target -    /// [`Surface`]: #associatedtype.Surface -    fn draw<T: AsRef<str>>( -        &mut self, -        renderer: &mut Self::Renderer, -        target: &mut Self::Target, -        output: &<Self::Renderer as crate::Renderer>::Output, -        overlay: &[T], -    ) -> MouseCursor; -} | 
