Thoughts
This commit is contained in:
parent
c458f90740
commit
f337b63f1e
@ -2,6 +2,9 @@ use cairo;
|
|||||||
use ui_model::Color;
|
use ui_model::Color;
|
||||||
use shell::{Shell, NvimMode};
|
use shell::{Shell, NvimMode};
|
||||||
|
|
||||||
|
use glib;
|
||||||
|
|
||||||
|
// display, 2 sec -> hiding 1 sec -> not visible 1 sec -> showing 1 sec
|
||||||
pub struct Cursor {
|
pub struct Cursor {
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,3 +32,29 @@ impl Cursor {
|
|||||||
ctx.fill();
|
ctx.fill();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
pub struct Animation {
|
||||||
|
state_stream: Vec<Box<AnimationState>>,
|
||||||
|
state: Option<Box<AnimationState>>,
|
||||||
|
timer: Option<glib::SourceId>,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Animation {
|
||||||
|
pub fn new() -> Animation {
|
||||||
|
Animation {
|
||||||
|
state_stream: vec![],
|
||||||
|
state: None,
|
||||||
|
timer: None,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
trait AnimationState {
|
||||||
|
fn clone(&self) -> AnimationState;
|
||||||
|
|
||||||
|
// [TODO]: Description - repaint rect here
|
||||||
|
fn next(&mut self) -> Option<u32>;
|
||||||
|
|
||||||
|
fn paint(&self, ctx: &cairo::Context, shell: &Shell);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user