summaryrefslogtreecommitdiff
path: root/include/sway/desktop/fx_renderer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sway/desktop/fx_renderer.h')
-rw-r--r--include/sway/desktop/fx_renderer.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/sway/desktop/fx_renderer.h b/include/sway/desktop/fx_renderer.h
index 1d7e2921..cc518284 100644
--- a/include/sway/desktop/fx_renderer.h
+++ b/include/sway/desktop/fx_renderer.h
@@ -2,6 +2,9 @@
#define _SWAY_OPENGL_H
#include <GLES2/gl2.h>
+#include <stdbool.h>
+
+enum corner_location {NONE, TOP_LEFT, TOP_RIGHT, BOTTOM_LEFT, BOTTOM_RIGHT};
struct gles2_tex_shader {
GLuint program;
@@ -29,6 +32,21 @@ struct fx_renderer {
GLint color;
GLint pos_attrib;
} quad;
+ struct {
+ GLuint program;
+ GLint proj;
+ GLint color;
+ GLint pos_attrib;
+ GLint is_top_left;
+ GLint is_top_right;
+ GLint is_bottom_left;
+ GLint is_bottom_right;
+ GLint width;
+ GLint height;
+ GLint position;
+ GLint radius;
+ GLint thickness;
+ } corner;
struct gles2_tex_shader tex_rgba;
struct gles2_tex_shader tex_rgbx;
struct gles2_tex_shader tex_ext;
@@ -55,4 +73,8 @@ bool fx_render_texture_with_matrix(struct fx_renderer *renderer, struct wlr_text
void fx_render_rect(struct fx_renderer *renderer, const struct wlr_box *box,
const float color[static 4], const float projection[static 9]);
+void fx_render_border_corner(struct fx_renderer *renderer, const struct wlr_box *box,
+ const float color[static 4], const float projection[static 9],
+ enum corner_location corner_location, int radius, int border_thickness);
+
#endif