wlroots/include/wlr/types/wlr_compositor.h

48 lines
1.0 KiB
C
Raw Normal View History

/*
* 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
#ifndef WLR_TYPES_WLR_COMPOSITOR_H
#define WLR_TYPES_WLR_COMPOSITOR_H
#include <wayland-server-core.h>
#include <wlr/render/wlr_renderer.h>
struct wlr_surface;
2018-04-21 18:02:39 +00:00
struct wlr_subcompositor {
struct wl_global *global;
2018-04-21 18:02:39 +00:00
};
2018-04-21 17:40:25 +00:00
struct wlr_compositor {
struct wl_global *global;
struct wlr_renderer *renderer;
2018-04-21 18:02:39 +00:00
struct wlr_subcompositor subcompositor;
struct wl_listener display_destroy;
2017-08-20 17:50:28 +00:00
struct {
struct wl_signal new_surface;
struct wl_signal destroy;
2017-08-20 17:50:28 +00:00
} events;
};
struct wlr_compositor *wlr_compositor_create(struct wl_display *display,
struct wlr_renderer *renderer);
bool wlr_surface_is_subsurface(struct wlr_surface *surface);
/**
* Get a subsurface from a surface. Can return NULL if the subsurface has been
* destroyed.
*/
struct wlr_subsurface *wlr_subsurface_from_wlr_surface(
struct wlr_surface *surface);
#endif