commit b1618bf

Michael Forney  ·  2019-08-30 04:06:42 +0000 UTC
parent de8e33b
Abbreviate 'implementation' as 'impl'
17 files changed,  +39, -39
+2, -2
 1@@ -766,7 +766,7 @@ create_region(struct wl_client *client, struct wl_resource *resource, uint32_t i
 2 		wl_resource_post_no_memory(resource);
 3 }
 4 
 5-static struct wl_compositor_interface compositor_implementation = {
 6+static struct wl_compositor_interface compositor_impl = {
 7 	.create_surface = create_surface,
 8 	.create_region = create_region,
 9 };
10@@ -780,7 +780,7 @@ bind_compositor(struct wl_client *client, void *data, uint32_t version, uint32_t
11 		version = 3;
12 
13 	resource = wl_resource_create(client, &wl_compositor_interface, version, id);
14-	wl_resource_set_implementation(resource, &compositor_implementation, NULL, NULL);
15+	wl_resource_set_implementation(resource, &compositor_impl, NULL, NULL);
16 }
17 
18 bool
+4, -4
 1@@ -66,7 +66,7 @@ offer_destroy(struct wl_client *client, struct wl_resource *offer)
 2 	wl_resource_destroy(offer);
 3 }
 4 
 5-static struct wl_data_offer_interface data_offer_implementation = {
 6+static struct wl_data_offer_interface data_offer_impl = {
 7 	.accept = offer_accept,
 8 	.receive = offer_receive,
 9 	.destroy = offer_destroy,
10@@ -88,7 +88,7 @@ source_destroy(struct wl_client *client, struct wl_resource *source)
11 	wl_resource_destroy(source);
12 }
13 
14-static struct wl_data_source_interface data_source_implementation = {
15+static struct wl_data_source_interface data_source_impl = {
16 	.offer = source_offer,
17 	.destroy = source_destroy,
18 };
19@@ -150,7 +150,7 @@ data_source_new(struct wl_client *client, uint32_t version, uint32_t id)
20 	data->source = wl_resource_create(client, &wl_data_source_interface, version, id);
21 
22 	/* Destroy the data object when the source disappears. */
23-	wl_resource_set_implementation(data->source, &data_source_implementation, data, &data_destroy);
24+	wl_resource_set_implementation(data->source, &data_source_impl, data, &data_destroy);
25 
26 	return data->source;
27 }
28@@ -162,7 +162,7 @@ data_offer_new(struct wl_client *client, struct wl_resource *source, uint32_t ve
29 	struct wl_resource *offer;
30 
31 	offer = wl_resource_create(client, &wl_data_offer_interface, version, 0);
32-	wl_resource_set_implementation(offer, &data_offer_implementation, data, &remove_resource);
33+	wl_resource_set_implementation(offer, &data_offer_impl, data, &remove_resource);
34 	wl_list_insert(&data->offers, wl_resource_get_link(offer));
35 
36 	return offer;
+2, -2
 1@@ -56,7 +56,7 @@ set_selection(struct wl_client *client, struct wl_resource *resource, struct wl_
 2 	send_event(&data_device->event_signal, DATA_DEVICE_EVENT_SELECTION_CHANGED, NULL);
 3 }
 4 
 5-static struct wl_data_device_interface data_device_implementation = {
 6+static struct wl_data_device_interface data_device_impl = {
 7 	.start_drag = start_drag,
 8 	.set_selection = set_selection,
 9 };
10@@ -102,7 +102,7 @@ data_device_bind(struct data_device *data_device, struct wl_client *client, uint
11 	struct wl_resource *resource;
12 
13 	resource = wl_resource_create(client, &wl_data_device_interface, version, id);
14-	wl_resource_set_implementation(resource, &data_device_implementation, data_device, &remove_resource);
15+	wl_resource_set_implementation(resource, &data_device_impl, data_device, &remove_resource);
16 	wl_list_insert(&data_device->resources, &resource->link);
17 }
18 
+2, -2
 1@@ -46,7 +46,7 @@ get_data_device(struct wl_client *client, struct wl_resource *resource, uint32_t
 2 	data_device_bind(seat->data_device, client, wl_resource_get_version(resource), id);
 3 }
 4 
 5-static struct wl_data_device_manager_interface data_device_manager_implementation = {
 6+static struct wl_data_device_manager_interface data_device_manager_impl = {
 7 	.create_data_source = create_data_source,
 8 	.get_data_device = get_data_device,
 9 };
10@@ -60,7 +60,7 @@ bind_data_device_manager(struct wl_client *client, void *data, uint32_t version,
11 		version = 1;
12 
13 	resource = wl_resource_create(client, &wl_data_device_manager_interface, version, id);
14-	wl_resource_set_implementation(resource, &data_device_manager_implementation, NULL, NULL);
15+	wl_resource_set_implementation(resource, &data_device_manager_impl, NULL, NULL);
16 }
17 
18 struct wl_global *
+2, -2
 1@@ -112,7 +112,7 @@ error0:
 2 	wl_resource_post_no_memory(resource);
 3 }
 4 
 5-static const struct wl_drm_interface drm_implementation = {
 6+static const struct wl_drm_interface drm_impl = {
 7 	.authenticate = authenticate,
 8 	.create_buffer = create_buffer,
 9 	.create_planar_buffer = create_planar_buffer,
10@@ -243,7 +243,7 @@ bind_drm(struct wl_client *client, void *data, uint32_t version, uint32_t id)
11 		version = 2;
12 
13 	resource = wl_resource_create(client, &wl_drm_interface, version, id);
14-	wl_resource_set_implementation(resource, &drm_implementation, NULL, NULL);
15+	wl_resource_set_implementation(resource, &drm_impl, NULL, NULL);
16 
17 	if (version >= 2)
18 		wl_drm_send_capabilities(resource, WL_DRM_CAPABILITY_PRIME);
+2, -2
 1@@ -299,7 +299,7 @@ release(struct wl_client *client, struct wl_resource *resource)
 2 	wl_resource_destroy(resource);
 3 }
 4 
 5-static struct wl_keyboard_interface keyboard_implementation = {
 6+static struct wl_keyboard_interface keyboard_impl = {
 7 	.release = release,
 8 };
 9 
10@@ -316,7 +316,7 @@ keyboard_bind(struct keyboard *keyboard, struct wl_client *client, uint32_t vers
11 	struct wl_resource *client_resource;
12 
13 	client_resource = wl_resource_create(client, &wl_keyboard_interface, version, id);
14-	wl_resource_set_implementation(client_resource, &keyboard_implementation, keyboard, &unbind);
15+	wl_resource_set_implementation(client_resource, &keyboard_impl, keyboard, &unbind);
16 
17 	/* Subtract one to remove terminating NULL character. */
18 	wl_keyboard_send_keymap(client_resource, WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1, keyboard->xkb.keymap.fd, keyboard->xkb.keymap.size - 1);
+2, -2
 1@@ -143,7 +143,7 @@ set_strut(struct wl_client *client, struct wl_resource *resource, uint32_t size,
 2 		screen_update_usable_geometry(panel->screen);
 3 }
 4 
 5-static const struct swc_panel_interface panel_implementation = {
 6+static const struct swc_panel_interface panel_impl = {
 7 	.dock = dock,
 8 	.set_offset = set_offset,
 9 	.set_strut = set_strut,
10@@ -236,7 +236,7 @@ panel_new(struct wl_client *client, uint32_t version, uint32_t id, struct surfac
11 	if (!(panel->view = compositor_create_view(surface)))
12 		goto error2;
13 
14-	wl_resource_set_implementation(panel->resource, &panel_implementation, panel, &destroy_panel);
15+	wl_resource_set_implementation(panel->resource, &panel_impl, panel, &destroy_panel);
16 	panel->surface_destroy_listener.notify = &handle_surface_destroy;
17 	panel->view_handler.impl = &view_handler_impl;
18 	panel->modifier.modify = &modify;
+2, -2
 1@@ -41,7 +41,7 @@ create_panel(struct wl_client *client, struct wl_resource *resource, uint32_t id
 2 		wl_client_post_no_memory(client);
 3 }
 4 
 5-static const struct swc_panel_manager_interface panel_manager_implementation = {
 6+static const struct swc_panel_manager_interface panel_manager_impl = {
 7 	.create_panel = create_panel,
 8 };
 9 
10@@ -54,7 +54,7 @@ bind_panel_manager(struct wl_client *client, void *data, uint32_t version, uint3
11 		version = 1;
12 
13 	resource = wl_resource_create(client, &swc_panel_manager_interface, version, id);
14-	wl_resource_set_implementation(resource, &panel_manager_implementation, NULL, NULL);
15+	wl_resource_set_implementation(resource, &panel_manager_impl, NULL, NULL);
16 }
17 
18 bool
+2, -2
 1@@ -337,7 +337,7 @@ release(struct wl_client *client, struct wl_resource *resource)
 2 	wl_resource_destroy(resource);
 3 }
 4 
 5-static struct wl_pointer_interface pointer_implementation = {
 6+static struct wl_pointer_interface pointer_impl = {
 7 	.set_cursor = set_cursor,
 8 	.release = release,
 9 };
10@@ -355,7 +355,7 @@ pointer_bind(struct pointer *pointer, struct wl_client *client, uint32_t version
11 	struct wl_resource *client_resource;
12 
13 	client_resource = wl_resource_create(client, &wl_pointer_interface, version, id);
14-	wl_resource_set_implementation(client_resource, &pointer_implementation, pointer, &unbind);
15+	wl_resource_set_implementation(client_resource, &pointer_impl, pointer, &unbind);
16 	input_focus_add_resource(&pointer->focus, client_resource);
17 
18 	return client_resource;
+2, -2
 1@@ -26,7 +26,7 @@ subtract(struct wl_client *client, struct wl_resource *resource, int32_t x, int3
 2 	pixman_region32_subtract(&region->region, &region->region, &operand);
 3 }
 4 
 5-static const struct wl_region_interface region_implementation = {
 6+static const struct wl_region_interface region_impl = {
 7 	.destroy = destroy,
 8 	.add = add,
 9 	.subtract = subtract,
10@@ -53,7 +53,7 @@ region_new(struct wl_client *client, uint32_t version, uint32_t id)
11 
12 	pixman_region32_init(&region->region);
13 	region->resource = wl_resource_create(client, &wl_region_interface, version, id);
14-	wl_resource_set_implementation(region->resource, &region_implementation, region, &region_destroy);
15+	wl_resource_set_implementation(region->resource, &region_impl, region, &region_destroy);
16 
17 	return region;
18 }
+2, -2
 1@@ -141,7 +141,7 @@ get_touch(struct wl_client *client, struct wl_resource *resource, uint32_t id)
 2 	/* XXX: Implement */
 3 }
 4 
 5-static struct wl_seat_interface seat_implementation = {
 6+static struct wl_seat_interface seat_impl = {
 7 	.get_pointer = get_pointer,
 8 	.get_keyboard = get_keyboard,
 9 	.get_touch = get_touch,
10@@ -157,7 +157,7 @@ bind_seat(struct wl_client *client, void *data, uint32_t version, uint32_t id)
11 		version = 4;
12 
13 	resource = wl_resource_create(client, &wl_seat_interface, version, id);
14-	wl_resource_set_implementation(resource, &seat_implementation, seat, &remove_resource);
15+	wl_resource_set_implementation(resource, &seat_impl, seat, &remove_resource);
16 	wl_list_insert(&seat->resources, wl_resource_get_link(resource));
17 
18 	if (version >= 2)
+4, -4
 1@@ -153,7 +153,7 @@ resize(struct wl_client *client, struct wl_resource *resource, int32_t size)
 2 	pool->size = size;
 3 }
 4 
 5-static struct wl_shm_pool_interface shm_pool_implementation = {
 6+static struct wl_shm_pool_interface shm_pool_impl = {
 7 	.create_buffer = create_buffer,
 8 	.destroy = destroy,
 9 	.resize = resize,
10@@ -176,7 +176,7 @@ create_pool(struct wl_client *client, struct wl_resource *resource, uint32_t id,
11 		wl_resource_post_no_memory(resource);
12 		goto error1;
13 	}
14-	wl_resource_set_implementation(pool->resource, &shm_pool_implementation, pool, &destroy_pool_resource);
15+	wl_resource_set_implementation(pool->resource, &shm_pool_impl, pool, &destroy_pool_resource);
16 	pool->data = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0);
17 	if (pool->data == MAP_FAILED) {
18 		wl_resource_post_error(resource, WL_SHM_ERROR_INVALID_FD, "mmap failed: %s", strerror(errno));
19@@ -195,7 +195,7 @@ error0:
20 	close(fd);
21 }
22 
23-static struct wl_shm_interface shm_implementation = {
24+static struct wl_shm_interface shm_impl = {
25 	.create_pool = &create_pool
26 };
27 
28@@ -209,7 +209,7 @@ bind_shm(struct wl_client *client, void *data, uint32_t version, uint32_t id)
29 		version = 1;
30 
31 	resource = wl_resource_create(client, &wl_shm_interface, version, id);
32-	wl_resource_set_implementation(resource, &shm_implementation, shm, NULL);
33+	wl_resource_set_implementation(resource, &shm_impl, shm, NULL);
34 
35 	wl_shm_send_format(resource, WL_SHM_FORMAT_XRGB8888);
36 	wl_shm_send_format(resource, WL_SHM_FORMAT_ARGB8888);
+2, -2
 1@@ -48,7 +48,7 @@ get_subsurface(struct wl_client *client, struct wl_resource *resource,
 2 	}
 3 }
 4 
 5-static struct wl_subcompositor_interface subcompositor_implementation = {
 6+static struct wl_subcompositor_interface subcompositor_impl = {
 7 	.destroy = destroy,
 8 	.get_subsurface = get_subsurface,
 9 };
10@@ -62,7 +62,7 @@ bind_subcompositor(struct wl_client *client, void *data, uint32_t version, uint3
11 		version = 1;
12 
13 	resource = wl_resource_create(client, &wl_subcompositor_interface, version, id);
14-	wl_resource_set_implementation(resource, &subcompositor_implementation, NULL, NULL);
15+	wl_resource_set_implementation(resource, &subcompositor_impl, NULL, NULL);
16 }
17 
18 bool
+2, -2
 1@@ -62,7 +62,7 @@ set_desync(struct wl_client *client, struct wl_resource *resource)
 2 	/* TODO: Implement. */
 3 }
 4 
 5-static struct wl_subsurface_interface subsurface_implementation = {
 6+static struct wl_subsurface_interface subsurface_impl = {
 7 	.destroy = destroy,
 8 	.set_position = set_position,
 9 	.place_above = place_above,
10@@ -91,7 +91,7 @@ subsurface_new(struct wl_client *client, uint32_t version, uint32_t id)
11 	if (!subsurface->resource)
12 		goto error1;
13 
14-	wl_resource_set_implementation(subsurface->resource, &subsurface_implementation, subsurface, &subsurface_destroy);
15+	wl_resource_set_implementation(subsurface->resource, &subsurface_impl, subsurface, &subsurface_destroy);
16 
17 	return subsurface;
18 
+2, -2
 1@@ -279,7 +279,7 @@ set_buffer_scale(struct wl_client *client, struct wl_resource *surface, int32_t
 2 	/* TODO: Implement */
 3 }
 4 
 5-static struct wl_surface_interface surface_implementation = {
 6+static struct wl_surface_interface surface_impl = {
 7 	.destroy = destroy,
 8 	.attach = attach,
 9 	.damage = damage,
10@@ -330,7 +330,7 @@ surface_new(struct wl_client *client, uint32_t version, uint32_t id)
11 
12 	/* Add the surface to the client. */
13 	surface->resource = wl_resource_create(client, &wl_surface_interface, version, id);
14-	wl_resource_set_implementation(surface->resource, &surface_implementation, surface, &surface_destroy);
15+	wl_resource_set_implementation(surface->resource, &surface_impl, surface, &surface_destroy);
16 
17 	return surface;
18 }
+3, -3
 1@@ -35,14 +35,14 @@ destroy(struct wl_client *client, struct wl_resource *resource)
 2 	wl_resource_destroy(resource);
 3 }
 4 
 5-static const struct wl_buffer_interface buffer_implementation = {
 6+static const struct wl_buffer_interface buffer_impl = {
 7 	.destroy = destroy,
 8 };
 9 
10 struct wld_buffer *
11 wayland_buffer_get(struct wl_resource *resource)
12 {
13-	if (wl_resource_instance_of(resource, &wl_buffer_interface, &buffer_implementation))
14+	if (wl_resource_instance_of(resource, &wl_buffer_interface, &buffer_impl))
15 		return wl_resource_get_user_data(resource);
16 
17 	return NULL;
18@@ -62,6 +62,6 @@ wayland_buffer_create_resource(struct wl_client *client, uint32_t version, uint3
19 
20 	resource = wl_resource_create(client, &wl_buffer_interface, version, id);
21 	if (resource)
22-		wl_resource_set_implementation(resource, &buffer_implementation, buffer, &destroy_buffer);
23+		wl_resource_set_implementation(resource, &buffer_impl, buffer, &destroy_buffer);
24 	return resource;
25 }
+2, -2
 1@@ -96,7 +96,7 @@ set_offset(struct wl_client *client, struct wl_resource *resource, int32_t x, in
 2 {
 3 }
 4 
 5-static const struct xdg_positioner_interface positioner_implementation = {
 6+static const struct xdg_positioner_interface positioner_impl = {
 7 	.destroy = destroy,
 8 	.set_size = set_size,
 9 	.set_anchor_rect = set_anchor_rect,
10@@ -475,7 +475,7 @@ create_positioner(struct wl_client *client, struct wl_resource *resource, uint32
11 	positioner->resource = wl_resource_create(client, &xdg_positioner_interface, version, id);
12 	if (!positioner->resource)
13 		goto error1;
14-	wl_resource_set_implementation(positioner->resource, &positioner_implementation, positioner, &destroy_positioner);
15+	wl_resource_set_implementation(positioner->resource, &positioner_impl, positioner, &destroy_positioner);
16 	return;
17 
18 error1: