commit d8d8757
Michael Forney
·
2013-11-24 04:30:54 +0000 UTC
parent f22c3d3
Explicitly export public API
5 files changed,
+14,
-0
M
Makefile
+2,
-0
1@@ -27,6 +27,8 @@ define check_deps
2 @$(PKG_CONFIG) --exists --print-errors $2
3 endef
4
5+override CFLAGS += -fvisibility=hidden
6+
7 compile = $(call quiet,CC) $(CFLAGS) $(CPPFLAGS) -I . -c -o $@ $< \
8 -MMD -MP -MF .deps/$(basename $<).d -MT $(basename $@).o -MT $(basename $@).lo
9 link = $(call quiet,CCLD,$(CC)) $(CFLAGS) -o $@ $^
+2,
-0
1@@ -24,6 +24,7 @@
2 #include "swc.h"
3 #include "binding.h"
4 #include "keyboard.h"
5+#include "util.h"
6
7 #include <wayland-util.h>
8
9@@ -92,6 +93,7 @@ void swc_bindings_finalize()
10 wl_array_release(&key_bindings);
11 }
12
13+EXPORT
14 void swc_add_key_binding(uint32_t modifiers, uint32_t value,
15 swc_binding_handler_t handler, void * data)
16 {
+2,
-0
1@@ -42,6 +42,7 @@ static void setup_compositor()
2 swc_window_enter_listener);
3 }
4
5+EXPORT
6 bool swc_initialize(struct wl_display * display,
7 const struct swc_manager * manager)
8 {
9@@ -79,6 +80,7 @@ bool swc_initialize(struct wl_display * display,
10 return false;
11 }
12
13+EXPORT
14 void swc_finalize()
15 {
16 swc_shell_finalize();
+2,
-0
1@@ -9,6 +9,8 @@
2 #include <pixman.h>
3 #include <wayland-util.h>
4
5+#define EXPORT __attribute__((visibility("default")))
6+
7 #ifdef offsetof
8 # define OFFSET_OF offsetof
9 #else
+6,
-0
1@@ -51,16 +51,19 @@ static struct wl_listener window_enter_listener = {
2 };
3 struct wl_listener * swc_window_enter_listener = &window_enter_listener;
4
5+EXPORT
6 void swc_window_show(struct swc_window * window)
7 {
8 swc_compositor_surface_show(INTERNAL(window)->surface);
9 }
10
11+EXPORT
12 void swc_window_hide(struct swc_window * window)
13 {
14 swc_compositor_surface_hide(INTERNAL(window)->surface);
15 }
16
17+EXPORT
18 void swc_window_focus(struct swc_window * window)
19 {
20 if (INTERNAL(window)->impl->focus)
21@@ -70,6 +73,7 @@ void swc_window_focus(struct swc_window * window)
22 INTERNAL(window)->surface);
23 }
24
25+EXPORT
26 void swc_window_set_geometry(struct swc_window * window,
27 const struct swc_rectangle * geometry)
28 {
29@@ -79,6 +83,7 @@ void swc_window_set_geometry(struct swc_window * window,
30 swc_surface_move(INTERNAL(window)->surface, geometry->x, geometry->y);
31 }
32
33+EXPORT
34 void swc_window_set_border(struct swc_window * window,
35 uint32_t border_color, uint32_t border_width)
36 {
37@@ -97,6 +102,7 @@ static void handle_surface_destroy(struct wl_listener * listener, void * data)
38 free(window);
39 }
40
41+EXPORT
42 bool swc_window_initialize(struct swc_window * window,
43 const struct swc_window_impl * impl,
44 struct swc_surface * surface)