summaryrefslogtreecommitdiffstats
path: root/native/src/renderer/windowed.rs
blob: f89da40b56eea4f8774c484b73db4807eb9f6b7b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::MouseCursor;

use raw_window_handle::HasRawWindowHandle;

pub trait Windowed: super::Renderer {
    type Target;

    fn new<W: HasRawWindowHandle>(window: &W) -> Self;

    fn target(&self, width: u16, height: u16) -> Self::Target;

    fn draw(
        &mut self,
        target: &mut Self::Target,
        primitive: &Self::Primitive,
    ) -> MouseCursor;
}