From c20e61fddc8c2b8838533f23f54c1c5acea3e05f Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Tue, 17 Dec 2019 08:48:51 +0100 Subject: [PATCH] xwayland: Move Xwayland structures to their own header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, `xwayland.h` contains all the declarations, which is a bit awkward and hard to follow. Move the Xwayland structures declarations to their own header file. Signed-off-by: Olivier Fourdan Reviewed-by: Michel Dänzer --- hw/xwayland/Makefile.am | 1 + hw/xwayland/meson.build | 1 + hw/xwayland/xwayland-types.h | 34 ++++++++++++++++++++++++++++++++++ hw/xwayland/xwayland.h | 6 ++---- 4 files changed, 38 insertions(+), 4 deletions(-) create mode 100644 hw/xwayland/xwayland-types.h diff --git a/hw/xwayland/Makefile.am b/hw/xwayland/Makefile.am index 042906074..0a6b3ee87 100644 --- a/hw/xwayland/Makefile.am +++ b/hw/xwayland/Makefile.am @@ -14,6 +14,7 @@ Xwayland_SOURCES = \ xwayland-input.c \ xwayland-cursor.c \ xwayland-shm.c \ + xwayland-types.h \ xwayland-output.c \ xwayland-cvt.c \ xwayland-vidmode.c \ diff --git a/hw/xwayland/meson.build b/hw/xwayland/meson.build index 6b76c494e..4f9ff434a 100644 --- a/hw/xwayland/meson.build +++ b/hw/xwayland/meson.build @@ -3,6 +3,7 @@ srcs = [ 'xwayland-input.c', 'xwayland-cursor.c', 'xwayland-shm.c', + 'xwayland-types.h', 'xwayland-output.c', 'xwayland-cvt.c', 'xwayland-vidmode.c', diff --git a/hw/xwayland/xwayland-types.h b/hw/xwayland/xwayland-types.h new file mode 100644 index 000000000..da80ff98e --- /dev/null +++ b/hw/xwayland/xwayland-types.h @@ -0,0 +1,34 @@ +/* + * Copyright © 2014 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 the above copyright notice appear in all copies + * and that both that copyright notice and this permission notice + * appear in supporting documentation, and that the name of the + * copyright holders not be used in advertising or publicity + * pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied + * warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. + */ + +#ifndef XWAYLAND_TYPES_H +#define XWAYLAND_TYPES_H + +struct xwl_pixmap; +struct xwl_window; +struct xwl_screen; +struct xwl_egl_backend; + +#endif /* XWAYLAND_TYPES_H */ diff --git a/hw/xwayland/xwayland.h b/hw/xwayland/xwayland.h index acf66f889..27359636e 100644 --- a/hw/xwayland/xwayland.h +++ b/hw/xwayland/xwayland.h @@ -50,16 +50,14 @@ #include "linux-dmabuf-unstable-v1-client-protocol.h" #include "viewporter-client-protocol.h" +#include "xwayland-types.h" + struct xwl_format { uint32_t format; int num_modifiers; uint64_t *modifiers; }; -struct xwl_pixmap; -struct xwl_window; -struct xwl_screen; - typedef void (*xwl_pixmap_cb) (PixmapPtr pixmap, void *data); struct xwl_egl_backend {