Struct TopEdgeReveal
pub struct TopEdgeReveal { /* private fields */ }Expand description
Reveal state of one top-edge bar. See the module docs.
Implementations§
§impl TopEdgeReveal
impl TopEdgeReveal
pub fn reset(&mut self)
pub fn reset(&mut self)
Forget everything and hide at once (the window stopped being maximized, or the bar’s geometry is gone).
pub fn pin(&mut self) -> bool
pub fn pin(&mut self) -> bool
Show the bar for keyboard use until Self::unpin.
pub fn unpin(&mut self)
pub fn unpin(&mut self)
Keyboard use ended; the pointer decides again on its next sample.
pub fn reveal_by_touch(&mut self) -> bool
pub fn reveal_by_touch(&mut self) -> bool
A finger swiped down from the top edge, which the host read (a display’s edge, where the band is the bezel’s): show the bar. It stays until the pointer, or a tap, goes elsewhere. Returns whether that changed anything.
pub fn on_motion(
&mut self,
p: Point,
geo: &EdgeGeometry<'_>,
now: Instant,
) -> bool
pub fn on_motion( &mut self, p: Point, geo: &EdgeGeometry<'_>, now: Instant, ) -> bool
A pointer sample. Returns whether shown changed.
pub fn on_press(&mut self, p: Point, geo: &EdgeGeometry<'_>)
pub fn on_press(&mut self, p: Point, geo: &EdgeGeometry<'_>)
A press. A press in the band while the bar hides goes to the app and cancels any reveal until the pointer leaves the band.
pub fn on_touch_start(&mut self, p: Point, geo: &EdgeGeometry<'_>)
pub fn on_touch_start(&mut self, p: Point, geo: &EdgeGeometry<'_>)
A touch went down at p.
pub fn on_touch_move(&mut self, p: Point) -> bool
pub fn on_touch_move(&mut self, p: Point) -> bool
A touch moved to p. Returns whether shown changed.
pub fn on_touch_end(&mut self)
pub fn on_touch_end(&mut self)
A touch lifted or was cancelled.
pub fn settle(&mut self, now: Instant) -> bool
pub fn settle(&mut self, now: Instant) -> bool
Advance timers to now without a sample. Returns whether shown
changed.
pub fn deadline(&self) -> Option<Instant>
pub fn deadline(&self) -> Option<Instant>
When Self::settle next changes something with no further input,
so the host can sleep until then instead of pumping frames.
pub fn force_shown(&mut self, shown: bool)
pub fn force_shown(&mut self, shown: bool)
Test and shot fixture: as if the person had reached for the bar.
Trait Implementations§
§impl Clone for TopEdgeReveal
impl Clone for TopEdgeReveal
§fn clone(&self) -> TopEdgeReveal
fn clone(&self) -> TopEdgeReveal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for TopEdgeReveal
impl Debug for TopEdgeReveal
§impl Default for TopEdgeReveal
impl Default for TopEdgeReveal
§fn default() -> TopEdgeReveal
fn default() -> TopEdgeReveal
Auto Trait Implementations§
impl Freeze for TopEdgeReveal
impl RefUnwindSafe for TopEdgeReveal
impl Send for TopEdgeReveal
impl Sync for TopEdgeReveal
impl Unpin for TopEdgeReveal
impl UnsafeUnpin for TopEdgeReveal
impl UnwindSafe for TopEdgeReveal
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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.§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.§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.§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.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§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>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§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>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§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.§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.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more