]> git.sur5r.net Git - i3/i3/blobdiff - include/match.h
CONTRIBUTING: document people should use the `next` branch
[i3/i3] / include / match.h
index 4f0e9bdc291f3f17df7d9f80dec5dbbf8f355a0f..09975cac20fe644162930e08ea25742e1d12644f 100644 (file)
@@ -1,5 +1,17 @@
-#ifndef _MATCH_H
-#define _MATCH_H
+/*
+ * vim:ts=4:sw=4:expandtab
+ *
+ * i3 - an improved dynamic tiling window manager
+ * © 2009-2011 Michael Stapelberg and contributors (see also: LICENSE)
+ *
+ * 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.
+ *
+ */
+#pragma once
 
 /*
  * Initializes the Match data structure. This function is necessary because the
@@ -16,6 +28,12 @@ void match_init(Match *match);
  */
 bool match_is_empty(Match *match);
 
+/**
+ * Copies the data of a match from src to dest.
+ *
+ */
+void match_copy(Match *dest, Match *src);
+
 /**
  * Check if a match data structure matches the given window.
  *
@@ -23,9 +41,7 @@ bool match_is_empty(Match *match);
 bool match_matches_window(Match *match, i3Window *window);
 
 /**
- * Returns the first match in 'assignments' that matches the given window.
+ * Frees the given match. It must not be used afterwards!
  *
  */
-Match *match_by_assignment(i3Window *window);
-
-#endif
+void match_free(Match *match);