Merge branch 'web' into merge-master-to-web
This commit is contained in:
commit
86bafdc104
10 changed files with 61 additions and 19 deletions
|
|
@ -2,7 +2,7 @@ use super::runner;
|
|||
use crate::event::Event;
|
||||
use crate::event_loop::EventLoopClosed;
|
||||
|
||||
pub struct Proxy<T: 'static>{
|
||||
pub struct Proxy<T: 'static> {
|
||||
runner: runner::Shared<T>,
|
||||
}
|
||||
|
||||
|
|
@ -20,7 +20,7 @@ impl<T: 'static> Proxy<T> {
|
|||
impl<T: 'static> Clone for Proxy<T> {
|
||||
fn clone(&self) -> Self {
|
||||
Proxy {
|
||||
runner: self.runner.clone()
|
||||
runner: self.runner.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,9 +21,7 @@ pub use self::error::OsError;
|
|||
pub use self::event_loop::{
|
||||
EventLoop, Proxy as EventLoopProxy, WindowTarget as EventLoopWindowTarget,
|
||||
};
|
||||
pub use self::monitor::{
|
||||
Handle as MonitorHandle, Mode as VideoMode
|
||||
};
|
||||
pub use self::monitor::{Handle as MonitorHandle, Mode as VideoMode};
|
||||
pub use self::window::{
|
||||
Id as WindowId, PlatformSpecificBuilderAttributes as PlatformSpecificWindowBuilderAttributes,
|
||||
Window,
|
||||
|
|
|
|||
|
|
@ -10,19 +10,21 @@ impl Handle {
|
|||
}
|
||||
|
||||
pub fn position(&self) -> PhysicalPosition {
|
||||
unimplemented!();
|
||||
PhysicalPosition { x: 0.0, y: 0.0 }
|
||||
}
|
||||
|
||||
pub fn name(&self) -> Option<String> {
|
||||
unimplemented!();
|
||||
None
|
||||
}
|
||||
|
||||
pub fn size(&self) -> PhysicalSize {
|
||||
unimplemented!();
|
||||
PhysicalSize {
|
||||
width: 0.0,
|
||||
height: 0.0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn video_modes(&self) -> impl Iterator<Item = VideoMode> {
|
||||
// TODO: is this possible ?
|
||||
std::iter::empty()
|
||||
}
|
||||
}
|
||||
|
|
@ -45,9 +47,6 @@ impl Mode {
|
|||
}
|
||||
|
||||
pub fn monitor(&self) -> MonitorHandle {
|
||||
MonitorHandle {
|
||||
inner: Handle
|
||||
}
|
||||
MonitorHandle { inner: Handle }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use crate::icon::Icon;
|
|||
use crate::monitor::MonitorHandle as RootMH;
|
||||
use crate::window::{CursorIcon, Fullscreen, WindowAttributes, WindowId as RootWI};
|
||||
|
||||
use raw_window_handle::{RawWindowHandle, web::WebHandle};
|
||||
use raw_window_handle::web::WebHandle;
|
||||
|
||||
use super::{backend, monitor, EventLoopWindowTarget};
|
||||
|
||||
|
|
@ -179,13 +179,13 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn set_cursor_position(&self, _position: LogicalPosition) -> Result<(), ExternalError> {
|
||||
// TODO: pointer capture
|
||||
// Intentionally a no-op, as the web does not support setting cursor positions
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn set_cursor_grab(&self, _grab: bool) -> Result<(), ExternalError> {
|
||||
// TODO: pointer capture
|
||||
// Intentionally a no-op, as the web does not (properly) support grabbing the cursor
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn set_maximized(&self, _maximized: bool) {
|
||||
// TODO: should there be a maximization / fullscreen API?
|
||||
// Intentionally a no-op, as canvases cannot be 'maximized'
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
@ -232,7 +232,7 @@ impl Window {
|
|||
|
||||
#[inline]
|
||||
pub fn set_ime_position(&self, _position: LogicalPosition) {
|
||||
// TODO: what is this?
|
||||
// Currently a no-op as it does not seem there is good support for this on web
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue