aboutsummaryrefslogtreecommitdiff
path: root/src/app/mod.rs
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-07-18 10:05:59 +0100
committerAkshay <[email protected]>2020-07-18 10:05:59 +0100
commit7740a2ad558eb289e9d8c0b33fe43453942398e0 (patch)
tree7537d4b2aafe941ce1bca5b66c95e62d7a06f2f6 /src/app/mod.rs
parent3eace50dfb39317fb08e5a95d6126b787c567a17 (diff)
refactor app.rs into module: app
Diffstat (limited to 'src/app/mod.rs')
-rw-r--r--src/app/mod.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/app/mod.rs b/src/app/mod.rs
new file mode 100644
index 0000000..f00c936
--- /dev/null
+++ b/src/app/mod.rs
@@ -0,0 +1,27 @@
1use std::default::Default;
2use std::sync::mpsc::Receiver;
3
4use notify::{DebouncedEvent, INotifyWatcher};
5
6use crate::habit::HabitWrapper;
7
8mod impl_self;
9mod impl_view;
10
11pub struct StatusLine(String, String);
12
13pub struct App {
14 // holds app data
15 habits: Vec<Box<dyn HabitWrapper>>,
16
17 _file_watcher: INotifyWatcher,
18 file_event_recv: Receiver<DebouncedEvent>,
19 focus: usize,
20 view_month_offset: u32,
21}
22
23impl Default for App {
24 fn default() -> Self {
25 App::new()
26 }
27}