#include <xcb/randr.h>
+extern int randr_base;
+
+/**
+ * Takes an xcb_generic_event_t and calls the appropriate handler, based on the
+ * event type.
+ *
+ */
+void handle_event(int type, xcb_generic_event_t *event);
+
+/**
+ * Requests the property and invokes the appropriate callback.
+ *
+ */
+int property_notify(uint8_t state, xcb_window_t window, xcb_atom_t atom);
+
/**
- * Due to bindings like Mode_switch + <a>, we need to bind some keys in
- * XCB_GRAB_MODE_SYNC. Therefore, we just replay all key presses.
+ * Sets the appropriate atoms for the property handlers after the atoms were
+ * received from X11
*
*/
-int handle_key_release(void *ignored, xcb_connection_t *conn,
- xcb_key_release_event_t *event);
+void property_handlers_init();
/**
* There was a key press. We compare this key code with our bindings table and
*/
int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_notify_event_t *event);
+/**
+ * A destroy notify event is sent when the window is not unmapped, but
+ * immediately destroyed (for example when starting a window and immediately
+ * killing the program which started it).
+ *
+ * We just pass on the event to the unmap notify handler (by copying the
+ * important fields in the event data structure).
+ *
+ */
+int handle_destroy_notify_event(void *data, xcb_connection_t *conn,
+ xcb_destroy_notify_event_t *event);
+
/**
* Called when a window changes its title
*