commit d8d8757e1aea8a8f9710bb9677cabf93c9898646
parent f22c3d3fd28a72200035f1cd2e2e61ee34842280
Author: Michael Forney <mforney@mforney.org>
Date: Sat, 23 Nov 2013 20:30:54 -0800
Explicitly export public API
Diffstat:
5 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
@@ -27,6 +27,8 @@ define check_deps
@$(PKG_CONFIG) --exists --print-errors $2
endef
+override CFLAGS += -fvisibility=hidden
+
compile = $(call quiet,CC) $(CFLAGS) $(CPPFLAGS) -I . -c -o $@ $< \
-MMD -MP -MF .deps/$(basename $<).d -MT $(basename $@).o -MT $(basename $@).lo
link = $(call quiet,CCLD,$(CC)) $(CFLAGS) -o $@ $^
diff --git a/libswc/binding.c b/libswc/binding.c
@@ -24,6 +24,7 @@
#include "swc.h"
#include "binding.h"
#include "keyboard.h"
+#include "util.h"
#include <wayland-util.h>
@@ -92,6 +93,7 @@ void swc_bindings_finalize()
wl_array_release(&key_bindings);
}
+EXPORT
void swc_add_key_binding(uint32_t modifiers, uint32_t value,
swc_binding_handler_t handler, void * data)
{
diff --git a/libswc/swc.c b/libswc/swc.c
@@ -42,6 +42,7 @@ static void setup_compositor()
swc_window_enter_listener);
}
+EXPORT
bool swc_initialize(struct wl_display * display,
const struct swc_manager * manager)
{
@@ -79,6 +80,7 @@ bool swc_initialize(struct wl_display * display,
return false;
}
+EXPORT
void swc_finalize()
{
swc_shell_finalize();
diff --git a/libswc/util.h b/libswc/util.h
@@ -9,6 +9,8 @@
#include <pixman.h>
#include <wayland-util.h>
+#define EXPORT __attribute__((visibility("default")))
+
#ifdef offsetof
# define OFFSET_OF offsetof
#else
diff --git a/libswc/window.c b/libswc/window.c
@@ -51,16 +51,19 @@ static struct wl_listener window_enter_listener = {
};
struct wl_listener * swc_window_enter_listener = &window_enter_listener;
+EXPORT
void swc_window_show(struct swc_window * window)
{
swc_compositor_surface_show(INTERNAL(window)->surface);
}
+EXPORT
void swc_window_hide(struct swc_window * window)
{
swc_compositor_surface_hide(INTERNAL(window)->surface);
}
+EXPORT
void swc_window_focus(struct swc_window * window)
{
if (INTERNAL(window)->impl->focus)
@@ -70,6 +73,7 @@ void swc_window_focus(struct swc_window * window)
INTERNAL(window)->surface);
}
+EXPORT
void swc_window_set_geometry(struct swc_window * window,
const struct swc_rectangle * geometry)
{
@@ -79,6 +83,7 @@ void swc_window_set_geometry(struct swc_window * window,
swc_surface_move(INTERNAL(window)->surface, geometry->x, geometry->y);
}
+EXPORT
void swc_window_set_border(struct swc_window * window,
uint32_t border_color, uint32_t border_width)
{
@@ -97,6 +102,7 @@ static void handle_surface_destroy(struct wl_listener * listener, void * data)
free(window);
}
+EXPORT
bool swc_window_initialize(struct swc_window * window,
const struct swc_window_impl * impl,
struct swc_surface * surface)