diff options
Diffstat (limited to 'backend')
-rw-r--r-- | backend/backend.c | 8 | ||||
-rw-r--r-- | backend/drm/backend.c | 6 | ||||
-rw-r--r-- | backend/libinput/backend.c | 6 | ||||
-rw-r--r-- | backend/multi/backend.c | 8 | ||||
-rw-r--r-- | backend/wayland/backend.c | 6 |
5 files changed, 17 insertions, 17 deletions
diff --git a/backend/backend.c b/backend/backend.c index d06abacc..fc8ccdb0 100644 --- a/backend/backend.c +++ b/backend/backend.c @@ -14,7 +14,7 @@ #include <wlr/util/log.h> #include "backend/udev.h" -void wlr_backend_create(struct wlr_backend *backend, +void wlr_backend_init(struct wlr_backend *backend, const struct wlr_backend_impl *impl) { assert(backend); backend->impl = impl; @@ -24,9 +24,9 @@ void wlr_backend_create(struct wlr_backend *backend, wl_signal_init(&backend->events.output_remove); } -bool wlr_backend_init(struct wlr_backend *backend) { - if (backend->impl->init) { - return backend->impl->init(backend); +bool wlr_backend_start(struct wlr_backend *backend) { + if (backend->impl->start) { + return backend->impl->start(backend); } return true; } diff --git a/backend/drm/backend.c b/backend/drm/backend.c index 9458a6ec..d0cdc234 100644 --- a/backend/drm/backend.c +++ b/backend/drm/backend.c @@ -16,7 +16,7 @@ #include "backend/udev.h" #include "backend/drm.h" -static bool wlr_drm_backend_init(struct wlr_backend *_backend) { +static bool wlr_drm_backend_start(struct wlr_backend *_backend) { struct wlr_drm_backend *backend = (struct wlr_drm_backend *)_backend; wlr_drm_scan_connectors(backend); return true; @@ -47,7 +47,7 @@ static struct wlr_egl *wlr_drm_backend_get_egl(struct wlr_backend *_backend) { } static struct wlr_backend_impl backend_impl = { - .init = wlr_drm_backend_init, + .start = wlr_drm_backend_start, .destroy = wlr_drm_backend_destroy, .get_egl = wlr_drm_backend_get_egl }; @@ -106,7 +106,7 @@ struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, wlr_log_errno(L_ERROR, "Allocation failed"); return NULL; } - wlr_backend_create(&backend->backend, &backend_impl); + wlr_backend_init(&backend->backend, &backend_impl); backend->session = session; backend->udev = udev; diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c index 8aec50bd..44a1a4a9 100644 --- a/backend/libinput/backend.c +++ b/backend/libinput/backend.c @@ -43,7 +43,7 @@ static void wlr_libinput_log(struct libinput *libinput_context, _wlr_vlog(L_ERROR, fmt, args); } -static bool wlr_libinput_backend_init(struct wlr_backend *_backend) { +static bool wlr_libinput_backend_start(struct wlr_backend *_backend) { struct wlr_libinput_backend *backend = (struct wlr_libinput_backend *)_backend; wlr_log(L_DEBUG, "Initializing libinput"); backend->libinput_context = libinput_udev_create_context(&libinput_impl, backend, @@ -99,7 +99,7 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *_backend) { } static struct wlr_backend_impl backend_impl = { - .init = wlr_libinput_backend_init, + .start = wlr_libinput_backend_start, .destroy = wlr_libinput_backend_destroy }; @@ -127,7 +127,7 @@ struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display, wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno)); return NULL; } - wlr_backend_create(&backend->backend, &backend_impl); + wlr_backend_init(&backend->backend, &backend_impl); if (!(backend->wlr_device_lists = list_create())) { wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno)); diff --git a/backend/multi/backend.c b/backend/multi/backend.c index 63cad33e..99cf3db9 100644 --- a/backend/multi/backend.c +++ b/backend/multi/backend.c @@ -15,11 +15,11 @@ struct subbackend_state { struct wl_listener output_remove; }; -static bool multi_backend_init(struct wlr_backend *_backend) { +static bool multi_backend_start(struct wlr_backend *_backend) { struct wlr_multi_backend *backend = (struct wlr_multi_backend *)_backend; for (size_t i = 0; i < backend->backends->length; ++i) { struct subbackend_state *sub = backend->backends->items[i]; - if (!wlr_backend_init(sub->backend)) { + if (!wlr_backend_start(sub->backend)) { wlr_log(L_ERROR, "Failed to initialize backend %zd", i); return false; } @@ -53,7 +53,7 @@ static struct wlr_egl *multi_backend_get_egl(struct wlr_backend *_backend) { } struct wlr_backend_impl backend_impl = { - .init = multi_backend_init, + .start = multi_backend_start, .destroy = multi_backend_destroy, .get_egl = multi_backend_get_egl }; @@ -74,7 +74,7 @@ struct wlr_backend *wlr_multi_backend_create(struct wlr_session *session, return NULL; } - wlr_backend_create(&backend->backend, &backend_impl); + wlr_backend_init(&backend->backend, &backend_impl); backend->session = session; backend->udev = udev; diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c index 86cedc89..8ca63036 100644 --- a/backend/wayland/backend.c +++ b/backend/wayland/backend.c @@ -29,7 +29,7 @@ static int dispatch_events(int fd, uint32_t mask, void *data) { * compositor and creates surfaces for each output, then registers globals on * the specified display. */ -static bool wlr_wl_backend_init(struct wlr_backend *_backend) { +static bool wlr_wl_backend_start(struct wlr_backend *_backend) { struct wlr_wl_backend *backend = (struct wlr_wl_backend *)_backend; wlr_log(L_INFO, "Initializating wayland backend"); @@ -102,7 +102,7 @@ static struct wlr_egl *wlr_wl_backend_get_egl(struct wlr_backend *_backend) { } static struct wlr_backend_impl backend_impl = { - .init = wlr_wl_backend_init, + .start = wlr_wl_backend_start, .destroy = wlr_wl_backend_destroy, .get_egl = wlr_wl_backend_get_egl }; @@ -130,7 +130,7 @@ struct wlr_backend *wlr_wl_backend_create(struct wl_display *display) { wlr_log(L_ERROR, "Allocation failed: %s", strerror(errno)); return NULL; } - wlr_backend_create(&backend->backend, &backend_impl); + wlr_backend_init(&backend->backend, &backend_impl); if (!(backend->devices = list_create())) { wlr_log(L_ERROR, "Could not allocate devices list"); |