PieDock  1.6.3
XSurface.h
1 /*
2  * O ,-
3  * ° o . -´ ' ,-
4  * ° .´ ` . ´,´
5  * ( ° )) . (
6  * `-;_ . -´ `.`.
7  * `._' ´
8  *
9  * Copyright (c) 2007-2010 Markus Fisch <mf@markusfisch.de>
10  *
11  * Licensed under the MIT license:
12  * http://www.opensource.org/licenses/mit-license.php
13  */
14 #ifndef _PieDock_XSurface_
15 #define _PieDock_XSurface_
16 
17 #include "Surface.h"
18 #include "ArgbSurface.h"
19 
20 #include <X11/Xlib.h>
21 
22 namespace PieDock
23 {
29  class XSurface : public Surface
30  {
31  public:
32  XSurface( int, int, Display *, Visual *, int );
33  virtual ~XSurface();
34  inline XImage *getResource() const { return resource; }
35  inline Visual *getVisual() const { return visual; }
36 
37  protected:
38  virtual int determineBitsPerPixel( int );
39  virtual void allocateData();
40  virtual void freeData();
41 
42  private:
43  Display *display;
44  Visual *visual;
45  int orginalDepth;
46  XImage *resource;
47  };
48 }
49 
50 #endif