mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-25 10:56:19 +04:00
Fixup Surface
This commit is contained in:
parent
2ea5feaeb1
commit
c17045ed07
@ -1,10 +1,12 @@
|
||||
|
||||
// IDEA: render to a cache buffer, then if not changed, copy the buf into the parent
|
||||
type Surface = ();
|
||||
pub trait Component {
|
||||
/// Process input events, return true if handled.
|
||||
fn process_event(&mut self, event: crossterm::event::Event, args) -> bool;
|
||||
fn process_event(&mut self, event: crossterm::event::Event, args: ()) -> bool;
|
||||
/// Should redraw? Useful for saving redraw cycles if we know component didn't change.
|
||||
fn should_update(&self) -> bool { true }
|
||||
fn should_update(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn render(&mut self, surface: &mut Surface, args: ());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user