pub struct FrameCause(/* private fields */);Expand description
Why a frame was drawn: every reason that reached the window between
the start of the last frame and the start of this one.
Read from a view as Core::frame_cause. A set, because a frame
answers everything that asked since the last one — a keystroke and the
caret’s blink, a wheel and the transition it started.
Empty is a frame nobody here asked for: the platform’s own redraw (an expose, a live resize the OS paints through), or a driver that notes nothing.
Implementations§
Source§impl FrameCause
impl FrameCause
Sourcepub const NONE: FrameCause
pub const NONE: FrameCause
Nothing recorded.
Sourcepub const POINTER_MOVE: FrameCause
pub const POINTER_MOVE: FrameCause
The pointer moved over the window.
Sourcepub const POINTER_LEAVE: FrameCause
pub const POINTER_LEAVE: FrameCause
The pointer left the window.
Sourcepub const BUTTON: FrameCause
pub const BUTTON: FrameCause
A mouse button went down or up, or a force click.
Sourcepub const WHEEL: FrameCause
pub const WHEEL: FrameCause
A wheel or a trackpad scroll — a swipe’s momentum included, which the platform sends as scrolls after the hand has left.
Sourcepub const KEY: FrameCause
pub const KEY: FrameCause
A key went down or up.
Sourcepub const MODIFIERS: FrameCause
pub const MODIFIERS: FrameCause
The modifier keys changed.
Sourcepub const TEXT: FrameCause
pub const TEXT: FrameCause
Text arrived: typed, committed by an input method, or pasted.
Sourcepub const PREEDIT: FrameCause
pub const PREEDIT: FrameCause
An input method’s composition changed.
Sourcepub const ACCESS: FrameCause
pub const ACCESS: FrameCause
Assistive technology asked for an action.
Sourcepub const FILE_DRAG: FrameCause
pub const FILE_DRAG: FrameCause
Files dragged over the window, dropped on it, or taken away.
Sourcepub const FILES: FrameCause
pub const FILES: FrameCause
A file dialog answered, or the OS handed the app documents to open
(InputEvent::Open, backlog F124).
Sourcepub const FIRST: FrameCause
pub const FIRST: FrameCause
The window’s first frame.
Sourcepub const WAKE: FrameCause
pub const WAKE: FrameCause
The app woke the loop from another thread (a Waker).
Sourcepub const HOST: FrameCause
pub const HOST: FrameCause
The host asked for a frame: a pumped runner’s request_redraw,
a new view handed over.
Sourcepub const RESIZE: FrameCause
pub const RESIZE: FrameCause
The window changed size.
Sourcepub const SCALE: FrameCause
pub const SCALE: FrameCause
The window moved to a display of another scale.
Sourcepub const FOCUS: FrameCause
pub const FOCUS: FrameCause
The window gained or lost the keyboard.
Sourcepub const OCCLUSION: FrameCause
pub const OCCLUSION: FrameCause
The window was uncovered, or came back from minimized. The runner
leaves out of that frame what it noted while the window could not
draw and no frame took — another window’s input, an appearance
change — so a restore does not report reasons from long before;
resize is the same edge on Windows, where
restoring is a resize.
Sourcepub const APPEARANCE: FrameCause
pub const APPEARANCE: FrameCause
The system’s appearance or settings changed: light or dark, the accent, reduced motion, assistive technology coming or going, a font installed or removed.
Sourcepub const CARET: FrameCause
pub const CARET: FrameCause
The caret’s blink changed phase.
Sourcepub const RETRY: FrameCause
pub const RETRY: FrameCause
The last frame’s surface refused it (skipped, out of date, misconfigured) and the frame is tried again.
Sourcepub const OVERDUE: FrameCause
pub const OVERDUE: FrameCause
A frame held for the display waited too long and is drawn anyway.
Sourcepub const DEVICE: FrameCause
pub const DEVICE: FrameCause
The graphics device was reopened.
Sourcepub const AFTER_FRAME: FrameCause
pub const AFTER_FRAME: FrameCause
The last frame’s own events — a resize, what a new layout put under a still pointer — were routed after it, and answered.
Sourcepub const ELSEWHERE: FrameCause
pub const ELSEWHERE: FrameCause
Something that reached the app in another window, which can change what this one shows.
Sourcepub const MENU: FrameCause
pub const MENU: FrameCause
A menu (the platform’s context menu or menu bar) was answered.
Sourcepub const AUDIO: FrameCause
pub const AUDIO: FrameCause
A sound finished or was refused, and its event was routed.
Sourcepub const SMOKE: FrameCause
pub const SMOKE: FrameCause
A smoke run’s frame counter asked for the next frame.
Sourcepub const OWED: FrameCause
pub const OWED: FrameCause
The last frame left one owed (Core::owed); Core::owed_by
says who, when traced.
Sourcepub const ALL: [(FrameCause, &'static str); 29]
pub const ALL: [(FrameCause, &'static str); 29]
Each reason and its name, in bit order.
Sourcepub const fn from_bits(bits: u32) -> FrameCause
pub const fn from_bits(bits: u32) -> FrameCause
The set these bits spell; bits no reason has are dropped.
pub const fn is_empty(self) -> bool
Sourcepub const fn contains(self, other: FrameCause) -> bool
pub const fn contains(self, other: FrameCause) -> bool
Whether every reason in other is in this set.
Sourcepub const fn intersects(self, other: FrameCause) -> bool
pub const fn intersects(self, other: FrameCause) -> bool
Whether any reason in other is in this set.
pub const fn union(self, other: FrameCause) -> FrameCause
Sourcepub fn names(self) -> impl Iterator<Item = &'static str>
pub fn names(self) -> impl Iterator<Item = &'static str>
The names of the reasons in the set, in bit order.
Sourcepub fn of_input(ev: &InputEvent) -> FrameCause
pub fn of_input(ev: &InputEvent) -> FrameCause
The reason one input is: what Core::handle_input records, and
what a driver that screens input before the core sees it can note
for an event it keeps.
Trait Implementations§
Source§impl BitOr for FrameCause
impl BitOr for FrameCause
Source§type Output = FrameCause
type Output = FrameCause
| operator.Source§fn bitor(self, rhs: FrameCause) -> FrameCause
fn bitor(self, rhs: FrameCause) -> FrameCause
| operation. Read moreSource§impl BitOrAssign for FrameCause
impl BitOrAssign for FrameCause
Source§fn bitor_assign(&mut self, rhs: FrameCause)
fn bitor_assign(&mut self, rhs: FrameCause)
|= operation. Read moreSource§impl Clone for FrameCause
impl Clone for FrameCause
Source§fn clone(&self) -> FrameCause
fn clone(&self) -> FrameCause
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for FrameCause
Source§impl Debug for FrameCause
impl Debug for FrameCause
Source§impl Default for FrameCause
impl Default for FrameCause
Source§fn default() -> FrameCause
fn default() -> FrameCause
impl Eq for FrameCause
Source§impl Hash for FrameCause
impl Hash for FrameCause
Source§impl PartialEq for FrameCause
impl PartialEq for FrameCause
impl StructuralPartialEq for FrameCause
Auto Trait Implementations§
impl Freeze for FrameCause
impl RefUnwindSafe for FrameCause
impl Send for FrameCause
impl Sync for FrameCause
impl Unpin for FrameCause
impl UnsafeUnpin for FrameCause
impl UnwindSafe for FrameCause
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.