Merge pull request #651 from swaywm/revert-647-elf_visibility

Revert "ELF Visibility"
This commit is contained in:
Drew DeVault 2018-02-19 18:10:24 -05:00 committed by GitHub
commit c4fb965144
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
56 changed files with 8 additions and 403 deletions

View File

@ -13,9 +13,7 @@
#include <wlr/backend/wayland.h> #include <wlr/backend/wayland.h>
#include <wlr/backend/x11.h> #include <wlr/backend/x11.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
WLR_API
void wlr_backend_init(struct wlr_backend *backend, void wlr_backend_init(struct wlr_backend *backend,
const struct wlr_backend_impl *impl) { const struct wlr_backend_impl *impl) {
assert(backend); assert(backend);
@ -25,7 +23,6 @@ void wlr_backend_init(struct wlr_backend *backend,
wl_signal_init(&backend->events.new_output); wl_signal_init(&backend->events.new_output);
} }
WLR_API
bool wlr_backend_start(struct wlr_backend *backend) { bool wlr_backend_start(struct wlr_backend *backend) {
if (backend->impl->start) { if (backend->impl->start) {
return backend->impl->start(backend); return backend->impl->start(backend);
@ -33,7 +30,6 @@ bool wlr_backend_start(struct wlr_backend *backend) {
return true; return true;
} }
WLR_API
void wlr_backend_destroy(struct wlr_backend *backend) { void wlr_backend_destroy(struct wlr_backend *backend) {
if (!backend) { if (!backend) {
return; 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) { struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend) {
if (backend->impl->get_egl) { if (backend->impl->get_egl) {
return backend->impl->get_egl(backend); return backend->impl->get_egl(backend);
@ -54,7 +49,6 @@ struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend) {
return NULL; return NULL;
} }
WLR_API
struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend) { struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend) {
if (backend->impl->get_renderer) { if (backend->impl->get_renderer) {
return backend->impl->get_renderer(backend); return backend->impl->get_renderer(backend);
@ -85,7 +79,6 @@ static struct wlr_backend *attempt_wl_backend(struct wl_display *display) {
return backend; return backend;
} }
WLR_API
struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) { struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) {
struct wlr_backend *backend = wlr_multi_backend_create(display); struct wlr_backend *backend = wlr_multi_backend_create(display);
if (!backend) { if (!backend) {
@ -157,3 +150,7 @@ struct wlr_backend *wlr_backend_autocreate(struct wl_display *display) {
return backend; return backend;
} }
uint32_t usec_to_msec(uint64_t usec) {
return (uint32_t)(usec / 1000);
}

View File

@ -13,7 +13,6 @@
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include <xf86drm.h> #include <xf86drm.h>
#include "backend/drm/drm.h" #include "backend/drm/drm.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static bool wlr_drm_backend_start(struct wlr_backend *backend) { 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, .get_renderer = wlr_drm_backend_get_renderer,
}; };
WLR_API
bool wlr_backend_is_drm(struct wlr_backend *b) { bool wlr_backend_is_drm(struct wlr_backend *b) {
return b->impl == &backend_impl; 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_drm_backend_destroy(&drm->backend);
} }
WLR_API
struct wlr_backend *wlr_drm_backend_create(struct wl_display *display, struct wlr_backend *wlr_drm_backend_create(struct wl_display *display,
struct wlr_session *session, int gpu_fd, struct wlr_backend *parent) { struct wlr_session *session, int gpu_fd, struct wlr_backend *parent) {
assert(display && session && gpu_fd >= 0); assert(display && session && gpu_fd >= 0);

View File

@ -24,7 +24,6 @@
#include "backend/drm/drm.h" #include "backend/drm/drm.h"
#include "backend/drm/iface.h" #include "backend/drm/iface.h"
#include "backend/drm/util.h" #include "backend/drm/util.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
bool wlr_drm_check_features(struct wlr_drm_backend *drm) { 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, .get_gamma_size = wlr_drm_connector_get_gamma_size,
}; };
WLR_API
bool wlr_output_is_drm(struct wlr_output *output) { bool wlr_output_is_drm(struct wlr_output *output) {
return output->impl == &output_impl; return output->impl == &output_impl;
} }

View File

@ -7,7 +7,6 @@
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/headless.h" #include "backend/headless.h"
#include "glapi.h" #include "glapi.h"
#include "util/defs.h"
static bool backend_start(struct wlr_backend *wlr_backend) { static bool backend_start(struct wlr_backend *wlr_backend) {
struct wlr_headless_backend *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); backend_destroy(&backend->backend);
} }
WLR_API
struct wlr_backend *wlr_headless_backend_create(struct wl_display *display) { struct wlr_backend *wlr_headless_backend_create(struct wl_display *display) {
wlr_log(L_INFO, "Creating headless backend"); 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; return &backend->backend;
} }
WLR_API
bool wlr_backend_is_headless(struct wlr_backend *backend) { bool wlr_backend_is_headless(struct wlr_backend *backend) {
return backend->impl == &backend_impl; return backend->impl == &backend_impl;
} }

View File

@ -7,7 +7,6 @@
#include <wlr/interfaces/wlr_touch.h> #include <wlr/interfaces/wlr_touch.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/headless.h" #include "backend/headless.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static void input_device_destroy(struct wlr_input_device *wlr_dev) { 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, .destroy = input_device_destroy,
}; };
WLR_API
bool wlr_input_device_is_headless(struct wlr_input_device *wlr_dev) { bool wlr_input_device_is_headless(struct wlr_input_device *wlr_dev) {
return wlr_dev->impl == &input_device_impl; return wlr_dev->impl == &input_device_impl;
} }
WLR_API
struct wlr_input_device *wlr_headless_add_input_device( struct wlr_input_device *wlr_headless_add_input_device(
struct wlr_backend *wlr_backend, enum wlr_input_device_type type) { struct wlr_backend *wlr_backend, enum wlr_input_device_type type) {
struct wlr_headless_backend *backend = struct wlr_headless_backend *backend =

View File

@ -5,7 +5,6 @@
#include <wlr/interfaces/wlr_output.h> #include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/headless.h" #include "backend/headless.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static EGLSurface egl_create_surface(struct wlr_egl *egl, unsigned int width, 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, .swap_buffers = output_swap_buffers,
}; };
WLR_API
bool wlr_output_is_headless(struct wlr_output *wlr_output) { bool wlr_output_is_headless(struct wlr_output *wlr_output) {
return wlr_output->impl == &output_impl; return wlr_output->impl == &output_impl;
} }
@ -92,7 +90,6 @@ static int signal_frame(void *data) {
return 0; return 0;
} }
WLR_API
struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend, struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
unsigned int width, unsigned int height) { unsigned int width, unsigned int height) {
struct wlr_headless_backend *backend = struct wlr_headless_backend *backend =

View File

@ -5,7 +5,6 @@
#include <wlr/backend/session.h> #include <wlr/backend/session.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/libinput.h" #include "backend/libinput.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static int wlr_libinput_open_restricted(const char *path, 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 .destroy = wlr_libinput_backend_destroy
}; };
WLR_API
bool wlr_backend_is_libinput(struct wlr_backend *b) { bool wlr_backend_is_libinput(struct wlr_backend *b) {
return b->impl == &backend_impl; 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_libinput_backend_destroy(&backend->backend);
} }
WLR_API
struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display, struct wlr_backend *wlr_libinput_backend_create(struct wl_display *display,
struct wlr_session *session) { struct wlr_session *session) {
assert(display && session); assert(display && session);
@ -188,12 +185,7 @@ error_backend:
return NULL; return NULL;
} }
WLR_API
struct libinput_device *wlr_libinput_get_device_handle(struct wlr_input_device *_dev) { 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; struct wlr_libinput_input_device *dev = (struct wlr_libinput_input_device *)_dev;
return dev->handle; return dev->handle;
} }
uint32_t usec_to_msec(uint64_t usec) {
return (uint32_t)(usec / 1000);
}

View File

@ -6,7 +6,6 @@
#include <wlr/interfaces/wlr_input_device.h> #include <wlr/interfaces/wlr_input_device.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/libinput.h" #include "backend/libinput.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
struct wlr_input_device *get_appropriate_device( struct wlr_input_device *get_appropriate_device(
@ -55,7 +54,6 @@ static struct wlr_input_device *allocate_device(
return wlr_dev; return wlr_dev;
} }
WLR_API
bool wlr_input_device_is_libinput(struct wlr_input_device *wlr_dev) { bool wlr_input_device_is_libinput(struct wlr_input_device *wlr_dev) {
return wlr_dev->impl == &input_device_impl; return wlr_dev->impl == &input_device_impl;
} }

View File

@ -6,7 +6,6 @@
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/drm/drm.h" #include "backend/drm/drm.h"
#include "backend/multi.h" #include "backend/multi.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
struct subbackend_state { 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); multi_backend_destroy((struct wlr_backend*)backend);
} }
WLR_API
struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) { struct wlr_backend *wlr_multi_backend_create(struct wl_display *display) {
struct wlr_multi_backend *backend = struct wlr_multi_backend *backend =
calloc(1, sizeof(struct wlr_multi_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; return &backend->backend;
} }
WLR_API
bool wlr_backend_is_multi(struct wlr_backend *b) { bool wlr_backend_is_multi(struct wlr_backend *b) {
return b->impl == &backend_impl; return b->impl == &backend_impl;
} }
@ -146,7 +143,6 @@ static struct subbackend_state *multi_backend_get_subbackend(struct wlr_multi_ba
return NULL; return NULL;
} }
WLR_API
void wlr_multi_backend_add(struct wlr_backend *_multi, void wlr_multi_backend_add(struct wlr_backend *_multi,
struct wlr_backend *backend) { struct wlr_backend *backend) {
assert(wlr_backend_is_multi(_multi)); 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_signal_emit_safe(&multi->events.backend_add, backend);
} }
WLR_API
void wlr_multi_backend_remove(struct wlr_backend *_multi, void wlr_multi_backend_remove(struct wlr_backend *_multi,
struct wlr_backend *backend) { struct wlr_backend *backend) {
assert(wlr_backend_is_multi(_multi)); 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) { struct wlr_session *wlr_multi_get_session(struct wlr_backend *_backend) {
assert(wlr_backend_is_multi(_backend)); assert(wlr_backend_is_multi(_backend));
@ -208,7 +202,6 @@ struct wlr_session *wlr_multi_get_session(struct wlr_backend *_backend) {
return NULL; return NULL;
} }
WLR_API
bool wlr_multi_is_empty(struct wlr_backend *_backend) { bool wlr_multi_is_empty(struct wlr_backend *_backend) {
assert(wlr_backend_is_multi(_backend)); assert(wlr_backend_is_multi(_backend));
struct wlr_multi_backend *backend = (struct wlr_multi_backend *)_backend; struct wlr_multi_backend *backend = (struct wlr_multi_backend *)_backend;

View File

@ -13,7 +13,6 @@
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include <xf86drm.h> #include <xf86drm.h>
#include <xf86drmMode.h> #include <xf86drmMode.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
extern const struct session_impl session_logind; 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_session_destroy(session);
} }
WLR_API
struct wlr_session *wlr_session_create(struct wl_display *disp) { struct wlr_session *wlr_session_create(struct wl_display *disp) {
struct wlr_session *session = NULL; struct wlr_session *session = NULL;
const struct session_impl **iter; const struct session_impl **iter;
@ -124,7 +122,6 @@ error_session:
return NULL; return NULL;
} }
WLR_API
void wlr_session_destroy(struct wlr_session *session) { void wlr_session_destroy(struct wlr_session *session) {
if (!session) { if (!session) {
return; return;
@ -139,7 +136,6 @@ void wlr_session_destroy(struct wlr_session *session) {
session->impl->destroy(session); session->impl->destroy(session);
} }
WLR_API
int wlr_session_open_file(struct wlr_session *session, const char *path) { int wlr_session_open_file(struct wlr_session *session, const char *path) {
int fd = session->impl->open(session, path); int fd = session->impl->open(session, path);
if (fd < 0) { if (fd < 0) {
@ -183,7 +179,6 @@ static struct wlr_device *find_device(struct wlr_session *session, int fd) {
assert(0); assert(0);
} }
WLR_API
void wlr_session_close_file(struct wlr_session *session, int fd) { void wlr_session_close_file(struct wlr_session *session, int fd) {
struct wlr_device *dev = find_device(session, 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); free(dev);
} }
WLR_API
void wlr_session_signal_add(struct wlr_session *session, int fd, void wlr_session_signal_add(struct wlr_session *session, int fd,
struct wl_listener *listener) { struct wl_listener *listener) {
struct wlr_device *dev = find_device(session, fd); 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); wl_signal_add(&dev->signal, listener);
} }
WLR_API
bool wlr_session_change_vt(struct wlr_session *session, unsigned vt) { bool wlr_session_change_vt(struct wlr_session *session, unsigned vt) {
if (!session) { if (!session) {
return false; 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. /* 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. * 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 wlr_session_find_gpus(struct wlr_session *session,
size_t ret_len, int *ret) { size_t ret_len, int *ret) {
const char *explicit = getenv("WLR_DRM_DEVICES"); const char *explicit = getenv("WLR_DRM_DEVICES");

View File

@ -12,7 +12,6 @@
#include <wlr/render/gles2.h> #include <wlr/render/gles2.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/wayland.h" #include "backend/wayland.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
#include "xdg-shell-unstable-v6-client-protocol.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, .get_renderer = wlr_wl_backend_get_renderer,
}; };
WLR_API
bool wlr_backend_is_wl(struct wlr_backend *b) { bool wlr_backend_is_wl(struct wlr_backend *b) {
return b->impl == &backend_impl; 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_wl_backend_destroy(&backend->backend);
} }
WLR_API
struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, const char *remote) { struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, const char *remote) {
wlr_log(L_INFO, "Creating wayland backend"); wlr_log(L_INFO, "Creating wayland backend");

View File

@ -11,7 +11,6 @@
#include <wlr/interfaces/wlr_output.h> #include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/wayland.h" #include "backend/wayland.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
#include "xdg-shell-unstable-v6-client-protocol.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, .move_cursor = wlr_wl_output_move_cursor,
}; };
WLR_API
bool wlr_output_is_wl(struct wlr_output *wlr_output) { bool wlr_output_is_wl(struct wlr_output *wlr_output) {
return wlr_output->impl == &output_impl; return wlr_output->impl == &output_impl;
} }
@ -262,7 +260,6 @@ static struct zxdg_toplevel_v6_listener xdg_toplevel_listener = {
.close = xdg_toplevel_handle_close, .close = xdg_toplevel_handle_close,
}; };
WLR_API
struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) { struct wlr_output *wlr_wl_output_create(struct wlr_backend *_backend) {
assert(wlr_backend_is_wl(_backend)); assert(wlr_backend_is_wl(_backend));
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)_backend; struct wlr_wl_backend *backend = (struct wlr_wl_backend *)_backend;

View File

@ -11,7 +11,6 @@
#include <wlr/interfaces/wlr_touch.h> #include <wlr/interfaces/wlr_touch.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "backend/wayland.h" #include "backend/wayland.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static void pointer_handle_enter(void *data, struct wl_pointer *wl_pointer, 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 .destroy = input_device_destroy
}; };
WLR_API
bool wlr_input_device_is_wl(struct wlr_input_device *dev) { bool wlr_input_device_is_wl(struct wlr_input_device *dev) {
return dev->impl == &input_device_impl; return dev->impl == &input_device_impl;
} }

View File

@ -23,7 +23,6 @@
#include <dev/evdev/input-event-codes.h> #include <dev/evdev/input-event-codes.h>
#endif #endif
#include "backend/x11.h" #include "backend/x11.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static struct wlr_backend_impl backend_impl; 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, .get_renderer = wlr_x11_backend_get_renderer,
}; };
WLR_API
bool wlr_backend_is_x11(struct wlr_backend *backend) { bool wlr_backend_is_x11(struct wlr_backend *backend) {
return backend->impl == &backend_impl; 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_x11_backend_destroy(&x11->backend);
} }
WLR_API
struct wlr_backend *wlr_x11_backend_create(struct wl_display *display, struct wlr_backend *wlr_x11_backend_create(struct wl_display *display,
const char *x11_display) { const char *x11_display) {
struct wlr_x11_backend *x11 = calloc(1, sizeof(*x11)); 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, .swap_buffers = output_swap_buffers,
}; };
WLR_API
bool wlr_output_is_x11(struct wlr_output *wlr_output) { bool wlr_output_is_x11(struct wlr_output *wlr_output) {
return wlr_output->impl == &output_impl; return wlr_output->impl == &output_impl;
} }
WLR_API
bool wlr_input_device_is_x11(struct wlr_input_device *wlr_dev) { bool wlr_input_device_is_x11(struct wlr_input_device *wlr_dev) {
return wlr_dev->impl == &input_device_impl; return wlr_dev->impl == &input_device_impl;
} }

View File

@ -83,6 +83,4 @@ void handle_tablet_pad_ring(struct libinput_event *event,
void handle_tablet_pad_strip(struct libinput_event *event, void handle_tablet_pad_strip(struct libinput_event *event,
struct libinput_device *device); struct libinput_device *device);
uint32_t usec_to_msec(uint64_t usec);
#endif #endif

View File

@ -1,10 +0,0 @@
#ifndef UTIL_DEFS_H
#define UTIL_DEFS_H
#ifdef __GNUC__
#define WLR_API __attribute__((visibility("default")))
#else
#define WLR_API
#endif
#endif

View File

@ -23,4 +23,6 @@ void wlr_backend_destroy(struct wlr_backend *backend);
struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend); struct wlr_egl *wlr_backend_get_egl(struct wlr_backend *backend);
struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend); struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend);
uint32_t usec_to_msec(uint64_t usec);
#endif #endif

View File

@ -17,7 +17,6 @@ project(
so_version = ['0', '0', '0'] so_version = ['0', '0', '0']
add_project_arguments('-Wno-unused-parameter', language: 'c') add_project_arguments('-Wno-unused-parameter', language: 'c')
add_project_arguments('-fvisibility=hidden', language: 'c')
add_project_arguments( add_project_arguments(
'-DWLR_SRC_DIR="@0@"'.format(meson.source_root()), '-DWLR_SRC_DIR="@0@"'.format(meson.source_root()),
language: 'c', language: 'c',

View File

@ -6,13 +6,11 @@
#include <wlr/render/egl.h> #include <wlr/render/egl.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "glapi.h" #include "glapi.h"
#include "util/defs.h"
// Extension documentation // Extension documentation
// https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_base.txt. // https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_image_base.txt.
// https://cgit.freedesktop.org/mesa/mesa/tree/docs/specs/WL_bind_wayland_display.spec // https://cgit.freedesktop.org/mesa/mesa/tree/docs/specs/WL_bind_wayland_display.spec
WLR_API
const char *egl_error(void) { const char *egl_error(void) {
switch (eglGetError()) { switch (eglGetError()) {
case EGL_SUCCESS: case EGL_SUCCESS:
@ -85,7 +83,6 @@ static bool egl_get_config(EGLDisplay disp, EGLint *attribs, EGLConfig *out,
return false; return false;
} }
WLR_API
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display, bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *remote_display,
EGLint *config_attribs, EGLint visual_id) { EGLint *config_attribs, EGLint visual_id) {
if (!load_glapi()) { if (!load_glapi()) {
@ -161,7 +158,6 @@ error:
return false; return false;
} }
WLR_API
void wlr_egl_finish(struct wlr_egl *egl) { void wlr_egl_finish(struct wlr_egl *egl) {
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
if (egl->wl_display && eglUnbindWaylandDisplayWL) { if (egl->wl_display && eglUnbindWaylandDisplayWL) {
@ -173,7 +169,6 @@ void wlr_egl_finish(struct wlr_egl *egl) {
eglReleaseThread(); eglReleaseThread();
} }
WLR_API
bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display) { bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display) {
if (!eglBindWaylandDisplayWL) { if (!eglBindWaylandDisplayWL) {
return false; return false;
@ -187,7 +182,6 @@ bool wlr_egl_bind_display(struct wlr_egl *egl, struct wl_display *local_display)
return false; return false;
} }
WLR_API
bool wlr_egl_query_buffer(struct wlr_egl *egl, struct wl_resource *buf, bool wlr_egl_query_buffer(struct wlr_egl *egl, struct wl_resource *buf,
int attrib, int *value) { int attrib, int *value) {
if (!eglQueryWaylandBufferWL) { if (!eglQueryWaylandBufferWL) {
@ -196,7 +190,6 @@ bool wlr_egl_query_buffer(struct wlr_egl *egl, struct wl_resource *buf,
return eglQueryWaylandBufferWL(egl->display, buf, attrib, value); return eglQueryWaylandBufferWL(egl->display, buf, attrib, value);
} }
WLR_API
EGLImage wlr_egl_create_image(struct wlr_egl *egl, EGLenum target, EGLImage wlr_egl_create_image(struct wlr_egl *egl, EGLenum target,
EGLClientBuffer buffer, const EGLint *attribs) { EGLClientBuffer buffer, const EGLint *attribs) {
if (!eglCreateImageKHR) { if (!eglCreateImageKHR) {
@ -207,7 +200,6 @@ EGLImage wlr_egl_create_image(struct wlr_egl *egl, EGLenum target,
buffer, attribs); buffer, attribs);
} }
WLR_API
bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) { bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) {
if (!eglDestroyImageKHR) { if (!eglDestroyImageKHR) {
return false; return false;
@ -217,7 +209,6 @@ bool wlr_egl_destroy_image(struct wlr_egl *egl, EGLImage image) {
return true; return true;
} }
WLR_API
EGLSurface wlr_egl_create_surface(struct wlr_egl *egl, void *window) { EGLSurface wlr_egl_create_surface(struct wlr_egl *egl, void *window) {
EGLSurface surf = eglCreatePlatformWindowSurfaceEXT(egl->display, egl->config, EGLSurface surf = eglCreatePlatformWindowSurfaceEXT(egl->display, egl->config,
window, NULL); window, NULL);
@ -244,7 +235,6 @@ int wlr_egl_get_buffer_age(struct wlr_egl *egl, EGLSurface surface) {
return buffer_age; return buffer_age;
} }
WLR_API
bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface, bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface,
int *buffer_age) { int *buffer_age) {
if (!eglMakeCurrent(egl->display, surface, surface, egl->context)) { if (!eglMakeCurrent(egl->display, surface, surface, egl->context)) {
@ -258,7 +248,6 @@ bool wlr_egl_make_current(struct wlr_egl *egl, EGLSurface surface,
return true; return true;
} }
WLR_API
bool wlr_egl_swap_buffers(struct wlr_egl *egl, EGLSurface surface, bool wlr_egl_swap_buffers(struct wlr_egl *egl, EGLSurface surface,
pixman_region32_t *damage) { pixman_region32_t *damage) {
EGLBoolean ret; EGLBoolean ret;

View File

@ -13,7 +13,6 @@
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "render/gles2.h" #include "render/gles2.h"
#include "glapi.h" #include "glapi.h"
#include "util/defs.h"
struct shaders shaders; struct shaders shaders;
@ -267,7 +266,6 @@ static struct wlr_renderer_impl wlr_renderer_impl = {
.format_supported = wlr_gles2_format_supported, .format_supported = wlr_gles2_format_supported,
}; };
WLR_API
struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend) { struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_backend *backend) {
init_globals(); init_globals();
struct wlr_gles2_renderer *renderer; struct wlr_gles2_renderer *renderer;

View File

@ -4,14 +4,12 @@
#include <wlr/render/matrix.h> #include <wlr/render/matrix.h>
#include <wlr/types/wlr_box.h> #include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output.h>
#include "util/defs.h"
/* Obtains the index for the given row/column */ /* Obtains the index for the given row/column */
static inline int mind(int row, int col) { static inline int mind(int row, int col) {
return (row - 1) * 4 + col - 1; return (row - 1) * 4 + col - 1;
} }
WLR_API
void wlr_matrix_identity(float (*output)[16]) { void wlr_matrix_identity(float (*output)[16]) {
static const float identity[16] = { static const float identity[16] = {
1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f,
@ -22,7 +20,6 @@ void wlr_matrix_identity(float (*output)[16]) {
memcpy(*output, identity, sizeof(identity)); memcpy(*output, identity, sizeof(identity));
} }
WLR_API
void wlr_matrix_translate(float (*output)[16], float x, float y, float z) { void wlr_matrix_translate(float (*output)[16], float x, float y, float z) {
wlr_matrix_identity(output); wlr_matrix_identity(output);
(*output)[mind(1, 4)] = x; (*output)[mind(1, 4)] = x;
@ -30,7 +27,6 @@ void wlr_matrix_translate(float (*output)[16], float x, float y, float z) {
(*output)[mind(3, 4)] = z; (*output)[mind(3, 4)] = z;
} }
WLR_API
void wlr_matrix_scale(float (*output)[16], float x, float y, float z) { void wlr_matrix_scale(float (*output)[16], float x, float y, float z) {
wlr_matrix_identity(output); wlr_matrix_identity(output);
(*output)[mind(1, 1)] = x; (*output)[mind(1, 1)] = x;
@ -38,7 +34,6 @@ void wlr_matrix_scale(float (*output)[16], float x, float y, float z) {
(*output)[mind(3, 3)] = z; (*output)[mind(3, 3)] = z;
} }
WLR_API
void wlr_matrix_rotate(float (*output)[16], float radians) { void wlr_matrix_rotate(float (*output)[16], float radians) {
wlr_matrix_identity(output); wlr_matrix_identity(output);
float _cos = cosf(radians); float _cos = cosf(radians);
@ -49,7 +44,6 @@ void wlr_matrix_rotate(float (*output)[16], float radians) {
(*output)[mind(2, 2)] = _cos; (*output)[mind(2, 2)] = _cos;
} }
WLR_API
void wlr_matrix_mul(const float (*x)[16], const float (*y)[16], float (*product)[16]) { void wlr_matrix_mul(const float (*x)[16], const float (*y)[16], float (*product)[16]) {
float _product[16] = { float _product[16] = {
(*x)[mind(1, 1)] * (*y)[mind(1, 1)] + (*x)[mind(1, 2)] * (*y)[mind(2, 1)] + (*x)[mind(1, 1)] * (*y)[mind(1, 1)] + (*x)[mind(1, 2)] * (*y)[mind(2, 1)] +
@ -126,7 +120,6 @@ static const float transforms[][4] = {
}, },
}; };
WLR_API
void wlr_matrix_transform(float mat[static 16], void wlr_matrix_transform(float mat[static 16],
enum wl_output_transform transform) { enum wl_output_transform transform) {
memset(mat, 0, sizeof(*mat) * 16); memset(mat, 0, sizeof(*mat) * 16);
@ -145,7 +138,6 @@ void wlr_matrix_transform(float mat[static 16],
} }
// Equivilent to glOrtho(0, width, 0, height, 1, -1) with the transform applied // Equivilent to glOrtho(0, width, 0, height, 1, -1) with the transform applied
WLR_API
void wlr_matrix_texture(float mat[static 16], int32_t width, int32_t height, void wlr_matrix_texture(float mat[static 16], int32_t width, int32_t height,
enum wl_output_transform transform) { enum wl_output_transform transform) {
memset(mat, 0, sizeof(*mat) * 16); memset(mat, 0, sizeof(*mat) * 16);
@ -169,7 +161,6 @@ void wlr_matrix_texture(float mat[static 16], int32_t width, int32_t height,
mat[15] = 1.0f; mat[15] = 1.0f;
} }
WLR_API
void wlr_matrix_project_box(float (*mat)[16], struct wlr_box *box, void wlr_matrix_project_box(float (*mat)[16], struct wlr_box *box,
enum wl_output_transform transform, float rotation, enum wl_output_transform transform, float rotation,
float (*projection)[16]) { float (*projection)[16]) {

View File

@ -1,15 +1,12 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <wlr/render/interface.h> #include <wlr/render/interface.h>
#include "util/defs.h"
WLR_API
void wlr_renderer_init(struct wlr_renderer *renderer, void wlr_renderer_init(struct wlr_renderer *renderer,
struct wlr_renderer_impl *impl) { struct wlr_renderer_impl *impl) {
renderer->impl = impl; renderer->impl = impl;
} }
WLR_API
void wlr_renderer_destroy(struct wlr_renderer *r) { void wlr_renderer_destroy(struct wlr_renderer *r) {
if (r && r->impl && r->impl->destroy) { if (r && r->impl && r->impl->destroy) {
r->impl->destroy(r); r->impl->destroy(r);
@ -18,62 +15,51 @@ void wlr_renderer_destroy(struct wlr_renderer *r) {
} }
} }
WLR_API
void wlr_renderer_begin(struct wlr_renderer *r, struct wlr_output *o) { void wlr_renderer_begin(struct wlr_renderer *r, struct wlr_output *o) {
r->impl->begin(r, o); r->impl->begin(r, o);
} }
WLR_API
void wlr_renderer_end(struct wlr_renderer *r) { void wlr_renderer_end(struct wlr_renderer *r) {
r->impl->end(r); r->impl->end(r);
} }
WLR_API
void wlr_renderer_clear(struct wlr_renderer *r, const float (*color)[4]) { void wlr_renderer_clear(struct wlr_renderer *r, const float (*color)[4]) {
r->impl->clear(r, color); r->impl->clear(r, color);
} }
WLR_API
void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box) { void wlr_renderer_scissor(struct wlr_renderer *r, struct wlr_box *box) {
r->impl->scissor(r, box); r->impl->scissor(r, box);
} }
WLR_API
struct wlr_texture *wlr_render_texture_create(struct wlr_renderer *r) { struct wlr_texture *wlr_render_texture_create(struct wlr_renderer *r) {
return r->impl->texture_create(r); return r->impl->texture_create(r);
} }
WLR_API
bool wlr_render_with_matrix(struct wlr_renderer *r, bool wlr_render_with_matrix(struct wlr_renderer *r,
struct wlr_texture *texture, const float (*matrix)[16]) { struct wlr_texture *texture, const float (*matrix)[16]) {
return r->impl->render_with_matrix(r, texture, matrix); return r->impl->render_with_matrix(r, texture, matrix);
} }
WLR_API
void wlr_render_colored_quad(struct wlr_renderer *r, void wlr_render_colored_quad(struct wlr_renderer *r,
const float (*color)[4], const float (*matrix)[16]) { const float (*color)[4], const float (*matrix)[16]) {
r->impl->render_quad(r, color, matrix); r->impl->render_quad(r, color, matrix);
} }
WLR_API
void wlr_render_colored_ellipse(struct wlr_renderer *r, void wlr_render_colored_ellipse(struct wlr_renderer *r,
const float (*color)[4], const float (*matrix)[16]) { const float (*color)[4], const float (*matrix)[16]) {
r->impl->render_ellipse(r, color, matrix); r->impl->render_ellipse(r, color, matrix);
} }
WLR_API
const enum wl_shm_format *wlr_renderer_get_formats( const enum wl_shm_format *wlr_renderer_get_formats(
struct wlr_renderer *r, size_t *len) { struct wlr_renderer *r, size_t *len) {
return r->impl->formats(r, len); return r->impl->formats(r, len);
} }
WLR_API
bool wlr_renderer_buffer_is_drm(struct wlr_renderer *r, bool wlr_renderer_buffer_is_drm(struct wlr_renderer *r,
struct wl_resource *buffer) { struct wl_resource *buffer) {
return r->impl->buffer_is_drm(r, buffer); return r->impl->buffer_is_drm(r, buffer);
} }
WLR_API
bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt, bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt,
uint32_t stride, uint32_t width, uint32_t height, uint32_t stride, uint32_t width, uint32_t height,
uint32_t src_x, uint32_t src_y, uint32_t dst_x, uint32_t dst_y, uint32_t src_x, uint32_t src_y, uint32_t dst_x, uint32_t dst_y,
@ -82,7 +68,6 @@ bool wlr_renderer_read_pixels(struct wlr_renderer *r, enum wl_shm_format fmt,
dst_x, dst_y, data); dst_x, dst_y, data);
} }
WLR_API
bool wlr_renderer_format_supported(struct wlr_renderer *r, bool wlr_renderer_format_supported(struct wlr_renderer *r,
enum wl_shm_format fmt) { enum wl_shm_format fmt) {
return r->impl->format_supported(r, fmt); return r->impl->format_supported(r, fmt);

View File

@ -1,16 +1,13 @@
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h> #include <stdlib.h>
#include <wlr/render/interface.h> #include <wlr/render/interface.h>
#include "util/defs.h"
WLR_API
void wlr_texture_init(struct wlr_texture *texture, void wlr_texture_init(struct wlr_texture *texture,
struct wlr_texture_impl *impl) { struct wlr_texture_impl *impl) {
texture->impl = impl; texture->impl = impl;
wl_signal_init(&texture->destroy_signal); wl_signal_init(&texture->destroy_signal);
} }
WLR_API
void wlr_texture_destroy(struct wlr_texture *texture) { void wlr_texture_destroy(struct wlr_texture *texture) {
if (texture && texture->impl && texture->impl->destroy) { if (texture && texture->impl && texture->impl->destroy) {
texture->impl->destroy(texture); texture->impl->destroy(texture);
@ -19,19 +16,16 @@ void wlr_texture_destroy(struct wlr_texture *texture) {
} }
} }
WLR_API
void wlr_texture_bind(struct wlr_texture *texture) { void wlr_texture_bind(struct wlr_texture *texture) {
texture->impl->bind(texture); texture->impl->bind(texture);
} }
WLR_API
bool wlr_texture_upload_pixels(struct wlr_texture *texture, uint32_t format, bool wlr_texture_upload_pixels(struct wlr_texture *texture, uint32_t format,
int stride, int width, int height, const unsigned char *pixels) { int stride, int width, int height, const unsigned char *pixels) {
return texture->impl->upload_pixels(texture, format, stride, return texture->impl->upload_pixels(texture, format, stride,
width, height, pixels); width, height, pixels);
} }
WLR_API
bool wlr_texture_update_pixels(struct wlr_texture *texture, bool wlr_texture_update_pixels(struct wlr_texture *texture,
enum wl_shm_format format, int stride, int x, int y, enum wl_shm_format format, int stride, int x, int y,
int width, int height, const unsigned char *pixels) { int width, int height, const unsigned char *pixels) {
@ -39,37 +33,31 @@ bool wlr_texture_update_pixels(struct wlr_texture *texture,
width, height, pixels); width, height, pixels);
} }
WLR_API
bool wlr_texture_upload_shm(struct wlr_texture *texture, uint32_t format, bool wlr_texture_upload_shm(struct wlr_texture *texture, uint32_t format,
struct wl_shm_buffer *shm) { struct wl_shm_buffer *shm) {
return texture->impl->upload_shm(texture, format, shm); return texture->impl->upload_shm(texture, format, shm);
} }
WLR_API
bool wlr_texture_update_shm(struct wlr_texture *texture, uint32_t format, bool wlr_texture_update_shm(struct wlr_texture *texture, uint32_t format,
int x, int y, int width, int height, struct wl_shm_buffer *shm) { int x, int y, int width, int height, struct wl_shm_buffer *shm) {
return texture->impl->update_shm(texture, format, x, y, width, height, shm); return texture->impl->update_shm(texture, format, x, y, width, height, shm);
} }
WLR_API
bool wlr_texture_upload_drm(struct wlr_texture *texture, bool wlr_texture_upload_drm(struct wlr_texture *texture,
struct wl_resource *drm_buffer) { struct wl_resource *drm_buffer) {
return texture->impl->upload_drm(texture, drm_buffer); return texture->impl->upload_drm(texture, drm_buffer);
} }
WLR_API
bool wlr_texture_upload_eglimage(struct wlr_texture *texture, bool wlr_texture_upload_eglimage(struct wlr_texture *texture,
EGLImageKHR image, uint32_t width, uint32_t height) { EGLImageKHR image, uint32_t width, uint32_t height) {
return texture->impl->upload_eglimage(texture, image, width, height); return texture->impl->upload_eglimage(texture, image, width, height);
} }
WLR_API
void wlr_texture_get_matrix(struct wlr_texture *texture, void wlr_texture_get_matrix(struct wlr_texture *texture,
float (*matrix)[16], const float (*projection)[16], int x, int y) { float (*matrix)[16], const float (*projection)[16], int x, int y) {
texture->impl->get_matrix(texture, matrix, projection, x, y); texture->impl->get_matrix(texture, matrix, projection, x, y);
} }
WLR_API
void wlr_texture_get_buffer_size(struct wlr_texture *texture, struct wl_resource void wlr_texture_get_buffer_size(struct wlr_texture *texture, struct wl_resource
*resource, int *width, int *height) { *resource, int *width, int *height) {
texture->impl->get_buffer_size(texture, resource, width, height); texture->impl->get_buffer_size(texture, resource, width, height);

View File

@ -5,9 +5,7 @@
#include <wayland-server-protocol.h> #include <wayland-server-protocol.h>
#include <wlr/types/wlr_box.h> #include <wlr/types/wlr_box.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
WLR_API
void wlr_box_closest_point(const struct wlr_box *box, double x, double y, void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
double *dest_x, double *dest_y) { double *dest_x, double *dest_y) {
// find the closest x point // find the closest x point
@ -29,12 +27,10 @@ void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
} }
} }
WLR_API
bool wlr_box_empty(const struct wlr_box *box) { bool wlr_box_empty(const struct wlr_box *box) {
return box == NULL || box->width <= 0 || box->height <= 0; return box == NULL || box->width <= 0 || box->height <= 0;
} }
WLR_API
bool wlr_box_intersection(const struct wlr_box *box_a, bool wlr_box_intersection(const struct wlr_box *box_a,
const struct wlr_box *box_b, struct wlr_box *dest) { const struct wlr_box *box_b, struct wlr_box *dest) {
bool a_empty = wlr_box_empty(box_a); bool a_empty = wlr_box_empty(box_a);
@ -61,7 +57,6 @@ bool wlr_box_intersection(const struct wlr_box *box_a,
return !wlr_box_empty(dest); return !wlr_box_empty(dest);
} }
WLR_API
bool wlr_box_contains_point(const struct wlr_box *box, double x, double y) { bool wlr_box_contains_point(const struct wlr_box *box, double x, double y) {
if (wlr_box_empty(box)) { if (wlr_box_empty(box)) {
return false; return false;
@ -71,7 +66,6 @@ bool wlr_box_contains_point(const struct wlr_box *box, double x, double y) {
} }
} }
WLR_API
void wlr_box_transform(const struct wlr_box *box, void wlr_box_transform(const struct wlr_box *box,
enum wl_output_transform transform, int width, int height, enum wl_output_transform transform, int width, int height,
struct wlr_box *dest) { struct wlr_box *dest) {
@ -121,7 +115,6 @@ void wlr_box_transform(const struct wlr_box *box,
} }
} }
WLR_API
void wlr_box_rotated_bounds(const struct wlr_box *box, float rotation, void wlr_box_rotated_bounds(const struct wlr_box *box, float rotation,
struct wlr_box *dest) { struct wlr_box *dest) {
if (rotation == 0) { if (rotation == 0) {

View File

@ -5,7 +5,6 @@
#include <wlr/types/wlr_region.h> #include <wlr/types/wlr_region.h>
#include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static const struct wl_compositor_interface wl_compositor_impl; static const struct wl_compositor_interface wl_compositor_impl;
@ -87,7 +86,6 @@ static void wl_compositor_bind(struct wl_client *wl_client, void *data,
wl_resource_get_link(wl_resource)); wl_resource_get_link(wl_resource));
} }
WLR_API
void wlr_compositor_destroy(struct wlr_compositor *compositor) { void wlr_compositor_destroy(struct wlr_compositor *compositor) {
if (compositor == NULL) { if (compositor == NULL) {
return; return;
@ -172,7 +170,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_compositor_destroy(compositor); wlr_compositor_destroy(compositor);
} }
WLR_API
struct wlr_compositor *wlr_compositor_create(struct wl_display *display, struct wlr_compositor *wlr_compositor_create(struct wl_display *display,
struct wlr_renderer *renderer) { struct wlr_renderer *renderer) {
struct wlr_compositor *compositor = struct wlr_compositor *compositor =

View File

@ -7,7 +7,6 @@
#include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
struct wlr_cursor_device { struct wlr_cursor_device {
@ -56,7 +55,6 @@ struct wlr_cursor_state {
struct wl_listener layout_destroy; struct wl_listener layout_destroy;
}; };
WLR_API
struct wlr_cursor *wlr_cursor_create() { struct wlr_cursor *wlr_cursor_create() {
struct wlr_cursor *cur = calloc(1, sizeof(struct wlr_cursor)); struct wlr_cursor *cur = calloc(1, sizeof(struct wlr_cursor));
if (!cur) { if (!cur) {
@ -151,7 +149,6 @@ static void wlr_cursor_device_destroy(struct wlr_cursor_device *c_device) {
free(c_device); free(c_device);
} }
WLR_API
void wlr_cursor_destroy(struct wlr_cursor *cur) { void wlr_cursor_destroy(struct wlr_cursor *cur) {
wlr_cursor_detach_output_layout(cur); wlr_cursor_detach_output_layout(cur);
@ -235,7 +232,6 @@ static struct wlr_box *get_mapping(struct wlr_cursor *cur,
return NULL; return NULL;
} }
WLR_API
bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev, bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
double x, double y) { double x, double y) {
assert(cur->state->layout); assert(cur->state->layout);
@ -257,7 +253,6 @@ bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
return result; return result;
} }
WLR_API
void wlr_cursor_warp_absolute(struct wlr_cursor *cur, void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
struct wlr_input_device *dev, double x_mm, double y_mm) { struct wlr_input_device *dev, double x_mm, double y_mm) {
assert(cur->state->layout); assert(cur->state->layout);
@ -273,7 +268,6 @@ void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
wlr_cursor_warp_unchecked(cur, x, y); wlr_cursor_warp_unchecked(cur, x, y);
} }
WLR_API
void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev, void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
double delta_x, double delta_y) { double delta_x, double delta_y) {
assert(cur->state->layout); assert(cur->state->layout);
@ -304,7 +298,6 @@ void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
wlr_cursor_warp_unchecked(cur, x, y); wlr_cursor_warp_unchecked(cur, x, y);
} }
WLR_API
void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels, void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x, int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x,
int32_t hotspot_y, float scale) { int32_t hotspot_y, float scale) {
@ -320,7 +313,6 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
} }
} }
WLR_API
void wlr_cursor_set_surface(struct wlr_cursor *cur, struct wlr_surface *surface, void wlr_cursor_set_surface(struct wlr_cursor *cur, struct wlr_surface *surface,
int32_t hotspot_x, int32_t hotspot_y) { int32_t hotspot_x, int32_t hotspot_y) {
struct wlr_cursor_output_cursor *output_cursor; struct wlr_cursor_output_cursor *output_cursor;
@ -486,7 +478,6 @@ static struct wlr_cursor_device *wlr_cursor_device_create(
return c_device; return c_device;
} }
WLR_API
void wlr_cursor_attach_input_device(struct wlr_cursor *cur, void wlr_cursor_attach_input_device(struct wlr_cursor *cur,
struct wlr_input_device *dev) { struct wlr_input_device *dev) {
if (dev->type != WLR_INPUT_DEVICE_POINTER && if (dev->type != WLR_INPUT_DEVICE_POINTER &&
@ -508,7 +499,6 @@ void wlr_cursor_attach_input_device(struct wlr_cursor *cur,
wlr_cursor_device_create(cur, dev); wlr_cursor_device_create(cur, dev);
} }
WLR_API
void wlr_cursor_detach_input_device(struct wlr_cursor *cur, void wlr_cursor_detach_input_device(struct wlr_cursor *cur,
struct wlr_input_device *dev) { struct wlr_input_device *dev) {
struct wlr_cursor_device *c_device, *tmp = NULL; struct wlr_cursor_device *c_device, *tmp = NULL;
@ -581,7 +571,6 @@ static void handle_layout_change(struct wl_listener *listener, void *data) {
} }
} }
WLR_API
void wlr_cursor_attach_output_layout(struct wlr_cursor *cur, void wlr_cursor_attach_output_layout(struct wlr_cursor *cur,
struct wlr_output_layout *l) { struct wlr_output_layout *l) {
wlr_cursor_detach_output_layout(cur); wlr_cursor_detach_output_layout(cur);
@ -605,13 +594,11 @@ void wlr_cursor_attach_output_layout(struct wlr_cursor *cur,
} }
} }
WLR_API
void wlr_cursor_map_to_output(struct wlr_cursor *cur, void wlr_cursor_map_to_output(struct wlr_cursor *cur,
struct wlr_output *output) { struct wlr_output *output) {
cur->state->mapped_output = output; cur->state->mapped_output = output;
} }
WLR_API
void wlr_cursor_map_input_to_output(struct wlr_cursor *cur, void wlr_cursor_map_input_to_output(struct wlr_cursor *cur,
struct wlr_input_device *dev, struct wlr_output *output) { struct wlr_input_device *dev, struct wlr_output *output) {
struct wlr_cursor_device *c_device = get_cursor_device(cur, dev); struct wlr_cursor_device *c_device = get_cursor_device(cur, dev);
@ -624,7 +611,6 @@ void wlr_cursor_map_input_to_output(struct wlr_cursor *cur,
c_device->mapped_output = output; c_device->mapped_output = output;
} }
WLR_API
void wlr_cursor_map_to_region(struct wlr_cursor *cur, void wlr_cursor_map_to_region(struct wlr_cursor *cur,
struct wlr_box *box) { struct wlr_box *box) {
if (box && wlr_box_empty(box)) { if (box && wlr_box_empty(box)) {
@ -635,7 +621,6 @@ void wlr_cursor_map_to_region(struct wlr_cursor *cur,
cur->state->mapped_box = box; cur->state->mapped_box = box;
} }
WLR_API
void wlr_cursor_map_input_to_region(struct wlr_cursor *cur, void wlr_cursor_map_input_to_region(struct wlr_cursor *cur,
struct wlr_input_device *dev, struct wlr_box *box) { struct wlr_input_device *dev, struct wlr_box *box) {
if (box && wlr_box_empty(box)) { if (box && wlr_box_empty(box)) {
@ -654,7 +639,6 @@ void wlr_cursor_map_input_to_region(struct wlr_cursor *cur,
c_device->mapped_box = box; c_device->mapped_box = box;
} }
WLR_API
bool wlr_cursor_absolute_to_layout_coords(struct wlr_cursor *cur, bool wlr_cursor_absolute_to_layout_coords(struct wlr_cursor *cur,
struct wlr_input_device *device, double x_mm, double y_mm, struct wlr_input_device *device, double x_mm, double y_mm,
double width_mm, double height_mm, double *lx, double *ly) { double width_mm, double height_mm, double *lx, double *ly) {

View File

@ -8,7 +8,6 @@
#include <wlr/types/wlr_data_device.h> #include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_seat.h> #include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
#define ALL_ACTIONS (WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY | \ #define ALL_ACTIONS (WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY | \
@ -271,7 +270,6 @@ static struct wlr_data_offer *wlr_data_source_send_offer(
return offer; return offer;
} }
WLR_API
void wlr_seat_client_send_selection(struct wlr_seat_client *seat_client) { void wlr_seat_client_send_selection(struct wlr_seat_client *seat_client) {
if (wl_list_empty(&seat_client->data_devices)) { if (wl_list_empty(&seat_client->data_devices)) {
return; return;
@ -314,7 +312,6 @@ static void seat_client_selection_data_source_destroy(
wlr_signal_emit_safe(&seat->events.selection, seat); wlr_signal_emit_safe(&seat->events.selection, seat);
} }
WLR_API
void wlr_seat_set_selection(struct wlr_seat *seat, void wlr_seat_set_selection(struct wlr_seat *seat,
struct wlr_data_source *source, uint32_t serial) { struct wlr_data_source *source, uint32_t serial) {
if (source) { if (source) {
@ -965,14 +962,12 @@ static void data_source_resource_handle_destroy(struct wl_resource *resource) {
free(source); free(source);
} }
WLR_API
void wlr_data_source_init(struct wlr_data_source *source) { void wlr_data_source_init(struct wlr_data_source *source) {
wl_array_init(&source->mime_types); wl_array_init(&source->mime_types);
wl_signal_init(&source->events.destroy); wl_signal_init(&source->events.destroy);
source->actions = -1; source->actions = -1;
} }
WLR_API
void wlr_data_source_finish(struct wlr_data_source *source) { void wlr_data_source_finish(struct wlr_data_source *source) {
if (source == NULL) { if (source == NULL) {
return; return;
@ -1064,7 +1059,6 @@ static void data_device_manager_bind(struct wl_client *client,
NULL, NULL); NULL, NULL);
} }
WLR_API
void wlr_data_device_manager_destroy(struct wlr_data_device_manager *manager) { void wlr_data_device_manager_destroy(struct wlr_data_device_manager *manager) {
if (!manager) { if (!manager) {
return; return;
@ -1081,7 +1075,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_data_device_manager_destroy(manager); wlr_data_device_manager_destroy(manager);
} }
WLR_API
struct wlr_data_device_manager *wlr_data_device_manager_create( struct wlr_data_device_manager *wlr_data_device_manager_create(
struct wl_display *display) { struct wl_display *display) {
struct wlr_data_device_manager *manager = struct wlr_data_device_manager *manager =

View File

@ -5,7 +5,6 @@
#include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "gamma-control-protocol.h" #include "gamma-control-protocol.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static void resource_destroy(struct wl_client *client, static void resource_destroy(struct wl_client *client,
@ -147,7 +146,6 @@ static void gamma_control_manager_bind(struct wl_client *client, void *data,
manager, NULL); manager, NULL);
} }
WLR_API
void wlr_gamma_control_manager_destroy( void wlr_gamma_control_manager_destroy(
struct wlr_gamma_control_manager *manager) { struct wlr_gamma_control_manager *manager) {
if (!manager) { if (!manager) {
@ -168,7 +166,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_gamma_control_manager_destroy(manager); wlr_gamma_control_manager_destroy(manager);
} }
WLR_API
struct wlr_gamma_control_manager *wlr_gamma_control_manager_create( struct wlr_gamma_control_manager *wlr_gamma_control_manager_create(
struct wl_display *display) { struct wl_display *display) {
struct wlr_gamma_control_manager *manager = struct wlr_gamma_control_manager *manager =

View File

@ -5,7 +5,6 @@
#include <wlr/types/wlr_idle.h> #include <wlr/types/wlr_idle.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "idle-protocol.h" #include "idle-protocol.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static const struct org_kde_kwin_idle_timeout_interface idle_timeout_impl; static const struct org_kde_kwin_idle_timeout_interface idle_timeout_impl;
@ -158,7 +157,6 @@ static void idle_bind(struct wl_client *wl_client, void *data,
wl_resource_set_implementation(wl_resource, &idle_impl, idle, NULL); wl_resource_set_implementation(wl_resource, &idle_impl, idle, NULL);
} }
WLR_API
void wlr_idle_destroy(struct wlr_idle *idle) { void wlr_idle_destroy(struct wlr_idle *idle) {
if (!idle) { if (!idle) {
return; return;
@ -177,7 +175,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_idle_destroy(idle); wlr_idle_destroy(idle);
} }
WLR_API
struct wlr_idle *wlr_idle_create(struct wl_display *display) { struct wlr_idle *wlr_idle_create(struct wl_display *display) {
struct wlr_idle *idle = calloc(1, sizeof(struct wlr_idle)); struct wlr_idle *idle = calloc(1, sizeof(struct wlr_idle));
if (!idle) { if (!idle) {
@ -206,7 +203,6 @@ struct wlr_idle *wlr_idle_create(struct wl_display *display) {
return idle; return idle;
} }
WLR_API
void wlr_idle_notify_activity(struct wlr_idle *idle, struct wlr_seat *seat) { void wlr_idle_notify_activity(struct wlr_idle *idle, struct wlr_seat *seat) {
wlr_signal_emit_safe(&idle->activity_notify, seat); wlr_signal_emit_safe(&idle->activity_notify, seat);
} }

View File

@ -10,10 +10,8 @@
#include <wlr/interfaces/wlr_touch.h> #include <wlr/interfaces/wlr_touch.h>
#include <wlr/types/wlr_input_device.h> #include <wlr/types/wlr_input_device.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
WLR_API
void wlr_input_device_init(struct wlr_input_device *dev, void wlr_input_device_init(struct wlr_input_device *dev,
enum wlr_input_device_type type, enum wlr_input_device_type type,
struct wlr_input_device_impl *impl, struct wlr_input_device_impl *impl,
@ -27,7 +25,6 @@ void wlr_input_device_init(struct wlr_input_device *dev,
wl_signal_init(&dev->events.destroy); wl_signal_init(&dev->events.destroy);
} }
WLR_API
void wlr_input_device_destroy(struct wlr_input_device *dev) { void wlr_input_device_destroy(struct wlr_input_device *dev) {
if (!dev) { if (!dev) {
return; return;

View File

@ -7,7 +7,6 @@
#include <wlr/interfaces/wlr_keyboard.h> #include <wlr/interfaces/wlr_keyboard.h>
#include <wlr/types/wlr_keyboard.h> #include <wlr/types/wlr_keyboard.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
int os_create_anonymous_file(off_t size); int os_create_anonymous_file(off_t size);
@ -101,7 +100,6 @@ static void keyboard_key_update(struct wlr_keyboard *keyboard,
assert(keyboard->num_keycodes <= WLR_KEYBOARD_KEYS_CAP); assert(keyboard->num_keycodes <= WLR_KEYBOARD_KEYS_CAP);
} }
WLR_API
void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard, void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked, uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked,
uint32_t group) { uint32_t group) {
@ -117,7 +115,6 @@ void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
} }
} }
WLR_API
void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard, void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
struct wlr_event_keyboard_key *event) { struct wlr_event_keyboard_key *event) {
if (keyboard->xkb_state == NULL) { if (keyboard->xkb_state == NULL) {
@ -139,7 +136,6 @@ void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
wlr_signal_emit_safe(&keyboard->events.key, event); wlr_signal_emit_safe(&keyboard->events.key, event);
} }
WLR_API
void wlr_keyboard_init(struct wlr_keyboard *kb, void wlr_keyboard_init(struct wlr_keyboard *kb,
struct wlr_keyboard_impl *impl) { struct wlr_keyboard_impl *impl) {
kb->impl = impl; kb->impl = impl;
@ -153,7 +149,6 @@ void wlr_keyboard_init(struct wlr_keyboard *kb,
kb->repeat_info.delay = 600; kb->repeat_info.delay = 600;
} }
WLR_API
void wlr_keyboard_destroy(struct wlr_keyboard *kb) { void wlr_keyboard_destroy(struct wlr_keyboard *kb) {
if (kb == NULL) { if (kb == NULL) {
return; return;
@ -169,14 +164,12 @@ void wlr_keyboard_destroy(struct wlr_keyboard *kb) {
free(kb); free(kb);
} }
WLR_API
void wlr_keyboard_led_update(struct wlr_keyboard *kb, uint32_t leds) { void wlr_keyboard_led_update(struct wlr_keyboard *kb, uint32_t leds) {
if (kb->impl && kb->impl->led_update) { if (kb->impl && kb->impl->led_update) {
kb->impl->led_update(kb, leds); kb->impl->led_update(kb, leds);
} }
} }
WLR_API
void wlr_keyboard_set_keymap(struct wlr_keyboard *kb, void wlr_keyboard_set_keymap(struct wlr_keyboard *kb,
struct xkb_keymap *keymap) { struct xkb_keymap *keymap) {
char *keymap_str = NULL; char *keymap_str = NULL;
@ -254,7 +247,6 @@ err:
free(keymap_str); free(keymap_str);
} }
WLR_API
void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate, void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate,
int32_t delay) { int32_t delay) {
if (kb->repeat_info.rate == rate && kb->repeat_info.delay == delay) { if (kb->repeat_info.rate == rate && kb->repeat_info.delay == delay) {
@ -265,7 +257,6 @@ void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate,
wlr_signal_emit_safe(&kb->events.repeat_info, kb); wlr_signal_emit_safe(&kb->events.repeat_info, kb);
} }
WLR_API
uint32_t wlr_keyboard_get_modifiers(struct wlr_keyboard *kb) { uint32_t wlr_keyboard_get_modifiers(struct wlr_keyboard *kb) {
xkb_mod_mask_t mask = kb->modifiers.depressed | kb->modifiers.latched; xkb_mod_mask_t mask = kb->modifiers.depressed | kb->modifiers.latched;
uint32_t modifiers = 0; uint32_t modifiers = 0;

View File

@ -5,9 +5,7 @@
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <wlr/types/wlr_list.h> #include <wlr/types/wlr_list.h>
#include "util/defs.h"
WLR_API
bool wlr_list_init(struct wlr_list *list) { bool wlr_list_init(struct wlr_list *list) {
list->capacity = 10; list->capacity = 10;
list->length = 0; list->length = 0;
@ -31,19 +29,16 @@ static bool list_resize(struct wlr_list *list) {
return true; return true;
} }
WLR_API
void wlr_list_finish(struct wlr_list *list) { void wlr_list_finish(struct wlr_list *list) {
free(list->items); free(list->items);
} }
WLR_API
void wlr_list_for_each(struct wlr_list *list, void (*callback)(void *item)) { void wlr_list_for_each(struct wlr_list *list, void (*callback)(void *item)) {
for (size_t i = 0; i < list->length; i++) { for (size_t i = 0; i < list->length; i++) {
callback(list->items[i]); callback(list->items[i]);
} }
} }
WLR_API
ssize_t wlr_list_push(struct wlr_list *list, void *item) { ssize_t wlr_list_push(struct wlr_list *list, void *item) {
if (!list_resize(list)) { if (!list_resize(list)) {
return -1; return -1;
@ -52,7 +47,6 @@ ssize_t wlr_list_push(struct wlr_list *list, void *item) {
return list->length; return list->length;
} }
WLR_API
ssize_t wlr_list_insert(struct wlr_list *list, size_t index, void *item) { ssize_t wlr_list_insert(struct wlr_list *list, size_t index, void *item) {
if (!list_resize(list)) { if (!list_resize(list)) {
return -1; return -1;
@ -64,14 +58,12 @@ ssize_t wlr_list_insert(struct wlr_list *list, size_t index, void *item) {
return list->length; return list->length;
} }
WLR_API
void wlr_list_del(struct wlr_list *list, size_t index) { void wlr_list_del(struct wlr_list *list, size_t index) {
list->length--; list->length--;
memmove(&list->items[index], &list->items[index + 1], memmove(&list->items[index], &list->items[index + 1],
sizeof(void *) * (list->length - index)); sizeof(void *) * (list->length - index));
} }
WLR_API
void *wlr_list_pop(struct wlr_list *list) { void *wlr_list_pop(struct wlr_list *list) {
if (list->length == 0) { if (list->length == 0) {
return NULL; return NULL;
@ -81,7 +73,6 @@ void *wlr_list_pop(struct wlr_list *list) {
return last; return last;
} }
WLR_API
void *wlr_list_peek(struct wlr_list *list) { void *wlr_list_peek(struct wlr_list *list) {
if (list->length == 0) { if (list->length == 0) {
return NULL; return NULL;
@ -89,7 +80,6 @@ void *wlr_list_peek(struct wlr_list *list) {
return list->items[list->length - 1]; return list->items[list->length - 1];
} }
WLR_API
ssize_t wlr_list_cat(struct wlr_list *list, const struct wlr_list *source) { ssize_t wlr_list_cat(struct wlr_list *list, const struct wlr_list *source) {
size_t old_len = list->length; size_t old_len = list->length;
size_t i; size_t i;
@ -102,13 +92,11 @@ ssize_t wlr_list_cat(struct wlr_list *list, const struct wlr_list *source) {
return list->length; return list->length;
} }
WLR_API
void wlr_list_qsort(struct wlr_list *list, void wlr_list_qsort(struct wlr_list *list,
int compare(const void *left, const void *right)) { int compare(const void *left, const void *right)) {
qsort(list->items, list->length, sizeof(void *), compare); qsort(list->items, list->length, sizeof(void *), compare);
} }
WLR_API
ssize_t wlr_list_find(struct wlr_list *list, ssize_t wlr_list_find(struct wlr_list *list,
int compare(const void *item, const void *data), const void *data) { int compare(const void *item, const void *data), const void *data) {
for (size_t i = 0; i < list->length; i++) { for (size_t i = 0; i < list->length; i++) {

View File

@ -13,7 +13,6 @@
#include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include <wlr/util/region.h> #include <wlr/util/region.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static void wl_output_send_to_resource(struct wl_resource *resource) { static void wl_output_send_to_resource(struct wl_resource *resource) {
@ -114,7 +113,6 @@ static void wl_output_bind(struct wl_client *wl_client, void *data,
wl_output_send_to_resource(wl_resource); wl_output_send_to_resource(wl_resource);
} }
WLR_API
void wlr_output_create_global(struct wlr_output *output) { void wlr_output_create_global(struct wlr_output *output) {
if (output->wl_global != NULL) { if (output->wl_global != NULL) {
return; return;
@ -124,7 +122,6 @@ void wlr_output_create_global(struct wlr_output *output) {
output->wl_global = wl_global; output->wl_global = wl_global;
} }
WLR_API
void wlr_output_destroy_global(struct wlr_output *output) { void wlr_output_destroy_global(struct wlr_output *output) {
if (output->wl_global == NULL) { if (output->wl_global == NULL) {
return; return;
@ -137,7 +134,6 @@ void wlr_output_destroy_global(struct wlr_output *output) {
output->wl_global = NULL; output->wl_global = NULL;
} }
WLR_API
void wlr_output_update_enabled(struct wlr_output *output, bool enabled) { void wlr_output_update_enabled(struct wlr_output *output, bool enabled) {
if (output->enabled == enabled) { if (output->enabled == enabled) {
return; return;
@ -152,7 +148,6 @@ static void wlr_output_update_matrix(struct wlr_output *output) {
output->transform); output->transform);
} }
WLR_API
void wlr_output_enable(struct wlr_output *output, bool enable) { void wlr_output_enable(struct wlr_output *output, bool enable) {
if (output->enabled == enable) { if (output->enabled == enable) {
return; return;
@ -163,7 +158,6 @@ void wlr_output_enable(struct wlr_output *output, bool enable) {
} }
} }
WLR_API
bool wlr_output_set_mode(struct wlr_output *output, bool wlr_output_set_mode(struct wlr_output *output,
struct wlr_output_mode *mode) { struct wlr_output_mode *mode) {
if (!output->impl || !output->impl->set_mode) { if (!output->impl || !output->impl->set_mode) {
@ -172,7 +166,6 @@ bool wlr_output_set_mode(struct wlr_output *output,
return output->impl->set_mode(output, mode); return output->impl->set_mode(output, mode);
} }
WLR_API
bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width, bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
int32_t height, int32_t refresh) { int32_t height, int32_t refresh) {
if (!output->impl || !output->impl->set_custom_mode) { if (!output->impl || !output->impl->set_custom_mode) {
@ -181,7 +174,6 @@ bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
return output->impl->set_custom_mode(output, width, height, refresh); return output->impl->set_custom_mode(output, width, height, refresh);
} }
WLR_API
void wlr_output_update_mode(struct wlr_output *output, void wlr_output_update_mode(struct wlr_output *output,
struct wlr_output_mode *mode) { struct wlr_output_mode *mode) {
output->current_mode = mode; output->current_mode = mode;
@ -189,7 +181,6 @@ void wlr_output_update_mode(struct wlr_output *output,
mode->refresh); mode->refresh);
} }
WLR_API
void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width, void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
int32_t height, int32_t refresh) { int32_t height, int32_t refresh) {
output->width = width; output->width = width;
@ -206,7 +197,6 @@ void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
wlr_signal_emit_safe(&output->events.mode, output); wlr_signal_emit_safe(&output->events.mode, output);
} }
WLR_API
void wlr_output_set_transform(struct wlr_output *output, void wlr_output_set_transform(struct wlr_output *output,
enum wl_output_transform transform) { enum wl_output_transform transform) {
output->impl->transform(output, transform); output->impl->transform(output, transform);
@ -221,7 +211,6 @@ void wlr_output_set_transform(struct wlr_output *output,
wlr_signal_emit_safe(&output->events.transform, output); wlr_signal_emit_safe(&output->events.transform, output);
} }
WLR_API
void wlr_output_set_position(struct wlr_output *output, int32_t lx, void wlr_output_set_position(struct wlr_output *output, int32_t lx,
int32_t ly) { int32_t ly) {
if (lx == output->lx && ly == output->ly) { if (lx == output->lx && ly == output->ly) {
@ -238,7 +227,6 @@ void wlr_output_set_position(struct wlr_output *output, int32_t lx,
} }
} }
WLR_API
void wlr_output_set_scale(struct wlr_output *output, float scale) { void wlr_output_set_scale(struct wlr_output *output, float scale) {
if (output->scale == scale) { if (output->scale == scale) {
return; return;
@ -261,7 +249,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_output_destroy_global(output); wlr_output_destroy_global(output);
} }
WLR_API
void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend, void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
const struct wlr_output_impl *impl, struct wl_display *display) { const struct wlr_output_impl *impl, struct wl_display *display) {
assert(impl->make_current && impl->swap_buffers && impl->transform); assert(impl->make_current && impl->swap_buffers && impl->transform);
@ -289,7 +276,6 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
output->frame_pending = true; output->frame_pending = true;
} }
WLR_API
void wlr_output_destroy(struct wlr_output *output) { void wlr_output_destroy(struct wlr_output *output) {
if (!output) { if (!output) {
return; return;
@ -321,7 +307,6 @@ void wlr_output_destroy(struct wlr_output *output) {
} }
} }
WLR_API
void wlr_output_transformed_resolution(struct wlr_output *output, void wlr_output_transformed_resolution(struct wlr_output *output,
int *width, int *height) { int *width, int *height) {
if (output->transform % 2 == 0) { if (output->transform % 2 == 0) {
@ -333,7 +318,6 @@ void wlr_output_transformed_resolution(struct wlr_output *output,
} }
} }
WLR_API
void wlr_output_effective_resolution(struct wlr_output *output, void wlr_output_effective_resolution(struct wlr_output *output,
int *width, int *height) { int *width, int *height) {
wlr_output_transformed_resolution(output, width, height); wlr_output_transformed_resolution(output, width, height);
@ -341,7 +325,6 @@ void wlr_output_effective_resolution(struct wlr_output *output,
*height /= output->scale; *height /= output->scale;
} }
WLR_API
bool wlr_output_make_current(struct wlr_output *output, int *buffer_age) { bool wlr_output_make_current(struct wlr_output *output, int *buffer_age) {
return output->impl->make_current(output, buffer_age); return output->impl->make_current(output, buffer_age);
} }
@ -477,7 +460,6 @@ surface_damage_finish:
pixman_region32_fini(&surface_damage); pixman_region32_fini(&surface_damage);
} }
WLR_API
bool wlr_output_swap_buffers(struct wlr_output *output, struct timespec *when, bool wlr_output_swap_buffers(struct wlr_output *output, struct timespec *when,
pixman_region32_t *damage) { pixman_region32_t *damage) {
if (output->frame_pending) { if (output->frame_pending) {
@ -544,7 +526,6 @@ bool wlr_output_swap_buffers(struct wlr_output *output, struct timespec *when,
return true; return true;
} }
WLR_API
void wlr_output_send_frame(struct wlr_output *output) { void wlr_output_send_frame(struct wlr_output *output) {
output->frame_pending = false; output->frame_pending = false;
wlr_signal_emit_safe(&output->events.frame, output); wlr_signal_emit_safe(&output->events.frame, output);
@ -558,7 +539,6 @@ static void schedule_frame_handle_idle_timer(void *data) {
} }
} }
WLR_API
void wlr_output_schedule_frame(struct wlr_output *output) { void wlr_output_schedule_frame(struct wlr_output *output) {
if (output->frame_pending || output->idle_frame != NULL) { if (output->frame_pending || output->idle_frame != NULL) {
return; return;
@ -570,7 +550,6 @@ void wlr_output_schedule_frame(struct wlr_output *output) {
wl_event_loop_add_idle(ev, schedule_frame_handle_idle_timer, output); wl_event_loop_add_idle(ev, schedule_frame_handle_idle_timer, output);
} }
WLR_API
void wlr_output_set_gamma(struct wlr_output *output, void wlr_output_set_gamma(struct wlr_output *output,
uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b) { uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b) {
if (output->impl->set_gamma) { if (output->impl->set_gamma) {
@ -578,7 +557,6 @@ void wlr_output_set_gamma(struct wlr_output *output,
} }
} }
WLR_API
uint32_t wlr_output_get_gamma_size(struct wlr_output *output) { uint32_t wlr_output_get_gamma_size(struct wlr_output *output) {
if (!output->impl->get_gamma_size) { if (!output->impl->get_gamma_size) {
return 0; return 0;
@ -586,7 +564,6 @@ uint32_t wlr_output_get_gamma_size(struct wlr_output *output) {
return output->impl->get_gamma_size(output); return output->impl->get_gamma_size(output);
} }
WLR_API
void wlr_output_update_needs_swap(struct wlr_output *output) { void wlr_output_update_needs_swap(struct wlr_output *output) {
output->needs_swap = true; output->needs_swap = true;
wlr_signal_emit_safe(&output->events.needs_swap, output); wlr_signal_emit_safe(&output->events.needs_swap, output);
@ -645,7 +622,6 @@ static void output_fullscreen_surface_handle_destroy(
output_fullscreen_surface_reset(output); output_fullscreen_surface_reset(output);
} }
WLR_API
void wlr_output_set_fullscreen_surface(struct wlr_output *output, void wlr_output_set_fullscreen_surface(struct wlr_output *output,
struct wlr_surface *surface) { struct wlr_surface *surface) {
// TODO: hardware fullscreen // TODO: hardware fullscreen
@ -672,7 +648,6 @@ void wlr_output_set_fullscreen_surface(struct wlr_output *output,
&output->fullscreen_surface_destroy); &output->fullscreen_surface_destroy);
} }
WLR_API
struct wlr_output *wlr_output_from_resource(struct wl_resource *resource) { struct wlr_output *wlr_output_from_resource(struct wl_resource *resource) {
assert(wl_resource_instance_of(resource, &wl_output_interface, assert(wl_resource_instance_of(resource, &wl_output_interface,
&wl_output_impl)); &wl_output_impl));
@ -699,7 +674,6 @@ static void output_cursor_reset(struct wlr_output_cursor *cursor) {
} }
} }
WLR_API
bool wlr_output_cursor_set_image(struct wlr_output_cursor *cursor, bool wlr_output_cursor_set_image(struct wlr_output_cursor *cursor,
const uint8_t *pixels, int32_t stride, uint32_t width, uint32_t height, const uint8_t *pixels, int32_t stride, uint32_t width, uint32_t height,
int32_t hotspot_x, int32_t hotspot_y) { int32_t hotspot_x, int32_t hotspot_y) {
@ -807,7 +781,6 @@ static void output_cursor_handle_destroy(struct wl_listener *listener,
output_cursor_reset(cursor); output_cursor_reset(cursor);
} }
WLR_API
void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor, void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor,
struct wlr_surface *surface, int32_t hotspot_x, int32_t hotspot_y) { struct wlr_surface *surface, int32_t hotspot_x, int32_t hotspot_y) {
if (surface && strcmp(surface->role, "wl_pointer-cursor") != 0) { if (surface && strcmp(surface->role, "wl_pointer-cursor") != 0) {
@ -868,7 +841,6 @@ void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor,
} }
} }
WLR_API
bool wlr_output_cursor_move(struct wlr_output_cursor *cursor, bool wlr_output_cursor_move(struct wlr_output_cursor *cursor,
double x, double y) { double x, double y) {
if (cursor->x == x && cursor->y == y) { if (cursor->x == x && cursor->y == y) {
@ -896,7 +868,6 @@ bool wlr_output_cursor_move(struct wlr_output_cursor *cursor,
return cursor->output->impl->move_cursor(cursor->output, (int)x, (int)y); return cursor->output->impl->move_cursor(cursor->output, (int)x, (int)y);
} }
WLR_API
struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output) { struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output) {
struct wlr_output_cursor *cursor = struct wlr_output_cursor *cursor =
calloc(1, sizeof(struct wlr_output_cursor)); calloc(1, sizeof(struct wlr_output_cursor));
@ -913,7 +884,6 @@ struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output) {
return cursor; return cursor;
} }
WLR_API
void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) { void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) {
if (cursor == NULL) { if (cursor == NULL) {
return; return;
@ -936,7 +906,6 @@ void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) {
} }
WLR_API
enum wl_output_transform wlr_output_transform_invert( enum wl_output_transform wlr_output_transform_invert(
enum wl_output_transform tr) { enum wl_output_transform tr) {
if ((tr & WL_OUTPUT_TRANSFORM_90) && !(tr & WL_OUTPUT_TRANSFORM_FLIPPED)) { if ((tr & WL_OUTPUT_TRANSFORM_90) && !(tr & WL_OUTPUT_TRANSFORM_FLIPPED)) {
@ -945,7 +914,6 @@ enum wl_output_transform wlr_output_transform_invert(
return tr; return tr;
} }
WLR_API
enum wl_output_transform wlr_output_transform_compose( enum wl_output_transform wlr_output_transform_compose(
enum wl_output_transform tr_a, enum wl_output_transform tr_b) { enum wl_output_transform tr_a, enum wl_output_transform tr_b) {
uint32_t flipped = (tr_a ^ tr_b) & WL_OUTPUT_TRANSFORM_FLIPPED; uint32_t flipped = (tr_a ^ tr_b) & WL_OUTPUT_TRANSFORM_FLIPPED;

View File

@ -5,7 +5,6 @@
#include <wlr/types/wlr_box.h> #include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output_damage.h> #include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static void output_handle_destroy(struct wl_listener *listener, void *data) { static void output_handle_destroy(struct wl_listener *listener, void *data) {
@ -51,7 +50,6 @@ static void output_handle_frame(struct wl_listener *listener, void *data) {
wlr_signal_emit_safe(&output_damage->events.frame, output_damage); wlr_signal_emit_safe(&output_damage->events.frame, output_damage);
} }
WLR_API
struct wlr_output_damage *wlr_output_damage_create(struct wlr_output *output) { struct wlr_output_damage *wlr_output_damage_create(struct wlr_output *output) {
struct wlr_output_damage *output_damage = struct wlr_output_damage *output_damage =
calloc(1, sizeof(struct wlr_output_damage)); calloc(1, sizeof(struct wlr_output_damage));
@ -84,7 +82,6 @@ struct wlr_output_damage *wlr_output_damage_create(struct wlr_output *output) {
return output_damage; return output_damage;
} }
WLR_API
void wlr_output_damage_destroy(struct wlr_output_damage *output_damage) { void wlr_output_damage_destroy(struct wlr_output_damage *output_damage) {
if (output_damage == NULL) { if (output_damage == NULL) {
return; return;
@ -103,7 +100,6 @@ void wlr_output_damage_destroy(struct wlr_output_damage *output_damage) {
free(output_damage); free(output_damage);
} }
WLR_API
bool wlr_output_damage_make_current(struct wlr_output_damage *output_damage, bool wlr_output_damage_make_current(struct wlr_output_damage *output_damage,
bool *needs_swap, pixman_region32_t *damage) { bool *needs_swap, pixman_region32_t *damage) {
struct wlr_output *output = output_damage->output; struct wlr_output *output = output_damage->output;
@ -135,7 +131,6 @@ bool wlr_output_damage_make_current(struct wlr_output_damage *output_damage,
return true; return true;
} }
WLR_API
bool wlr_output_damage_swap_buffers(struct wlr_output_damage *output_damage, bool wlr_output_damage_swap_buffers(struct wlr_output_damage *output_damage,
struct timespec *when, pixman_region32_t *damage) { struct timespec *when, pixman_region32_t *damage) {
if (!wlr_output_swap_buffers(output_damage->output, when, damage)) { if (!wlr_output_swap_buffers(output_damage->output, when, damage)) {
@ -153,7 +148,6 @@ bool wlr_output_damage_swap_buffers(struct wlr_output_damage *output_damage,
return true; return true;
} }
WLR_API
void wlr_output_damage_add(struct wlr_output_damage *output_damage, void wlr_output_damage_add(struct wlr_output_damage *output_damage,
pixman_region32_t *damage) { pixman_region32_t *damage) {
int width, height; int width, height;
@ -166,7 +160,6 @@ void wlr_output_damage_add(struct wlr_output_damage *output_damage,
wlr_output_schedule_frame(output_damage->output); wlr_output_schedule_frame(output_damage->output);
} }
WLR_API
void wlr_output_damage_add_whole(struct wlr_output_damage *output_damage) { void wlr_output_damage_add_whole(struct wlr_output_damage *output_damage) {
int width, height; int width, height;
wlr_output_transformed_resolution(output_damage->output, &width, &height); wlr_output_transformed_resolution(output_damage->output, &width, &height);
@ -177,7 +170,6 @@ void wlr_output_damage_add_whole(struct wlr_output_damage *output_damage) {
wlr_output_schedule_frame(output_damage->output); wlr_output_schedule_frame(output_damage->output);
} }
WLR_API
void wlr_output_damage_add_box(struct wlr_output_damage *output_damage, void wlr_output_damage_add_box(struct wlr_output_damage *output_damage,
struct wlr_box *box) { struct wlr_box *box) {
int width, height; int width, height;

View File

@ -6,7 +6,6 @@
#include <wlr/types/wlr_output_layout.h> #include <wlr/types/wlr_output_layout.h>
#include <wlr/types/wlr_output.h> #include <wlr/types/wlr_output.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
struct wlr_output_layout_state { struct wlr_output_layout_state {
@ -26,7 +25,6 @@ struct wlr_output_layout_output_state {
struct wl_listener output_destroy; struct wl_listener output_destroy;
}; };
WLR_API
struct wlr_output_layout *wlr_output_layout_create() { struct wlr_output_layout *wlr_output_layout_create() {
struct wlr_output_layout *layout = struct wlr_output_layout *layout =
calloc(1, sizeof(struct wlr_output_layout)); calloc(1, sizeof(struct wlr_output_layout));
@ -59,7 +57,6 @@ static void wlr_output_layout_output_destroy(
free(l_output); free(l_output);
} }
WLR_API
void wlr_output_layout_destroy(struct wlr_output_layout *layout) { void wlr_output_layout_destroy(struct wlr_output_layout *layout) {
if (!layout) { if (!layout) {
return; return;
@ -192,7 +189,6 @@ static struct wlr_output_layout_output *wlr_output_layout_output_create(
return l_output; return l_output;
} }
WLR_API
void wlr_output_layout_add(struct wlr_output_layout *layout, void wlr_output_layout_add(struct wlr_output_layout *layout,
struct wlr_output *output, int x, int y) { struct wlr_output *output, int x, int y) {
struct wlr_output_layout_output *l_output = struct wlr_output_layout_output *l_output =
@ -212,7 +208,6 @@ void wlr_output_layout_add(struct wlr_output_layout *layout,
wlr_signal_emit_safe(&layout->events.add, l_output); wlr_signal_emit_safe(&layout->events.add, l_output);
} }
WLR_API
struct wlr_output_layout_output *wlr_output_layout_get( struct wlr_output_layout_output *wlr_output_layout_get(
struct wlr_output_layout *layout, struct wlr_output *reference) { struct wlr_output_layout *layout, struct wlr_output *reference) {
struct wlr_output_layout_output *l_output; struct wlr_output_layout_output *l_output;
@ -224,7 +219,6 @@ struct wlr_output_layout_output *wlr_output_layout_get(
return NULL; return NULL;
} }
WLR_API
bool wlr_output_layout_contains_point(struct wlr_output_layout *layout, bool wlr_output_layout_contains_point(struct wlr_output_layout *layout,
struct wlr_output *reference, int x, int y) { struct wlr_output *reference, int x, int y) {
if (reference) { if (reference) {
@ -237,7 +231,6 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout *layout,
} }
} }
WLR_API
bool wlr_output_layout_intersects(struct wlr_output_layout *layout, bool wlr_output_layout_intersects(struct wlr_output_layout *layout,
struct wlr_output *reference, const struct wlr_box *target_box) { struct wlr_output *reference, const struct wlr_box *target_box) {
struct wlr_box out_box; struct wlr_box out_box;
@ -264,7 +257,6 @@ bool wlr_output_layout_intersects(struct wlr_output_layout *layout,
} }
} }
WLR_API
struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout, struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout,
double x, double y) { double x, double y) {
struct wlr_output_layout_output *l_output; struct wlr_output_layout_output *l_output;
@ -277,7 +269,6 @@ struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout,
return NULL; return NULL;
} }
WLR_API
void wlr_output_layout_move(struct wlr_output_layout *layout, void wlr_output_layout_move(struct wlr_output_layout *layout,
struct wlr_output *output, int x, int y) { struct wlr_output *output, int x, int y) {
struct wlr_output_layout_output *l_output = struct wlr_output_layout_output *l_output =
@ -292,7 +283,6 @@ void wlr_output_layout_move(struct wlr_output_layout *layout,
} }
} }
WLR_API
void wlr_output_layout_remove(struct wlr_output_layout *layout, void wlr_output_layout_remove(struct wlr_output_layout *layout,
struct wlr_output *output) { struct wlr_output *output) {
struct wlr_output_layout_output *l_output = struct wlr_output_layout_output *l_output =
@ -304,7 +294,6 @@ void wlr_output_layout_remove(struct wlr_output_layout *layout,
wlr_output_destroy_global(output); wlr_output_destroy_global(output);
} }
WLR_API
void wlr_output_layout_output_coords(struct wlr_output_layout *layout, void wlr_output_layout_output_coords(struct wlr_output_layout *layout,
struct wlr_output *reference, double *x, double *y) { struct wlr_output *reference, double *x, double *y) {
assert(layout && reference); assert(layout && reference);
@ -321,7 +310,6 @@ void wlr_output_layout_output_coords(struct wlr_output_layout *layout,
} }
} }
WLR_API
void wlr_output_layout_closest_point(struct wlr_output_layout *layout, void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
struct wlr_output *reference, double x, double y, double *dest_x, struct wlr_output *reference, double x, double y, double *dest_x,
double *dest_y) { double *dest_y) {
@ -355,7 +343,6 @@ void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
*dest_y = min_y; *dest_y = min_y;
} }
WLR_API
struct wlr_box *wlr_output_layout_get_box( struct wlr_box *wlr_output_layout_get_box(
struct wlr_output_layout *layout, struct wlr_output *reference) { struct wlr_output_layout *layout, struct wlr_output *reference) {
struct wlr_output_layout_output *l_output; struct wlr_output_layout_output *l_output;
@ -400,7 +387,6 @@ struct wlr_box *wlr_output_layout_get_box(
// not reached // not reached
} }
WLR_API
void wlr_output_layout_add_auto(struct wlr_output_layout *layout, void wlr_output_layout_add_auto(struct wlr_output_layout *layout,
struct wlr_output *output) { struct wlr_output *output) {
struct wlr_output_layout_output *l_output = struct wlr_output_layout_output *l_output =
@ -419,7 +405,6 @@ void wlr_output_layout_add_auto(struct wlr_output_layout *layout,
wlr_signal_emit_safe(&layout->events.add, l_output); wlr_signal_emit_safe(&layout->events.add, l_output);
} }
WLR_API
struct wlr_output *wlr_output_layout_get_center_output( struct wlr_output *wlr_output_layout_get_center_output(
struct wlr_output_layout *layout) { struct wlr_output_layout *layout) {
if (wl_list_empty(&layout->outputs)) { if (wl_list_empty(&layout->outputs)) {

View File

@ -3,9 +3,7 @@
#include <wayland-server.h> #include <wayland-server.h>
#include <wlr/interfaces/wlr_pointer.h> #include <wlr/interfaces/wlr_pointer.h>
#include <wlr/types/wlr_pointer.h> #include <wlr/types/wlr_pointer.h>
#include "util/defs.h"
WLR_API
void wlr_pointer_init(struct wlr_pointer *pointer, void wlr_pointer_init(struct wlr_pointer *pointer,
struct wlr_pointer_impl *impl) { struct wlr_pointer_impl *impl) {
pointer->impl = impl; pointer->impl = impl;
@ -15,7 +13,6 @@ void wlr_pointer_init(struct wlr_pointer *pointer,
wl_signal_init(&pointer->events.axis); wl_signal_init(&pointer->events.axis);
} }
WLR_API
void wlr_pointer_destroy(struct wlr_pointer *pointer) { void wlr_pointer_destroy(struct wlr_pointer *pointer) {
if (pointer && pointer->impl && pointer->impl->destroy) { if (pointer && pointer->impl && pointer->impl->destroy) {
pointer->impl->destroy(pointer); pointer->impl->destroy(pointer);

View File

@ -7,7 +7,6 @@
#include <wlr/types/wlr_seat.h> #include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "gtk-primary-selection-protocol.h" #include "gtk-primary-selection-protocol.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static const struct gtk_primary_selection_offer_interface offer_impl; static const struct gtk_primary_selection_offer_interface offer_impl;
@ -174,7 +173,6 @@ static void source_resource_handle_destroy(struct wl_resource *resource) {
} }
WLR_API
void wlr_seat_client_send_primary_selection( void wlr_seat_client_send_primary_selection(
struct wlr_seat_client *seat_client) { struct wlr_seat_client *seat_client) {
if (wl_list_empty(&seat_client->primary_selection_devices)) { if (wl_list_empty(&seat_client->primary_selection_devices)) {
@ -218,7 +216,6 @@ static void seat_client_primary_selection_source_destroy(
wlr_signal_emit_safe(&seat->events.primary_selection, seat); wlr_signal_emit_safe(&seat->events.primary_selection, seat);
} }
WLR_API
void wlr_seat_set_primary_selection(struct wlr_seat *seat, void wlr_seat_set_primary_selection(struct wlr_seat *seat,
struct wlr_primary_selection_source *source, uint32_t serial) { struct wlr_primary_selection_source *source, uint32_t serial) {
if (source) { if (source) {
@ -286,14 +283,13 @@ static void device_resource_handle_destroy(struct wl_resource *resource) {
wl_list_remove(wl_resource_get_link(resource)); wl_list_remove(wl_resource_get_link(resource));
} }
WLR_API
void wlr_primary_selection_source_init( void wlr_primary_selection_source_init(
struct wlr_primary_selection_source *source) { struct wlr_primary_selection_source *source) {
wl_array_init(&source->mime_types); wl_array_init(&source->mime_types);
wl_signal_init(&source->events.destroy); wl_signal_init(&source->events.destroy);
} }
WLR_API
void wlr_primary_selection_source_finish( void wlr_primary_selection_source_finish(
struct wlr_primary_selection_source *source) { struct wlr_primary_selection_source *source) {
if (source == NULL) { if (source == NULL) {
@ -386,7 +382,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_primary_selection_device_manager_destroy(manager); wlr_primary_selection_device_manager_destroy(manager);
} }
WLR_API
struct wlr_primary_selection_device_manager * struct wlr_primary_selection_device_manager *
wlr_primary_selection_device_manager_create( wlr_primary_selection_device_manager_create(
struct wl_display *display) { struct wl_display *display) {
@ -409,7 +404,6 @@ struct wlr_primary_selection_device_manager *
return manager; return manager;
} }
WLR_API
void wlr_primary_selection_device_manager_destroy( void wlr_primary_selection_device_manager_destroy(
struct wlr_primary_selection_device_manager *manager) { struct wlr_primary_selection_device_manager *manager) {
if (manager == NULL) { if (manager == NULL) {

View File

@ -4,7 +4,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <wayland-server.h> #include <wayland-server.h>
#include <wlr/types/wlr_region.h> #include <wlr/types/wlr_region.h>
#include "util/defs.h"
static void region_add(struct wl_client *client, struct wl_resource *resource, static void region_add(struct wl_client *client, struct wl_resource *resource,
int32_t x, int32_t y, int32_t width, int32_t height) { int32_t x, int32_t y, int32_t width, int32_t height) {
@ -39,7 +38,6 @@ static void destroy_region(struct wl_resource *resource) {
free(reg); free(reg);
} }
WLR_API
void wlr_region_create(struct wl_client *client, struct wl_resource *res, void wlr_region_create(struct wl_client *client, struct wl_resource *res,
uint32_t id) { uint32_t id) {
pixman_region32_t *region = calloc(1, sizeof(pixman_region32_t)); pixman_region32_t *region = calloc(1, sizeof(pixman_region32_t));
@ -61,7 +59,6 @@ void wlr_region_create(struct wl_client *client, struct wl_resource *res,
destroy_region); destroy_region);
} }
WLR_API
pixman_region32_t *wlr_region_from_resource(struct wl_resource *resource) { pixman_region32_t *wlr_region_from_resource(struct wl_resource *resource) {
assert(wl_resource_instance_of(resource, &wl_region_interface, assert(wl_resource_instance_of(resource, &wl_region_interface,
&region_impl)); &region_impl));

View File

@ -8,7 +8,6 @@
#include <wlr/types/wlr_screenshooter.h> #include <wlr/types/wlr_screenshooter.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "screenshooter-protocol.h" #include "screenshooter-protocol.h"
#include "util/defs.h"
static struct wlr_screenshot *screenshot_from_resource( static struct wlr_screenshot *screenshot_from_resource(
struct wl_resource *resource) { struct wl_resource *resource) {
@ -169,7 +168,6 @@ static void screenshooter_bind(struct wl_client *wl_client, void *data,
screenshooter, NULL); screenshooter, NULL);
} }
WLR_API
void wlr_screenshooter_destroy(struct wlr_screenshooter *screenshooter) { void wlr_screenshooter_destroy(struct wlr_screenshooter *screenshooter) {
if (!screenshooter) { if (!screenshooter) {
return; return;
@ -189,7 +187,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_screenshooter_destroy(screenshooter); wlr_screenshooter_destroy(screenshooter);
} }
WLR_API
struct wlr_screenshooter *wlr_screenshooter_create(struct wl_display *display) { struct wlr_screenshooter *wlr_screenshooter_create(struct wl_display *display) {
struct wlr_screenshooter *screenshooter = struct wlr_screenshooter *screenshooter =
calloc(1, sizeof(struct wlr_screenshooter)); calloc(1, sizeof(struct wlr_screenshooter));

View File

@ -9,7 +9,6 @@
#include <wlr/types/wlr_primary_selection.h> #include <wlr/types/wlr_primary_selection.h>
#include <wlr/types/wlr_seat.h> #include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static void resource_destroy(struct wl_client *client, static void resource_destroy(struct wl_client *client,
@ -357,7 +356,6 @@ static const struct wlr_touch_grab_interface default_touch_grab_impl = {
}; };
WLR_API
void wlr_seat_destroy(struct wlr_seat *seat) { void wlr_seat_destroy(struct wlr_seat *seat) {
if (!seat) { if (!seat) {
return; return;
@ -398,7 +396,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_seat_destroy(seat); wlr_seat_destroy(seat);
} }
WLR_API
struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) { struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
struct wlr_seat *wlr_seat = calloc(1, sizeof(struct wlr_seat)); struct wlr_seat *wlr_seat = calloc(1, sizeof(struct wlr_seat));
if (!wlr_seat) { if (!wlr_seat) {
@ -492,7 +489,6 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
return wlr_seat; return wlr_seat;
} }
WLR_API
struct wlr_seat_client *wlr_seat_client_for_wl_client(struct wlr_seat *wlr_seat, struct wlr_seat_client *wlr_seat_client_for_wl_client(struct wlr_seat *wlr_seat,
struct wl_client *wl_client) { struct wl_client *wl_client) {
assert(wlr_seat); assert(wlr_seat);
@ -505,7 +501,6 @@ struct wlr_seat_client *wlr_seat_client_for_wl_client(struct wlr_seat *wlr_seat,
return NULL; return NULL;
} }
WLR_API
void wlr_seat_set_capabilities(struct wlr_seat *wlr_seat, void wlr_seat_set_capabilities(struct wlr_seat *wlr_seat,
uint32_t capabilities) { uint32_t capabilities) {
wlr_seat->capabilities = capabilities; wlr_seat->capabilities = capabilities;
@ -515,7 +510,6 @@ void wlr_seat_set_capabilities(struct wlr_seat *wlr_seat,
} }
} }
WLR_API
void wlr_seat_set_name(struct wlr_seat *wlr_seat, const char *name) { void wlr_seat_set_name(struct wlr_seat *wlr_seat, const char *name) {
free(wlr_seat->name); free(wlr_seat->name);
wlr_seat->name = strdup(name); wlr_seat->name = strdup(name);
@ -525,7 +519,6 @@ void wlr_seat_set_name(struct wlr_seat *wlr_seat, const char *name) {
} }
} }
WLR_API
bool wlr_seat_pointer_surface_has_focus(struct wlr_seat *wlr_seat, bool wlr_seat_pointer_surface_has_focus(struct wlr_seat *wlr_seat,
struct wlr_surface *surface) { struct wlr_surface *surface) {
return surface == wlr_seat->pointer_state.focused_surface; return surface == wlr_seat->pointer_state.focused_surface;
@ -549,7 +542,6 @@ static void pointer_resource_destroy_notify(struct wl_listener *listener,
wlr_seat_pointer_clear_focus(state->seat); wlr_seat_pointer_clear_focus(state->seat);
} }
WLR_API
void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat, void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat,
struct wlr_surface *surface, double sx, double sy) { struct wlr_surface *surface, double sx, double sy) {
assert(wlr_seat); assert(wlr_seat);
@ -613,12 +605,10 @@ void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat,
// TODO: send focus change event // TODO: send focus change event
} }
WLR_API
void wlr_seat_pointer_clear_focus(struct wlr_seat *wlr_seat) { void wlr_seat_pointer_clear_focus(struct wlr_seat *wlr_seat) {
wlr_seat_pointer_enter(wlr_seat, NULL, 0, 0); wlr_seat_pointer_enter(wlr_seat, NULL, 0, 0);
} }
WLR_API
void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time, void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
double sx, double sy) { double sx, double sy) {
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client; struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
@ -634,7 +624,6 @@ void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
} }
} }
WLR_API
uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time, uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time,
uint32_t button, uint32_t state) { uint32_t button, uint32_t state) {
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client; struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
@ -651,7 +640,6 @@ uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time,
return serial; return serial;
} }
WLR_API
void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time, void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
enum wlr_axis_orientation orientation, double value) { enum wlr_axis_orientation orientation, double value) {
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client; struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
@ -672,7 +660,6 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
} }
} }
WLR_API
void wlr_seat_pointer_start_grab(struct wlr_seat *wlr_seat, void wlr_seat_pointer_start_grab(struct wlr_seat *wlr_seat,
struct wlr_seat_pointer_grab *grab) { struct wlr_seat_pointer_grab *grab) {
assert(wlr_seat); assert(wlr_seat);
@ -683,7 +670,6 @@ void wlr_seat_pointer_start_grab(struct wlr_seat *wlr_seat,
wlr_signal_emit_safe(&wlr_seat->events.pointer_grab_begin, grab); wlr_signal_emit_safe(&wlr_seat->events.pointer_grab_begin, grab);
} }
WLR_API
void wlr_seat_pointer_end_grab(struct wlr_seat *wlr_seat) { void wlr_seat_pointer_end_grab(struct wlr_seat *wlr_seat) {
struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab; struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab;
if (grab != wlr_seat->pointer_state.default_grab) { if (grab != wlr_seat->pointer_state.default_grab) {
@ -695,14 +681,12 @@ void wlr_seat_pointer_end_grab(struct wlr_seat *wlr_seat) {
} }
} }
WLR_API
void wlr_seat_pointer_notify_enter(struct wlr_seat *wlr_seat, void wlr_seat_pointer_notify_enter(struct wlr_seat *wlr_seat,
struct wlr_surface *surface, double sx, double sy) { struct wlr_surface *surface, double sx, double sy) {
struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab; struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab;
grab->interface->enter(grab, surface, sx, sy); grab->interface->enter(grab, surface, sx, sy);
} }
WLR_API
void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time, void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time,
double sx, double sy) { double sx, double sy) {
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event); clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
@ -710,7 +694,6 @@ void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time,
grab->interface->motion(grab, time, sx, sy); grab->interface->motion(grab, time, sx, sy);
} }
WLR_API
uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat, uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
uint32_t time, uint32_t button, uint32_t state) { uint32_t time, uint32_t button, uint32_t state) {
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event); clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
@ -734,7 +717,6 @@ uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
return serial; return serial;
} }
WLR_API
void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time, void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time,
enum wlr_axis_orientation orientation, double value) { enum wlr_axis_orientation orientation, double value) {
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event); clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
@ -742,12 +724,10 @@ void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time,
grab->interface->axis(grab, time, orientation, value); grab->interface->axis(grab, time, orientation, value);
} }
WLR_API
bool wlr_seat_pointer_has_grab(struct wlr_seat *seat) { bool wlr_seat_pointer_has_grab(struct wlr_seat *seat) {
return seat->pointer_state.grab->interface != &default_pointer_grab_impl; return seat->pointer_state.grab->interface != &default_pointer_grab_impl;
} }
WLR_API
void wlr_seat_keyboard_send_key(struct wlr_seat *wlr_seat, uint32_t time, void wlr_seat_keyboard_send_key(struct wlr_seat *wlr_seat, uint32_t time,
uint32_t key, uint32_t state) { uint32_t key, uint32_t state) {
struct wlr_seat_client *client = wlr_seat->keyboard_state.focused_client; struct wlr_seat_client *client = wlr_seat->keyboard_state.focused_client;
@ -790,7 +770,6 @@ static void handle_keyboard_destroy(struct wl_listener *listener, void *data) {
state->keyboard = NULL; state->keyboard = NULL;
} }
WLR_API
void wlr_seat_set_keyboard(struct wlr_seat *seat, void wlr_seat_set_keyboard(struct wlr_seat *seat,
struct wlr_input_device *device) { struct wlr_input_device *device) {
// TODO call this on device key event before the event reaches the // TODO call this on device key event before the event reaches the
@ -835,12 +814,10 @@ void wlr_seat_set_keyboard(struct wlr_seat *seat,
} }
} }
WLR_API
struct wlr_keyboard *wlr_seat_get_keyboard(struct wlr_seat *seat) { struct wlr_keyboard *wlr_seat_get_keyboard(struct wlr_seat *seat) {
return seat->keyboard_state.keyboard; return seat->keyboard_state.keyboard;
} }
WLR_API
void wlr_seat_keyboard_start_grab(struct wlr_seat *wlr_seat, void wlr_seat_keyboard_start_grab(struct wlr_seat *wlr_seat,
struct wlr_seat_keyboard_grab *grab) { struct wlr_seat_keyboard_grab *grab) {
grab->seat = wlr_seat; grab->seat = wlr_seat;
@ -849,7 +826,6 @@ void wlr_seat_keyboard_start_grab(struct wlr_seat *wlr_seat,
wlr_signal_emit_safe(&wlr_seat->events.keyboard_grab_begin, grab); wlr_signal_emit_safe(&wlr_seat->events.keyboard_grab_begin, grab);
} }
WLR_API
void wlr_seat_keyboard_end_grab(struct wlr_seat *wlr_seat) { void wlr_seat_keyboard_end_grab(struct wlr_seat *wlr_seat) {
struct wlr_seat_keyboard_grab *grab = wlr_seat->keyboard_state.grab; struct wlr_seat_keyboard_grab *grab = wlr_seat->keyboard_state.grab;
@ -880,7 +856,6 @@ static void keyboard_resource_destroy_notify(struct wl_listener *listener,
wlr_seat_keyboard_clear_focus(state->seat); wlr_seat_keyboard_clear_focus(state->seat);
} }
WLR_API
void wlr_seat_keyboard_send_modifiers(struct wlr_seat *seat, void wlr_seat_keyboard_send_modifiers(struct wlr_seat *seat,
struct wlr_keyboard_modifiers *modifiers) { struct wlr_keyboard_modifiers *modifiers) {
struct wlr_seat_client *client = seat->keyboard_state.focused_client; struct wlr_seat_client *client = seat->keyboard_state.focused_client;
@ -901,7 +876,6 @@ void wlr_seat_keyboard_send_modifiers(struct wlr_seat *seat,
} }
} }
WLR_API
void wlr_seat_keyboard_enter(struct wlr_seat *seat, void wlr_seat_keyboard_enter(struct wlr_seat *seat,
struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes, struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes,
struct wlr_keyboard_modifiers *modifiers) { struct wlr_keyboard_modifiers *modifiers) {
@ -981,7 +955,6 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat,
} }
} }
WLR_API
void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat, void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat,
struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes, struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes,
struct wlr_keyboard_modifiers *modifiers) { struct wlr_keyboard_modifiers *modifiers) {
@ -989,18 +962,15 @@ void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat,
grab->interface->enter(grab, surface, keycodes, num_keycodes, modifiers); grab->interface->enter(grab, surface, keycodes, num_keycodes, modifiers);
} }
WLR_API
void wlr_seat_keyboard_clear_focus(struct wlr_seat *seat) { void wlr_seat_keyboard_clear_focus(struct wlr_seat *seat) {
// TODO respect grabs here? // TODO respect grabs here?
wlr_seat_keyboard_enter(seat, NULL, NULL, 0, NULL); wlr_seat_keyboard_enter(seat, NULL, NULL, 0, NULL);
} }
WLR_API
bool wlr_seat_keyboard_has_grab(struct wlr_seat *seat) { bool wlr_seat_keyboard_has_grab(struct wlr_seat *seat) {
return seat->keyboard_state.grab->interface != &default_keyboard_grab_impl; return seat->keyboard_state.grab->interface != &default_keyboard_grab_impl;
} }
WLR_API
void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat, void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat,
struct wlr_keyboard_modifiers *modifiers) { struct wlr_keyboard_modifiers *modifiers) {
clock_gettime(CLOCK_MONOTONIC, &seat->last_event); clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
@ -1008,7 +978,6 @@ void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat,
grab->interface->modifiers(grab, modifiers); grab->interface->modifiers(grab, modifiers);
} }
WLR_API
void wlr_seat_keyboard_notify_key(struct wlr_seat *seat, uint32_t time, void wlr_seat_keyboard_notify_key(struct wlr_seat *seat, uint32_t time,
uint32_t key, uint32_t state) { uint32_t key, uint32_t state) {
clock_gettime(CLOCK_MONOTONIC, &seat->last_event); clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
@ -1016,7 +985,6 @@ void wlr_seat_keyboard_notify_key(struct wlr_seat *seat, uint32_t time,
grab->interface->key(grab, time, key, state); grab->interface->key(grab, time, key, state);
} }
WLR_API
void wlr_seat_touch_start_grab(struct wlr_seat *wlr_seat, void wlr_seat_touch_start_grab(struct wlr_seat *wlr_seat,
struct wlr_seat_touch_grab *grab) { struct wlr_seat_touch_grab *grab) {
grab->seat = wlr_seat; grab->seat = wlr_seat;
@ -1025,7 +993,6 @@ void wlr_seat_touch_start_grab(struct wlr_seat *wlr_seat,
wlr_signal_emit_safe(&wlr_seat->events.touch_grab_begin, grab); wlr_signal_emit_safe(&wlr_seat->events.touch_grab_begin, grab);
} }
WLR_API
void wlr_seat_touch_end_grab(struct wlr_seat *wlr_seat) { void wlr_seat_touch_end_grab(struct wlr_seat *wlr_seat) {
struct wlr_seat_touch_grab *grab = wlr_seat->touch_state.grab; struct wlr_seat_touch_grab *grab = wlr_seat->touch_state.grab;
@ -1105,7 +1072,6 @@ static struct wlr_touch_point *touch_point_create(
return point; return point;
} }
WLR_API
struct wlr_touch_point *wlr_seat_touch_get_point( struct wlr_touch_point *wlr_seat_touch_get_point(
struct wlr_seat *seat, int32_t touch_id) { struct wlr_seat *seat, int32_t touch_id) {
struct wlr_touch_point *point = NULL; struct wlr_touch_point *point = NULL;
@ -1118,7 +1084,6 @@ struct wlr_touch_point *wlr_seat_touch_get_point(
return NULL; return NULL;
} }
WLR_API
uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat, uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat,
struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx, struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx,
double sy) { double sy) {
@ -1141,7 +1106,6 @@ uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat,
return serial; return serial;
} }
WLR_API
void wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time, void wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time,
int32_t touch_id) { int32_t touch_id) {
clock_gettime(CLOCK_MONOTONIC, &seat->last_event); clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
@ -1157,7 +1121,6 @@ void wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time,
touch_point_destroy(point); touch_point_destroy(point);
} }
WLR_API
void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time, void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time,
int32_t touch_id, double sx, double sy) { int32_t touch_id, double sx, double sy) {
clock_gettime(CLOCK_MONOTONIC, &seat->last_event); clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
@ -1205,7 +1168,6 @@ static void touch_point_set_focus(struct wlr_touch_point *point,
} }
} }
WLR_API
void wlr_seat_touch_point_focus(struct wlr_seat *seat, void wlr_seat_touch_point_focus(struct wlr_seat *seat,
struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx, struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx,
double sy) { double sy) {
@ -1224,7 +1186,6 @@ void wlr_seat_touch_point_focus(struct wlr_seat *seat,
} }
} }
WLR_API
void wlr_seat_touch_point_clear_focus(struct wlr_seat *seat, uint32_t time, void wlr_seat_touch_point_clear_focus(struct wlr_seat *seat, uint32_t time,
int32_t touch_id) { int32_t touch_id) {
struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id); struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id);
@ -1236,7 +1197,6 @@ void wlr_seat_touch_point_clear_focus(struct wlr_seat *seat, uint32_t time,
touch_point_clear_focus(point); touch_point_clear_focus(point);
} }
WLR_API
uint32_t wlr_seat_touch_send_down(struct wlr_seat *seat, uint32_t wlr_seat_touch_send_down(struct wlr_seat *seat,
struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx, struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx,
double sy) { double sy) {
@ -1257,7 +1217,6 @@ uint32_t wlr_seat_touch_send_down(struct wlr_seat *seat,
return serial; return serial;
} }
WLR_API
void wlr_seat_touch_send_up(struct wlr_seat *seat, uint32_t time, int32_t touch_id) { void wlr_seat_touch_send_up(struct wlr_seat *seat, uint32_t time, int32_t touch_id) {
struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id); struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id);
if (!point) { if (!point) {
@ -1273,7 +1232,6 @@ void wlr_seat_touch_send_up(struct wlr_seat *seat, uint32_t time, int32_t touch_
} }
} }
WLR_API
void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time, int32_t touch_id, void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time, int32_t touch_id,
double sx, double sy) { double sx, double sy) {
struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id); struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id);
@ -1290,23 +1248,19 @@ void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time, int32_t to
} }
} }
WLR_API
int wlr_seat_touch_num_points(struct wlr_seat *seat) { int wlr_seat_touch_num_points(struct wlr_seat *seat) {
return wl_list_length(&seat->touch_state.touch_points); return wl_list_length(&seat->touch_state.touch_points);
} }
WLR_API
bool wlr_seat_touch_has_grab(struct wlr_seat *seat) { bool wlr_seat_touch_has_grab(struct wlr_seat *seat) {
return seat->touch_state.grab->interface != &default_touch_grab_impl; return seat->touch_state.grab->interface != &default_touch_grab_impl;
} }
WLR_API
bool wlr_seat_validate_grab_serial(struct wlr_seat *seat, uint32_t serial) { bool wlr_seat_validate_grab_serial(struct wlr_seat *seat, uint32_t serial) {
return serial == seat->pointer_state.grab_serial || return serial == seat->pointer_state.grab_serial ||
serial == seat->touch_state.grab_serial; serial == seat->touch_state.grab_serial;
} }
WLR_API
struct wlr_seat_client *wlr_seat_client_from_resource( struct wlr_seat_client *wlr_seat_client_from_resource(
struct wl_resource *resource) { struct wl_resource *resource) {
assert(wl_resource_instance_of(resource, &wl_seat_interface, assert(wl_resource_instance_of(resource, &wl_seat_interface,

View File

@ -4,7 +4,6 @@
#include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "server-decoration-protocol.h" #include "server-decoration-protocol.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static const struct org_kde_kwin_server_decoration_interface static const struct org_kde_kwin_server_decoration_interface
@ -128,7 +127,6 @@ static const struct org_kde_kwin_server_decoration_manager_interface
.create = server_decoration_manager_handle_create, .create = server_decoration_manager_handle_create,
}; };
WLR_API
void wlr_server_decoration_manager_set_default_mode( void wlr_server_decoration_manager_set_default_mode(
struct wlr_server_decoration_manager *manager, uint32_t default_mode) { struct wlr_server_decoration_manager *manager, uint32_t default_mode) {
manager->default_mode = default_mode; manager->default_mode = default_mode;
@ -164,7 +162,6 @@ static void server_decoration_manager_bind(struct wl_client *client, void *data,
manager->default_mode); manager->default_mode);
} }
WLR_API
void wlr_server_decoration_manager_destroy( void wlr_server_decoration_manager_destroy(
struct wlr_server_decoration_manager *manager) { struct wlr_server_decoration_manager *manager) {
if (manager == NULL) { if (manager == NULL) {
@ -190,7 +187,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_server_decoration_manager_destroy(manager); wlr_server_decoration_manager_destroy(manager);
} }
WLR_API
struct wlr_server_decoration_manager *wlr_server_decoration_manager_create( struct wlr_server_decoration_manager *wlr_server_decoration_manager_create(
struct wl_display *display) { struct wl_display *display) {
struct wlr_server_decoration_manager *manager = struct wlr_server_decoration_manager *manager =

View File

@ -8,7 +8,6 @@
#include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_surface.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include <wlr/util/region.h> #include <wlr/util/region.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static void wlr_surface_state_reset_buffer(struct wlr_surface_state *state) { static void wlr_surface_state_reset_buffer(struct wlr_surface_state *state) {
@ -531,7 +530,6 @@ const struct wl_surface_interface surface_interface = {
.damage_buffer = surface_damage_buffer .damage_buffer = surface_damage_buffer
}; };
WLR_API
struct wlr_surface *wlr_surface_from_resource(struct wl_resource *resource) { struct wlr_surface *wlr_surface_from_resource(struct wl_resource *resource) {
assert(wl_resource_instance_of(resource, &wl_surface_interface, assert(wl_resource_instance_of(resource, &wl_surface_interface,
&surface_interface)); &surface_interface));
@ -607,7 +605,6 @@ static void destroy_surface(struct wl_resource *resource) {
free(surface); free(surface);
} }
WLR_API
struct wlr_surface *wlr_surface_create(struct wl_resource *res, struct wlr_surface *wlr_surface_create(struct wl_resource *res,
struct wlr_renderer *renderer) { struct wlr_renderer *renderer) {
struct wlr_surface *surface = calloc(1, sizeof(struct wlr_surface)); struct wlr_surface *surface = calloc(1, sizeof(struct wlr_surface));
@ -633,7 +630,6 @@ struct wlr_surface *wlr_surface_create(struct wl_resource *res,
return surface; return surface;
} }
WLR_API
void wlr_surface_get_matrix(struct wlr_surface *surface, void wlr_surface_get_matrix(struct wlr_surface *surface,
float (*matrix)[16], float (*matrix)[16],
const float (*projection)[16], const float (*projection)[16],
@ -650,12 +646,10 @@ void wlr_surface_get_matrix(struct wlr_surface *surface,
wlr_matrix_mul(projection, matrix, matrix); wlr_matrix_mul(projection, matrix, matrix);
} }
WLR_API
bool wlr_surface_has_buffer(struct wlr_surface *surface) { bool wlr_surface_has_buffer(struct wlr_surface *surface) {
return surface->texture && surface->texture->valid; return surface->texture && surface->texture->valid;
} }
WLR_API
int wlr_surface_set_role(struct wlr_surface *surface, const char *role, int wlr_surface_set_role(struct wlr_surface *surface, const char *role,
struct wl_resource *error_resource, uint32_t error_code) { struct wl_resource *error_resource, uint32_t error_code) {
assert(role); assert(role);
@ -814,7 +808,6 @@ static void subsurface_handle_parent_destroy(struct wl_listener *listener,
subsurface->parent = NULL; subsurface->parent = NULL;
} }
WLR_API
void wlr_surface_make_subsurface(struct wlr_surface *surface, void wlr_surface_make_subsurface(struct wlr_surface *surface,
struct wlr_surface *parent, uint32_t id) { struct wlr_surface *parent, uint32_t id) {
struct wl_client *client = wl_resource_get_client(surface->resource); struct wl_client *client = wl_resource_get_client(surface->resource);
@ -864,7 +857,7 @@ void wlr_surface_make_subsurface(struct wlr_surface *surface,
wlr_signal_emit_safe(&parent->events.new_subsurface, subsurface); wlr_signal_emit_safe(&parent->events.new_subsurface, subsurface);
} }
WLR_API
struct wlr_surface *wlr_surface_get_main_surface(struct wlr_surface *surface) { struct wlr_surface *wlr_surface_get_main_surface(struct wlr_surface *surface) {
struct wlr_subsurface *sub; struct wlr_subsurface *sub;
@ -875,7 +868,6 @@ struct wlr_surface *wlr_surface_get_main_surface(struct wlr_surface *surface) {
return surface; return surface;
} }
WLR_API
struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface, struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface,
double sx, double sy, double *sub_x, double *sub_y) { double sx, double sy, double *sub_x, double *sub_y) {
struct wlr_subsurface *subsurface; struct wlr_subsurface *subsurface;
@ -908,7 +900,6 @@ struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface,
return NULL; return NULL;
} }
WLR_API
void wlr_surface_send_enter(struct wlr_surface *surface, void wlr_surface_send_enter(struct wlr_surface *surface,
struct wlr_output *output) { struct wlr_output *output) {
struct wl_client *client = wl_resource_get_client(surface->resource); struct wl_client *client = wl_resource_get_client(surface->resource);
@ -921,7 +912,6 @@ void wlr_surface_send_enter(struct wlr_surface *surface,
} }
} }
WLR_API
void wlr_surface_send_leave(struct wlr_surface *surface, void wlr_surface_send_leave(struct wlr_surface *surface,
struct wlr_output *output) { struct wlr_output *output) {
struct wl_client *client = wl_resource_get_client(surface->resource); struct wl_client *client = wl_resource_get_client(surface->resource);
@ -938,7 +928,6 @@ static inline int64_t timespec_to_msec(const struct timespec *a) {
return (int64_t)a->tv_sec * 1000 + a->tv_nsec / 1000000; return (int64_t)a->tv_sec * 1000 + a->tv_nsec / 1000000;
} }
WLR_API
void wlr_surface_send_frame_done(struct wlr_surface *surface, void wlr_surface_send_frame_done(struct wlr_surface *surface,
const struct timespec *when) { const struct timespec *when) {
struct wlr_frame_callback *cb, *cnext; struct wlr_frame_callback *cb, *cnext;
@ -949,7 +938,6 @@ void wlr_surface_send_frame_done(struct wlr_surface *surface,
} }
} }
WLR_API
void wlr_surface_set_role_committed(struct wlr_surface *surface, void wlr_surface_set_role_committed(struct wlr_surface *surface,
void (*role_committed)(struct wlr_surface *surface, void *role_data), void (*role_committed)(struct wlr_surface *surface, void *role_data),
void *role_data) { void *role_data) {

View File

@ -3,9 +3,7 @@
#include <wayland-server.h> #include <wayland-server.h>
#include <wlr/interfaces/wlr_tablet_pad.h> #include <wlr/interfaces/wlr_tablet_pad.h>
#include <wlr/types/wlr_tablet_pad.h> #include <wlr/types/wlr_tablet_pad.h>
#include "util/defs.h"
WLR_API
void wlr_tablet_pad_init(struct wlr_tablet_pad *pad, void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
struct wlr_tablet_pad_impl *impl) { struct wlr_tablet_pad_impl *impl) {
pad->impl = impl; pad->impl = impl;
@ -14,7 +12,6 @@ void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
wl_signal_init(&pad->events.strip); wl_signal_init(&pad->events.strip);
} }
WLR_API
void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) { void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) {
if (pad && pad->impl && pad->impl->destroy) { if (pad && pad->impl && pad->impl->destroy) {
pad->impl->destroy(pad); pad->impl->destroy(pad);

View File

@ -3,9 +3,7 @@
#include <wayland-server.h> #include <wayland-server.h>
#include <wlr/interfaces/wlr_tablet_tool.h> #include <wlr/interfaces/wlr_tablet_tool.h>
#include <wlr/types/wlr_tablet_tool.h> #include <wlr/types/wlr_tablet_tool.h>
#include "util/defs.h"
WLR_API
void wlr_tablet_tool_init(struct wlr_tablet_tool *tool, void wlr_tablet_tool_init(struct wlr_tablet_tool *tool,
struct wlr_tablet_tool_impl *impl) { struct wlr_tablet_tool_impl *impl) {
tool->impl = impl; tool->impl = impl;
@ -15,7 +13,6 @@ void wlr_tablet_tool_init(struct wlr_tablet_tool *tool,
wl_signal_init(&tool->events.button); wl_signal_init(&tool->events.button);
} }
WLR_API
void wlr_tablet_tool_destroy(struct wlr_tablet_tool *tool) { void wlr_tablet_tool_destroy(struct wlr_tablet_tool *tool) {
if (!tool) { if (!tool) {
return; return;

View File

@ -3,9 +3,7 @@
#include <wayland-server.h> #include <wayland-server.h>
#include <wlr/interfaces/wlr_touch.h> #include <wlr/interfaces/wlr_touch.h>
#include <wlr/types/wlr_touch.h> #include <wlr/types/wlr_touch.h>
#include "util/defs.h"
WLR_API
void wlr_touch_init(struct wlr_touch *touch, void wlr_touch_init(struct wlr_touch *touch,
struct wlr_touch_impl *impl) { struct wlr_touch_impl *impl) {
touch->impl = impl; touch->impl = impl;
@ -15,7 +13,6 @@ void wlr_touch_init(struct wlr_touch *touch,
wl_signal_init(&touch->events.cancel); wl_signal_init(&touch->events.cancel);
} }
WLR_API
void wlr_touch_destroy(struct wlr_touch *touch) { void wlr_touch_destroy(struct wlr_touch *touch) {
if (touch && touch->impl && touch->impl->destroy) { if (touch && touch->impl && touch->impl->destroy) {
touch->impl->destroy(touch); touch->impl->destroy(touch);

View File

@ -8,7 +8,6 @@
#include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_wl_shell.h> #include <wlr/types/wlr_wl_shell.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
static const char *wlr_wl_shell_surface_role = "wl-shell-surface"; static const char *wlr_wl_shell_surface_role = "wl-shell-surface";
@ -592,7 +591,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_wl_shell_destroy(wl_shell); wlr_wl_shell_destroy(wl_shell);
} }
WLR_API
struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display) { struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display) {
struct wlr_wl_shell *wl_shell = calloc(1, sizeof(struct wlr_wl_shell)); struct wlr_wl_shell *wl_shell = calloc(1, sizeof(struct wlr_wl_shell));
if (!wl_shell) { if (!wl_shell) {
@ -617,7 +615,6 @@ struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display) {
return wl_shell; return wl_shell;
} }
WLR_API
void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell) { void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell) {
if (!wlr_wl_shell) { if (!wlr_wl_shell) {
return; return;
@ -633,7 +630,6 @@ void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell) {
free(wlr_wl_shell); free(wlr_wl_shell);
} }
WLR_API
void wlr_wl_shell_surface_ping(struct wlr_wl_shell_surface *surface) { void wlr_wl_shell_surface_ping(struct wlr_wl_shell_surface *surface) {
if (surface->ping_serial != 0) { if (surface->ping_serial != 0) {
// already pinged // already pinged
@ -647,13 +643,11 @@ void wlr_wl_shell_surface_ping(struct wlr_wl_shell_surface *surface) {
wl_shell_surface_send_ping(surface->resource, surface->ping_serial); wl_shell_surface_send_ping(surface->resource, surface->ping_serial);
} }
WLR_API
void wlr_wl_shell_surface_configure(struct wlr_wl_shell_surface *surface, void wlr_wl_shell_surface_configure(struct wlr_wl_shell_surface *surface,
uint32_t edges, int32_t width, int32_t height) { uint32_t edges, int32_t width, int32_t height) {
wl_shell_surface_send_configure(surface->resource, edges, width, height); wl_shell_surface_send_configure(surface->resource, edges, width, height);
} }
WLR_API
struct wlr_wl_shell_surface *wlr_wl_shell_surface_popup_at( struct wlr_wl_shell_surface *wlr_wl_shell_surface_popup_at(
struct wlr_wl_shell_surface *surface, double sx, double sy, struct wlr_wl_shell_surface *surface, double sx, double sy,
double *popup_sx, double *popup_sy) { double *popup_sx, double *popup_sy) {

View File

@ -2,9 +2,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <wlr/types/wlr_xcursor_manager.h> #include <wlr/types/wlr_xcursor_manager.h>
#include "util/defs.h"
WLR_API
struct wlr_xcursor_manager *wlr_xcursor_manager_create(const char *name, struct wlr_xcursor_manager *wlr_xcursor_manager_create(const char *name,
uint32_t size) { uint32_t size) {
struct wlr_xcursor_manager *manager = struct wlr_xcursor_manager *manager =
@ -20,7 +18,6 @@ struct wlr_xcursor_manager *wlr_xcursor_manager_create(const char *name,
return manager; return manager;
} }
WLR_API
void wlr_xcursor_manager_destroy(struct wlr_xcursor_manager *manager) { void wlr_xcursor_manager_destroy(struct wlr_xcursor_manager *manager) {
if (manager == NULL) { if (manager == NULL) {
return; return;
@ -35,7 +32,6 @@ void wlr_xcursor_manager_destroy(struct wlr_xcursor_manager *manager) {
free(manager); free(manager);
} }
WLR_API
int wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager, int wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager,
float scale) { float scale) {
struct wlr_xcursor_manager_theme *theme; struct wlr_xcursor_manager_theme *theme;
@ -59,7 +55,6 @@ int wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager,
return 0; return 0;
} }
WLR_API
struct wlr_xcursor *wlr_xcursor_manager_get_xcursor( struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(
struct wlr_xcursor_manager *manager, const char *name, float scale) { struct wlr_xcursor_manager *manager, const char *name, float scale) {
struct wlr_xcursor_manager_theme *theme; struct wlr_xcursor_manager_theme *theme;
@ -71,7 +66,6 @@ struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(
return NULL; return NULL;
} }
WLR_API
void wlr_xcursor_manager_set_cursor_image(struct wlr_xcursor_manager *manager, void wlr_xcursor_manager_set_cursor_image(struct wlr_xcursor_manager *manager,
const char *name, struct wlr_cursor *cursor) { const char *name, struct wlr_cursor *cursor) {
struct wlr_xcursor_manager_theme *theme; struct wlr_xcursor_manager_theme *theme;

View File

@ -10,7 +10,6 @@
#include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_xdg_shell.h> #include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
#include "xdg-shell-protocol.h" #include "xdg-shell-protocol.h"
@ -1384,7 +1383,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_xdg_shell_destroy(xdg_shell); wlr_xdg_shell_destroy(xdg_shell);
} }
WLR_API
struct wlr_xdg_shell *wlr_xdg_shell_create(struct wl_display *display) { struct wlr_xdg_shell *wlr_xdg_shell_create(struct wl_display *display) {
struct wlr_xdg_shell *xdg_shell = struct wlr_xdg_shell *xdg_shell =
calloc(1, sizeof(struct wlr_xdg_shell)); calloc(1, sizeof(struct wlr_xdg_shell));
@ -1413,7 +1411,6 @@ struct wlr_xdg_shell *wlr_xdg_shell_create(struct wl_display *display) {
return xdg_shell; return xdg_shell;
} }
WLR_API
void wlr_xdg_shell_destroy(struct wlr_xdg_shell *xdg_shell) { void wlr_xdg_shell_destroy(struct wlr_xdg_shell *xdg_shell) {
if (!xdg_shell) { if (!xdg_shell) {
return; return;
@ -1423,7 +1420,6 @@ void wlr_xdg_shell_destroy(struct wlr_xdg_shell *xdg_shell) {
free(xdg_shell); free(xdg_shell);
} }
WLR_API
void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) { void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
if (surface->client->ping_serial != 0) { if (surface->client->ping_serial != 0) {
// already pinged // already pinged
@ -1438,7 +1434,6 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
surface->client->ping_serial); surface->client->ping_serial);
} }
WLR_API
uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_surface *surface, uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_surface *surface,
uint32_t width, uint32_t height) { uint32_t width, uint32_t height) {
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
@ -1448,7 +1443,6 @@ uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_surface *surface,
return wlr_xdg_surface_schedule_configure(surface); return wlr_xdg_surface_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_set_activated(struct wlr_xdg_surface *surface, uint32_t wlr_xdg_toplevel_set_activated(struct wlr_xdg_surface *surface,
bool activated) { bool activated) {
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
@ -1457,7 +1451,6 @@ uint32_t wlr_xdg_toplevel_set_activated(struct wlr_xdg_surface *surface,
return wlr_xdg_surface_schedule_configure(surface); return wlr_xdg_surface_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_surface *surface, uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_surface *surface,
bool maximized) { bool maximized) {
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
@ -1466,7 +1459,6 @@ uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_surface *surface,
return wlr_xdg_surface_schedule_configure(surface); return wlr_xdg_surface_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_set_fullscreen(struct wlr_xdg_surface *surface, uint32_t wlr_xdg_toplevel_set_fullscreen(struct wlr_xdg_surface *surface,
bool fullscreen) { bool fullscreen) {
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
@ -1475,7 +1467,6 @@ uint32_t wlr_xdg_toplevel_set_fullscreen(struct wlr_xdg_surface *surface,
return wlr_xdg_surface_schedule_configure(surface); return wlr_xdg_surface_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_surface *surface, uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_surface *surface,
bool resizing) { bool resizing) {
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
@ -1484,13 +1475,11 @@ uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_surface *surface,
return wlr_xdg_surface_schedule_configure(surface); return wlr_xdg_surface_schedule_configure(surface);
} }
WLR_API
void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) { void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) {
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
xdg_toplevel_send_close(surface->toplevel_state->resource); xdg_toplevel_send_close(surface->toplevel_state->resource);
} }
WLR_API
void wlr_xdg_surface_popup_get_position(struct wlr_xdg_surface *surface, void wlr_xdg_surface_popup_get_position(struct wlr_xdg_surface *surface,
double *popup_sx, double *popup_sy) { double *popup_sx, double *popup_sy) {
assert(surface->role == WLR_XDG_SURFACE_ROLE_POPUP); assert(surface->role == WLR_XDG_SURFACE_ROLE_POPUP);
@ -1501,7 +1490,6 @@ void wlr_xdg_surface_popup_get_position(struct wlr_xdg_surface *surface,
surface->geometry->y; surface->geometry->y;
} }
WLR_API
struct wlr_xdg_surface *wlr_xdg_surface_popup_at( struct wlr_xdg_surface *wlr_xdg_surface_popup_at(
struct wlr_xdg_surface *surface, double sx, double sy, struct wlr_xdg_surface *surface, double sx, double sy,
double *popup_sx, double *popup_sy) { double *popup_sx, double *popup_sy) {

View File

@ -10,7 +10,6 @@
#include <wlr/types/wlr_surface.h> #include <wlr/types/wlr_surface.h>
#include <wlr/types/wlr_xdg_shell_v6.h> #include <wlr/types/wlr_xdg_shell_v6.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
#include "xdg-shell-unstable-v6-protocol.h" #include "xdg-shell-unstable-v6-protocol.h"
@ -1354,7 +1353,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
wlr_xdg_shell_v6_destroy(xdg_shell); wlr_xdg_shell_v6_destroy(xdg_shell);
} }
WLR_API
struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) { struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) {
struct wlr_xdg_shell_v6 *xdg_shell = struct wlr_xdg_shell_v6 *xdg_shell =
calloc(1, sizeof(struct wlr_xdg_shell_v6)); calloc(1, sizeof(struct wlr_xdg_shell_v6));
@ -1383,7 +1381,6 @@ struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) {
return xdg_shell; return xdg_shell;
} }
WLR_API
void wlr_xdg_shell_v6_destroy(struct wlr_xdg_shell_v6 *xdg_shell) { void wlr_xdg_shell_v6_destroy(struct wlr_xdg_shell_v6 *xdg_shell) {
if (!xdg_shell) { if (!xdg_shell) {
return; return;
@ -1393,7 +1390,6 @@ void wlr_xdg_shell_v6_destroy(struct wlr_xdg_shell_v6 *xdg_shell) {
free(xdg_shell); free(xdg_shell);
} }
WLR_API
void wlr_xdg_surface_v6_ping(struct wlr_xdg_surface_v6 *surface) { void wlr_xdg_surface_v6_ping(struct wlr_xdg_surface_v6 *surface) {
if (surface->client->ping_serial != 0) { if (surface->client->ping_serial != 0) {
// already pinged // already pinged
@ -1408,7 +1404,6 @@ void wlr_xdg_surface_v6_ping(struct wlr_xdg_surface_v6 *surface) {
surface->client->ping_serial); surface->client->ping_serial);
} }
WLR_API
uint32_t wlr_xdg_toplevel_v6_set_size(struct wlr_xdg_surface_v6 *surface, uint32_t wlr_xdg_toplevel_v6_set_size(struct wlr_xdg_surface_v6 *surface,
uint32_t width, uint32_t height) { uint32_t width, uint32_t height) {
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
@ -1418,7 +1413,6 @@ uint32_t wlr_xdg_toplevel_v6_set_size(struct wlr_xdg_surface_v6 *surface,
return wlr_xdg_surface_v6_schedule_configure(surface); return wlr_xdg_surface_v6_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_v6_set_activated(struct wlr_xdg_surface_v6 *surface, uint32_t wlr_xdg_toplevel_v6_set_activated(struct wlr_xdg_surface_v6 *surface,
bool activated) { bool activated) {
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
@ -1427,7 +1421,6 @@ uint32_t wlr_xdg_toplevel_v6_set_activated(struct wlr_xdg_surface_v6 *surface,
return wlr_xdg_surface_v6_schedule_configure(surface); return wlr_xdg_surface_v6_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_v6_set_maximized(struct wlr_xdg_surface_v6 *surface, uint32_t wlr_xdg_toplevel_v6_set_maximized(struct wlr_xdg_surface_v6 *surface,
bool maximized) { bool maximized) {
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
@ -1436,7 +1429,6 @@ uint32_t wlr_xdg_toplevel_v6_set_maximized(struct wlr_xdg_surface_v6 *surface,
return wlr_xdg_surface_v6_schedule_configure(surface); return wlr_xdg_surface_v6_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_v6_set_fullscreen(struct wlr_xdg_surface_v6 *surface, uint32_t wlr_xdg_toplevel_v6_set_fullscreen(struct wlr_xdg_surface_v6 *surface,
bool fullscreen) { bool fullscreen) {
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
@ -1445,7 +1437,6 @@ uint32_t wlr_xdg_toplevel_v6_set_fullscreen(struct wlr_xdg_surface_v6 *surface,
return wlr_xdg_surface_v6_schedule_configure(surface); return wlr_xdg_surface_v6_schedule_configure(surface);
} }
WLR_API
uint32_t wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface, uint32_t wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface,
bool resizing) { bool resizing) {
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
@ -1454,13 +1445,11 @@ uint32_t wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface,
return wlr_xdg_surface_v6_schedule_configure(surface); return wlr_xdg_surface_v6_schedule_configure(surface);
} }
WLR_API
void wlr_xdg_toplevel_v6_send_close(struct wlr_xdg_surface_v6 *surface) { void wlr_xdg_toplevel_v6_send_close(struct wlr_xdg_surface_v6 *surface) {
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL); assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
zxdg_toplevel_v6_send_close(surface->toplevel_state->resource); zxdg_toplevel_v6_send_close(surface->toplevel_state->resource);
} }
WLR_API
void wlr_xdg_surface_v6_popup_get_position(struct wlr_xdg_surface_v6 *surface, void wlr_xdg_surface_v6_popup_get_position(struct wlr_xdg_surface_v6 *surface,
double *popup_sx, double *popup_sy) { double *popup_sx, double *popup_sy) {
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP); assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP);
@ -1471,7 +1460,6 @@ void wlr_xdg_surface_v6_popup_get_position(struct wlr_xdg_surface_v6 *surface,
surface->geometry->y; surface->geometry->y;
} }
WLR_API
struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_popup_at( struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_popup_at(
struct wlr_xdg_surface_v6 *surface, double sx, double sy, struct wlr_xdg_surface_v6 *surface, double sx, double sy,
double *popup_sx, double *popup_sy) { double *popup_sx, double *popup_sy) {

View File

@ -7,7 +7,6 @@
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include "util/defs.h"
static bool colored = true; static bool colored = true;
static log_importance_t log_importance = L_ERROR; static log_importance_t log_importance = L_ERROR;
@ -49,7 +48,6 @@ void wlr_log_stderr(log_importance_t verbosity, const char *fmt, va_list args) {
static log_callback_t log_callback = wlr_log_stderr; static log_callback_t log_callback = wlr_log_stderr;
WLR_API
void wlr_log_init(log_importance_t verbosity, log_callback_t callback) { void wlr_log_init(log_importance_t verbosity, log_callback_t callback) {
if (verbosity < L_LAST) { if (verbosity < L_LAST) {
log_importance = verbosity; log_importance = verbosity;
@ -59,12 +57,10 @@ void wlr_log_init(log_importance_t verbosity, log_callback_t callback) {
} }
} }
WLR_API
void _wlr_vlog(log_importance_t verbosity, const char *fmt, va_list args) { void _wlr_vlog(log_importance_t verbosity, const char *fmt, va_list args) {
log_callback(verbosity, fmt, args); log_callback(verbosity, fmt, args);
} }
WLR_API
void _wlr_log(log_importance_t verbosity, const char *fmt, ...) { void _wlr_log(log_importance_t verbosity, const char *fmt, ...) {
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
@ -77,7 +73,6 @@ void _wlr_log(log_importance_t verbosity, const char *fmt, ...) {
// e.g. '/src/build/wlroots/backend/wayland/backend.c' and // e.g. '/src/build/wlroots/backend/wayland/backend.c' and
// '../backend/wayland/backend.c' will both be stripped to // '../backend/wayland/backend.c' will both be stripped to
// 'backend/wayland/backend.c' // 'backend/wayland/backend.c'
WLR_API
const char *_strip_path(const char *filepath) { const char *_strip_path(const char *filepath) {
static int srclen = sizeof(WLR_SRC_DIR); static int srclen = sizeof(WLR_SRC_DIR);
if (strstr(filepath, WLR_SRC_DIR) == filepath) { if (strstr(filepath, WLR_SRC_DIR) == filepath) {

View File

@ -31,7 +31,6 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
#include "util/defs.h"
#include "util/os-compatibility.h" #include "util/os-compatibility.h"
int os_fd_set_cloexec(int fd) { int os_fd_set_cloexec(int fd) {
@ -98,11 +97,6 @@ int create_tmpfile_cloexec(char *tmpname)
* If posix_fallocate() is not supported, program may receive * If posix_fallocate() is not supported, program may receive
* SIGBUS on accessing mmap()'ed file contents instead. * SIGBUS on accessing mmap()'ed file contents instead.
*/ */
/*
* XXX: This is not part of our public headers, but one of the examples uses it.
* We really should not export this.
*/
WLR_API
int os_create_anonymous_file(off_t size) { int os_create_anonymous_file(off_t size) {
static const char template[] = "/wlroots-shared-XXXXXX"; static const char template[] = "/wlroots-shared-XXXXXX";
const char *path; const char *path;

View File

@ -1,9 +1,7 @@
#include <math.h> #include <math.h>
#include <stdlib.h> #include <stdlib.h>
#include <wlr/util/region.h> #include <wlr/util/region.h>
#include "util/defs.h"
WLR_API
void wlr_region_scale(pixman_region32_t *dst, pixman_region32_t *src, void wlr_region_scale(pixman_region32_t *dst, pixman_region32_t *src,
float scale) { float scale) {
if (scale == 1) { if (scale == 1) {
@ -31,7 +29,6 @@ void wlr_region_scale(pixman_region32_t *dst, pixman_region32_t *src,
free(dst_rects); free(dst_rects);
} }
WLR_API
void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src, void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src,
enum wl_output_transform transform, int width, int height) { enum wl_output_transform transform, int width, int height) {
if (transform == WL_OUTPUT_TRANSFORM_NORMAL) { if (transform == WL_OUTPUT_TRANSFORM_NORMAL) {
@ -105,7 +102,6 @@ void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src,
free(dst_rects); free(dst_rects);
} }
WLR_API
void wlr_region_expand(pixman_region32_t *dst, pixman_region32_t *src, void wlr_region_expand(pixman_region32_t *dst, pixman_region32_t *src,
int distance) { int distance) {
if (distance == 0) { if (distance == 0) {

View File

@ -30,7 +30,6 @@
#include <string.h> #include <string.h>
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include <wlr/xcursor.h> #include <wlr/xcursor.h>
#include "util/defs.h"
#include "xcursor/xcursor.h" #include "xcursor/xcursor.h"
static void wlr_xcursor_destroy(struct wlr_xcursor *cursor) { static void wlr_xcursor_destroy(struct wlr_xcursor *cursor) {
@ -213,7 +212,6 @@ static void load_callback(XcursorImages *images, void *data) {
XcursorImagesDestroy(images); XcursorImagesDestroy(images);
} }
WLR_API
struct wlr_xcursor_theme *wlr_xcursor_theme_load(const char *name, int size) { struct wlr_xcursor_theme *wlr_xcursor_theme_load(const char *name, int size) {
struct wlr_xcursor_theme *theme; struct wlr_xcursor_theme *theme;
@ -257,7 +255,6 @@ out_error_name:
return NULL; return NULL;
} }
WLR_API
void wlr_xcursor_theme_destroy(struct wlr_xcursor_theme *theme) { void wlr_xcursor_theme_destroy(struct wlr_xcursor_theme *theme) {
unsigned int i; unsigned int i;
@ -270,7 +267,6 @@ void wlr_xcursor_theme_destroy(struct wlr_xcursor_theme *theme) {
free(theme); free(theme);
} }
WLR_API
struct wlr_xcursor *wlr_xcursor_theme_get_cursor(struct wlr_xcursor_theme *theme, struct wlr_xcursor *wlr_xcursor_theme_get_cursor(struct wlr_xcursor_theme *theme,
const char *name) { const char *name) {
unsigned int i; unsigned int i;
@ -326,12 +322,10 @@ static int wlr_xcursor_frame_and_duration(struct wlr_xcursor *cursor,
return i; return i;
} }
WLR_API
int wlr_xcursor_frame(struct wlr_xcursor *_cursor, uint32_t time) { int wlr_xcursor_frame(struct wlr_xcursor *_cursor, uint32_t time) {
return wlr_xcursor_frame_and_duration(_cursor, time, NULL); return wlr_xcursor_frame_and_duration(_cursor, time, NULL);
} }
WLR_API
const char *wlr_xcursor_get_resize_name(enum wlr_edges edges) { const char *wlr_xcursor_get_resize_name(enum wlr_edges edges) {
if (edges & WLR_EDGE_TOP) { if (edges & WLR_EDGE_TOP) {
if (edges & WLR_EDGE_RIGHT) { if (edges & WLR_EDGE_RIGHT) {

View File

@ -9,7 +9,6 @@
#include <wlr/util/log.h> #include <wlr/util/log.h>
#include <wlr/xwm.h> #include <wlr/xwm.h>
#include <xcb/xfixes.h> #include <xcb/xfixes.h>
#include "util/defs.h"
static const size_t incr_chunk_size = 64 * 1024; static const size_t incr_chunk_size = 64 * 1024;
@ -806,7 +805,6 @@ static void selection_init(struct wlr_xwm *xwm,
selection->atom, mask); selection->atom, mask);
} }
WLR_API
void xwm_selection_init(struct wlr_xwm *xwm) { void xwm_selection_init(struct wlr_xwm *xwm) {
uint32_t values[] = { XCB_EVENT_MASK_PROPERTY_CHANGE }; uint32_t values[] = { XCB_EVENT_MASK_PROPERTY_CHANGE };
xwm->selection_window = xcb_generate_id(xwm->xcb_conn); xwm->selection_window = xcb_generate_id(xwm->xcb_conn);
@ -830,7 +828,6 @@ void xwm_selection_init(struct wlr_xwm *xwm) {
selection_init(xwm, &xwm->primary_selection, xwm->atoms[PRIMARY]); selection_init(xwm, &xwm->primary_selection, xwm->atoms[PRIMARY]);
} }
WLR_API
void xwm_selection_finish(struct wlr_xwm *xwm) { void xwm_selection_finish(struct wlr_xwm *xwm) {
if (!xwm) { if (!xwm) {
return; return;
@ -899,7 +896,6 @@ static void seat_handle_primary_selection(struct wl_listener *listener,
xwm_selection_set_owner(&xwm->primary_selection, source != NULL); xwm_selection_set_owner(&xwm->primary_selection, source != NULL);
} }
WLR_API
void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat) { void xwm_set_seat(struct wlr_xwm *xwm, struct wlr_seat *seat) {
if (xwm->seat != NULL) { if (xwm->seat != NULL) {
wl_list_remove(&xwm->seat_selection.link); wl_list_remove(&xwm->seat_selection.link);

View File

@ -20,7 +20,6 @@
#include <wlr/xwayland.h> #include <wlr/xwayland.h>
#include <wlr/xwm.h> #include <wlr/xwm.h>
#include "sockets.h" #include "sockets.h"
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
#ifdef __FreeBSD__ #ifdef __FreeBSD__
@ -337,14 +336,12 @@ static bool wlr_xwayland_start(struct wlr_xwayland *wlr_xwayland,
return true; return true;
} }
WLR_API
void wlr_xwayland_destroy(struct wlr_xwayland *wlr_xwayland) { void wlr_xwayland_destroy(struct wlr_xwayland *wlr_xwayland) {
wlr_xwayland_set_seat(wlr_xwayland, NULL); wlr_xwayland_set_seat(wlr_xwayland, NULL);
wlr_xwayland_finish(wlr_xwayland); wlr_xwayland_finish(wlr_xwayland);
free(wlr_xwayland); free(wlr_xwayland);
} }
WLR_API
struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display, struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
struct wlr_compositor *compositor) { struct wlr_compositor *compositor) {
struct wlr_xwayland *wlr_xwayland = calloc(1, sizeof(struct wlr_xwayland)); struct wlr_xwayland *wlr_xwayland = calloc(1, sizeof(struct wlr_xwayland));
@ -358,7 +355,6 @@ struct wlr_xwayland *wlr_xwayland_create(struct wl_display *wl_display,
return NULL; return NULL;
} }
WLR_API
void wlr_xwayland_set_cursor(struct wlr_xwayland *wlr_xwayland, void wlr_xwayland_set_cursor(struct wlr_xwayland *wlr_xwayland,
uint8_t *pixels, uint32_t stride, uint32_t width, uint32_t height, uint8_t *pixels, uint32_t stride, uint32_t width, uint32_t height,
int32_t hotspot_x, int32_t hotspot_y) { int32_t hotspot_x, int32_t hotspot_y) {
@ -390,7 +386,6 @@ static void wlr_xwayland_handle_seat_destroy(struct wl_listener *listener,
wlr_xwayland_set_seat(xwayland, NULL); wlr_xwayland_set_seat(xwayland, NULL);
} }
WLR_API
void wlr_xwayland_set_seat(struct wlr_xwayland *xwayland, void wlr_xwayland_set_seat(struct wlr_xwayland *xwayland,
struct wlr_seat *seat) { struct wlr_seat *seat) {
if (xwayland->seat) { if (xwayland->seat) {

View File

@ -14,7 +14,6 @@
#include <xcb/render.h> #include <xcb/render.h>
#include <xcb/xcb_image.h> #include <xcb/xcb_image.h>
#include <xcb/xfixes.h> #include <xcb/xfixes.h>
#include "util/defs.h"
#include "util/signal.h" #include "util/signal.h"
#ifdef WLR_HAS_XCB_ICCCM #ifdef WLR_HAS_XCB_ICCCM
@ -1044,7 +1043,6 @@ static void handle_compositor_surface_create(struct wl_listener *listener,
} }
} }
WLR_API
void wlr_xwayland_surface_activate(struct wlr_xwayland_surface *xsurface, void wlr_xwayland_surface_activate(struct wlr_xwayland_surface *xsurface,
bool activated) { bool activated) {
struct wlr_xwayland_surface *focused = xsurface->xwm->focus_surface; struct wlr_xwayland_surface *focused = xsurface->xwm->focus_surface;
@ -1055,7 +1053,6 @@ void wlr_xwayland_surface_activate(struct wlr_xwayland_surface *xsurface,
} }
} }
WLR_API
void wlr_xwayland_surface_configure(struct wlr_xwayland_surface *xsurface, void wlr_xwayland_surface_configure(struct wlr_xwayland_surface *xsurface,
int16_t x, int16_t y, uint16_t width, uint16_t height) { int16_t x, int16_t y, uint16_t width, uint16_t height) {
xsurface->x = x; xsurface->x = x;
@ -1072,7 +1069,6 @@ void wlr_xwayland_surface_configure(struct wlr_xwayland_surface *xsurface,
xcb_flush(xwm->xcb_conn); xcb_flush(xwm->xcb_conn);
} }
WLR_API
void wlr_xwayland_surface_close(struct wlr_xwayland_surface *xsurface) { void wlr_xwayland_surface_close(struct wlr_xwayland_surface *xsurface) {
struct wlr_xwm *xwm = xsurface->xwm; struct wlr_xwm *xwm = xsurface->xwm;
@ -1104,7 +1100,6 @@ void wlr_xwayland_surface_close(struct wlr_xwayland_surface *xsurface) {
xcb_flush(xwm->xcb_conn); xcb_flush(xwm->xcb_conn);
} }
WLR_API
void xwm_destroy(struct wlr_xwm *xwm) { void xwm_destroy(struct wlr_xwm *xwm) {
if (!xwm) { if (!xwm) {
return; return;
@ -1297,7 +1292,6 @@ static void xwm_get_render_format(struct wlr_xwm *xwm) {
free(reply); free(reply);
} }
WLR_API
void xwm_set_cursor(struct wlr_xwm *xwm, const uint8_t *pixels, uint32_t stride, void xwm_set_cursor(struct wlr_xwm *xwm, const uint8_t *pixels, uint32_t stride,
uint32_t width, uint32_t height, int32_t hotspot_x, int32_t hotspot_y) { uint32_t width, uint32_t height, int32_t hotspot_x, int32_t hotspot_y) {
if (!xwm->render_format_id) { if (!xwm->render_format_id) {
@ -1338,7 +1332,6 @@ void xwm_set_cursor(struct wlr_xwm *xwm, const uint8_t *pixels, uint32_t stride,
xcb_flush(xwm->xcb_conn); xcb_flush(xwm->xcb_conn);
} }
WLR_API
struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland) { struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland) {
struct wlr_xwm *xwm = calloc(1, sizeof(struct wlr_xwm)); struct wlr_xwm *xwm = calloc(1, sizeof(struct wlr_xwm));
if (xwm == NULL) { if (xwm == NULL) {
@ -1425,7 +1418,6 @@ struct wlr_xwm *xwm_create(struct wlr_xwayland *wlr_xwayland) {
return xwm; return xwm;
} }
WLR_API
void wlr_xwayland_surface_set_maximized(struct wlr_xwayland_surface *surface, void wlr_xwayland_surface_set_maximized(struct wlr_xwayland_surface *surface,
bool maximized) { bool maximized) {
surface->maximized_horz = maximized; surface->maximized_horz = maximized;
@ -1434,7 +1426,6 @@ void wlr_xwayland_surface_set_maximized(struct wlr_xwayland_surface *surface,
xcb_flush(surface->xwm->xcb_conn); xcb_flush(surface->xwm->xcb_conn);
} }
WLR_API
void wlr_xwayland_surface_set_fullscreen(struct wlr_xwayland_surface *surface, void wlr_xwayland_surface_set_fullscreen(struct wlr_xwayland_surface *surface,
bool fullscreen) { bool fullscreen) {
surface->fullscreen = fullscreen; surface->fullscreen = fullscreen;