diff options
| author | Andreas Grois <andi@grois.info> | 2021-05-02 16:01:55 +0200 |
|---|---|---|
| committer | Andreas Grois <andi@grois.info> | 2021-05-02 16:01:55 +0200 |
| commit | d2fd2da41dbc9c2f19711c14cd68142d5484eb40 (patch) | |
| tree | 799ae403bd62b37a5011680745d3c2e10d71f5b9 /pulse/src/runnable.rs | |
| parent | 18a96163d730b7e44270603a4c6de071b725db5f (diff) | |
Factor out all unsafe code into its own module (unfinished)
Diffstat (limited to 'pulse/src/runnable.rs')
| -rw-r--r-- | pulse/src/runnable.rs | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/pulse/src/runnable.rs b/pulse/src/runnable.rs deleted file mode 100644 index d77a132..0000000 --- a/pulse/src/runnable.rs +++ /dev/null @@ -1,36 +0,0 @@ -use std::sync::mpsc::*; -use crate::config::*; -use swaystatus_plugin::*; -use crate::communication::*; - -pub struct PulseVolumeRunnable<'p> { - config : &'p PulseVolumeConfig, - to_main : Box<dyn MsgModuleToMain + 'p>, - from_main : Receiver<MessagesFromMain>, - pulse : std::sync::Arc<PulseMainLoop> -} - -impl<'p : 's, 's> PulseVolumeRunnable<'p> { - pub fn new(config : &'p PulseVolumeConfig, to_main : Box<dyn MsgModuleToMain + 'p>) -> (Self, SenderForMain) { - let (s, r) = channel(); - let pulse = std::sync::Arc::new(PulseMainLoop {});//TODO: initialize this properly - let result = PulseVolumeRunnable { - config, - to_main, - from_main : r, - pulse: pulse.clone() - }; - let sender = SenderForMain::new(s, pulse); - (result, sender) - } -} - -impl<'p> SwayStatusModuleRunnable for PulseVolumeRunnable<'p> { - fn run(&self) { - //TODO - } -} - -pub struct PulseMainLoop { - //TODO! -} |
