|
Dunst
Lightweight notification daemon
|
#include "rules.h"#include <fnmatch.h>#include <glib.h>#include <stddef.h>#include <regex.h>#include "dunst.h"#include "utils.h"#include "settings_data.h"#include "log.h"
Include dependency graph for rules.c:Go to the source code of this file.
Macros | |
| #define | RULE_APPLY2(nprop, rprop, defval) |
| #define | RULE_APPLY(prop, defval) |
Functions | |
| void | rule_apply (struct rule *r, struct notification *n, bool save) |
| void | rule_print (const struct rule *r) |
| void | rule_apply_all (struct notification *n) |
| bool | rule_apply_special_filters (struct rule *r, const char *name) |
| struct rule * | rule_new (const char *name) |
| Allocate a new rule with given name. | |
| void | rule_free (struct rule *r) |
| static bool | rule_field_matches_string (const char *value, const char *pattern) |
| bool | rule_matches_notification (struct rule *r, struct notification *n) |
| struct rule * | get_rule (const char *name) |
| Check if a rule exists with that name. | |
| bool | rule_offset_is_modifying (const size_t offset) |
| see rules.h | |
| bool | rule_offset_is_filter (const size_t offset) |
| see rules.h | |
Variables | |
| GSList * | rules = NULL |
Definition in file rules.c.
| #define RULE_APPLY | ( | prop, | |
| defval ) |
| #define RULE_APPLY2 | ( | nprop, | |
| rprop, | |||
| defval ) |
| struct rule * get_rule | ( | const char * | name | ) |
| void rule_apply | ( | struct rule * | r, |
| struct notification * | n, | ||
| bool | save ) |
| void rule_apply_all | ( | struct notification * | n | ) |
| bool rule_apply_special_filters | ( | struct rule * | r, |
| const char * | name ) |
|
inlinestatic |
| bool rule_matches_notification | ( | struct rule * | r, |
| struct notification * | n ) |
| struct rule * rule_new | ( | const char * | name | ) |
Allocate a new rule with given name.
The rule is fully initialised. If the name is one of a special section (see settings_data.h), the rule is initialized with some filters, and you should not add any filters after that.
| name | Name of the rule. |
| bool rule_offset_is_filter | ( | const size_t | offset | ) |
| bool rule_offset_is_modifying | ( | const size_t | offset | ) |