]> icculus.org git repositories - dana/openbox.git/blob - otk/size.hh
udpate to new api
[dana/openbox.git] / otk / size.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __size_hh
3 #define __size_hh
4
5 namespace otk {
6
7 class Size {
8   unsigned int _w, _h;
9 public:
10   Size() : _w(1), _h(1) {}
11   Size(unsigned int w, unsigned int h) : _w(w), _h(h) {}
12   Size(const Size &s) : _w(s._w), _h(s._h) {}
13
14   inline unsigned int width() const { return _w; }
15   inline unsigned int height() const { return _h; }
16
17   bool operator==(const Size &o) const { return _w == o._w && _h == o._h; }
18   bool operator!=(const Size &o) const { return _w != o._w || _h != o._h; }
19 };
20
21 }
22
23 #endif // __size_hh