use super::*;
pub trait PlatformBackend: WindowController {
fn kind(&self) -> PlatformKind;
fn capabilities(&self) -> PlatformCapabilities;
fn create_window(&mut self, config: &WindowConfig) -> Result<WindowState, PlatformError>;
fn window_state(&self, id: WindowId) -> Option<WindowState>;
fn raw_window_handle(&self, id: WindowId) -> RawWindowHandle;
fn poll_events(&mut self) -> Vec<WindowEvent>;
fn present_framebuffer(
&mut self,
id: WindowId,
framebuffer: &Framebuffer,
) -> Result<(), PlatformError>;
fn present_framebuffer_region(
&mut self,
id: WindowId,
framebuffer: &Framebuffer,
_damage: DamageRegion,
) -> Result<(), PlatformError> {
self.present_framebuffer(id, framebuffer)
}
fn read_clipboard(&self) -> Option<String>;
fn write_clipboard(&mut self, text: &str) -> Result<(), PlatformError>;
fn system_theme(&self) -> ThemeMode;
fn display_refresh_rate_hz(&self) -> f32 {
60.0
}
}