diff --git a/.gitignore b/.gitignore index 3bfc9f3730..6e5804c12f 100644 --- a/.gitignore +++ b/.gitignore @@ -79,6 +79,8 @@ Session.vim /src/bin/ecore_con/efl_net_proxy_helper #Once all protocols are generated these will use wildcards +/src/lib/ecore_wl2/teamwork-client-protocol.h +/src/lib/ecore_wl2/teamwork-protocol.c /src/lib/ecore_wl2/linux-dmabuf-unstable-v1-client-protocol.h /src/lib/ecore_wl2/linux-dmabuf-unstable-v1-protocol.c /src/lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h diff --git a/src/Makefile_Ecore_Wl2.am b/src/Makefile_Ecore_Wl2.am index 1f1b17f1b8..56d2ebe58a 100644 --- a/src/Makefile_Ecore_Wl2.am +++ b/src/Makefile_Ecore_Wl2.am @@ -8,8 +8,8 @@ installed_ecorewl2mainheadersdir = $(includedir)/ecore-wl2-@VMAJ@ dist_installed_ecorewl2mainheaders_DATA = lib/ecore_wl2/Ecore_Wl2.h lib_ecore_wl2_libecore_wl2_la_SOURCES = \ -lib/ecore_wl2/teamwork_protocol.c \ -lib/ecore_wl2/teamwork_protocol.h \ +lib/ecore_wl2/teamwork-protocol.c \ +lib/ecore_wl2/teamwork-client-protocol.h \ lib/ecore_wl2/session-recovery-client-protocol.h \ lib/ecore_wl2/session-recovery-protocol.c \ lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h \ @@ -36,6 +36,8 @@ lib_ecore_wl2_libecore_wl2_la_DEPENDENCIES = @ECORE_WL2_INTERNAL_LIBS@ lib_ecore_wl2_libecore_wl2_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@ BUILT_SOURCES += \ + lib/ecore_wl2/teamwork-protocol.c \ + lib/ecore_wl2/teamwork-client-protocol.h \ lib/ecore_wl2/xdg-shell-unstable-v6-client-protocol.h \ lib/ecore_wl2/xdg-shell-unstable-v6-protocol.c \ lib/ecore_wl2/xdg-shell-unstable-v5-client-protocol.h \ diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h index 57ecf1c953..5ea5babc1b 100644 --- a/src/lib/ecore_wl2/ecore_wl2_private.h +++ b/src/lib/ecore_wl2/ecore_wl2_private.h @@ -7,7 +7,7 @@ # include "www-protocol.h" #define EFL_TEAMWORK_VERSION 2 -# include "teamwork_protocol.h" +# include "teamwork-client-protocol.h" # include "xdg-shell-unstable-v5-client-protocol.h" # define XDG_V5_UNSTABLE_VERSION 5 diff --git a/src/lib/ecore_wl2/teamwork_protocol.c b/src/lib/ecore_wl2/teamwork_protocol.c deleted file mode 100644 index baca23d3b0..0000000000 --- a/src/lib/ecore_wl2/teamwork_protocol.c +++ /dev/null @@ -1,46 +0,0 @@ -#include -#include -#include "wayland-util.h" - -extern const struct wl_interface wl_surface_interface; - -static const struct wl_interface *types[] = { - &wl_surface_interface, - NULL, - &wl_surface_interface, - NULL, - NULL, - NULL, - &wl_surface_interface, - NULL, - &wl_surface_interface, - NULL, - &wl_surface_interface, - NULL, - &wl_surface_interface, - NULL, - NULL, - &wl_surface_interface, - NULL, - NULL, -}; - -static const struct wl_message zwp_teamwork_requests[] = { - { "preload_uri", "os", types + 0 }, - { "activate_uri", "osff", types + 2 }, - { "deactivate_uri", "os", types + 6 }, - { "open_uri", "os", types + 8 }, -}; - -static const struct wl_message zwp_teamwork_events[] = { - { "fetching_uri", "os", types + 10 }, - { "completed_uri", "osi", types + 12 }, - { "fetch_info", "osu", types + 15 }, -}; - -WL_EXPORT const struct wl_interface zwp_teamwork_interface = { - "zwp_teamwork", 2, - 4, zwp_teamwork_requests, - 3, zwp_teamwork_events, -}; - diff --git a/src/lib/ecore_wl2/teamwork_protocol.h b/src/lib/ecore_wl2/teamwork_protocol.h deleted file mode 100644 index 129aa2deb4..0000000000 --- a/src/lib/ecore_wl2/teamwork_protocol.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef TEAMWORK_CLIENT_PROTOCOL_H -#define TEAMWORK_CLIENT_PROTOCOL_H - -#ifdef __cplusplus -extern "C" { -#endif - -#include -#include -#include "wayland-client.h" - -struct wl_client; -struct wl_resource; - -struct wl_surface; -struct zwp_teamwork; - -extern const struct wl_interface zwp_teamwork_interface; - -struct zwp_teamwork_listener { - /** - * fetching_uri - (none) - * @surface: (none) - * @uri: (none) - */ - void (*fetching_uri)(void *data, - struct zwp_teamwork *zwp_teamwork, - struct wl_surface *surface, - const char *uri); - /** - * completed_uri - (none) - * @surface: (none) - * @uri: (none) - * @valid: 1 if uri can be displayed, else 0 - */ - void (*completed_uri)(void *data, - struct zwp_teamwork *zwp_teamwork, - struct wl_surface *surface, - const char *uri, - int32_t valid); - /** - * fetch_info - (none) - * @surface: (none) - * @uri: (none) - * @progress: percentage of download - */ - void (*fetch_info)(void *data, - struct zwp_teamwork *zwp_teamwork, - struct wl_surface *surface, - const char *uri, - uint32_t progress); -}; - -static inline int -zwp_teamwork_add_listener(struct zwp_teamwork *zwp_teamwork, - const struct zwp_teamwork_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_teamwork, - (void (**)(void)) listener, data); -} - -#define ZWP_TEAMWORK_PRELOAD_URI 0 -#define ZWP_TEAMWORK_ACTIVATE_URI 1 -#define ZWP_TEAMWORK_DEACTIVATE_URI 2 -#define ZWP_TEAMWORK_OPEN_URI 3 - -#define ZWP_TEAMWORK_PRELOAD_URI_SINCE_VERSION 1 -#define ZWP_TEAMWORK_ACTIVATE_URI_SINCE_VERSION 1 -#define ZWP_TEAMWORK_DEACTIVATE_URI_SINCE_VERSION 1 -#define ZWP_TEAMWORK_OPEN_URI_SINCE_VERSION 1 - -static inline void -zwp_teamwork_set_user_data(struct zwp_teamwork *zwp_teamwork, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_teamwork, user_data); -} - -static inline void * -zwp_teamwork_get_user_data(struct zwp_teamwork *zwp_teamwork) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_teamwork); -} - -static inline uint32_t -zwp_teamwork_get_version(struct zwp_teamwork *zwp_teamwork) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_teamwork); -} - -static inline void -zwp_teamwork_destroy(struct zwp_teamwork *zwp_teamwork) -{ - wl_proxy_destroy((struct wl_proxy *) zwp_teamwork); -} - -static inline void -zwp_teamwork_preload_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_teamwork, - ZWP_TEAMWORK_PRELOAD_URI, surface, uri); -} - -static inline void -zwp_teamwork_activate_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri, wl_fixed_t x, wl_fixed_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_teamwork, - ZWP_TEAMWORK_ACTIVATE_URI, surface, uri, x, y); -} - -static inline void -zwp_teamwork_deactivate_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_teamwork, - ZWP_TEAMWORK_DEACTIVATE_URI, surface, uri); -} - -static inline void -zwp_teamwork_open_uri(struct zwp_teamwork *zwp_teamwork, struct wl_surface *surface, const char *uri) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_teamwork, - ZWP_TEAMWORK_OPEN_URI, surface, uri); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/src/wayland_protocol/teamwork.xml b/src/wayland_protocol/teamwork.xml new file mode 100644 index 0000000000..99e2f33dfa --- /dev/null +++ b/src/wayland_protocol/teamwork.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +