summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorWill McKinnon <[email protected]>2022-11-11 20:05:05 -0500
committerWill McKinnon <[email protected]>2022-11-11 20:05:17 -0500
commit6ca742d4f2408e2277b98825206ed9d7e6cf41b1 (patch)
tree66c86680d3b44a36772ac7cea7469ca19c9d9247 /include
parent1881b01d3fe1805d371589969b4a75b9cccd8d26 (diff)
feat: render tiling move indicator with round corners
Diffstat (limited to 'include')
-rw-r--r--include/sway/desktop/fx_renderer.h3
-rw-r--r--include/sway/output.h7
2 files changed, 9 insertions, 1 deletions
diff --git a/include/sway/desktop/fx_renderer.h b/include/sway/desktop/fx_renderer.h
index 0bbfcec3..b461ba02 100644
--- a/include/sway/desktop/fx_renderer.h
+++ b/include/sway/desktop/fx_renderer.h
@@ -4,7 +4,7 @@
#include <GLES2/gl2.h>
#include <stdbool.h>
-enum corner_location { NONE, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
+enum corner_location { ALL, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT };
struct gles2_tex_shader {
GLuint program;
@@ -44,6 +44,7 @@ struct fx_renderer {
GLint pos_attrib;
} quad;
+ struct rounded_quad_shader rounded_quad;
struct rounded_quad_shader rounded_tl_quad;
struct rounded_quad_shader rounded_tr_quad;
diff --git a/include/sway/output.h b/include/sway/output.h
index 26b9709f..dc34686a 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -5,6 +5,7 @@
#include <wayland-server-core.h>
#include <wlr/types/wlr_output.h>
#include "config.h"
+#include "sway/desktop/fx_renderer.h"
#include "sway/tree/node.h"
#include "sway/tree/view.h"
@@ -162,6 +163,12 @@ void render_rect(struct sway_output *output,
pixman_region32_t *output_damage, const struct wlr_box *_box,
float color[static 4]);
+void render_rounded_rect(struct sway_output *output,
+ pixman_region32_t *output_damage, const struct wlr_box *_box,
+ float color[static 4], int corner_radius,
+ enum corner_location corner_location);
+
+
void premultiply_alpha(float color[4], float opacity);
void scale_box(struct wlr_box *box, float scale);