libweston: Drop shell_interface

Its usage is now limited to some dock-related helper, and the plugin
registry is a better fit for that kind of helper.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Reviewed-by: Giulio Camuffo <giuliocamuffo@gmail.com>
diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 7589586..653e85b 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -51,6 +51,7 @@
 #endif
 
 struct focus_state {
+	struct desktop_shell *shell;
 	struct weston_seat *seat;
 	struct workspace *ws;
 	struct weston_surface *keyboard_focus;
@@ -332,11 +333,10 @@
 }
 
 static void
-get_output_work_area(void *data,
+get_output_work_area(struct desktop_shell *shell,
 		     struct weston_output *output,
 		     pixman_rectangle32_t *area)
 {
-	struct desktop_shell *shell = data;
 	int32_t panel_width = 0, panel_height = 0;
 
 	area->x = output->x;
@@ -633,7 +633,6 @@
 	struct focus_state *state = container_of(listener,
 						 struct focus_state,
 						 surface_destroy_listener);
-	struct desktop_shell *shell;
 	struct weston_surface *main_surface;
 	struct weston_view *next;
 	struct weston_view *view;
@@ -658,13 +657,12 @@
 	if (main_surface != state->keyboard_focus)
 		next = get_default_view(main_surface);
 
-	shell = state->seat->compositor->shell_interface.shell;
 	if (next) {
 		state->keyboard_focus = NULL;
-		activate(shell, next, state->seat,
+		activate(state->shell, next, state->seat,
 			 WESTON_ACTIVATE_FLAG_CONFIGURE);
 	} else {
-		if (shell->focus_animation_type == ANIMATION_DIM_LAYER) {
+		if (state->shell->focus_animation_type == ANIMATION_DIM_LAYER) {
 			if (state->ws->focus_animation)
 				weston_view_animation_destroy(state->ws->focus_animation);
 
@@ -680,7 +678,8 @@
 }
 
 static struct focus_state *
-focus_state_create(struct weston_seat *seat, struct workspace *ws)
+focus_state_create(struct desktop_shell *shell, struct weston_seat *seat,
+		   struct workspace *ws)
 {
 	struct focus_state *state;
 
@@ -688,6 +687,7 @@
 	if (state == NULL)
 		return NULL;
 
+	state->shell = shell;
 	state->keyboard_focus = NULL;
 	state->ws = ws;
 	state->seat = seat;
@@ -713,7 +713,7 @@
 			break;
 
 	if (&state->link == &ws->focus_list)
-		state = focus_state_create(seat, ws);
+		state = focus_state_create(shell, seat, ws);
 
 	return state;
 }
@@ -4867,9 +4867,6 @@
 	shell->transform_listener.notify = transform_handler;
 	wl_signal_add(&ec->transform_signal, &shell->transform_listener);
 
-	ec->shell_interface.shell = shell;
-	ec->shell_interface.get_output_work_area = get_output_work_area;
-
 	weston_layer_init(&shell->fullscreen_layer, &ec->cursor_layer.link);
 	weston_layer_init(&shell->panel_layer, &shell->fullscreen_layer.link);
 	weston_layer_init(&shell->background_layer, &shell->panel_layer.link);