aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorScott Anderson <ascent12@hotmail.com>2018-02-19 14:26:40 +1300
committerScott Anderson <ascent12@hotmail.com>2018-02-19 14:26:40 +1300
commit86269052eb7be715eba274dffc30c77c11b8309c (patch)
tree8291d0ee15c75499ad884f629fd630c54f46b8ce /util
parentf27c0b44b882f7a837906e5b3376ad035cb51445 (diff)
Explicitly export EFL symbols
Diffstat (limited to 'util')
-rw-r--r--util/log.c5
-rw-r--r--util/os-compatibility.c6
-rw-r--r--util/region.c4
3 files changed, 15 insertions, 0 deletions
diff --git a/util/log.c b/util/log.c
index 327402e6..bf5f848c 100644
--- a/util/log.c
+++ b/util/log.c
@@ -7,6 +7,7 @@
#include <time.h>
#include <unistd.h>
#include <wlr/util/log.h>
+#include "util/defs.h"
static bool colored = true;
static log_importance_t log_importance = L_ERROR;
@@ -48,6 +49,7 @@ void wlr_log_stderr(log_importance_t verbosity, const char *fmt, va_list args) {
static log_callback_t log_callback = wlr_log_stderr;
+WLR_API
void wlr_log_init(log_importance_t verbosity, log_callback_t callback) {
if (verbosity < L_LAST) {
log_importance = verbosity;
@@ -57,10 +59,12 @@ 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) {
log_callback(verbosity, fmt, args);
}
+WLR_API
void _wlr_log(log_importance_t verbosity, const char *fmt, ...) {
va_list args;
va_start(args, fmt);
@@ -73,6 +77,7 @@ void _wlr_log(log_importance_t verbosity, const char *fmt, ...) {
// e.g. '/src/build/wlroots/backend/wayland/backend.c' and
// '../backend/wayland/backend.c' will both be stripped to
// 'backend/wayland/backend.c'
+WLR_API
const char *_strip_path(const char *filepath) {
static int srclen = sizeof(WLR_SRC_DIR);
if (strstr(filepath, WLR_SRC_DIR) == filepath) {
diff --git a/util/os-compatibility.c b/util/os-compatibility.c
index bd3067d2..0e95fdee 100644
--- a/util/os-compatibility.c
+++ b/util/os-compatibility.c
@@ -31,6 +31,7 @@
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
+#include "util/defs.h"
#include "util/os-compatibility.h"
int os_fd_set_cloexec(int fd) {
@@ -97,6 +98,11 @@ int create_tmpfile_cloexec(char *tmpname)
* If posix_fallocate() is not supported, program may receive
* 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) {
static const char template[] = "/wlroots-shared-XXXXXX";
const char *path;
diff --git a/util/region.c b/util/region.c
index 88e38fd2..2639ac04 100644
--- a/util/region.c
+++ b/util/region.c
@@ -1,7 +1,9 @@
#include <math.h>
#include <stdlib.h>
#include <wlr/util/region.h>
+#include "util/defs.h"
+WLR_API
void wlr_region_scale(pixman_region32_t *dst, pixman_region32_t *src,
float scale) {
if (scale == 1) {
@@ -29,6 +31,7 @@ void wlr_region_scale(pixman_region32_t *dst, pixman_region32_t *src,
free(dst_rects);
}
+WLR_API
void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src,
enum wl_output_transform transform, int width, int height) {
if (transform == WL_OUTPUT_TRANSFORM_NORMAL) {
@@ -102,6 +105,7 @@ void wlr_region_transform(pixman_region32_t *dst, pixman_region32_t *src,
free(dst_rects);
}
+WLR_API
void wlr_region_expand(pixman_region32_t *dst, pixman_region32_t *src,
int distance) {
if (distance == 0) {