tileme 0.0.3

(Not yet) A tiling window manager for Windows 10
use crate::manager::WindowManager;
use std::collections::HashMap;

pub type KeyListenerID = i32;

#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
pub struct KeyCode {
    /// Modifier key bit mask
    pub mask: u32,
    /// key code
    pub code: u32,
}

/// Some action to be run by a user key binding
pub type FireAndForget = Box<dyn FnMut(&mut WindowManager) -> ()>;

/// User defined key bindings
pub type KeyBindings = HashMap<KeyCode, FireAndForget>;



pub struct Config<'a> {
    /// Workspace names to use when initialising the WindowManager. Must have at least one element.
    pub virtual_desktops: Vec<&'a str>,
}

impl<'a> Config<'a> {
    /// Initialise a default Config, giving sensible (but minimal) values for all fields.
    pub fn default() -> Config<'a> {
        Config {
            virtual_desktops: vec!["Desktop 1"]
        }
    }
}