]> git.sur5r.net Git - i3/i3/blobdiff - include/handlers.h
Merge branch 'release-4.16.1'
[i3/i3] / include / handlers.h
index e3f5d144748ef12577d916296b1d09baa1f70494..1d5a386522bcbe229c1de411ecf7b5ceab4d5fe8 100644 (file)
@@ -1,31 +1,67 @@
 /*
- * vim:ts=8:expandtab
+ * vim:ts=4:sw=4:expandtab
  *
  * i3 - an improved dynamic tiling window manager
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
  *
- * (c) 2009 Michael Stapelberg and contributors
+ * handlers.c: Small handlers for various events (keypresses, focus changes,
+ *             …).
  *
- * See file LICENSE for license information.
+ */
+#pragma once
+
+#include <config.h>
+
+#include <xcb/randr.h>
+
+extern int randr_base;
+extern int xkb_base;
+
+/**
+ * Adds the given sequence to the list of events which are ignored.
+ * If this ignore should only affect a specific response_type, pass
+ * response_type, otherwise, pass -1.
+ *
+ * Every ignored sequence number gets garbage collected after 5 seconds.
+ *
+ */
+void add_ignore_event(const int sequence, const int response_type);
+
+/**
+ * Checks if the given sequence is ignored and returns true if so.
+ *
+ */
+bool event_is_ignored(const int sequence, const int response_type);
+
+/**
+ * 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);
+
+/**
+ * Sets the appropriate atoms for the property handlers after the atoms were
+ * received from X11
+ *
+ */
+void property_handlers_init(void);
+
+#if 0
+/**
+ * Configuration notifies are only handled because we need to set up ignore
+ * for the following enter notify events
  *
  */
-#ifndef _HANDLERS_H
-#define _HANDLERS_H
-
-int handle_key_release(void *ignored, xcb_connection_t *conn, xcb_key_release_event_t *event);
-int handle_key_press(void *ignored, xcb_connection_t *conn, xcb_key_press_event_t *event);
-int handle_enter_notify(void *ignored, xcb_connection_t *conn, xcb_enter_notify_event_t *event);
-int handle_button_press(void *ignored, xcb_connection_t *conn, xcb_button_press_event_t *event);
-int handle_map_request(void *prophs, xcb_connection_t *conn, xcb_map_request_event_t *event);
 int handle_configure_event(void *prophs, xcb_connection_t *conn, xcb_configure_notify_event_t *event);
-int handle_configure_request(void *prophs, xcb_connection_t *conn, xcb_configure_request_event_t *event);
-int handle_destroy_notify_event(void *data, xcb_connection_t *conn, xcb_destroy_notify_event_t *event);
-int handle_unmap_notify_event(void *data, xcb_connection_t *conn, xcb_unmap_notify_event_t *event);
-int handle_windowname_change(void *data, xcb_connection_t *conn, uint8_t state,
-                                xcb_window_t window, xcb_atom_t atom, xcb_get_property_reply_t *prop);
-int handle_expose_event(void *data, xcb_connection_t *conn, xcb_expose_event_t *event);
-int handle_client_message(void *data, xcb_connection_t *conn, xcb_client_message_event_t *event);
-int window_type_handler(void *data, xcb_connection_t *conn, uint8_t state, xcb_window_t window, xcb_atom_t atom, xcb_get_property_reply_t *property);
-int handle_normal_hints(void *data, xcb_connection_t *conn, uint8_t state, xcb_window_t window,
-                        xcb_atom_t name, xcb_get_property_reply_t *reply);
+#endif
 
+#if 0
+/**
+ * Handles _NET_WM_WINDOW_TYPE changes
+ *
+ */
+int handle_window_type(void *data, xcb_connection_t *conn, uint8_t state,
+                       xcb_window_t window, xcb_atom_t atom,
+                       xcb_get_property_reply_t *property);
 #endif