This commit is contained in:
daa84 2017-03-22 18:37:34 +03:00
parent c458f90740
commit f337b63f1e
1 changed files with 29 additions and 0 deletions

View File

@ -2,6 +2,9 @@ use cairo;
use ui_model::Color;
use shell::{Shell, NvimMode};
use glib;
// display, 2 sec -> hiding 1 sec -> not visible 1 sec -> showing 1 sec
pub struct Cursor {
}
@ -29,3 +32,29 @@ impl Cursor {
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);
}