00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CAIROMM_XLIB_SURFACE_H
00020 #define __CAIROMM_XLIB_SURFACE_H
00021
00022 #include <cairomm/surface.h>
00023
00024
00025
00026
00027
00028 #ifdef CAIRO_HAS_XLIB_SURFACE
00029 #include <cairo-xlib.h>
00030 #endif
00031
00032
00033 namespace Cairo
00034 {
00035
00036 #ifdef CAIRO_HAS_XLIB_SURFACE
00037
00045 class XlibSurface : public Surface
00046 {
00047 public:
00048
00056 explicit XlibSurface(cairo_surface_t* cobject, bool has_reference = false);
00057 virtual ~XlibSurface();
00058
00074 static RefPtr<XlibSurface> create(Display* dpy, Drawable drawable, Visual* visual, int width, int height);
00075
00086 static RefPtr<XlibSurface> create(Display *dpy, Pixmap bitmap, Screen *screen, int width, int height);
00087
00100 void set_size(int width, int height);
00101
00111 void set_drawable(Drawable drawable, int width, int height);
00112
00114 Drawable get_drawable() const;
00115
00117 const Display* get_display() const;
00119 Display* get_display();
00120
00122 Screen* get_screen();
00124 const Screen* get_screen() const;
00125
00127 Visual* get_visual();
00129 const Visual* get_visual() const;
00130
00132 int get_depth() const;
00133
00135 int get_height() const;
00136
00138 int get_width() const;
00139
00140 };
00141
00142 #endif // CAIRO_HAS_XLIB_SURFACE
00143
00144 }
00145
00146 #endif //__CAIROMM_XLIB_SURFACE_H
00147
00148