aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/backend/drm/drm.h1
-rw-r--r--include/rootston/desktop.h6
-rw-r--r--include/rootston/output.h3
-rw-r--r--include/rootston/view.h3
-rw-r--r--include/wlr/render.h7
-rw-r--r--include/wlr/render/interface.h2
-rw-r--r--include/wlr/types/wlr_compositor.h1
-rw-r--r--include/wlr/types/wlr_idle_inhibit_v1.h45
-rw-r--r--include/wlr/xwayland.h1
-rw-r--r--include/wlr/xwm.h12
10 files changed, 75 insertions, 6 deletions
diff --git a/include/backend/drm/drm.h b/include/backend/drm/drm.h
index 65db04ef..ee3fd38e 100644
--- a/include/backend/drm/drm.h
+++ b/include/backend/drm/drm.h
@@ -144,6 +144,7 @@ void wlr_drm_restore_outputs(struct wlr_drm_backend *drm);
void wlr_drm_connector_cleanup(struct wlr_drm_connector *conn);
void wlr_drm_scan_connectors(struct wlr_drm_backend *state);
int wlr_drm_event(int fd, uint32_t mask, void *data);
+void wlr_drm_connector_enable(struct wlr_output *output, bool enable);
void wlr_drm_connector_start_renderer(struct wlr_drm_connector *conn);
diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h
index 0132a7e8..467de8ab 100644
--- a/include/rootston/desktop.h
+++ b/include/rootston/desktop.h
@@ -16,6 +16,10 @@
#include <wlr/types/wlr_xcursor_manager.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/types/wlr_xdg_shell.h>
+#include <wlr/types/wlr_list.h>
+#include <wlr/types/wlr_idle.h>
+#include <wlr/types/wlr_idle_inhibit_v1.h>
+#include "rootston/view.h"
#include "rootston/config.h"
#include "rootston/output.h"
#include "rootston/view.h"
@@ -41,6 +45,7 @@ struct roots_desktop {
struct wlr_server_decoration_manager *server_decoration_manager;
struct wlr_primary_selection_device_manager *primary_selection_device_manager;
struct wlr_idle *idle;
+ struct wlr_idle_inhibit_manager_v1 *idle_inhibit;
struct wl_listener new_output;
struct wl_listener layout_change;
@@ -73,6 +78,7 @@ void view_apply_damage(struct roots_view *view);
void view_damage_whole(struct roots_view *view);
void view_update_position(struct roots_view *view, double x, double y);
void view_update_size(struct roots_view *view, uint32_t width, uint32_t height);
+void view_initial_focus(struct roots_view *view);
void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data);
void handle_xdg_shell_surface(struct wl_listener *listener, void *data);
diff --git a/include/rootston/output.h b/include/rootston/output.h
index 9682e4f5..a852a204 100644
--- a/include/rootston/output.h
+++ b/include/rootston/output.h
@@ -19,7 +19,8 @@ struct roots_output {
struct wlr_output_damage *damage;
struct wl_listener destroy;
- struct wl_listener frame;
+ struct wl_listener damage_frame;
+ struct wl_listener damage_destroy;
};
void handle_new_output(struct wl_listener *listener, void *data);
diff --git a/include/rootston/view.h b/include/rootston/view.h
index 198086c1..ff5ef44a 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;
@@ -180,6 +181,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 +192,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,
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