mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2026-03-21 05:34:00 -04:00
Add convenience functions for posting display events
This commit is contained in:
parent
f66d0f4e14
commit
13b8ae4986
4 changed files with 28 additions and 22 deletions
|
|
@ -139,8 +139,7 @@ wl_client_connection_data(int fd, uint32_t mask, void *data)
|
|||
p[0], opcode);
|
||||
continue;
|
||||
} else if (closure == NULL && errno == ENOMEM) {
|
||||
wl_client_post_event(client, &client->display->base,
|
||||
WL_DISPLAY_NO_MEMORY);
|
||||
wl_client_post_no_memory(client);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -233,6 +232,25 @@ wl_client_add_resource(struct wl_client *client,
|
|||
wl_list_insert(client->resource_list.prev, &resource->link);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
wl_client_post_no_memory(struct wl_client *client)
|
||||
{
|
||||
wl_client_post_event(client,
|
||||
&client->display->base,
|
||||
WL_DISPLAY_NO_MEMORY);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
wl_client_post_global(struct wl_client *client, struct wl_object *object)
|
||||
{
|
||||
wl_client_post_event(client,
|
||||
&client->display->base,
|
||||
WL_DISPLAY_GLOBAL,
|
||||
object,
|
||||
object->interface->name,
|
||||
object->interface->version);
|
||||
}
|
||||
|
||||
WL_EXPORT void
|
||||
wl_resource_destroy(struct wl_resource *resource, struct wl_client *client)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue