Begin the widgetization
This commit is contained in:
parent
717ac4c47a
commit
f08f653bfc
2 changed files with 10 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ mod list;
|
|||
mod room;
|
||||
mod rooms;
|
||||
mod util;
|
||||
mod widget;
|
||||
|
||||
use std::sync::{Arc, Weak};
|
||||
use std::time::Duration;
|
||||
|
|
|
|||
9
src/ui/widget.rs
Normal file
9
src/ui/widget.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use async_trait::async_trait;
|
||||
use toss::frame::{Frame, Pos, Size};
|
||||
|
||||
#[async_trait]
|
||||
pub trait Widget {
|
||||
fn size(max_width: Option<u16>, max_height: Option<u16>) -> Size;
|
||||
|
||||
async fn render(frame: &mut Frame, pos: Pos, size: Size);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue