backend/wayland: add wlr_wl_output_create_from_surface()

By using this function, a compositor can display a wlroots
compositor in a sub-surface, for instance.
This commit is contained in:
Simon Ser 2023-06-07 14:35:26 +02:00
parent 4f88886199
commit 8678633fc9
3 changed files with 89 additions and 30 deletions

View file

@ -24,13 +24,24 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display,
struct wl_display *wlr_wl_backend_get_remote_display(struct wlr_backend *backend);
/**
* Adds a new output to this backend. You may remove outputs by destroying them.
* Adds a new output to this backend.
*
* This creates a new xdg_toplevel in the parent Wayland compositor.
*
* You may remove outputs by destroying them.
*
* Note that if called before initializing the backend, this will return NULL
* and your outputs will be created during initialization (and given to you via
* the new_output signal).
*/
struct wlr_output *wlr_wl_output_create(struct wlr_backend *backend);
/**
* Create a new output from an existing struct wl_surface.
*/
struct wlr_output *wlr_wl_output_create_from_surface(struct wlr_backend *backend,
struct wl_surface *surface);
/**
* Check whether the provided backend is a Wayland backend.
*/