mirror of
https://github.com/rust-windowing/winit.git
synced 2026-06-26 22:53:15 -04:00
Draft web platform structure
This commit is contained in:
@@ -20,7 +20,5 @@ pub mod macos;
|
||||
pub mod unix;
|
||||
pub mod windows;
|
||||
|
||||
pub mod stdweb;
|
||||
pub mod web_sys;
|
||||
|
||||
pub mod desktop;
|
||||
pub mod web;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#![cfg(feature = "stdweb")]
|
||||
|
||||
use stdweb::web::html_element::CanvasElement;
|
||||
|
||||
pub trait WindowExtStdweb {
|
||||
fn canvas(&self) -> CanvasElement;
|
||||
}
|
||||
|
||||
15
src/platform/web.rs
Normal file
15
src/platform/web.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
#[cfg(feature = "stdweb")]
|
||||
use stdweb::web::html_element::CanvasElement;
|
||||
|
||||
#[cfg(feature = "stdweb")]
|
||||
pub trait WindowExtStdweb {
|
||||
fn canvas(&self) -> CanvasElement;
|
||||
}
|
||||
|
||||
#[cfg(feature = "web-sys")]
|
||||
use web_sys::HtmlCanvasElement;
|
||||
|
||||
#[cfg(feature = "web-sys")]
|
||||
pub trait WindowExtWebSys {
|
||||
fn canvas(&self) -> HtmlCanvasElement;
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
#![cfg(feature = "web-sys")]
|
||||
|
||||
use web_sys::HtmlCanvasElement;
|
||||
|
||||
pub trait WindowExtWebSys {
|
||||
fn canvas(&self) -> HtmlCanvasElement;
|
||||
}
|
||||
Reference in New Issue
Block a user