2018-07-13 14:40:56 +02:00
|
|
|
/*
|
|
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
|
|
* future consistency of this API.
|
|
|
|
*/
|
|
|
|
#ifndef WLR_USE_UNSTABLE
|
|
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
|
|
#endif
|
|
|
|
|
2017-09-23 10:26:01 +02:00
|
|
|
#ifndef WLR_TYPES_WLR_COMPOSITOR_H
|
|
|
|
#define WLR_TYPES_WLR_COMPOSITOR_H
|
|
|
|
|
2017-06-29 00:51:58 +02:00
|
|
|
#include <wayland-server.h>
|
2018-03-19 23:16:29 +01:00
|
|
|
#include <wlr/render/wlr_renderer.h>
|
2017-06-29 00:51:58 +02:00
|
|
|
|
2018-04-05 19:58:41 +02:00
|
|
|
struct wlr_surface;
|
|
|
|
|
2018-04-21 20:02:39 +02:00
|
|
|
struct wlr_subcompositor {
|
2018-07-08 20:21:31 +02:00
|
|
|
struct wl_global *global;
|
|
|
|
struct wl_list resources;
|
2018-04-25 00:31:58 +02:00
|
|
|
struct wl_list subsurface_resources;
|
2018-04-21 20:02:39 +02:00
|
|
|
};
|
2018-04-21 19:40:25 +02:00
|
|
|
|
2017-08-19 21:48:20 +02:00
|
|
|
struct wlr_compositor {
|
2018-07-08 20:21:31 +02:00
|
|
|
struct wl_global *global;
|
|
|
|
struct wl_list resources;
|
2017-08-03 15:50:45 +02:00
|
|
|
struct wlr_renderer *renderer;
|
2018-04-25 00:05:15 +02:00
|
|
|
struct wl_list surface_resources;
|
|
|
|
struct wl_list region_resources;
|
2017-12-07 00:44:45 +01:00
|
|
|
|
2018-04-21 20:02:39 +02:00
|
|
|
struct wlr_subcompositor subcompositor;
|
|
|
|
|
2017-12-07 00:44:45 +01:00
|
|
|
struct wl_listener display_destroy;
|
2017-08-19 22:14:51 +02:00
|
|
|
|
2017-08-20 19:50:28 +02:00
|
|
|
struct {
|
2018-01-21 14:22:33 +01:00
|
|
|
struct wl_signal new_surface;
|
2018-02-23 10:20:53 +01:00
|
|
|
struct wl_signal destroy;
|
2017-08-20 19:50:28 +02:00
|
|
|
} events;
|
2017-06-29 00:51:58 +02:00
|
|
|
};
|
|
|
|
|
2017-08-19 23:16:19 +02:00
|
|
|
void wlr_compositor_destroy(struct wlr_compositor *wlr_compositor);
|
|
|
|
struct wlr_compositor *wlr_compositor_create(struct wl_display *display,
|
2018-06-30 11:13:30 +02:00
|
|
|
struct wlr_renderer *renderer);
|
2017-06-29 00:51:58 +02:00
|
|
|
|
2018-04-05 19:58:41 +02:00
|
|
|
bool wlr_surface_is_subsurface(struct wlr_surface *surface);
|
|
|
|
|
2018-11-26 23:16:40 +01:00
|
|
|
/**
|
|
|
|
* Get a subsurface from a surface. Can return NULL if the subsurface has been
|
|
|
|
* destroyed.
|
|
|
|
*/
|
2018-06-30 11:13:30 +02:00
|
|
|
struct wlr_subsurface *wlr_subsurface_from_wlr_surface(
|
|
|
|
struct wlr_surface *surface);
|
2018-04-05 19:58:41 +02:00
|
|
|
|
2017-06-29 00:51:58 +02:00
|
|
|
#endif
|