aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/config.h')
-rw-r--r--include/sway/config.h29
1 files changed, 21 insertions, 8 deletions
diff --git a/include/sway/config.h b/include/sway/config.h
index f9da1967..5ccc3e77 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -292,6 +292,14 @@ struct output_config {
292}; 292};
293 293
294/** 294/**
295 * An output config pre-matched to an output
296 */
297struct matched_output_config {
298 struct sway_output *output;
299 struct output_config *config;
300};
301
302/**
295 * Stores size of gaps for each side 303 * Stores size of gaps for each side
296 */ 304 */
297struct side_gaps { 305struct side_gaps {
@@ -680,20 +688,25 @@ const char *sway_output_scale_filter_to_string(enum scale_filter_mode scale_filt
680 688
681struct output_config *new_output_config(const char *name); 689struct output_config *new_output_config(const char *name);
682 690
683void merge_output_config(struct output_config *dst, struct output_config *src); 691bool apply_output_configs(struct matched_output_config *configs,
692 size_t configs_len, bool test_only, bool degrade_to_off);
684 693
685bool apply_output_config(struct output_config *oc, struct sway_output *output); 694void apply_all_output_configs(void);
686 695
687bool test_output_config(struct output_config *oc, struct sway_output *output); 696void sort_output_configs_by_priority(struct matched_output_config *configs,
697 size_t configs_len);
688 698
689struct output_config *store_output_config(struct output_config *oc); 699/**
700 * store_output_config stores a new output config. An output may be matched by
701 * three different config types, in order of precedence: Identifier, name and
702 * wildcard. When storing a config type of lower precedence, assume that the
703 * user wants the config to take immediate effect by superseding (clearing) the
704 * same values from higher presedence configuration.
705 */
706void store_output_config(struct output_config *oc);
690 707
691struct output_config *find_output_config(struct sway_output *output); 708struct output_config *find_output_config(struct sway_output *output);
692 709
693void apply_output_config_to_outputs(struct output_config *oc);
694
695void reset_outputs(void);
696
697void free_output_config(struct output_config *oc); 710void free_output_config(struct output_config *oc);
698 711
699bool spawn_swaybg(void); 712bool spawn_swaybg(void);