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 STRDUP(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.

Define Documentation

#define STRDUP (   field)
Value:
do { \
    if (src->field != NULL) \
        dest->field = sstrdup(src->field); \
} 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 STRDUP.

void match_init ( Match match)

Definition at line 23 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 33 of file match.c.

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

bool match_matches_window ( Match match,
i3Window window 
)

Check if a match data structure matches the given window.

Definition at line 71 of file match.c.

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

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