surface started
[mikachu/openbox.git] / otk / surface.cc
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2
3 #ifdef    HAVE_CONFIG_H
4 #  include "../config.h"
5 #endif // HAVE_CONFIG_H
6
7 #include "surface.hh"
8 #include "display.hh"
9
10 namespace otk {
11
12 Surface::Surface()
13   : _size(1, 1),
14     _pm(None)
15 {
16 }
17
18 Surface::Surface(const Point &size)
19   : _size(size),
20     _pm(None)
21 {
22 }
23
24 Surface::~Surface()
25 {
26   if (_pm != None) XFreePixmap(**display, _pm);
27 }
28
29 void Surface::setSize(int w, int h)
30 {
31   _size.setPoint(w, h);
32 }
33
34 }