dlopen the compositor, add a glx compositor.
diff --git a/egl-compositor.c b/egl-compositor.c
index 40ffc4c..c37ea12 100644
--- a/egl-compositor.c
+++ b/egl-compositor.c
@@ -85,7 +85,8 @@
eglSwapBuffers(ec->display, ec->surface);
}
-static void schedule_repaint(struct egl_compositor *ec)
+static void
+schedule_repaint(struct egl_compositor *ec)
{
struct wl_event_loop *loop;
@@ -93,8 +94,9 @@
wl_event_loop_add_idle(loop, repaint, ec);
}
-void notify_surface_create(struct wl_compositor *compositor,
- struct wl_surface *surface)
+static void
+notify_surface_create(struct wl_compositor *compositor,
+ struct wl_surface *surface)
{
struct surface_data *sd;
@@ -108,8 +110,9 @@
glGenTextures(1, &sd->texture);
}
-void notify_surface_destroy(struct wl_compositor *compositor,
- struct wl_surface *surface)
+static void
+notify_surface_destroy(struct wl_compositor *compositor,
+ struct wl_surface *surface)
{
struct egl_compositor *ec = (struct egl_compositor *) compositor;
struct surface_data *sd;
@@ -128,9 +131,10 @@
schedule_repaint(ec);
}
-void notify_surface_attach(struct wl_compositor *compositor,
- struct wl_surface *surface, uint32_t name,
- uint32_t width, uint32_t height, uint32_t stride)
+static void
+notify_surface_attach(struct wl_compositor *compositor,
+ struct wl_surface *surface, uint32_t name,
+ uint32_t width, uint32_t height, uint32_t stride)
{
struct egl_compositor *ec = (struct egl_compositor *) compositor;
struct surface_data *sd;
@@ -158,8 +162,9 @@
schedule_repaint(ec);
}
-void notify_surface_map(struct wl_compositor *compositor,
- struct wl_surface *surface, struct wl_map *map)
+static void
+notify_surface_map(struct wl_compositor *compositor,
+ struct wl_surface *surface, struct wl_map *map)
{
struct egl_compositor *ec = (struct egl_compositor *) compositor;
struct surface_data *sd;
@@ -173,7 +178,7 @@
schedule_repaint(ec);
}
-struct wl_compositor_interface interface = {
+static const struct wl_compositor_interface interface = {
notify_surface_create,
notify_surface_destroy,
notify_surface_attach,