]> icculus.org git repositories - dana/openbox.git/blob - loco/window.h
don't make windows owned by a screen, make them globally owned so they have a more...
[dana/openbox.git] / loco / window.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3    window.h for the Openbox compositor
4    Copyright (c) 2008        Dana Jansens
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    See the COPYING file for a copy of the GNU General Public License.
17 */
18
19 #ifndef loco__window_h
20 #define loco__window_h
21
22 #include "obt/display.h"
23 #include <X11/Xlib.h>
24 #include <GL/glx.h>
25
26 struct _LocoScreen;
27
28 typedef enum {
29     a /* XXX fill this in */
30 } LocoWindowType;
31
32 typedef struct _LocoWindow {
33     gint      ref;
34
35     Window    id;
36     gint      type; /* XXX make this an enum */
37
38     struct _LocoScreen *screen;
39
40     gint      x, y, w, h;
41
42     gint      depth;
43
44     gboolean  input_only;
45     gboolean  visible;
46     gboolean  damaged;
47     gboolean  stale;      /* glpixmap is out of date */
48
49     GLuint    texname;
50     Damage    damage;
51     Pixmap    pixmap;
52     GLXPixmap glpixmap;
53 } LocoWindow;
54
55 LocoWindow* loco_window_new(Window xwin, struct _LocoScreen *screen);
56 void loco_window_ref(LocoWindow *lw);
57 void loco_window_unref(LocoWindow *lw);
58
59 void loco_window_show(LocoWindow *lw);
60 void loco_window_hide(LocoWindow *lw, gboolean gone);
61
62 void loco_window_configure(LocoWindow *lw, const XConfigureEvent *e);
63 void loco_window_damage(LocoWindow *lw);
64
65 void loco_window_update_pixmap(LocoWindow *lw);
66
67 #endif