From 5dbf0fe7f257edc3e96f3cf4ebf067f12c806419 Mon Sep 17 00:00:00 2001 From: emersion Date: Thu, 19 Jul 2018 21:50:00 +0100 Subject: linux-dmabuf: add v1 suffix This prevents some future conflicts with the stable version. Fixes #1133 --- include/rootston/desktop.h | 4 +- include/wlr/types/wlr_linux_dmabuf.h | 67 --------------------------------- include/wlr/types/wlr_linux_dmabuf_v1.h | 67 +++++++++++++++++++++++++++++++++ include/wlr/types/wlr_output.h | 2 +- 4 files changed, 70 insertions(+), 70 deletions(-) delete mode 100644 include/wlr/types/wlr_linux_dmabuf.h create mode 100644 include/wlr/types/wlr_linux_dmabuf_v1.h (limited to 'include') diff --git a/include/rootston/desktop.h b/include/rootston/desktop.h index d9add26a..2d28fa10 100644 --- a/include/rootston/desktop.h +++ b/include/rootston/desktop.h @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -52,7 +52,7 @@ struct roots_desktop { struct wlr_idle *idle; struct wlr_idle_inhibit_manager_v1 *idle_inhibit; struct wlr_input_inhibit_manager *input_inhibit; - struct wlr_linux_dmabuf *linux_dmabuf; + struct wlr_linux_dmabuf_v1 *linux_dmabuf; struct wlr_layer_shell *layer_shell; struct wlr_virtual_keyboard_manager_v1 *virtual_keyboard; struct wlr_screencopy_manager_v1 *screencopy; diff --git a/include/wlr/types/wlr_linux_dmabuf.h b/include/wlr/types/wlr_linux_dmabuf.h deleted file mode 100644 index 4a03170c..00000000 --- a/include/wlr/types/wlr_linux_dmabuf.h +++ /dev/null @@ -1,67 +0,0 @@ -#ifndef WLR_TYPES_WLR_LINUX_DMABUF_H -#define WLR_TYPES_WLR_LINUX_DMABUF_H - -#include -#include -#include - -struct wlr_dmabuf_buffer { - struct wlr_renderer *renderer; - struct wl_resource *buffer_resource; - struct wl_resource *params_resource; - struct wlr_dmabuf_attributes attributes; - bool has_modifier; -}; - -/** - * Returns true if the given resource was created via the linux-dmabuf - * buffer protocol, false otherwise - */ -bool wlr_dmabuf_resource_is_buffer(struct wl_resource *buffer_resource); - -/** - * Returns the wlr_dmabuf_buffer if the given resource was created - * via the linux-dmabuf buffer protocol - */ -struct wlr_dmabuf_buffer *wlr_dmabuf_buffer_from_buffer_resource( - struct wl_resource *buffer_resource); - -/** - * Returns the wlr_dmabuf_buffer if the given resource was created - * via the linux-dmabuf params protocol - */ -struct wlr_dmabuf_buffer *wlr_dmabuf_buffer_from_params_resource( - struct wl_resource *params_resource); - -/* the protocol interface */ -struct wlr_linux_dmabuf { - struct wl_global *global; - struct wlr_renderer *renderer; - struct wl_list resources; - - struct { - struct wl_signal destroy; - } events; - - struct wl_listener display_destroy; - struct wl_listener renderer_destroy; -}; - -/** - * Create linux-dmabuf interface - */ -struct wlr_linux_dmabuf *wlr_linux_dmabuf_create(struct wl_display *display, - struct wlr_renderer *renderer); -/** - * Destroy the linux-dmabuf interface - */ -void wlr_linux_dmabuf_destroy(struct wlr_linux_dmabuf *linux_dmabuf); - -/** - * Returns the wlr_linux_dmabuf if the given resource was created - * via the linux_dmabuf protocol - */ -struct wlr_linux_dmabuf *wlr_linux_dmabuf_from_resource( - struct wl_resource *resource); - -#endif diff --git a/include/wlr/types/wlr_linux_dmabuf_v1.h b/include/wlr/types/wlr_linux_dmabuf_v1.h new file mode 100644 index 00000000..43bc8385 --- /dev/null +++ b/include/wlr/types/wlr_linux_dmabuf_v1.h @@ -0,0 +1,67 @@ +#ifndef WLR_TYPES_WLR_LINUX_DMABUF_H +#define WLR_TYPES_WLR_LINUX_DMABUF_H + +#include +#include +#include + +struct wlr_dmabuf_v1_buffer { + struct wlr_renderer *renderer; + struct wl_resource *buffer_resource; + struct wl_resource *params_resource; + struct wlr_dmabuf_attributes attributes; + bool has_modifier; +}; + +/** + * Returns true if the given resource was created via the linux-dmabuf + * buffer protocol, false otherwise + */ +bool wlr_dmabuf_v1_resource_is_buffer(struct wl_resource *buffer_resource); + +/** + * Returns the wlr_dmabuf_buffer if the given resource was created + * via the linux-dmabuf buffer protocol + */ +struct wlr_dmabuf_v1_buffer *wlr_dmabuf_v1_buffer_from_buffer_resource( + struct wl_resource *buffer_resource); + +/** + * Returns the wlr_dmabuf_buffer if the given resource was created + * via the linux-dmabuf params protocol + */ +struct wlr_dmabuf_v1_buffer *wlr_dmabuf_v1_buffer_from_params_resource( + struct wl_resource *params_resource); + +/* the protocol interface */ +struct wlr_linux_dmabuf_v1 { + struct wl_global *global; + struct wlr_renderer *renderer; + struct wl_list resources; + + struct { + struct wl_signal destroy; + } events; + + struct wl_listener display_destroy; + struct wl_listener renderer_destroy; +}; + +/** + * Create linux-dmabuf interface + */ +struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display, + struct wlr_renderer *renderer); +/** + * Destroy the linux-dmabuf interface + */ +void wlr_linux_dmabuf_v1_destroy(struct wlr_linux_dmabuf_v1 *linux_dmabuf); + +/** + * Returns the wlr_linux_dmabuf if the given resource was created + * via the linux_dmabuf protocol + */ +struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_from_resource( + struct wl_resource *resource); + +#endif diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index 5084eb5a..c93ed2eb 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -6,7 +6,7 @@ #include #include #include -#include +#include struct wlr_output_mode { uint32_t flags; // enum wl_output_mode -- cgit v1.2.3