view include/X11App.h @ 9:8769ee69bd05

Simple X11App class is done.
author Eris Caffee <discordia@eldalin.com>
date Sun, 22 Apr 2012 01:25:33 -0500
parents
children
line source
1 #ifndef APP_H
2 #define X11APP_H
4 #include <string>
6 #include <X11/Xlib.h>
8 class X11Window
9 {
10 public:
11 X11Window(Display * dpy,
12 const std::string& win_name,
13 int x, int y,
14 unsigned int width, unsigned int height);
16 std::string name;
17 Window win;
18 };
20 class X11App
21 {
22 public:
24 X11App(const std::string & appname);
25 ~X11App();
27 void run(void);
29 private:
30 X11App();
31 X11App(const X11App & a);
32 X11App operator=(const X11App&);
34 std::string button_state_string(unsigned int state);
36 X11Window * main_win;
37 Display * dpy;
38 long event_mask;
39 Atom wm_delete_window;
41 };
43 #endif