i3
Defines | Functions
src/match.c File Reference
#include "all.h"
Include dependency graph for match.c:

Go to the source code of this file.

Defines

#define DUPLICATE_REGEX(field)

Functions

void match_init (Match *match)
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.

Define Documentation

#define DUPLICATE_REGEX (   field)
Value:
do { \
    if (src->field != NULL) \
        dest->field = regex_new(src->field->pattern); \
} while (0)

Referenced by match_copy().


Function Documentation

void match_copy ( Match dest,
Match src 
)

Copies the data of a match from src to dest.

Definition at line 52 of file match.c.

References DUPLICATE_REGEX.

void match_free ( Match match)

Frees the given match.

It must not be used afterwards!

Definition at line 150 of file match.c.

References Match::application, Match::class, FREE, Match::instance, Match::mark, regex_free(), Match::role, and Match::title.

Referenced by load_configuration().

Here is the call graph for this function:

void match_init ( Match match)

Definition at line 22 of file match.c.

References Match::dock.

Referenced by json_start_map(), output_init_con(), and parse_cmd().

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 32 of file match.c.

References Match::application, Match::class, Match::con_id, Match::dock, Match::floating, Match::id, Match::instance, Match::mark, Match::role, and Match::title.

bool match_matches_window ( Match match,
i3Window window 
)

Check if a match data structure matches the given window.

Definition at line 75 of file match.c.

References Match::class, Window::class_class, Window::class_instance, Window::dock, Match::dock, Window::id, Match::id, Match::instance, LOG, Match::mark, Window::name_json, regex_matches(), Window::role, Match::role, and Match::title.

Referenced by assignment_for(), con_for_window(), and run_assignments().

Here is the call graph for this function: