diff --git a/src/wayland-server-core.h b/src/wayland-server-core.h index b1baa25f..15c3b762 100644 --- a/src/wayland-server-core.h +++ b/src/wayland-server-core.h @@ -227,7 +227,7 @@ typedef void (*wl_global_bind_func_t)(struct wl_client *client, void *data, uint32_t version, uint32_t id); uint32_t -wl_display_get_serial(struct wl_display *display); +wl_display_get_serial(const struct wl_display *display); uint32_t wl_display_next_serial(struct wl_display *display); @@ -324,7 +324,7 @@ void wl_client_flush(struct wl_client *client); void -wl_client_get_credentials(struct wl_client *client, +wl_client_get_credentials(const struct wl_client *client, pid_t *pid, uid_t *uid, gid_t *gid); int @@ -586,7 +586,7 @@ void wl_resource_destroy(struct wl_resource *resource); uint32_t -wl_resource_get_id(struct wl_resource *resource); +wl_resource_get_id(const struct wl_resource *resource); struct wl_list * wl_resource_get_link(struct wl_resource *resource); @@ -607,7 +607,7 @@ void * wl_resource_get_user_data(struct wl_resource *resource); int -wl_resource_get_version(struct wl_resource *resource); +wl_resource_get_version(const struct wl_resource *resource); void wl_resource_set_destructor(struct wl_resource *resource, @@ -617,8 +617,9 @@ int wl_resource_instance_of(struct wl_resource *resource, const struct wl_interface *interface, const void *implementation); + const char * -wl_resource_get_class(struct wl_resource *resource); +wl_resource_get_class(const struct wl_resource *resource); void wl_resource_add_destroy_listener(struct wl_resource *resource, @@ -654,16 +655,16 @@ void * wl_shm_buffer_get_data(struct wl_shm_buffer *buffer); int32_t -wl_shm_buffer_get_stride(struct wl_shm_buffer *buffer); +wl_shm_buffer_get_stride(const struct wl_shm_buffer *buffer); uint32_t -wl_shm_buffer_get_format(struct wl_shm_buffer *buffer); +wl_shm_buffer_get_format(const struct wl_shm_buffer *buffer); int32_t -wl_shm_buffer_get_width(struct wl_shm_buffer *buffer); +wl_shm_buffer_get_width(const struct wl_shm_buffer *buffer); int32_t -wl_shm_buffer_get_height(struct wl_shm_buffer *buffer); +wl_shm_buffer_get_height(const struct wl_shm_buffer *buffer); struct wl_shm_pool * wl_shm_buffer_ref_pool(struct wl_shm_buffer *buffer); diff --git a/src/wayland-server.c b/src/wayland-server.c index 1d6be3ec..e5805669 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -619,7 +619,7 @@ err_client: * \memberof wl_client */ WL_EXPORT void -wl_client_get_credentials(struct wl_client *client, +wl_client_get_credentials(const struct wl_client *client, pid_t *pid, uid_t *uid, gid_t *gid) { if (pid) @@ -799,7 +799,7 @@ wl_resource_destroy(struct wl_resource *resource) } WL_EXPORT uint32_t -wl_resource_get_id(struct wl_resource *resource) +wl_resource_get_id(const struct wl_resource *resource) { return resource->object.id; } @@ -853,7 +853,7 @@ wl_resource_get_user_data(struct wl_resource *resource) } WL_EXPORT int -wl_resource_get_version(struct wl_resource *resource) +wl_resource_get_version(const struct wl_resource *resource) { return resource->version; } @@ -900,7 +900,7 @@ wl_resource_get_destroy_listener(struct wl_resource *resource, * \memberof wl_resource */ WL_EXPORT const char * -wl_resource_get_class(struct wl_resource *resource) +wl_resource_get_class(const struct wl_resource *resource) { return resource->object.interface->name; } @@ -1496,7 +1496,7 @@ wl_global_set_user_data(struct wl_global *global, void *data) * \memberof wl_display */ WL_EXPORT uint32_t -wl_display_get_serial(struct wl_display *display) +wl_display_get_serial(const struct wl_display *display) { return display->serial; } diff --git a/src/wayland-shm.c b/src/wayland-shm.c index 87917dad..9b3aac61 100644 --- a/src/wayland-shm.c +++ b/src/wayland-shm.c @@ -445,7 +445,7 @@ wl_shm_buffer_get(struct wl_resource *resource) } WL_EXPORT int32_t -wl_shm_buffer_get_stride(struct wl_shm_buffer *buffer) +wl_shm_buffer_get_stride(const struct wl_shm_buffer *buffer) { return buffer->stride; } @@ -479,19 +479,19 @@ wl_shm_buffer_get_data(struct wl_shm_buffer *buffer) } WL_EXPORT uint32_t -wl_shm_buffer_get_format(struct wl_shm_buffer *buffer) +wl_shm_buffer_get_format(const struct wl_shm_buffer *buffer) { return buffer->format; } WL_EXPORT int32_t -wl_shm_buffer_get_width(struct wl_shm_buffer *buffer) +wl_shm_buffer_get_width(const struct wl_shm_buffer *buffer) { return buffer->width; } WL_EXPORT int32_t -wl_shm_buffer_get_height(struct wl_shm_buffer *buffer) +wl_shm_buffer_get_height(const struct wl_shm_buffer *buffer) { return buffer->height; }