Struct alacritty::display::damage::DamageTracker
source · pub struct DamageTracker {
pub old_vi_cursor: Option<Point<usize>>,
pub old_selection: Option<SelectionRange>,
pub debug: bool,
frames: [FrameDamage; 2],
screen_lines: usize,
columns: usize,
}
Expand description
State of the damage tracking for the Display
.
Fields§
§old_vi_cursor: Option<Point<usize>>
Position of the previously drawn Vi cursor.
old_selection: Option<SelectionRange>
The location of the old selection.
debug: bool
Highlight damage submitted for the compositor.
frames: [FrameDamage; 2]
The damage for the frames.
screen_lines: usize
§columns: usize
Implementations§
source§impl DamageTracker
impl DamageTracker
pub fn new(screen_lines: usize, columns: usize) -> Self
pub fn frame(&mut self) -> &mut FrameDamage
pub fn next_frame(&mut self) -> &mut FrameDamage
sourcepub fn swap_damage(&mut self)
pub fn swap_damage(&mut self)
Advance to the next frame resetting the state for the active frame.
sourcepub fn resize(&mut self, screen_lines: usize, columns: usize)
pub fn resize(&mut self, screen_lines: usize, columns: usize)
Resize the damage information in the tracker.
sourcepub fn damage_vi_cursor(&mut self, vi_cursor: Option<Point<usize>>)
pub fn damage_vi_cursor(&mut self, vi_cursor: Option<Point<usize>>)
Damage vi cursor inside the viewport.
sourcepub fn shape_frame_damage(&self, size_info: SizeInfo<u32>) -> Vec<Rect>
pub fn shape_frame_damage(&self, size_info: SizeInfo<u32>) -> Vec<Rect>
Get shaped frame damage for the active frame.
sourcepub fn damage_selection(
&mut self,
selection: Option<SelectionRange>,
display_offset: usize
)
pub fn damage_selection( &mut self, selection: Option<SelectionRange>, display_offset: usize )
Add the current frame’s selection damage.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for DamageTracker
impl Send for DamageTracker
impl Sync for DamageTracker
impl Unpin for DamageTracker
impl UnwindSafe for DamageTracker
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
Mutably borrows from an owned value. Read more
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
source§fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
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, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
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)
Convert
&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)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.