aboutsummaryrefslogtreecommitdiff
path: root/backend/backend.c
diff options
context:
space:
mode:
Diffstat (limited to 'backend/backend.c')
-rw-r--r--backend/backend.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/backend/backend.c b/backend/backend.c
index c67be617..c2a487e7 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -13,7 +13,9 @@
#include <wlr/backend/wayland.h>
#include <wlr/backend/x11.h>
#include <wlr/util/log.h>
+#include "util/defs.h"
+WLR_API
void wlr_backend_init(struct wlr_backend *backend,
const struct wlr_backend_impl *impl) {
assert(backend);
@@ -23,6 +25,7 @@ void wlr_backend_init(struct wlr_backend *backend,
wl_signal_init(&backend->events.new_output);
}
+WLR_API
bool wlr_backend_start(struct wlr_backend *backend) {
if (backend->impl->start) {
return backend->impl->start(backend);
@@ -30,6 +33,7 @@ bool wlr_backend_start(struct wlr_backend *backend) {
return true;
}
+WLR_API
void wlr_backend_destroy(struct wlr_backend *backend) {
if (!backend) {
return;
@@ -42,6 +46,7 @@ void wlr_backend_destroy(struct wlr_backend *backend) {
}
}
+WLR_API
struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend) {
if (backend->impl->get_egl) {
return backend->impl->get_egl(backend);
@@ -49,6 +54,7 @@ struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend) {
return NULL;
}
+WLR_API
struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend) {
if (backend->impl->get_renderer) {
return backend->impl->get_renderer(backend);
@@ -79,6 +85,7 @@ static struct wlr_backend *attempt_wl_backend(struct wl_display *display) {
return backend;
}
+WLR_API
struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) {
struct wlr_backend *backend = wlr_multi_backend_create(display);
if (!backend) {
@@ -150,7 +157,3 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) {
return backend;
}
-
-uint32_t usec_to_msec(uint64_t usec) {
- return (uint32_t)(usec / 1000);
-}