X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Flayers.hpp;h=ee3205443c72b393c7ad0719f88f99125bd13d61;hb=2f864ac5289e8426f1d0c91c264a6a274047245b;hp=a33f24a712fa7c26a91720f18a2fdaf421525065;hpb=42f7dfd87b7192ecd326598d627e32a5feddf43b;p=staging%2Fwindowmanager.git diff --git a/src/layers.hpp b/src/layers.hpp index a33f24a..ee32054 100644 --- a/src/layers.hpp +++ b/src/layers.hpp @@ -18,6 +18,8 @@ #define TMCAGLWM_LAYERS_H #include + +#include #include #include @@ -26,6 +28,13 @@ namespace wm { +struct split_layout { + std::string name; + std::string main_match; + std::string sub_match; + int prio; // no entirely sure we will use this +}; + struct layer { using json = nlohmann::json; @@ -47,6 +56,7 @@ struct layer { // put on this layer. std::string role; // XXX perhaps a zorder is needed here? + std::vector layouts; explicit layer(nlohmann::json const &j); @@ -60,10 +70,10 @@ struct layer { struct layer_map { using json = nlohmann::json; - typedef std::set storage_type; - typedef std::vector layers_type; - typedef std::vector> role_to_layer_map; - typedef std::map addsurf_layer_map; + using storage_type = std::set; + using layers_type = std::vector; + using role_to_layer_map = std::vector>; + using addsurf_layer_map = std::map; // XXX: we also will need a layer_id to layer map, perhaps // make this the primary map, and the surface_id->layer a @@ -90,7 +100,7 @@ struct layer_map { return this->layers.size(); } - void add_surface(unsigned surface_id, unsigned layer_id) { + void add_surface(int surface_id, int layer_id) { this->surfaces[surface_id] = layer_id; }