swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit f57c76f5f4ffdb19cf2692f125f5e219ca27da64
parent b261193c25384555fe653931a6979fa0cbf67439
Author: Michael Forney <mforney@mforney.org>
Date:   Thu, 19 Sep 2013 17:33:02 -0700

Use forward declarations

Diffstat:
Mlibswc/compositor.h | 4++--
Mlibswc/data.c | 1+
Mlibswc/data.h | 5++++-
Mlibswc/keyboard.h | 4+++-
Mlibswc/output.h | 2+-
Mlibswc/region.c | 1+
Mlibswc/region.h | 4+++-
Mlibswc/seat.c | 1+
Mlibswc/seat.h | 7+++++--
Mlibswc/util.h | 3++-
10 files changed, 23 insertions(+), 9 deletions(-)

diff --git a/libswc/compositor.h b/libswc/compositor.h @@ -1,14 +1,14 @@ #ifndef SWC_COMPOSITOR_H #define SWC_COMPOSITOR_H 1 -#include <wayland-server.h> - #include "drm.h" #include "tty.h" #include "seat.h" #include "binding.h" #include "renderer.h" +#include <wayland-server.h> + struct swc_compositor { struct wl_display * display; diff --git a/libswc/data.c b/libswc/data.c @@ -27,6 +27,7 @@ #include <stdlib.h> #include <string.h> #include <unistd.h> +#include <wayland-server.h> struct data { diff --git a/libswc/data.h b/libswc/data.h @@ -24,7 +24,10 @@ #ifndef SWC_DATA_H #define SWC_DATA_H 1 -#include <wayland-server.h> +#include <stdint.h> + +struct wl_client; +struct wl_resource; struct wl_resource * swc_data_source_new(struct wl_client * client, uint32_t id); diff --git a/libswc/keyboard.h b/libswc/keyboard.h @@ -5,9 +5,11 @@ #include "input_focus.h" #include "xkb.h" -#include <wayland-server.h> +#include <wayland-util.h> struct swc_keyboard; +struct wl_client; +struct wl_resource; struct swc_keyboard_handler { diff --git a/libswc/output.h b/libswc/output.h @@ -6,12 +6,12 @@ #include <stdint.h> #include <pixman.h> #include <wayland-util.h> -#include <wayland-server.h> #include <xf86drmMode.h> #define SWC_OUTPUT_MASK(output) (1 << (output)->id) struct swc_mode; +struct wl_display; struct swc_output { diff --git a/libswc/region.c b/libswc/region.c @@ -1,6 +1,7 @@ #include "region.h" #include <stdlib.h> +#include <wayland-server.h> static void destroy(struct wl_client * client, struct wl_resource * resource) { diff --git a/libswc/region.h b/libswc/region.h @@ -3,7 +3,9 @@ #include <stdbool.h> #include <pixman.h> -#include <wayland-server.h> + +struct wl_client; +struct wl_resource; struct swc_region { diff --git a/libswc/seat.c b/libswc/seat.c @@ -8,6 +8,7 @@ #include <stdlib.h> #include <stdio.h> #include <string.h> +#include <libudev.h> static void handle_key(const struct swc_evdev_device_handler * handler, uint32_t time, uint32_t key, uint32_t state) diff --git a/libswc/seat.h b/libswc/seat.h @@ -9,8 +9,11 @@ #include <stdint.h> #include <stdbool.h> -#include <libudev.h> -#include <wayland-server.h> +#include <wayland-util.h> + +struct udev; +struct wl_display; +struct wl_event_loop; struct swc_seat { diff --git a/libswc/util.h b/libswc/util.h @@ -4,7 +4,6 @@ #include <stdbool.h> #include <sys/time.h> #include <sys/param.h> -#include <wayland-server.h> #include <pixman.h> #ifndef offsetof @@ -16,6 +15,8 @@ ((type *) ((uintptr_t) __mptr - offsetof(type, member))); \ }) +struct wl_resource; + void swc_remove_resource(struct wl_resource * resource); static inline uint32_t swc_time()