diff options
| author | Andreas Grois <andi@grois.info> | 2021-04-07 13:03:25 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2021-04-07 13:03:25 +0200 |
| commit | 1c394103886ed58b72016c971a6ab54dbd64d55b (patch) | |
| tree | 17097e5e0009d5270314f9db009e6272d18b3399 /src/module_communication.rs | |
Initial commit. Borked, so don't use
Diffstat (limited to 'src/module_communication.rs')
| -rw-r--r-- | src/module_communication.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/module_communication.rs b/src/module_communication.rs new file mode 100644 index 0000000..3d4aefe --- /dev/null +++ b/src/module_communication.rs @@ -0,0 +1,18 @@ +pub enum MsgMainToModule { + Quit, +} +pub enum MsgModuleToMain { + UpdateText { + text : Result<String, String> + } +} + +pub trait SwayStatusModule { + fn new(from_main : crossbeam_channel::Receiver<MsgMainToModule>, + to_main : crossbeam_channel::Sender<MsgModuleToMain>, + module_settings : &str) -> Result<Box<Self>,String>; + + fn get_name(&self) -> &'static str; + + fn run(&self); +} |
