pub mod event_loop;
pub mod input;
pub mod window;
pub use event_loop::{DesktopEventLoop, WakeProxy};
pub use window::DesktopWindow;
use blinc_platform::{Platform, PlatformError, WindowConfig};
pub struct DesktopPlatform;
impl Platform for DesktopPlatform {
type Window = DesktopWindow;
type EventLoop = DesktopEventLoop;
fn new() -> Result<Self, PlatformError> {
Ok(Self)
}
fn create_event_loop(&self) -> Result<Self::EventLoop, PlatformError> {
DesktopEventLoop::new(WindowConfig::default())
}
fn name(&self) -> &'static str {
"desktop"
}
fn scale_factor(&self) -> f64 {
1.0
}
}
impl DesktopPlatform {
pub fn create_event_loop_with_config(
&self,
config: WindowConfig,
) -> Result<DesktopEventLoop, PlatformError> {
DesktopEventLoop::new(config)
}
}