]> git.sur5r.net Git - i3/i3/blobdiff - include/x.h
Remove redundant depth argument from x_con_init(). (#2323)
[i3/i3] / include / x.h
index da4147cc64abe3e41bab28dd609b6f9c58f18ea0..39e0eb2f68e97725df869ad3cf35376bac63ffd7 100644 (file)
@@ -1,9 +1,17 @@
 /*
  * vim:ts=4:sw=4:expandtab
+ *
+ * i3 - an improved dynamic tiling window manager
+ * © 2009 Michael Stapelberg and contributors (see also: LICENSE)
+ *
+ * x.c: Interface to X11, transfers our in-memory state to X11 (see also
+ *      render.c). Basically a big state machine.
+ *
  */
+#pragma once
 
-#ifndef _X_H
-#define _X_H
+/** Stores the X11 window ID of the currently focused window */
+extern xcb_window_t focused_id;
 
 /**
  * Initializes the X11 part for the given container. Called exactly once for
@@ -49,7 +57,7 @@ bool window_supports_protocol(xcb_window_t window, xcb_atom_t atom);
  * Kills the given X11 window using WM_DELETE_WINDOW (if supported).
  *
  */
-void x_window_kill(xcb_window_t window);
+void x_window_kill(xcb_window_t window, kill_window_t kill_window);
 
 /**
  * Draws the decoration of the given container onto its parent.
@@ -57,6 +65,22 @@ void x_window_kill(xcb_window_t window);
  */
 void x_draw_decoration(Con *con);
 
+/**
+ * Recursively calls x_draw_decoration. This cannot be done in x_push_node
+ * because x_push_node uses focus order to recurse (see the comment above)
+ * while drawing the decoration needs to happen in the actual order.
+ *
+ */
+void x_deco_recurse(Con *con);
+
+/**
+ * This function pushes the properties of each node of the layout tree to
+ * X11 if they have changed (like the map state, position of the window, …).
+ * It recursively traverses all children of the given node.
+ *
+ */
+void x_push_node(Con *con);
+
 /**
  * Pushes all changes (state of each node, see x_push_node() and the window
  * stack) to X11.
@@ -79,4 +103,29 @@ void x_raise_con(Con *con);
  */
 void x_set_name(Con *con, const char *name);
 
-#endif
+/**
+ * Set up the SHMLOG_PATH atom.
+ *
+ */
+void update_shmlog_atom(void);
+
+/**
+ * Sets up i3 specific atoms (I3_SOCKET_PATH and I3_CONFIG_PATH)
+ *
+ */
+void x_set_i3_atoms(void);
+
+/**
+ * Set warp_to coordinates.  This will trigger on the next call to
+ * x_push_changes().
+ *
+ */
+void x_set_warp_to(Rect *rect);
+
+/**
+ * Applies the given mask to the event mask of every i3 window decoration X11
+ * window. This is useful to disable EnterNotify while resizing so that focus
+ * is untouched.
+ *
+ */
+void x_mask_event_mask(uint32_t mask);