Improve feature names to enable web backends
This commit is contained in:
parent
e89674d337
commit
5cc84f32db
4 changed files with 14 additions and 12 deletions
|
|
@ -135,9 +135,9 @@ extern crate smithay_client_toolkit as sctk;
|
|||
target_os = "openbsd"
|
||||
))]
|
||||
extern crate x11_dl;
|
||||
#[cfg(feature = "stdweb")]
|
||||
#[cfg(feature = "std_web")]
|
||||
#[macro_use]
|
||||
extern crate stdweb;
|
||||
extern crate std_web as stdweb;
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
#[cfg(feature = "use_stdweb")]
|
||||
#[cfg(feature = "stdweb")]
|
||||
use stdweb::web::html_element::CanvasElement;
|
||||
|
||||
#[cfg(feature = "use_stdweb")]
|
||||
#[cfg(feature = "stdweb")]
|
||||
pub trait WindowExtStdweb {
|
||||
fn canvas(&self) -> CanvasElement;
|
||||
}
|
||||
|
||||
#[cfg(feature = "use_web-sys")]
|
||||
#[cfg(feature = "web-sys")]
|
||||
use web_sys::HtmlCanvasElement;
|
||||
|
||||
#[cfg(feature = "use_web-sys")]
|
||||
#[cfg(feature = "web-sys")]
|
||||
pub trait WindowExtWebSys {
|
||||
fn canvas(&self) -> HtmlCanvasElement;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ mod event_loop;
|
|||
mod monitor;
|
||||
mod window;
|
||||
|
||||
#[cfg(feature = "use_web-sys")]
|
||||
#[cfg(feature = "web-sys")]
|
||||
#[path = "web_sys/mod.rs"]
|
||||
mod backend;
|
||||
|
||||
#[cfg(feature = "use_stdweb")]
|
||||
#[cfg(feature = "stdweb")]
|
||||
#[path = "stdweb/mod.rs"]
|
||||
mod backend;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue