X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2FUtil.hh;h=40a2254abc72177f929e64e224930b0d3684f970;hb=5b8ec886237aff9ede99feb66721f8ac7a44d2ed;hp=393c00893beca853fcc7b10189029090ab48a454;hpb=351a06655bdd7d440780b5bc5b255081c888044b;p=chaz%2Fopenbox diff --git a/src/Util.hh b/src/Util.hh index 393c0089..40a2254a 100644 --- a/src/Util.hh +++ b/src/Util.hh @@ -28,6 +28,7 @@ #include #include +#include class Rect { public: @@ -71,12 +72,21 @@ public: inline bool valid(void) const { return _x2 > _x1 && _y2 > _y1; } bool intersects(const Rect &a) const; - bool contains(int _x, int _y) const; + bool contains(int __x, int __y) const; + bool contains(const Rect &a) const; private: int _x1, _y1, _x2, _y2; }; +typedef std::vector RectList; + +struct Strut { + unsigned int top, bottom, left, right; + + Strut(void): top(0), bottom(0), left(0), right(0) {} +}; + /* XXX: this needs autoconf help */ const unsigned int BSENTINEL = 65535; @@ -102,11 +112,9 @@ struct PointerAssassin { std::string itostring(unsigned long i); std::string itostring(long i); -inline std::string itostring(unsigned int i) { - return itostring((unsigned long) i); -} -inline std::string itostring(int i) { - return itostring((long) i); -} - +inline std::string itostring(unsigned int i) + { return itostring((unsigned long) i); } +inline std::string itostring(int i) + { return itostring((long) i); } + #endif