WL_EXPORT struct weston_compositor * backend_init(struct wl_display *display, int *argc, char *argv[], struct weston_config *config) { int width = 1024, height = 640; char *display_name = NULL; struct headless_parameters param = { 0, }; const char *transform = "normal"; const struct weston_option headless_options[] = { { WESTON_OPTION_INTEGER, "width", 0, &width }, { WESTON_OPTION_INTEGER, "height", 0, &height }, { WESTON_OPTION_BOOLEAN, "use-pixman", 0, ¶m.use_pixman }, { WESTON_OPTION_STRING, "transform", 0, &transform }, }; parse_options(headless_options, ARRAY_LENGTH(headless_options), argc, argv); param.width = width; param.height = height; if (weston_parse_transform(transform, ¶m.transform) < 0) weston_log("Invalid transform \"%s\"\n", transform); return headless_compositor_create(display, ¶m, display_name, argc, argv, config); }
WL_EXPORT struct weston_compositor * backend_init(struct wl_display *display, int argc, char *argv[], const char *config_file) { int width = 1024, height = 640; char *display_name = NULL; const struct weston_option headless_options[] = { { WESTON_OPTION_INTEGER, "width", 0, &width }, { WESTON_OPTION_INTEGER, "height", 0, &height }, }; parse_options(headless_options, ARRAY_LENGTH(headless_options), argc, argv); return headless_compositor_create(display, width, height, display_name, argc, argv, config_file); }