wip: on collaborative scheduling
This commit is contained in:
1 parent
fac42339c2
commit
1a323835c8
5 files changed
+122
-155
No files matched your search
@@ -112,6 +112,8 @@ pub enum VirtualEvent {
|
||||
GarbageCollection,
|
||||
|
||||
/// A type of "immediate" event scheduled by components
|
||||
///
|
||||
/// Usually called through "set_state"
|
||||
ScheduledUpdate {
|
||||
height: u32,
|
||||
},
|
||||
@@ -158,6 +160,32 @@ pub enum VirtualEvent {
|
||||
MouseEvent(on::MouseEvent),
|
||||
PointerEvent(on::PointerEvent),
|
||||
}
|
||||
impl VirtualEvent {
|
||||
pub fn is_input_event(&self) -> bool {
|
||||
match self {
|
||||
VirtualEvent::ClipboardEvent(_)
|
||||
| VirtualEvent::CompositionEvent(_)
|
||||
| VirtualEvent::KeyboardEvent(_)
|
||||
| VirtualEvent::FocusEvent(_)
|
||||
| VirtualEvent::FormEvent(_)
|
||||
| VirtualEvent::SelectionEvent(_)
|
||||
| VirtualEvent::TouchEvent(_)
|
||||
| VirtualEvent::UIEvent(_)
|
||||
| VirtualEvent::WheelEvent(_)
|
||||
| VirtualEvent::MediaEvent(_)
|
||||
| VirtualEvent::AnimationEvent(_)
|
||||
| VirtualEvent::TransitionEvent(_)
|
||||
| VirtualEvent::ToggleEvent(_)
|
||||
| VirtualEvent::MouseEvent(_)
|
||||
| VirtualEvent::PointerEvent(_) => true,
|
||||
|
||||
VirtualEvent::GarbageCollection
|
||||
| VirtualEvent::ScheduledUpdate { .. }
|
||||
| VirtualEvent::AsyncEvent { .. }
|
||||
| VirtualEvent::SuspenseEvent { .. } => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for VirtualEvent {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
|
||||
Reference in new issue
Block a user