[PATCH weston 11/15] libweston: expose the X11 backend's API
Giulio Camuffo
giuliocamuffo at gmail.com
Thu Nov 6 12:41:30 PST 2014
---
Makefile.am | 1 +
src/compositor-x11.c | 5 +++--
src/compositor-x11.h | 27 +++++++++++++++++++++++++++
3 files changed, 31 insertions(+), 2 deletions(-)
create mode 100644 src/compositor-x11.h
diff --git a/Makefile.am b/Makefile.am
index d045137..1e14bf2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -159,6 +159,7 @@ westonincludedir = $(includedir)/weston
westoninclude_HEADERS = \
src/version.h \
src/compositor.h \
+ src/compositor-x11.h \
shared/matrix.h \
shared/config-parser.h \
shared/zalloc.h
diff --git a/src/compositor-x11.c b/src/compositor-x11.c
index a09a502..7072179 100644
--- a/src/compositor-x11.c
+++ b/src/compositor-x11.c
@@ -47,6 +47,7 @@
#include <xkbcommon/xkbcommon.h>
#include "compositor.h"
+#include "compositor-x11.h"
#include "gl-renderer.h"
#include "pixman-renderer.h"
#include "../shared/config-parser.h"
@@ -746,7 +747,7 @@ x11_output_init_shm(struct x11_backend *b, struct x11_output *output,
return 0;
}
-static struct x11_output *
+WL_EXPORT struct x11_output *
x11_backend_create_output(struct x11_backend *b, int x, int y,
int width, int height, int fullscreen,
int no_input, char *configured_name,
@@ -1470,7 +1471,7 @@ init_gl_renderer(struct x11_backend *b)
return ret;
}
-static struct x11_backend *
+WL_EXPORT struct x11_backend *
x11_backend_create(struct weston_compositor *compositor,
int fullscreen,
int no_input,
diff --git a/src/compositor-x11.h b/src/compositor-x11.h
new file mode 100644
index 0000000..0cc7fb0
--- /dev/null
+++ b/src/compositor-x11.h
@@ -0,0 +1,27 @@
+
+#ifndef WESTON_COMPOSITOR_X11_H
+#define WESTON_COMPOSITOR_X11_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "compositor.h"
+
+struct x11_backend *
+x11_backend_create(struct weston_compositor *c,
+ int fullscreen,
+ int no_input,
+ int use_pixman);
+
+struct x11_output *
+x11_backend_create_output(struct x11_backend *c, int x, int y,
+ int width, int height, int fullscreen,
+ int no_input, char *configured_name,
+ uint32_t transform, int32_t scale);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--
2.1.3
More information about the wayland-devel
mailing list