2019-02-08 22:43:59 +00:00
|
|
|
/*
|
|
|
|
* This protocol is obsolete and will be removed in a future version. The
|
|
|
|
* recommended replacement is xdg-decoration.
|
|
|
|
*/
|
|
|
|
|
2018-07-13 12:40:56 +00: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-10-24 19:56:18 +00:00
|
|
|
#ifndef WLR_TYPES_WLR_SERVER_DECORATION_H
|
|
|
|
#define WLR_TYPES_WLR_SERVER_DECORATION_H
|
|
|
|
|
2019-07-27 08:53:54 +00:00
|
|
|
#include <wayland-server-core.h>
|
2017-10-24 19:56:18 +00:00
|
|
|
|
2017-12-03 18:16:41 +00:00
|
|
|
/**
|
|
|
|
* Possible values to use in request_mode and the event mode. Same as
|
|
|
|
* org_kde_kwin_server_decoration_manager_mode.
|
|
|
|
*/
|
|
|
|
enum wlr_server_decoration_manager_mode {
|
|
|
|
/**
|
|
|
|
* Undecorated: The surface is not decorated at all, neither server nor
|
|
|
|
* client-side. An example is a popup surface which should not be
|
|
|
|
* decorated.
|
|
|
|
*/
|
|
|
|
WLR_SERVER_DECORATION_MANAGER_MODE_NONE = 0,
|
|
|
|
/**
|
|
|
|
* Client-side decoration: The decoration is part of the surface and the
|
|
|
|
* client.
|
|
|
|
*/
|
|
|
|
WLR_SERVER_DECORATION_MANAGER_MODE_CLIENT = 1,
|
|
|
|
/**
|
|
|
|
* Server-side decoration: The server embeds the surface into a decoration
|
|
|
|
* frame.
|
|
|
|
*/
|
|
|
|
WLR_SERVER_DECORATION_MANAGER_MODE_SERVER = 2,
|
|
|
|
};
|
|
|
|
|
2019-02-08 22:43:59 +00:00
|
|
|
/**
|
2019-11-23 12:04:06 +00:00
|
|
|
* A decoration negotiation interface which implements the KDE protocol.
|
2019-02-08 22:43:59 +00:00
|
|
|
*/
|
2017-10-24 19:56:18 +00:00
|
|
|
struct wlr_server_decoration_manager {
|
2018-07-08 18:21:31 +00:00
|
|
|
struct wl_global *global;
|
2019-11-16 17:31:33 +00:00
|
|
|
struct wl_list resources; // wl_resource_get_link
|
2017-10-24 19:56:18 +00:00
|
|
|
struct wl_list decorations; // wlr_server_decoration::link
|
|
|
|
|
2017-12-03 18:16:41 +00:00
|
|
|
uint32_t default_mode; // enum wlr_server_decoration_manager_mode
|
2017-10-24 21:22:27 +00:00
|
|
|
|
2017-12-06 23:36:05 +00:00
|
|
|
struct wl_listener display_destroy;
|
|
|
|
|
2017-10-24 21:22:27 +00:00
|
|
|
struct {
|
|
|
|
struct wl_signal new_decoration;
|
2018-08-26 21:23:12 +00:00
|
|
|
struct wl_signal destroy;
|
2017-10-24 21:22:27 +00:00
|
|
|
} events;
|
|
|
|
|
2017-10-24 19:56:18 +00:00
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_server_decoration {
|
|
|
|
struct wl_resource *resource;
|
2017-10-24 21:22:27 +00:00
|
|
|
struct wlr_surface *surface;
|
2017-10-24 19:56:18 +00:00
|
|
|
struct wl_list link;
|
|
|
|
|
2017-12-03 18:16:41 +00:00
|
|
|
uint32_t mode; // enum wlr_server_decoration_manager_mode
|
2017-10-24 21:22:27 +00:00
|
|
|
|
2017-10-24 19:56:18 +00:00
|
|
|
struct {
|
|
|
|
struct wl_signal destroy;
|
2017-10-26 22:02:30 +00:00
|
|
|
struct wl_signal mode;
|
2017-10-24 19:56:18 +00:00
|
|
|
} events;
|
|
|
|
|
2017-10-24 21:22:27 +00:00
|
|
|
struct wl_listener surface_destroy_listener;
|
|
|
|
|
2017-10-24 19:56:18 +00:00
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_server_decoration_manager *wlr_server_decoration_manager_create(
|
|
|
|
struct wl_display *display);
|
2017-10-24 21:22:27 +00:00
|
|
|
void wlr_server_decoration_manager_set_default_mode(
|
|
|
|
struct wlr_server_decoration_manager *manager, uint32_t default_mode);
|
2017-10-24 19:56:18 +00:00
|
|
|
|
|
|
|
#endif
|