Cairo support works, both to draw in the window and to write as a png image in a...
[universe.git] / simple_window.h
index 37218eb..6339609 100644 (file)
@@ -12,6 +12,12 @@ using namespace std;
 
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
+#include <X11/XKBlib.h>
+
+#ifdef CAIRO_SUPPORT
+#include <cairo.h>
+#include <cairo-xlib.h>
+#endif
 
 class SimpleEvent {
 public:
@@ -31,6 +37,8 @@ public:
 
 class SimpleWindow {
   Display *_display;
+  int _screen;
+  Visual *_visual;
   Window _window;
   Pixmap _pixmap;
   GC _gc;
@@ -61,6 +69,10 @@ public:
 
   virtual int file_descriptor();
   virtual SimpleEvent event();
+
+#ifdef CAIRO_SUPPORT
+  virtual cairo_t *get_cairo_context_resource();
+#endif
 };
 
 #endif