commit f57c76f
Michael Forney
·
2013-09-20 00:33:02 +0000 UTC
parent b261193
Use forward declarations
10 files changed,
+23,
-9
+2,
-2
1@@ -1,14 +1,14 @@
2 #ifndef SWC_COMPOSITOR_H
3 #define SWC_COMPOSITOR_H 1
4
5-#include <wayland-server.h>
6-
7 #include "drm.h"
8 #include "tty.h"
9 #include "seat.h"
10 #include "binding.h"
11 #include "renderer.h"
12
13+#include <wayland-server.h>
14+
15 struct swc_compositor
16 {
17 struct wl_display * display;
+1,
-0
1@@ -27,6 +27,7 @@
2 #include <stdlib.h>
3 #include <string.h>
4 #include <unistd.h>
5+#include <wayland-server.h>
6
7 struct data
8 {
+4,
-1
1@@ -24,7 +24,10 @@
2 #ifndef SWC_DATA_H
3 #define SWC_DATA_H 1
4
5-#include <wayland-server.h>
6+#include <stdint.h>
7+
8+struct wl_client;
9+struct wl_resource;
10
11 struct wl_resource * swc_data_source_new(struct wl_client * client,
12 uint32_t id);
+3,
-1
1@@ -5,9 +5,11 @@
2 #include "input_focus.h"
3 #include "xkb.h"
4
5-#include <wayland-server.h>
6+#include <wayland-util.h>
7
8 struct swc_keyboard;
9+struct wl_client;
10+struct wl_resource;
11
12 struct swc_keyboard_handler
13 {
+1,
-1
1@@ -6,12 +6,12 @@
2 #include <stdint.h>
3 #include <pixman.h>
4 #include <wayland-util.h>
5-#include <wayland-server.h>
6 #include <xf86drmMode.h>
7
8 #define SWC_OUTPUT_MASK(output) (1 << (output)->id)
9
10 struct swc_mode;
11+struct wl_display;
12
13 struct swc_output
14 {
+1,
-0
1@@ -1,6 +1,7 @@
2 #include "region.h"
3
4 #include <stdlib.h>
5+#include <wayland-server.h>
6
7 static void destroy(struct wl_client * client, struct wl_resource * resource)
8 {
+3,
-1
1@@ -3,7 +3,9 @@
2
3 #include <stdbool.h>
4 #include <pixman.h>
5-#include <wayland-server.h>
6+
7+struct wl_client;
8+struct wl_resource;
9
10 struct swc_region
11 {
+1,
-0
1@@ -8,6 +8,7 @@
2 #include <stdlib.h>
3 #include <stdio.h>
4 #include <string.h>
5+#include <libudev.h>
6
7 static void handle_key(const struct swc_evdev_device_handler * handler,
8 uint32_t time, uint32_t key, uint32_t state)
+5,
-2
1@@ -9,8 +9,11 @@
2
3 #include <stdint.h>
4 #include <stdbool.h>
5-#include <libudev.h>
6-#include <wayland-server.h>
7+#include <wayland-util.h>
8+
9+struct udev;
10+struct wl_display;
11+struct wl_event_loop;
12
13 struct swc_seat
14 {
+2,
-1
1@@ -4,7 +4,6 @@
2 #include <stdbool.h>
3 #include <sys/time.h>
4 #include <sys/param.h>
5-#include <wayland-server.h>
6 #include <pixman.h>
7
8 #ifndef offsetof
9@@ -16,6 +15,8 @@
10 ((type *) ((uintptr_t) __mptr - offsetof(type, member))); \
11 })
12
13+struct wl_resource;
14+
15 void swc_remove_resource(struct wl_resource * resource);
16
17 static inline uint32_t swc_time()