]> git.sur5r.net Git - i3/i3/blobdiff - include/data.h
Merge branch 'master' into next
[i3/i3] / include / data.h
index 10fc16d25aba594f1a22d932b5a841575062c8d2..b498e02abc32afeb1c742d42e9dada28a3862dad 100644 (file)
 #include "queue.h"
 
 /*
- * To get the big concept: There are helper structures like struct Colorpixel
- * or struct Stack_Window. Everything which is also defined as type (see
+ * To get the big concept: There are helper structures like struct
+ * Workspace_Assignment. Every struct which is also defined as type (see
  * forward definitions) is considered to be a major structure, thus important.
  *
- * Let’s start from the biggest to the smallest:
+ * The following things are all stored in a 'Con', from very high level (the
+ * biggest Cons) to very small (a single window):
  *
- * TODO
+ * 1) X11 root window (as big as all your outputs combined)
+ * 2) output (like LVDS1)
+ * 3) content container, dockarea containers
+ * 4) workspaces
+ * 5) split containers
+ * ... (you can arbitrarily nest split containers)
+ * 6) X11 window containers
  *
  */
 
@@ -119,7 +126,6 @@ struct deco_render_params {
     Rect con_deco_rect;
     uint32_t background;
     bool con_is_leaf;
-    xcb_font_t font;
 };
 
 /**
@@ -178,7 +184,7 @@ struct regex {
 
 /**
  * Holds a keybinding, consisting of a keycode combined with modifiers and the
- * command which is executed as soon as the key is pressed (see src/command.c)
+ * command which is executed as soon as the key is pressed (see src/cfgparse.y)
  *
  */
 struct Binding {
@@ -257,6 +263,11 @@ struct xoutput {
     TAILQ_ENTRY(xoutput) outputs;
 };
 
+/**
+ * A 'Window' is a type which contains an xcb_window_t and all the related
+ * information (hints like _NET_WM_NAME for that window).
+ *
+ */
 struct Window {
     xcb_window_t id;
 
@@ -285,7 +296,7 @@ struct Window {
     char *name_json;
 
     /** The length of the name in glyphs (not bytes) */
-    int name_len;
+    size_t name_len;
 
     /** Whether the application used _NET_WM_NAME */
     bool uses_net_wm_name;
@@ -309,6 +320,14 @@ struct Window {
     Assignment **ran_assignments;
 };
 
+/**
+ * A "match" is a data structure which acts like a mask or expression to match
+ * certain windows or not. For example, when using commands, you can specify a
+ * command like this: [title="*Firefox*"] kill. The title member of the match
+ * data structure will then be filled and i3 will check each window using
+ * match_matches_window() to find the windows affected by this command.
+ *
+ */
 struct Match {
     struct regex *title;
     struct regex *application;
@@ -344,9 +363,9 @@ struct Match {
 /**
  * An Assignment makes specific windows go to a specific workspace/output or
  * run a command for that window. With this mechanism, the user can -- for
- * example -- make specific windows floating or assign his browser to workspace
- * "www". Checking if a window is assigned works by comparing the Match data
- * structure with the window (see match_matches_window()).
+ * example -- assign his browser to workspace "www". Checking if a window is
+ * assigned works by comparing the Match data structure with the window (see
+ * match_matches_window()).
  *
  */
 struct Assignment {
@@ -381,6 +400,10 @@ struct Assignment {
     TAILQ_ENTRY(Assignment) assignments;
 };
 
+/**
+ * A 'Con' represents everything from the X11 root window down to a single X11 window.
+ *
+ */
 struct Con {
     bool mapped;
     enum {
@@ -485,6 +508,12 @@ struct Con {
 
     /** callbacks */
     void(*on_remove_child)(Con *);
+
+    enum {
+        SCRATCHPAD_NONE = 0,
+        SCRATCHPAD_FRESH = 1,
+        SCRATCHPAD_CHANGED = 2
+    } scratchpad_state;
 };
 
 #endif