module_init = NULL;
if (xserver)
- module_init = load_module("xwayland.so",
- "weston_xserver_init",
+ module_init = load_module("xwayland.so", "module_init",
&xserver_module);
if (module_init && module_init(ec) < 0) {
ret = EXIT_FAILURE;
if (!shell)
shell = "desktop-shell.so";
- module_init = load_module(shell, "shell_init", &shell_module);
+ module_init = load_module(shell, "module_init", &shell_module);
if (!module_init || module_init(ec) < 0) {
ret = EXIT_FAILURE;
goto out;
void
weston_watch_process(struct weston_process *process);
-int
-weston_xserver_init(struct weston_compositor *compositor);
-
struct weston_surface_animation;
typedef void (*weston_surface_animation_done_func_t)(struct weston_surface_animation *animation, void *data);
void
weston_surface_destroy(struct weston_surface *surface);
-struct weston_compositor *
-backend_init(struct wl_display *display, int argc, char *argv[],
- const char *config_file);
-
int
weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode);
void
gles2_renderer_destroy(struct weston_compositor *ec);
+struct weston_compositor *
+backend_init(struct wl_display *display, int argc, char *argv[],
+ const char *config_file);
+
+int
+module_init(struct weston_compositor *compositor);
+
#endif
}
}
-int
-shell_init(struct weston_compositor *ec);
-
WL_EXPORT int
-shell_init(struct weston_compositor *ec)
+module_init(struct weston_compositor *ec)
{
struct weston_seat *seat;
struct desktop_shell *shell;
free(shell);
}
-void
-shell_init(struct weston_compositor *compositor);
-
-WL_EXPORT void
-shell_init(struct weston_compositor *compositor)
+WL_EXPORT int
+module_init(struct weston_compositor *compositor)
{
struct tablet_shell *shell;
struct wl_event_loop *loop;
shell = malloc(sizeof *shell);
if (shell == NULL)
- return;
+ return -1;
memset(shell, 0, sizeof *shell);
shell->compositor = compositor;
launch_ux_daemon(shell);
tablet_shell_set_state(shell, STATE_STARTING);
+
+ return 0;
}
}
WL_EXPORT int
-weston_xserver_init(struct weston_compositor *compositor)
+module_init(struct weston_compositor *compositor)
{
struct wl_display *display = compositor->wl_display;
struct weston_xserver *mxs;