i3
|
#include "all.h"
Go to the source code of this file.
Macros | |
#define | _i3_timercmp(a, b, CMP) |
#define | DUPLICATE_REGEX(field) |
#define | GET_FIELD_str(field) |
#define | GET_FIELD_i3string(field) |
#define | CHECK_WINDOW_FIELD(match_field, window_field, type) |
Functions | |
void | match_init (Match *match) |
Initializes the Match data structure. | |
bool | match_is_empty (Match *match) |
Check if a match is empty. | |
void | match_copy (Match *dest, Match *src) |
Copies the data of a match from src to dest. | |
bool | match_matches_window (Match *match, i3Window *window) |
Check if a match data structure matches the given window. | |
void | match_free (Match *match) |
Frees the given match. | |
void | match_parse_property (Match *match, const char *ctype, const char *cvalue) |
Interprets a ctype=cvalue pair and adds it to the given match specification. | |
#define _i3_timercmp | ( | a, | |
b, | |||
CMP ) |
Definition at line 17 of file match.c.
Referenced by match_matches_window().
#define CHECK_WINDOW_FIELD | ( | match_field, | |
window_field, | |||
type ) |
Referenced by match_matches_window().
#define DUPLICATE_REGEX | ( | field | ) |
Referenced by match_copy().
#define GET_FIELD_i3string | ( | field | ) |
#define GET_FIELD_str | ( | field | ) |
void match_free | ( | Match * | match | ) |
Frees the given match.
It must not be used afterwards!
Definition at line 279 of file match.c.
References Match::application, Match::class, Match::error, FREE, Match::instance, Match::machine, Match::mark, regex_free(), Match::title, Match::window_role, and Match::workspace.
Referenced by _remove_matches(), CFGFUN(), con_free(), free_configuration(), json_end_map(), manage_window(), and TAILQ_HEAD().
void match_init | ( | Match * | match | ) |
Initializes the Match data structure.
This function is necessary because the members representing boolean values (like dock) need to be initialized with -1 instead of 0.
Definition at line 26 of file match.c.
References Match::urgent, Match::window_mode, and Match::window_type.
Referenced by CFGFUN(), open_placeholder_window(), output_init_con(), and TAILQ_HEAD().
bool match_is_empty | ( | Match * | match | ) |
Check if a match is empty.
This is necessary while parsing commands to see whether the user specified a match at all.
Definition at line 39 of file match.c.
References Match::application, Match::class, Match::con_id, Match::dock, Match::id, Match::instance, Match::machine, Match::mark, Match::match_all_windows, Match::title, Match::urgent, Match::window_mode, Match::window_role, Match::window_type, and Match::workspace.
Referenced by CFGFUN(), CFGFUN(), CFGFUN(), CFGFUN(), cmd_focus(), cmd_layout_toggle(), cmd_scratchpad_show(), and cmd_unmark().
Check if a match data structure matches the given window.
Definition at line 90 of file match.c.
References _i3_timercmp, all_cons, CHECK_WINDOW_FIELD, Window::class_class, con_by_window_id(), con_get_workspace(), con_inside_floating(), Match::dock, Window::dock, Con::floating, focused, Match::id, Window::id, LOG, Match::mark, marks, Con::name, mark_t::name, regex::pattern, regex_matches(), TAILQ_FOREACH, Match::urgent, Window::urgent, Con::window, Match::window_mode, Match::window_type, Window::window_type, and Match::workspace.
Referenced by assignment_for(), cmd_criteria_match_windows(), con_for_window(), and run_assignments().
void match_parse_property | ( | Match * | match, |
const char * | ctype, | ||
const char * | cvalue ) |
Interprets a ctype=cvalue pair and adds it to the given match specification.
Definition at line 295 of file match.c.
References Match::class, Match::con_id, DLOG, ELOG, Match::error, focused, Match::id, Match::instance, Match::machine, Match::mark, Match::match_all_windows, parse_long(), regex_free(), regex_new(), sstrdup(), Match::title, Match::urgent, Match::window_mode, Match::window_role, Match::window_type, and Match::workspace.
Referenced by CFGFUN(), and cmd_criteria_add().