mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-03 09:01:40 -05:00
Revert "ELF Visibility"
This commit is contained in:
parent
09cfa39392
commit
1d9be89e2d
56 changed files with 8 additions and 403 deletions
|
|
@ -13,9 +13,7 @@
|
|||
#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);
|
||||
|
|
@ -25,7 +23,6 @@ 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);
|
||||
|
|
@ -33,7 +30,6 @@ bool wlr_backend_start(struct wlr_backend *backend) {
|
|||
return true;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_backend_destroy(struct wlr_backend *backend) {
|
||||
if (!backend) {
|
||||
return;
|
||||
|
|
@ -46,7 +42,6 @@ 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);
|
||||
|
|
@ -54,7 +49,6 @@ 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);
|
||||
|
|
@ -85,7 +79,6 @@ 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) {
|
||||
|
|
@ -157,3 +150,7 @@ 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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include <xf86drm.h>
|
||||
#include "backend/drm/drm.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static bool wlr_drm_backend_start(struct wlr_backend *backend) {
|
||||
|
|
@ -67,7 +66,6 @@ static struct wlr_backend_impl backend_impl = {
|
|||
.get_renderer = wlr_drm_backend_get_renderer,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_backend_is_drm(struct wlr_backend *b) {
|
||||
return b->impl == &backend_impl;
|
||||
}
|
||||
|
|
@ -119,7 +117,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_drm_backend_destroy(&drm->backend);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
|
||||
struct wlr_session *session, int gpu_fd, struct wlr_backend *parent) {
|
||||
assert(display && session && gpu_fd >= 0);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@
|
|||
#include "backend/drm/drm.h"
|
||||
#include "backend/drm/iface.h"
|
||||
#include "backend/drm/util.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
bool wlr_drm_check_features(struct wlr_drm_backend *drm) {
|
||||
|
|
@ -729,7 +728,6 @@ static struct wlr_output_impl output_impl = {
|
|||
.get_gamma_size = wlr_drm_connector_get_gamma_size,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_is_drm(struct wlr_output *output) {
|
||||
return output->impl == &output_impl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include "backend/headless.h"
|
||||
#include "glapi.h"
|
||||
#include "util/defs.h"
|
||||
|
||||
static bool backend_start(struct wlr_backend *wlr_backend) {
|
||||
struct wlr_headless_backend *backend =
|
||||
|
|
@ -85,7 +84,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
backend_destroy(&backend->backend);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_backend *wlr_headless_backend_create(struct wl_display *display) {
|
||||
wlr_log(L_INFO, "Creating headless backend");
|
||||
|
||||
|
|
@ -127,7 +125,6 @@ struct wlr_backend *wlr_headless_backend_create(struct wl_display *display) {
|
|||
return &backend->backend;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_backend_is_headless(struct wlr_backend *backend) {
|
||||
return backend->impl == &backend_impl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <wlr/interfaces/wlr_touch.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "backend/headless.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void input_device_destroy(struct wlr_input_device *wlr_dev) {
|
||||
|
|
@ -20,12 +19,10 @@ static struct wlr_input_device_impl input_device_impl = {
|
|||
.destroy = input_device_destroy,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_input_device_is_headless(struct wlr_input_device *wlr_dev) {
|
||||
return wlr_dev->impl == &input_device_impl;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_input_device *wlr_headless_add_input_device(
|
||||
struct wlr_backend *wlr_backend, enum wlr_input_device_type type) {
|
||||
struct wlr_headless_backend *backend =
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <wlr/interfaces/wlr_output.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "backend/headless.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static EGLSurface egl_create_surface(struct wlr_egl *egl, unsigned int width,
|
||||
|
|
@ -80,7 +79,6 @@ static const struct wlr_output_impl output_impl = {
|
|||
.swap_buffers = output_swap_buffers,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_is_headless(struct wlr_output *wlr_output) {
|
||||
return wlr_output->impl == &output_impl;
|
||||
}
|
||||
|
|
@ -92,7 +90,6 @@ static int signal_frame(void *data) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
|
||||
unsigned int width, unsigned int height) {
|
||||
struct wlr_headless_backend *backend =
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <wlr/backend/session.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "backend/libinput.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static int wlr_libinput_open_restricted(const char *path,
|
||||
|
|
@ -129,7 +128,6 @@ static struct wlr_backend_impl backend_impl = {
|
|||
.destroy = wlr_libinput_backend_destroy
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_backend_is_libinput(struct wlr_backend *b) {
|
||||
return b->impl == &backend_impl;
|
||||
}
|
||||
|
|
@ -156,7 +154,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_libinput_backend_destroy(&backend->backend);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
|
||||
struct wlr_session *session) {
|
||||
assert(display && session);
|
||||
|
|
@ -188,12 +185,7 @@ error_backend:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct libinput_device *wlr_libinput_get_device_handle(struct wlr_input_device *_dev) {
|
||||
struct wlr_libinput_input_device *dev = (struct wlr_libinput_input_device *)_dev;
|
||||
return dev->handle;
|
||||
}
|
||||
|
||||
uint32_t usec_to_msec(uint64_t usec) {
|
||||
return (uint32_t)(usec / 1000);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <wlr/interfaces/wlr_input_device.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "backend/libinput.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
struct wlr_input_device *get_appropriate_device(
|
||||
|
|
@ -55,7 +54,6 @@ static struct wlr_input_device *allocate_device(
|
|||
return wlr_dev;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_input_device_is_libinput(struct wlr_input_device *wlr_dev) {
|
||||
return wlr_dev->impl == &input_device_impl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include "backend/drm/drm.h"
|
||||
#include "backend/multi.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
struct subbackend_state {
|
||||
|
|
@ -91,7 +90,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
multi_backend_destroy((struct wlr_backend*)backend);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) {
|
||||
struct wlr_multi_backend *backend =
|
||||
calloc(1, sizeof(struct wlr_multi_backend));
|
||||
|
|
@ -112,7 +110,6 @@ struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) {
|
|||
return &backend->backend;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_backend_is_multi(struct wlr_backend *b) {
|
||||
return b->impl == &backend_impl;
|
||||
}
|
||||
|
|
@ -146,7 +143,6 @@ static struct subbackend_state *multi_backend_get_subbackend(struct wlr_multi_ba
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_multi_backend_add(struct wlr_backend *_multi,
|
||||
struct wlr_backend *backend) {
|
||||
assert(wlr_backend_is_multi(_multi));
|
||||
|
|
@ -179,7 +175,6 @@ void wlr_multi_backend_add(struct wlr_backend *_multi,
|
|||
wlr_signal_emit_safe(&multi->events.backend_add, backend);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_multi_backend_remove(struct wlr_backend *_multi,
|
||||
struct wlr_backend *backend) {
|
||||
assert(wlr_backend_is_multi(_multi));
|
||||
|
|
@ -194,7 +189,6 @@ void wlr_multi_backend_remove(struct wlr_backend *_multi,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_session *wlr_multi_get_session(struct wlr_backend *_backend) {
|
||||
assert(wlr_backend_is_multi(_backend));
|
||||
|
||||
|
|
@ -208,7 +202,6 @@ struct wlr_session *wlr_multi_get_session(struct wlr_backend *_backend) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_multi_is_empty(struct wlr_backend *_backend) {
|
||||
assert(wlr_backend_is_multi(_backend));
|
||||
struct wlr_multi_backend *backend = (struct wlr_multi_backend *)_backend;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <wlr/util/log.h>
|
||||
#include <xf86drm.h>
|
||||
#include <xf86drmMode.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
extern const struct session_impl session_logind;
|
||||
|
|
@ -67,7 +66,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_session_destroy(session);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_session *wlr_session_create(struct wl_display *disp) {
|
||||
struct wlr_session *session = NULL;
|
||||
const struct session_impl **iter;
|
||||
|
|
@ -124,7 +122,6 @@ error_session:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_session_destroy(struct wlr_session *session) {
|
||||
if (!session) {
|
||||
return;
|
||||
|
|
@ -139,7 +136,6 @@ void wlr_session_destroy(struct wlr_session *session) {
|
|||
session->impl->destroy(session);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
int wlr_session_open_file(struct wlr_session *session, const char *path) {
|
||||
int fd = session->impl->open(session, path);
|
||||
if (fd < 0) {
|
||||
|
|
@ -183,7 +179,6 @@ static struct wlr_device *find_device(struct wlr_session *session, int fd) {
|
|||
assert(0);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_session_close_file(struct wlr_session *session, int fd) {
|
||||
struct wlr_device *dev = find_device(session, fd);
|
||||
|
||||
|
|
@ -192,7 +187,6 @@ void wlr_session_close_file(struct wlr_session *session, int fd) {
|
|||
free(dev);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_session_signal_add(struct wlr_session *session, int fd,
|
||||
struct wl_listener *listener) {
|
||||
struct wlr_device *dev = find_device(session, fd);
|
||||
|
|
@ -200,7 +194,6 @@ void wlr_session_signal_add(struct wlr_session *session, int fd,
|
|||
wl_signal_add(&dev->signal, listener);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_session_change_vt(struct wlr_session *session, unsigned vt) {
|
||||
if (!session) {
|
||||
return false;
|
||||
|
|
@ -276,7 +269,6 @@ static size_t explicit_find_gpus(struct wlr_session *session,
|
|||
/* Tries to find the primary GPU by checking for the "boot_vga" attribute.
|
||||
* If it's not found, it returns the first valid GPU it finds.
|
||||
*/
|
||||
WLR_API
|
||||
size_t wlr_session_find_gpus(struct wlr_session *session,
|
||||
size_t ret_len, int *ret) {
|
||||
const char *explicit = getenv("WLR_DRM_DEVICES");
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
#include <wlr/render/gles2.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "backend/wayland.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
#include "xdg-shell-unstable-v6-client-protocol.h"
|
||||
|
||||
|
|
@ -129,7 +128,6 @@ static struct wlr_backend_impl backend_impl = {
|
|||
.get_renderer = wlr_wl_backend_get_renderer,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_backend_is_wl(struct wlr_backend *b) {
|
||||
return b->impl == &backend_impl;
|
||||
}
|
||||
|
|
@ -183,7 +181,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_wl_backend_destroy(&backend->backend);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, const char *remote) {
|
||||
wlr_log(L_INFO, "Creating wayland backend");
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <wlr/interfaces/wlr_output.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "backend/wayland.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
#include "xdg-shell-unstable-v6-client-protocol.h"
|
||||
|
||||
|
|
@ -218,7 +217,6 @@ static struct wlr_output_impl output_impl = {
|
|||
.move_cursor = wlr_wl_output_move_cursor,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_is_wl(struct wlr_output *wlr_output) {
|
||||
return wlr_output->impl == &output_impl;
|
||||
}
|
||||
|
|
@ -262,7 +260,6 @@ static struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
|
|||
.close = xdg_toplevel_handle_close,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) {
|
||||
assert(wlr_backend_is_wl(_backend));
|
||||
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)_backend;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
#include <wlr/interfaces/wlr_touch.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "backend/wayland.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer,
|
||||
|
|
@ -206,7 +205,6 @@ static struct wlr_input_device_impl input_device_impl = {
|
|||
.destroy = input_device_destroy
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_input_device_is_wl(struct wlr_input_device *dev) {
|
||||
return dev->impl == &input_device_impl;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@
|
|||
#include <dev/evdev/input-event-codes.h>
|
||||
#endif
|
||||
#include "backend/x11.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static struct wlr_backend_impl backend_impl;
|
||||
|
|
@ -300,7 +299,6 @@ static struct wlr_backend_impl backend_impl = {
|
|||
.get_renderer = wlr_x11_backend_get_renderer,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_backend_is_x11(struct wlr_backend *backend) {
|
||||
return backend->impl == &backend_impl;
|
||||
}
|
||||
|
|
@ -311,7 +309,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_x11_backend_destroy(&x11->backend);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
|
||||
const char *x11_display) {
|
||||
struct wlr_x11_backend *x11 = calloc(1, sizeof(*x11));
|
||||
|
|
@ -431,12 +428,10 @@ static struct wlr_output_impl output_impl = {
|
|||
.swap_buffers = output_swap_buffers,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_is_x11(struct wlr_output *wlr_output) {
|
||||
return wlr_output->impl == &output_impl;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_input_device_is_x11(struct wlr_input_device *wlr_dev) {
|
||||
return wlr_dev->impl == &input_device_impl;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue