diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/connection.c | 2 | ||||
-rw-r--r-- | src/wayland-client.c | 2 | ||||
-rw-r--r-- | src/wayland-private.h (renamed from src/connection.h) | 22 | ||||
-rw-r--r-- | src/wayland-server.c | 2 | ||||
-rw-r--r-- | src/wayland-util.c | 2 | ||||
-rw-r--r-- | src/wayland-util.h | 15 |
7 files changed, 25 insertions, 21 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 156ca2e..979a0c6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -14,6 +14,7 @@ libwayland_util_la_SOURCES = \ connection.h \ wayland-util.c \ wayland-util.h \ + wayland-private.h \ wayland-hash.c libwayland_server_la_LIBADD = $(FFI_LIBS) libwayland-util.la -lrt diff --git a/src/connection.c b/src/connection.c index 5a7ec2e..84f58c4 100644 --- a/src/connection.c +++ b/src/connection.c @@ -37,7 +37,7 @@ #include <time.h> #include "wayland-util.h" -#include "connection.h" +#include "wayland-private.h" #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0]) diff --git a/src/wayland-client.c b/src/wayland-client.c index 5845698..2597ab2 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -35,9 +35,9 @@ #include <fcntl.h> #include <sys/poll.h> -#include "connection.h" #include "wayland-util.h" #include "wayland-client.h" +#include "wayland-private.h" struct wl_global_listener { wl_display_global_func_t handler; diff --git a/src/connection.h b/src/wayland-private.h index 4f7c928..e302300 100644 --- a/src/connection.h +++ b/src/wayland-private.h @@ -1,5 +1,6 @@ /* - * Copyright © 2008 Kristian Høgsberg + * Copyright © 2008-2011 Kristian Høgsberg + * Copyright © 2011 Intel Corporation * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that @@ -20,12 +21,27 @@ * OF THIS SOFTWARE. */ -#ifndef _CONNECTION_H_ -#define _CONNECTION_H_ +#ifndef WAYLAND_PRIVATE_H +#define WAYLAND_PRIVATE_H #include <stdarg.h> #include "wayland-util.h" +#define WL_ZOMBIE_OBJECT ((void *) 2) + +struct wl_map { + struct wl_array entries; + uint32_t free_list; +}; + +void wl_map_init(struct wl_map *map); +void wl_map_release(struct wl_map *map); +uint32_t wl_map_insert_new(struct wl_map *map, void *data); +int wl_map_insert_at(struct wl_map *map, uint32_t i, void *data); +void wl_map_remove(struct wl_map *map, uint32_t i); +void *wl_map_lookup(struct wl_map *map, uint32_t i); +void wl_map_for_each(struct wl_map *map, wl_iterator_func_t func, void *data); + struct wl_connection; struct wl_closure; diff --git a/src/wayland-server.c b/src/wayland-server.c index f3d8050..d2bc0c0 100644 --- a/src/wayland-server.c +++ b/src/wayland-server.c @@ -41,9 +41,9 @@ #include <sys/stat.h> #include <ffi.h> +#include "wayland-private.h" #include "wayland-server.h" #include "wayland-server-protocol.h" -#include "connection.h" struct wl_socket { int fd; diff --git a/src/wayland-util.c b/src/wayland-util.c index 3b187b8..43b095e 100644 --- a/src/wayland-util.c +++ b/src/wayland-util.c @@ -24,7 +24,9 @@ #include <stdlib.h> #include <stdint.h> #include <string.h> + #include "wayland-util.h" +#include "wayland-private.h" WL_EXPORT void wl_list_init(struct wl_list *list) diff --git a/src/wayland-util.h b/src/wayland-util.h index 083bff8..953d51a 100644 --- a/src/wayland-util.h +++ b/src/wayland-util.h @@ -44,8 +44,6 @@ extern "C" { const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) -#define WL_ZOMBIE_OBJECT ((void *) 2) - struct wl_message { const char *name; const char *signature; @@ -152,19 +150,6 @@ void wl_array_release(struct wl_array *array); void *wl_array_add(struct wl_array *array, int size); void wl_array_copy(struct wl_array *array, struct wl_array *source); -struct wl_map { - struct wl_array entries; - uint32_t free_list; -}; - -void wl_map_init(struct wl_map *map); -void wl_map_release(struct wl_map *map); -uint32_t wl_map_insert_new(struct wl_map *map, void *data); -int wl_map_insert_at(struct wl_map *map, uint32_t i, void *data); -void wl_map_remove(struct wl_map *map, uint32_t i); -void *wl_map_lookup(struct wl_map *map, uint32_t i); -void wl_map_for_each(struct wl_map *map, wl_iterator_func_t func, void *data); - #ifdef __cplusplus } #endif |