#include <xcb/xcb.h>
#include <glib.h>
+struct d_window;
+struct d_display;
+
/* inherits from xcb_screen_t */
-typedef struct {
- xcb_screen_t super;
- int num;
- xcb_window_t selwin; /* for the selection */
+typedef struct d_screen {
+ xcb_screen_t super;
+ struct d_display *dpy;
+ int num;
+
+ xcb_window_t selwin; /* for the selection */
+ xcb_atom_t selatom; /* ditto.. */
+
+ xcb_window_t overlay;
+
+ GHashTable *winhash;
} d_screen_t;
/*! Tries to register on the screen given by @sc. If it succeeds, it fills
- out the selwin in @sc and returns TRUE, otherwise it returns FALSE.
+ in @sc and returns TRUE, otherwise it returns FALSE.
*/
-gboolean screen_register(xcb_connection_t *conn, d_screen_t *sc);
+gboolean screen_register(struct d_display *dpy, int num, d_screen_t *sc);
+
+void screen_add_window(d_screen_t *sc, xcb_window_t wid);
+void screen_remove_window(d_screen_t *sc, struct d_window *w);
-void screen_listen(xcb_connection_t *conn, d_screen_t *sc);
+struct d_window* screen_find_window(d_screen_t *sc, xcb_window_t id);
#endif