xglcomp

view src/cwin.h @ 12:1c0d056ec360

moving slowly
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 05 Feb 2016 03:33:18 +0200
parents 03ca0fd49916
children
line source
1 #ifndef COMP_WIN_H_
2 #define COMP_WIN_H_
4 #include <X11/Xlib.h>
5 #include <X11/extensions/Xdamage.h>
6 #include "texture.h"
8 class CompWindow {
9 public:
10 Window xwin;
11 Pixmap xpixmap;
12 bool pixmap_valid;
14 XWindowAttributes attr;
15 bool mapped;
17 Damage damage;
18 XRectangle damage_rect;
19 bool damaged;
21 Texture tex;
22 bool tex_valid;
24 CompWindow(Window xid = 0);
25 ~CompWindow();
27 bool update_attr();
28 bool update_pixmap();
29 bool update_texture();
30 };
32 void add_window(CompWindow *cwin);
33 bool remove_window(CompWindow *cwin);
34 bool have_window(CompWindow *cwin);
35 CompWindow *find_window_xid(Window xid);
36 CompWindow *find_window_pixmap(Pixmap pix);
38 int get_window_count();
39 CompWindow *get_window(int idx);
41 #endif // COMP_WIN_H_