summaryrefslogtreecommitdiff
path: root/otk/surface.hh
blob: 7289b14aaebac8bd7a1c13bc987b51f8dd298eed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
#ifndef __surface_hh
#define __surface_hh

#include "point.hh"

extern "C" {
#include <X11/Xlib.h>
}

namespace otk {

class Surface {
  Point _size;
  Pixmap _pm;

protected:
  Surface();
  Surface(const Point &size);

  virtual void setSize(int w, int h);

public:
  virtual ~Surface();

  virtual const Point& size() const { return _size; }
  virtual int width() const { return _size.x(); }
  virtual int height() const { return _size.y(); }
};

}

#endif // __surface_hh