Struct alacritty::display::bell::VisualBell
source · pub struct VisualBell {
animation: BellAnimation,
duration: Duration,
start_time: Option<Instant>,
}
Fields§
§animation: BellAnimation
Visual bell animation.
duration: Duration
Visual bell duration.
start_time: Option<Instant>
The last time the visual bell rang, if at all.
Implementations§
source§impl VisualBell
impl VisualBell
sourcepub fn intensity(&self) -> f64
pub fn intensity(&self) -> f64
Get the currently intensity of the visual bell. The bell’s intensity ramps down from 1.0 to 0.0 at a rate determined by the bell’s duration.
sourcepub fn completed(&mut self) -> bool
pub fn completed(&mut self) -> bool
Check whether or not the visual bell has completed “ringing”.
sourcepub fn intensity_at_instant(&self, instant: Instant) -> f64
pub fn intensity_at_instant(&self, instant: Instant) -> f64
Get the intensity of the visual bell at a particular instant. The bell’s intensity ramps down from 1.0 to 0.0 at a rate determined by the bell’s duration.
pub fn update_config(&mut self, bell_config: &BellConfig)
Trait Implementations§
source§impl From<&BellConfig> for VisualBell
impl From<&BellConfig> for VisualBell
source§fn from(bell_config: &BellConfig) -> VisualBell
fn from(bell_config: &BellConfig) -> VisualBell
Converts to this type from the input type.