mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
compositor: introduce wlr_surface_set_role_object()
This commit is contained in:
parent
0040c78c0b
commit
0f67580aab
12 changed files with 58 additions and 33 deletions
|
|
@ -230,17 +230,22 @@ typedef void (*wlr_surface_iterator_func_t)(struct wlr_surface *surface,
|
|||
int sx, int sy, void *data);
|
||||
|
||||
/**
|
||||
* Set the lifetime role for this surface. Returns true on success or false if
|
||||
* the role cannot be set.
|
||||
* Set the lifetime role for this surface.
|
||||
*
|
||||
* If the role is represented by an object, role_data must be non-NULL.
|
||||
* Alternatively, if the role isn't represented by any object, role_data must
|
||||
* be NULL.
|
||||
* If the surface already has a different role and/or has a role object set,
|
||||
* the function fails and sends an error to the client.
|
||||
*
|
||||
* Returns true on success, false otherwise.
|
||||
*/
|
||||
bool wlr_surface_set_role(struct wlr_surface *surface,
|
||||
const struct wlr_surface_role *role, void *role_data,
|
||||
bool wlr_surface_set_role(struct wlr_surface *surface, const struct wlr_surface_role *role,
|
||||
struct wl_resource *error_resource, uint32_t error_code);
|
||||
|
||||
/**
|
||||
* Set the role object for this surface. The surface must have a role and
|
||||
* no already set role object.
|
||||
*/
|
||||
void wlr_surface_set_role_object(struct wlr_surface *surface, void *role_data);
|
||||
|
||||
/**
|
||||
* Destroy the object representing the surface's role. If it doesn't exist,
|
||||
* this function is no-op.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue