diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-06-29 09:31:46 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-07-09 10:04:53 +0900 |
commit | dd72b1c91895058d14bd13c3aa9a50bd75f633b6 (patch) | |
tree | cc15ad1a3c7078bdb8f6cec08ff1b5b5c4e497d7 /src/layers.hpp | |
parent | cf05c2b5c92b9a79635aa2277a9d55449e14fab6 (diff) |
Add configuration file for each area sizes
Add areas.db which has each area sizes.
less-than-0 values refer to (MAX + 1 - $VALUE)
and MAX is either screen width or height.
layers.json had each area sizes until now,
so removed the sizes from it.
Change-Id: I5cf283581daaca41e2b9e3ee6e947478bff1189c
Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
Diffstat (limited to 'src/layers.hpp')
-rw-r--r-- | src/layers.hpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/layers.hpp b/src/layers.hpp index a8ab2cc..b6dd67f 100644 --- a/src/layers.hpp +++ b/src/layers.hpp @@ -116,9 +116,12 @@ struct layer_map json to_json() const; void setupArea(int output_w, int output_h); compositor::rect getAreaSize(const std::string &area); + int loadAreaDb(); private: std::unordered_map<std::string, compositor::rect> area2size; + + static const char *kDefaultAreaDb; }; struct result<struct layer_map> to_layer_map(nlohmann::json const &j); |