X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flayers.hpp;h=3a169851662e5893993bef22234ca2726e7a123e;hb=e7ba7ca4eae20ab2db682bb780c7a4d5b1d394f5;hp=a8ab2cc937265b0bdffec1a9b9398a331251896c;hpb=d1127dd62c25e9c4c7d545de2456c6f4c4d7309f;p=apps%2Fagl-service-windowmanager.git diff --git a/src/layers.hpp b/src/layers.hpp index a8ab2cc..3a16985 100644 --- a/src/layers.hpp +++ b/src/layers.hpp @@ -27,13 +27,6 @@ namespace wm { -struct split_layout -{ - std::string name; - std::string main_match; - std::string sub_match; -}; - struct layer { using json = nlohmann::json; @@ -43,23 +36,14 @@ struct layer // The actual layer ID int layer_id = -1; // The rectangular region surfaces are allowed to draw on - // this layer, note however, width and hieght of the rect - // can be negative, in which case they specify that - // the actual value is computed using MAX + 1 - w - // That is; allow us to specify dimensions dependent on - // e.g. screen dimension, w/o knowing the actual screen size. + // this layer. compositor::rect rect; // Specify a role prefix for surfaces that should be // put on this layer. std::string role; - // TODO: perhaps a zorder is needed here? - std::vector layouts; mutable struct LayoutState state; - // Flag of normal layout only - bool is_normal_layout_only; - explicit layer(nlohmann::json const &j); json to_json() const; @@ -114,11 +98,14 @@ struct layer_map } json to_json() const; - void setupArea(int output_w, int output_h); + void setupArea(double scaling); compositor::rect getAreaSize(const std::string &area); + int loadAreaDb(); private: std::unordered_map area2size; + + static const char *kDefaultAreaDb; }; struct result to_layer_map(nlohmann::json const &j);