From: Kristian Høgsberg Date: Wed, 23 Nov 2011 15:34:50 +0000 (-0500) Subject: server: Stop special casing the compositor X-Git-Tag: 0.85.0~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b7d1e86af1e3da1dbee79ebdee2616a6e8bcf01;p=platform%2Fupstream%2Fwayland.git server: Stop special casing the compositor wl_compositor_init() was just adding the global and providing a helper bind function. Not useful enough to warrent API. --- diff --git a/src/wayland-server.c b/src/wayland-server.c index d2ca043..4811639 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -387,8 +387,7 @@ lose_keyboard_focus(struct wl_listener *listener, } WL_EXPORT void -wl_input_device_init(struct wl_input_device *device, - struct wl_compositor *compositor) +wl_input_device_init(struct wl_input_device *device) { memset(device, 0, sizeof *device); wl_list_init(&device->resource_list); @@ -397,7 +396,6 @@ wl_input_device_init(struct wl_input_device *device, device->x = 100; device->y = 100; - device->compositor = compositor; } static struct wl_resource * @@ -876,32 +874,3 @@ wl_client_add_object(struct wl_client *client, return resource; } - -static void -compositor_bind(struct wl_client *client, - void *data, uint32_t version, uint32_t id) -{ - struct wl_compositor *compositor = data; - struct wl_resource *resource; - - resource = wl_client_add_object(client, &wl_compositor_interface, - compositor->interface, id, compositor); - if (resource == NULL) - return; -} - -WL_EXPORT int -wl_compositor_init(struct wl_compositor *compositor, - const struct wl_compositor_interface *interface, - struct wl_display *display) -{ - struct wl_global *global; - - compositor->interface = interface; - global = wl_display_add_global(display, &wl_compositor_interface, - compositor, compositor_bind); - if (!global) - return -1; - - return 0; -} diff --git a/src/wayland-server.h b/src/wayland-server.h index ead95cc..269a079 100644 --- a/src/wayland-server.h +++ b/src/wayland-server.h @@ -124,10 +124,6 @@ struct wl_shm_callbacks { void (*buffer_destroyed)(struct wl_buffer *buffer); }; -struct wl_compositor { - const struct wl_compositor_interface *interface; -}; - struct wl_buffer { struct wl_resource resource; int32_t width, height; @@ -161,7 +157,6 @@ struct wl_grab { struct wl_input_device { struct wl_list resource_list; - struct wl_compositor *compositor; struct wl_resource *pointer_focus_resource; struct wl_surface *pointer_focus; struct wl_resource *keyboard_focus_resource; @@ -242,8 +237,7 @@ void wl_resource_destroy(struct wl_resource *resource, uint32_t time); void -wl_input_device_init(struct wl_input_device *device, - struct wl_compositor *compositor); +wl_input_device_init(struct wl_input_device *device); void wl_input_device_set_pointer_focus(struct wl_input_device *device,