From cbc74401075237210066d0becba41d7227a18a25 Mon Sep 17 00:00:00 2001 From: Seunghun Lee Date: Wed, 22 Feb 2023 14:35:35 +0900 Subject: [PATCH] Expose ds_subsurface as ABI Change-Id: I57a13628ea72393ec0b4d89442ee20bc9b5751b0 --- include/libds/types/ds_subsurface.h | 40 +++++++++++++++++++++++++++++++++++++ src/compositor/compositor_private.h | 32 +---------------------------- 2 files changed, 41 insertions(+), 31 deletions(-) create mode 100644 include/libds/types/ds_subsurface.h diff --git a/include/libds/types/ds_subsurface.h b/include/libds/types/ds_subsurface.h new file mode 100644 index 0000000..b50b962 --- /dev/null +++ b/include/libds/types/ds_subsurface.h @@ -0,0 +1,40 @@ +#ifndef LIBDS_TYPES_DS_SUBSURFACE_H +#define LIBDS_TYPES_DS_SUBSURFACE_H + +#include + +#include +#include + +struct ds_subsurface_parent_state +{ + int32_t x, y; + struct wl_list link; +}; + +struct ds_subsurface +{ + struct wl_resource *resource; + struct ds_surface *surface; + struct ds_surface *parent; + + struct ds_subsurface_parent_state current, pending; + + struct { + struct wl_signal destroy; + } events; + + struct { + struct wl_listener surface_destroy; + struct wl_listener parent_destroy; + } listener; + + struct ds_surface_state cached; + bool has_cache; + + bool synchronized; + bool reordered; + bool mapped; +}; + +#endif diff --git a/src/compositor/compositor_private.h b/src/compositor/compositor_private.h index d8cf53b..1663014 100644 --- a/src/compositor/compositor_private.h +++ b/src/compositor/compositor_private.h @@ -10,6 +10,7 @@ #include "libds/util/box.h" #include "libds/util/addon.h" #include "libds/types/ds_surface.h" +#include "libds/types/ds_subsurface.h" #include "surface.h" #include "util.h" @@ -18,37 +19,6 @@ struct ds_subcompositor struct wl_global *global; }; -struct ds_subsurface_parent_state -{ - int32_t x, y; - struct wl_list link; -}; - -struct ds_subsurface -{ - struct wl_resource *resource; - struct ds_surface *surface; - struct ds_surface *parent; - - struct ds_subsurface_parent_state current, pending; - - struct { - struct wl_signal destroy; - } events; - - struct { - struct wl_listener surface_destroy; - struct wl_listener parent_destroy; - } listener; - - struct ds_surface_state cached; - bool has_cache; - - bool synchronized; - bool reordered; - bool mapped; -}; - bool subcompositor_init(struct ds_subcompositor *subcomp, struct wl_display *display); -- 2.7.4