1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 screen.h for the Openbox compositor
4 Copyright (c) 2008 Dana Jansens
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.
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.
16 See the COPYING file for a copy of the GNU General Public License.
19 #ifndef loco__screen_h
20 #define loco__screen_h
26 #define LOCO_SCREEN_MAX_DEPTH 32
31 typedef void (*BindEXTFunc)(Display *, GLXDrawable, int, const int *);
32 typedef void (*ReleaseEXTFunc)(Display *, GLXDrawable, int);
34 typedef struct _LocoScreen {
39 //struct _Window *root;
43 GLXFBConfig glxFBConfig[LOCO_SCREEN_MAX_DEPTH + 1];
47 /* Maps X Window ID -> LocoList* which is in the stacking_top/bottom list
49 GHashTable *stacking_map;
50 /* The stacking list goes from top-most to bottom-most window */
51 struct _LocoList *stacking_top;
52 struct _LocoList *stacking_bottom;
54 BindEXTFunc bindTexImageEXT;
55 ReleaseEXTFunc releaseTexImageEXT;
58 LocoScreen* loco_screen_new(gint number);
59 void loco_screen_ref(LocoScreen *sc);
60 void loco_screen_unref(LocoScreen *sc);
62 void loco_screen_add_window(LocoScreen *sc, Window xwin);
63 void loco_screen_remove_window(LocoScreen *sc, struct _LocoWindow *lw);
65 struct _LocoWindow* loco_screen_find_window(LocoScreen *sc, Window xwin);
66 struct _LocoList* loco_screen_find_stacking(LocoScreen *sc, Window xwin);
68 void loco_screen_redraw(LocoScreen *sc);
70 void loco_screen_redraw_done(LocoScreen *sc);