mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Finish the integration of webxr
into the Cargo workspace (#35229)
- Run `cargo fmt` on `webxr` and `webxr-api` - Fix clippy warnings in the existing `webxr` code - Integrate the new crates into the workspace - Expose `webxr` via the libservo API rather than requiring embedders to depend on it explicitly. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
a4c6c205d2
commit
5466c27f6f
41 changed files with 448 additions and 649 deletions
|
@ -4,18 +4,13 @@
|
|||
|
||||
use euclid::RigidTransform3D;
|
||||
|
||||
use crate::ApiSpace;
|
||||
use crate::BaseSpace;
|
||||
use crate::Frame;
|
||||
use crate::InputFrame;
|
||||
use crate::InputId;
|
||||
use crate::InputSource;
|
||||
use crate::SelectEvent;
|
||||
use crate::SelectKind;
|
||||
use crate::Sender;
|
||||
use crate::{
|
||||
ApiSpace, BaseSpace, Frame, InputFrame, InputId, InputSource, SelectEvent, SelectKind, Sender,
|
||||
};
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
#[cfg_attr(feature = "ipc", derive(serde::Serialize, serde::Deserialize))]
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
pub enum Event {
|
||||
/// Input source connected
|
||||
AddInput(InputSource),
|
||||
|
@ -35,7 +30,7 @@ pub enum Event {
|
|||
ReferenceSpaceChanged(BaseSpace, RigidTransform3D<f32, ApiSpace, ApiSpace>),
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[cfg_attr(feature = "ipc", derive(serde::Serialize, serde::Deserialize))]
|
||||
pub enum Visibility {
|
||||
/// Session fully displayed to user
|
||||
|
@ -65,7 +60,7 @@ impl EventBuffer {
|
|||
EventBuffer::Buffered(ref mut events) => events.push(event),
|
||||
EventBuffer::Sink(ref dest) => {
|
||||
let _ = dest.send(event);
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue