// // Created by m on 7/27/17. // #ifndef TMCAGLWM_LAYERS_H #define TMCAGLWM_LAYERS_H #include #include #include #include "result.hpp" namespace wm { struct surface_id_to_layer { int id_min = -1; int id_max = -1; std::string name = ""; int layer_id = -1; explicit surface_id_to_layer(nlohmann::json const &j); bool operator<(struct surface_id_to_layer const &rhs) const { return this->id_max < rhs.id_max; } }; // Actually, we shouldn't need a struct here ... but let's just keep it at that // for now, to contain its mapping type and the _single_ useful method. struct surface_id_to_layer_map { typedef std::set surface_to_layer_map_type; typedef std::vector layers_type; surface_to_layer_map_type mapping; layers_type layers; optional get_layer_for_surface(int surface_id); layers_type::size_type get_layers_count() const { return this->layers.size(); } }; struct result to_surface_id_to_layer_map( nlohmann::json const &j); } // namespace wm #endif // TMCAGLWM_LAYERS_H