Advertisement
Guest User

X11Painter.h

a guest
Dec 11th, 2010
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.00 KB | None | 0 0
  1. // X11Painter.h
  2. #include <X11/Xlib.h>
  3. #include <X11/Xutil.h>
  4. #include <X11/extensions/shape.h>
  5. #include <stdlib.h>
  6. #include <stdio.h>
  7. #include <unistd.h>
  8. #include <exception>
  9. //
  10. //#include "libLaserFinger.h"
  11. #ifndef LF_X11PAINTER_H
  12. #define LF_X11PAINTER_H
  13.  
  14. using namespace std;
  15.  
  16. class X11Exception : public exception {};
  17.  
  18. class DisplayUnknownException : public X11Exception {};
  19. class NoDisplayException : public X11Exception {};
  20. class ShapeExtensionException : public X11Exception {};
  21. class WrongPositionException : public X11Exception {};
  22.  
  23. class X11Painter {
  24.     public:
  25.         X11Painter();
  26.         X11Painter(int screenno);
  27.         ~X11Painter();
  28.  
  29.         void show();
  30.         void showAt(int x, int y);
  31.         void hide();
  32.    
  33.     private:
  34.         Display*        display;
  35.         int             screen;
  36.         Window          window;
  37.         XSetWindowAttributes    winattr;
  38.         int             xpos;
  39.         Visual*         visual;
  40.        
  41.         int             screenwidth;
  42.         int             screenheight;
  43.         int             some_test;
  44.         unsigned int    depth;
  45.  
  46.         bool            windowVisibility;
  47.  
  48. }; 
  49.  
  50. #endif // LF_X11PAINTER_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement