2 // Created by m on 7/27/17.
5 #ifndef TMCAGLWM_LAYERS_H
6 #define TMCAGLWM_LAYERS_H
16 struct surface_id_to_layer {
19 std::string name = "";
22 explicit surface_id_to_layer(nlohmann::json const &j);
24 bool operator<(struct surface_id_to_layer const &rhs) const {
25 return this->id_max < rhs.id_max;
29 // Actually, we shouldn't need a struct here ... but let's just keep it at that for now,
30 // to contain its mapping type and the _single_ useful method.
31 struct surface_id_to_layer_map {
32 typedef std::set<struct surface_id_to_layer> surface_to_layer_map_type;
34 surface_to_layer_map_type mapping;
36 optional<int> get_layer_for_surface(int surface_id);
39 struct result<struct surface_id_to_layer_map> to_surface_id_to_layer_map(
40 nlohmann::json const &j);
44 #endif // TMCAGLWM_LAYERS_H