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

Go to the source code of this file.

Macros

#define _i3_timercmp(a, b, CMP)
 
#define DUPLICATE_REGEX(field)
 

Functions

void match_init (Match *match)
 
bool match_is_empty (Match *match)
 Check if a match is empty. More...
 
void match_copy (Match *dest, Match *src)
 Copies the data of a match from src to dest. More...
 
bool match_matches_window (Match *match, i3Window *window)
 Check if a match data structure matches the given window. More...
 
void match_free (Match *match)
 Frees the given match. More...
 

Macro Definition Documentation

#define _i3_timercmp (   a,
  b,
  CMP 
)
Value:
(((a).tv_sec == (b).tv_sec) ? \
((a).tv_usec CMP (b).tv_usec) : \
((a).tv_sec CMP (b).tv_sec))

Definition at line 17 of file match.c.

Referenced by match_matches_window().

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

References DUPLICATE_REGEX.

Referenced by yyparse().

void match_free ( Match match)

Frees the given match.

It must not be used afterwards!

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

References Match::dock, and Match::urgent.

Referenced by cmd_criteria_init(), output_init_con(), TAILQ_HEAD(), and yyparse().

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::floating, Match::id, Match::instance, Match::mark, Match::role, Match::title, and Match::urgent.

Referenced by cmd_focus(), cmd_kill(), cmd_layout(), cmd_move_con_to_workspace_name(), cmd_move_con_to_workspace_number(), cmd_scratchpad_show(), and yyparse().

bool match_matches_window ( Match match,
i3Window window 
)