all repos — openbox @ 6e29605d41cab8fd7e8ad6f28d6132bbd521f106

openbox fork - make it a bit more like ryudo

otk/point.hh (raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef __point_hh
#define __point_hh

namespace otk {

class Point {
  int _x, _y;
public:
  Point() : _x(0), _y(0) {}
  Point(int x, int y) : _x(x), _y(y) {}
  Point(const Point &p) : _x(p._x), _y(p._y) {}

  inline int x() const { return _x; }
  inline int y() const { return _y; }

  bool operator==(const Point &o) const { return _x == o._x && _y == o._y; }
  bool operator!=(const Point &o) const { return _x != o._x || _y != o._y; }
};

}

#endif // __point_hh