Struct alacritty::display::Display [−][src]
pub struct Display {Show 13 fields
pub size_info: SizeInfo,
pub window: Window,
pub highlighted_hint: Option<HintMatch>,
pub vi_highlighted_hint: Option<HintMatch>,
pub is_x11: bool,
pub cursor_hidden: bool,
pub visual_bell: VisualBell,
pub colors: List,
pub hint_state: HintState,
pub pending_update: DisplayUpdate,
renderer: QuadRenderer,
glyph_cache: GlyphCache,
meter: Meter,
}Expand description
The display wraps a window, font rasterizer, and GPU renderer.
Fields
size_info: SizeInfowindow: Windowhighlighted_hint: Option<HintMatch>Hint highlighted by the mouse.
vi_highlighted_hint: Option<HintMatch>Hint highlighted by the vi mode cursor.
is_x11: boolUI cursor visibility for blinking.
visual_bell: VisualBellcolors: ListMapped RGB values for each terminal color.
hint_state: HintStateState of the keyboard hints.
pending_update: DisplayUpdateUnprocessed display updates.
renderer: QuadRendererglyph_cache: GlyphCachemeter: MeterImplementations
pub fn new<E>(
config: &UiConfig,
event_loop: &EventLoopWindowTarget<E>,
identity: &Identity,
wayland_event_queue: Option<&EventQueue>
) -> Result<Display, Error>
fn new_glyph_cache(
dpr: f64,
renderer: &mut QuadRenderer,
config: &UiConfig
) -> Result<(GlyphCache, f32, f32), Error>
Update font size and cell dimensions.
This will return a tuple of the cell width and height.
Clear glyph cache.
pub fn handle_update<T>(
&mut self,
terminal: &mut Term<T>,
pty_resize_handle: &mut dyn OnResize,
message_buffer: &MessageBuffer,
search_active: bool,
config: &UiConfig
) where
T: EventListener,
pub fn handle_update<T>(
&mut self,
terminal: &mut Term<T>,
pty_resize_handle: &mut dyn OnResize,
message_buffer: &MessageBuffer,
search_active: bool,
config: &UiConfig
) where
T: EventListener,
Process update events.
pub fn draw<T: EventListener>(
&mut self,
terminal: MutexGuard<'_, Term<T>>,
message_buffer: &MessageBuffer,
config: &UiConfig,
search_state: &SearchState
)
pub fn draw<T: EventListener>(
&mut self,
terminal: MutexGuard<'_, Term<T>>,
message_buffer: &MessageBuffer,
config: &UiConfig,
search_state: &SearchState
)
Draw the screen.
A reference to Term whose state is being drawn must be provided.
This call may block if vsync is enabled.
Update to a new configuration.
pub fn update_highlighted_hints<T>(
&mut self,
term: &Term<T>,
config: &UiConfig,
mouse: &Mouse,
modifiers: ModifiersState
) -> bool
pub fn update_highlighted_hints<T>(
&mut self,
term: &Term<T>,
config: &UiConfig,
mouse: &Mouse,
modifiers: ModifiersState
) -> bool
Update the mouse/vi mode cursor hint highlighting.
This will return whether the highlighted hints changed.
Format search regex to account for the cursor and fullwidth characters.
Draw current search regex.
Draw render timer.
Draw an indicator for the position of a line in history.
Requst a new frame for a window on Wayland.