X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Flayout.hpp;h=b7a3c288c7be594d1203f56c46c41cde521d3c56;hb=f09cbfb256460bc934f1df1cef2939a35e032bab;hp=33a503dd0bd9f46c30a9ed1ad6caee35af468b0b;hpb=04540dd41d0b3c1fad72b3074c0511dadc947657;p=staging%2Fwindowmanager.git diff --git a/src/layout.hpp b/src/layout.hpp index 33a503d..b7a3c28 100644 --- a/src/layout.hpp +++ b/src/layout.hpp @@ -25,24 +25,19 @@ namespace wm { -// Areas and layouts are defined to have a name, let's just keep it this way, -// we will not copy them around anyway. -struct area { - std::string name; - genivi::rect rect; - uint32_t layer; // i.e. zorder? -}; +struct LayoutState { + int main{-1}; + int sub{-1}; -struct layout { - static constexpr unsigned MAX_N_AREAS = 2; + bool operator==(const LayoutState &b) const { + return main == b.main && sub == b.sub; + } - std::string name; - uint32_t n_areas; - struct area areas[MAX_N_AREAS]; + bool operator!=(const LayoutState &b) const { + return !(*this == b); + } }; -typedef std::vector layouts_type; - } // namespace wm #endif // TMCAGLWM_LAYOUT_HPP