summaryrefslogtreecommitdiffstats
path: root/src/layout.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/layout.hpp')
-rw-r--r--src/layout.hpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/layout.hpp b/src/layout.hpp
index 33a503d..85ac30e 100644
--- a/src/layout.hpp
+++ b/src/layout.hpp
@@ -25,24 +25,25 @@
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 {
+ enum States {
+ Single,
+ Split,
+ };
+
+ enum States s{Single};
+ int main{-1};
+ int sub{-1};
+
+ bool operator==(const LayoutState &b) const {
+ return s == b.s && main == b.main && sub == b.sub;
+ }
+
+ bool operator!=(const LayoutState &b) const {
+ return !(*this == b);
+ }
};
-struct layout {
- static constexpr unsigned MAX_N_AREAS = 2;
-
- std::string name;
- uint32_t n_areas;
- struct area areas[MAX_N_AREAS];
-};
-
-typedef std::vector<struct layout> layouts_type;
-
} // namespace wm
#endif // TMCAGLWM_LAYOUT_HPP