]> Dogcows Code - chaz/openbox/blob - otk/size.hh
change the default titlebar layout
[chaz/openbox] / otk / size.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef __size_hh
3 #define __size_hh
4
5 #include <cassert>
6
7 namespace otk {
8
9 class Size {
10 int _w, _h;
11 public:
12 Size() : _w(1), _h(1) {}
13 Size(int w, int h) : _w(w), _h(h) { assert(_w >= 0 && _h >= 0); }
14 Size(const Size &s) : _w(s._w), _h(s._h) { assert(_w >= 0 && _h >= 0); }
15
16 inline int width() const { return _w; }
17 inline int height() const { return _h; }
18
19 bool operator==(const Size &o) const { return _w == o._w && _h == o._h; }
20 bool operator!=(const Size &o) const { return _w != o._w || _h != o._h; }
21 };
22
23 }
24
25 #endif // __size_hh
This page took 0.032668 seconds and 4 git commands to generate.