compositor: introduce internal shell_interface
We're able now to create shell_surfaces inside Weston. This makes possible the
glue needed between shell and xserver-launcher.
On the desktop-shell, it was split the protocol part from shell_surface
specific functions to make this possible.
Signed-off-by: Tiago Vignatti <tiago.vignatti@intel.com>
diff --git a/src/compositor.h b/src/compositor.h
index 59494ad..5cf4285 100644
--- a/src/compositor.h
+++ b/src/compositor.h
@@ -43,6 +43,7 @@
};
struct weston_surface;
+struct shell_surface;
struct weston_input_device;
struct weston_output;
@@ -53,6 +54,15 @@
struct wl_list link;
};
+struct weston_shell_interface {
+ void *shell; /* either desktop or tablet */
+
+ void (*create_shell_surface)(void *shell,
+ struct weston_surface *surface,
+ struct shell_surface **ret);
+ void (*set_toplevel)(struct shell_surface *shsurf);
+};
+
struct weston_border {
int32_t left, right, top, bottom;
};
@@ -194,6 +204,7 @@
struct weston_shader solid_shader;
struct weston_shader *current_shader;
struct wl_display *wl_display;
+ struct weston_shell_interface shell_interface;
struct wl_signal activate_signal;
struct wl_signal lock_signal;