swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit b1618bf206d5bf5d30eedc18d79b9d61638c25f3
parent de8e33bc5df25546d9a44d93d8cb9d0f504cab1b
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 29 Aug 2019 21:06:42 -0700

Abbreviate 'implementation' as 'impl'

Diffstat:
Mlibswc/compositor.c | 4++--
Mlibswc/data.c | 8++++----
Mlibswc/data_device.c | 4++--
Mlibswc/data_device_manager.c | 4++--
Mlibswc/drm.c | 4++--
Mlibswc/keyboard.c | 4++--
Mlibswc/panel.c | 4++--
Mlibswc/panel_manager.c | 4++--
Mlibswc/pointer.c | 4++--
Mlibswc/region.c | 4++--
Mlibswc/seat.c | 4++--
Mlibswc/shm.c | 8++++----
Mlibswc/subcompositor.c | 4++--
Mlibswc/subsurface.c | 4++--
Mlibswc/surface.c | 4++--
Mlibswc/wayland_buffer.c | 6+++---
Mlibswc/xdg_shell.c | 4++--
17 files changed, 39 insertions(+), 39 deletions(-)

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