aboutsummaryrefslogtreecommitdiff
path: root/include/sway
diff options
context:
space:
mode:
authorRonan Pigott <rpigott@berkeley.edu>2019-11-13 11:23:36 -0700
committerSimon Ser <contact@emersion.fr>2019-11-29 18:13:37 +0100
commit6968fb3123e69f563cd01d472967a9e6ddca2ec1 (patch)
tree0e313d5e19da37762ab572e38c36ff33798f25fb /include/sway
parent4b579536288108ec09bb8523dea6799228d3d7fa (diff)
add scale_filter output config option
Diffstat (limited to 'include/sway')
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h10
-rw-r--r--include/sway/output.h1
3 files changed, 12 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 67665d87..5f249980 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -276,6 +276,7 @@ sway_cmd output_cmd_max_render_time;
sway_cmd output_cmd_mode;
sway_cmd output_cmd_position;
sway_cmd output_cmd_scale;
+sway_cmd output_cmd_scale_filter;
sway_cmd output_cmd_subpixel;
sway_cmd output_cmd_toggle;
sway_cmd output_cmd_transform;
diff --git a/include/sway/config.h b/include/sway/config.h
index ed542790..9a00ccb5 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -204,6 +204,13 @@ enum config_dpms {
DPMS_OFF
};
+enum scale_filter_mode {
+ SCALE_FILTER_DEFAULT, // the default is currently smart
+ SCALE_FILTER_LINEAR,
+ SCALE_FILTER_NEAREST,
+ SCALE_FILTER_SMART
+};
+
/**
* Size and position configuration for a particular output.
*
@@ -217,6 +224,7 @@ struct output_config {
int custom_mode;
int x, y;
float scale;
+ enum scale_filter_mode scale_filter;
int32_t transform;
enum wl_output_subpixel subpixel;
int max_render_time; // In milliseconds
@@ -655,6 +663,8 @@ int output_name_cmp(const void *item, const void *data);
void output_get_identifier(char *identifier, size_t len,
struct sway_output *output);
+const char *sway_output_scale_filter_to_string(enum scale_filter_mode scale_filter);
+
struct output_config *new_output_config(const char *name);
void merge_output_config(struct output_config *dst, struct output_config *src);
diff --git a/include/sway/output.h b/include/sway/output.h
index ddc08022..bc03f4c5 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -32,6 +32,7 @@ struct sway_output {
int lx, ly; // layout coords
int width, height; // transformed buffer size
enum wl_output_subpixel detected_subpixel;
+ enum scale_filter_mode scale_filter;
// last applied mode when the output is DPMS'ed
struct wlr_output_mode *current_mode;