diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/render.h | 7 | ||||
-rw-r--r-- | include/wlr/render/interface.h | 2 | ||||
-rw-r--r-- | include/wlr/types/wlr_compositor.h | 1 | ||||
-rw-r--r-- | include/wlr/types/wlr_idle_inhibit_v1.h | 45 | ||||
-rw-r--r-- | include/wlr/xwayland.h | 1 | ||||
-rw-r--r-- | include/wlr/xwm.h | 12 |
6 files changed, 63 insertions, 5 deletions
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, diff --git a/include/wlr/types/wlr_compositor.h b/include/wlr/types/wlr_compositor.h index 8481c590..5919b934 100644 --- a/include/wlr/types/wlr_compositor.h +++ b/include/wlr/types/wlr_compositor.h @@ -14,6 +14,7 @@ struct wlr_compositor { struct { struct wl_signal new_surface; + struct wl_signal destroy; } events; }; diff --git a/include/wlr/types/wlr_idle_inhibit_v1.h b/include/wlr/types/wlr_idle_inhibit_v1.h new file mode 100644 index 00000000..a777ff43 --- /dev/null +++ b/include/wlr/types/wlr_idle_inhibit_v1.h @@ -0,0 +1,45 @@ +#ifndef WLR_TYPES_WLR_IDLE_INHIBIT_V1_H +#define WLR_TYPES_WLR_IDLE_INHIBIT_V1_H + +#include <wayland-server.h> + +/* This interface permits clients to inhibit the idle behavior such as + * screenblanking, locking, and screensaving. + * + * This allows clients to ensure they stay visible instead of being hidden by + * power-saving. + * + * Inhibitors are created for surfaces. They should only be in effect, while + * this surface is visible. + * The effect could also be limited to outputs it is displayed on (e.g. + * dimm/dpms off outputs, except the one a video is displayed on). + */ + +struct wlr_idle_inhibit_manager_v1 { + struct wl_list wl_resources; // wl_resource_get_link + struct wl_list inhibitors; // wlr_idle_inhibit_inhibitor_v1::link + struct wl_global *global; + + struct wl_listener display_destroy; + + struct { + struct wl_signal new_inhibitor; + } events; +}; + +struct wlr_idle_inhibitor_v1 { + struct wlr_surface *surface; + struct wl_resource *resource; + struct wl_listener surface_destroy; + + struct wl_list link; // wlr_idle_inhibit_manager_v1::inhibitors; + + struct { + struct wl_signal destroy; + } events; +}; + +struct wlr_idle_inhibit_manager_v1 *wlr_idle_inhibit_v1_create(struct wl_display *display); +void wlr_idle_inhibit_v1_destroy(struct wlr_idle_inhibit_manager_v1 *idle_inhibit); + +#endif diff --git a/include/wlr/xwayland.h b/include/wlr/xwayland.h index ad7ceb83..0d4b91ed 100644 --- a/include/wlr/xwayland.h +++ b/include/wlr/xwayland.h @@ -186,4 +186,5 @@ void wlr_xwayland_surface_set_fullscreen(struct wlr_xwayland_surface *surface, void wlr_xwayland_set_seat(struct wlr_xwayland *xwayland, struct wlr_seat *seat); +bool wlr_xwayland_surface_is_unmanaged(const struct wlr_xwayland_surface *surface); #endif diff --git a/include/wlr/xwm.h b/include/wlr/xwm.h index 242ff9cc..7d518f7e 100644 --- a/include/wlr/xwm.h +++ b/include/wlr/xwm.h @@ -39,6 +39,12 @@ enum atom_name { INCR, TEXT, TIMESTAMP, + NET_WM_WINDOW_TYPE_UTILITY, + NET_WM_WINDOW_TYPE_TOOLTIP, + NET_WM_WINDOW_TYPE_DND, + NET_WM_WINDOW_TYPE_DROPDOWN_MENU, + NET_WM_WINDOW_TYPE_POPUP_MENU, + NET_WM_WINDOW_TYPE_COMBO, ATOM_LAST, }; @@ -93,7 +99,8 @@ struct wlr_xwm { const xcb_query_extension_reply_t *xfixes; - struct wl_listener compositor_surface_create; + struct wl_listener compositor_new_surface; + struct wl_listener compositor_destroy; struct wl_listener seat_selection; struct wl_listener seat_primary_selection; }; @@ -112,4 +119,7 @@ void xwm_selection_finish(struct wlr_xwm *xwm); void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat); +bool wlr_xwm_atoms_contains(struct wlr_xwm *xwm, xcb_atom_t *atoms, + size_t num_atoms, enum atom_name needle); + #endif |