diff options
Diffstat (limited to 'otk/surface.cc')
| -rw-r--r-- | otk/surface.cc | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/otk/surface.cc b/otk/surface.cc new file mode 100644 index 00000000..cea793f2 --- /dev/null +++ b/otk/surface.cc @@ -0,0 +1,34 @@ +// -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*- + +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif // HAVE_CONFIG_H + +#include "surface.hh" +#include "display.hh" + +namespace otk { + +Surface::Surface() + : _size(1, 1), + _pm(None) +{ +} + +Surface::Surface(const Point &size) + : _size(size), + _pm(None) +{ +} + +Surface::~Surface() +{ + if (_pm != None) XFreePixmap(**display, _pm); +} + +void Surface::setSize(int w, int h) +{ + _size.setPoint(w, h); +} + +} |
