Commit cf04b0a1 authored by Kristian Høgsberg's avatar Kristian Høgsberg

Move private definitions and prototypes to new wayland-private.h

parent 68d13212
......@@ -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
......
......@@ -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])
......
......@@ -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;
......
/*
* 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;
......
......@@ -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;
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment