diff --git a/src/cursor.rs b/src/cursor.rs index 1dbbcc9..f011eb4 100644 --- a/src/cursor.rs +++ b/src/cursor.rs @@ -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>, + state: Option>, + timer: Option, +} + +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; + + fn paint(&self, ctx: &cairo::Context, shell: &Shell); +}