summaryrefslogtreecommitdiff
path: root/otk/surface.cc
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-01-18 03:52:58 +0000
committerDana Jansens <danakj@orodu.net>2003-01-18 03:52:58 +0000
commit2005c344bdb4b59611972bc37e194d2e14cdf911 (patch)
tree35fe6c0f7b6ce425a0ac83fe393c02c0be3bbfee /otk/surface.cc
parent4ac47a41a15626a3da41d68efd2212869c9188b2 (diff)
surface started
Diffstat (limited to 'otk/surface.cc')
-rw-r--r--otk/surface.cc34
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);
+}
+
+}