diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/rootston/view.h | 4 | ||||
-rw-r--r-- | include/wlr/render.h | 7 | ||||
-rw-r--r-- | include/wlr/render/interface.h | 2 |
3 files changed, 9 insertions, 4 deletions
diff --git a/include/rootston/view.h b/include/rootston/view.h index 198086c1..7464edc5 100644 --- a/include/rootston/view.h +++ b/include/rootston/view.h @@ -83,6 +83,7 @@ struct roots_view { double x, y; uint32_t width, height; float rotation; + float alpha; bool decorated; int border_width; @@ -94,6 +95,7 @@ struct roots_view { double x, y; uint32_t width, height; float rotation; + float alpha; } saved; struct { @@ -180,6 +182,7 @@ struct roots_xdg_popup { struct wl_listener new_popup; }; +struct roots_view *view_create(); void view_get_box(const struct roots_view *view, struct wlr_box *box); void view_activate(struct roots_view *view, bool active); void view_move(struct roots_view *view, double x, double y); @@ -190,6 +193,7 @@ void view_maximize(struct roots_view *view, bool maximized); void view_set_fullscreen(struct roots_view *view, bool fullscreen, struct wlr_output *output); void view_rotate(struct roots_view *view, float rotation); +void view_cycle_alpha(struct roots_view *view); void view_close(struct roots_view *view); bool view_center(struct roots_view *view); void view_setup(struct roots_view *view); diff --git a/include/wlr/render.h b/include/wlr/render.h index 3743482b..747603da 100644 --- a/include/wlr/render.h +++ b/include/wlr/render.h @@ -33,12 +33,13 @@ struct wlr_texture *wlr_render_texture_create(struct wlr_renderer *r); * float projection[16]; * float matrix[16]; * wlr_texture_get_matrix(texture, &matrix, &projection, 123, 321); - * wlr_render_with_matrix(renderer, texture, &matrix); + * wlr_render_with_matrix(renderer, texture, &matrix, 0.5f); * - * This will render the texture at <123, 321>. + * This will render the texture at <123, 321> with an alpha channel of 0.5. */ bool wlr_render_with_matrix(struct wlr_renderer *r, - struct wlr_texture *texture, const float (*matrix)[16]); + struct wlr_texture *texture, const float (*matrix)[16], float alpha); + /** * Renders a solid quad in the specified color. */ diff --git a/include/wlr/render/interface.h b/include/wlr/render/interface.h index b989e399..eda5af1c 100644 --- a/include/wlr/render/interface.h +++ b/include/wlr/render/interface.h @@ -22,7 +22,7 @@ struct wlr_renderer_impl { void (*scissor)(struct wlr_renderer *renderer, struct wlr_box *box); struct wlr_texture *(*texture_create)(struct wlr_renderer *renderer); bool (*render_with_matrix)(struct wlr_renderer *renderer, - struct wlr_texture *texture, const float (*matrix)[16]); + struct wlr_texture *texture, const float (*matrix)[16], float alpha); void (*render_quad)(struct wlr_renderer *renderer, const float (*color)[4], const float (*matrix)[16]); void (*render_ellipse)(struct wlr_renderer *renderer, |