diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/wayland-server-core.h | 3 | ||||
| -rw-r--r-- | src/wayland-server.c | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h index 3e0272b..68d7ddb 100644 --- a/src/wayland-server-core.h +++ b/src/wayland-server-core.h @@ -279,6 +279,9 @@ wl_global_get_interface(const struct wl_global *global); void * wl_global_get_user_data(const struct wl_global *global); +void +wl_global_set_user_data(struct wl_global *global, void *data); + struct wl_client * wl_client_create(struct wl_display *display, int fd); diff --git a/src/wayland-server.c b/src/wayland-server.c index 11cb7f5..8c537bb 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -1245,6 +1245,19 @@ wl_global_get_user_data(const struct wl_global *global) return global->data; } +/** Set the global's user data + * + * \param global The global object + * \param data The user data pointer + * + * \since 1.17.90 + */ +WL_EXPORT void +wl_global_set_user_data(struct wl_global *global, void *data) +{ + global->data = data; +} + /** Get the current serial number * * \param display The display object |
