diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am index c328ea77bd..50a979abe2 100644 --- a/src/Makefile_Ecore_Wl2.am +++ b/src/Makefile_Ecore_Wl2.am @@ -12,8 +12,6 @@ lib/ecore_wl2/teamwork_protocol.c \ lib/ecore_wl2/teamwork_protocol.h \ lib/ecore_wl2/session-recovery-client-protocol.h \ lib/ecore_wl2/session-recovery-protocol.c \ -lib/ecore_wl2/subsurface-client-protocol.h \ -lib/ecore_wl2/subsurface-protocol.c \ lib/ecore_wl2/xdg-shell-client-protocol.h \ lib/ecore_wl2/xdg-shell-protocol.c \ lib/ecore_wl2/www-protocol.h \ diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index ff9a09eb22..91fce24f0a 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -9,12 +9,6 @@ #define EFL_TEAMWORK_VERSION 2 # include "teamwork_protocol.h" -/* NB: Test if subsurface protocol is part of wayland code, if not then - * include our own copy */ -# ifndef WL_SUBSURFACE_ERROR_ENUM -# include "subsurface-client-protocol.h" -# endif - # include "xdg-shell-client-protocol.h" # define XDG_VERSION 5 diff --git a/src/lib/ecore_wl2/subsurface-client-protocol.h b/src/lib/ecore_wl2/subsurface-client-protocol.h deleted file mode 100644 index 4396ea44ce..0000000000 --- a/src/lib/ecore_wl2/subsurface-client-protocol.h +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright © 2012-2013 Collabora, Ltd. - * - * 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 SUBSURFACE_CLIENT_PROTOCOL_H -#define SUBSURFACE_CLIENT_PROTOCOL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include "wayland-client.h" - -struct wl_client; -struct wl_resource; - -struct wl_subcompositor; -struct wl_subsurface; - -extern const struct wl_interface wl_subcompositor_interface; -extern const struct wl_interface wl_subsurface_interface; - -#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM -#define WL_SUBCOMPOSITOR_ERROR_ENUM -enum wl_subcompositor_error { - WL_SUBCOMPOSITOR_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBCOMPOSITOR_ERROR_ENUM */ - -#define WL_SUBCOMPOSITOR_DESTROY 0 -#define WL_SUBCOMPOSITOR_GET_SUBSURFACE 1 - -static inline void -wl_subcompositor_set_user_data(struct wl_subcompositor *wl_subcompositor, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_subcompositor, user_data); -} - -static inline void * -wl_subcompositor_get_user_data(struct wl_subcompositor *wl_subcompositor) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_subcompositor); -} - -static inline void -wl_subcompositor_destroy(struct wl_subcompositor *wl_subcompositor) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subcompositor, - WL_SUBCOMPOSITOR_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_subcompositor); -} - -static inline struct wl_subsurface * -wl_subcompositor_get_subsurface(struct wl_subcompositor *wl_subcompositor, struct wl_surface *surface, struct wl_surface *parent) -{ - struct wl_proxy *id; - - id = wl_proxy_create((struct wl_proxy *) wl_subcompositor, - &wl_subsurface_interface); - if (!id) - return NULL; - - wl_proxy_marshal((struct wl_proxy *) wl_subcompositor, - WL_SUBCOMPOSITOR_GET_SUBSURFACE, id, surface, parent); - - return (struct wl_subsurface *) id; -} - -#ifndef WL_SUBSURFACE_ERROR_ENUM -#define WL_SUBSURFACE_ERROR_ENUM -enum wl_subsurface_error { - WL_SUBSURFACE_ERROR_BAD_SURFACE = 0, -}; -#endif /* WL_SUBSURFACE_ERROR_ENUM */ - -#define WL_SUBSURFACE_DESTROY 0 -#define WL_SUBSURFACE_SET_POSITION 1 -#define WL_SUBSURFACE_PLACE_ABOVE 2 -#define WL_SUBSURFACE_PLACE_BELOW 3 -#define WL_SUBSURFACE_SET_SYNC 4 -#define WL_SUBSURFACE_SET_DESYNC 5 - -static inline void -wl_subsurface_set_user_data(struct wl_subsurface *wl_subsurface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wl_subsurface, user_data); -} - -static inline void * -wl_subsurface_get_user_data(struct wl_subsurface *wl_subsurface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wl_subsurface); -} - -static inline void -wl_subsurface_destroy(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wl_subsurface); -} - -static inline void -wl_subsurface_set_position(struct wl_subsurface *wl_subsurface, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_POSITION, x, y); -} - -static inline void -wl_subsurface_place_above(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_PLACE_ABOVE, sibling); -} - -static inline void -wl_subsurface_place_below(struct wl_subsurface *wl_subsurface, struct wl_surface *sibling) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_PLACE_BELOW, sibling); -} - -static inline void -wl_subsurface_set_sync(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_SYNC); -} - -static inline void -wl_subsurface_set_desync(struct wl_subsurface *wl_subsurface) -{ - wl_proxy_marshal((struct wl_proxy *) wl_subsurface, - WL_SUBSURFACE_SET_DESYNC); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/lib/ecore_wl2/subsurface-protocol.c b/src/lib/ecore_wl2/subsurface-protocol.c deleted file mode 100644 index 3e67801c35..0000000000 --- a/src/lib/ecore_wl2/subsurface-protocol.c +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright © 2012-2013 Collabora, Ltd. - * - * 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. - */ - -#include -#include -#include "wayland-util.h" - -extern const struct wl_interface wl_subsurface_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface wl_surface_interface; -extern const struct wl_interface wl_surface_interface; - -static const struct wl_interface *types[] = { - NULL, - NULL, - &wl_subsurface_interface, - &wl_surface_interface, - &wl_surface_interface, - &wl_surface_interface, - &wl_surface_interface, -}; - -static const struct wl_message wl_subcompositor_requests[] = { - { "destroy", "", types + 0 }, - { "get_subsurface", "noo", types + 2 }, -}; - -WL_EXPORT const struct wl_interface wl_subcompositor_interface = { - "wl_subcompositor", 1, - 2, wl_subcompositor_requests, - 0, NULL, -}; - -static const struct wl_message wl_subsurface_requests[] = { - { "destroy", "", types + 0 }, - { "set_position", "ii", types + 0 }, - { "place_above", "o", types + 5 }, - { "place_below", "o", types + 6 }, - { "set_sync", "", types + 0 }, - { "set_desync", "", types + 0 }, -}; - -WL_EXPORT const struct wl_interface wl_subsurface_interface = { - "wl_subsurface", 1, - 6, wl_subsurface_requests, - 0, NULL, -};