From c2ff1358039e3a7e4e9ea28f23ad458962559cec Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 23 Jul 2013 13:01:45 +0100 Subject: [PATCH] Update screenshot protocol for done event. Signed-off-by: Chris Michael --- .../e_screenshooter_client_protocol.c | 7 ++++++- .../e_screenshooter_client_protocol.h | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/modules/wl_screenshot/e_screenshooter_client_protocol.c b/src/modules/wl_screenshot/e_screenshooter_client_protocol.c index 258d72542..ef0a9d6ad 100644 --- a/src/modules/wl_screenshot/e_screenshooter_client_protocol.c +++ b/src/modules/wl_screenshot/e_screenshooter_client_protocol.c @@ -14,9 +14,14 @@ static const struct wl_message screenshooter_requests[] = { { "shoot", "oo", types + 0 }, }; +static const struct wl_message screenshooter_events[] = +{ + { "done", "", types + 0 }, +}; + WL_EXPORT const struct wl_interface screenshooter_interface = { "screenshooter", 1, ARRAY_LENGTH(screenshooter_requests), screenshooter_requests, - 0, NULL, + ARRAY_LENGTH(screenshooter_events), screenshooter_events, }; diff --git a/src/modules/wl_screenshot/e_screenshooter_client_protocol.h b/src/modules/wl_screenshot/e_screenshooter_client_protocol.h index 0265f67f7..b92c68240 100644 --- a/src/modules/wl_screenshot/e_screenshooter_client_protocol.h +++ b/src/modules/wl_screenshot/e_screenshooter_client_protocol.h @@ -11,9 +11,24 @@ extern "C" { struct wl_client; struct wl_resource; +struct screenshooter; extern const struct wl_interface screenshooter_interface; +struct screenshooter_listener +{ + /** done event */ + void (*done)(void *data, struct screenshooter *screenshooter); +}; + +static inline int +screenshooter_add_listener(struct screenshooter *screenshooter, + const struct screenshooter_listener *listener, void *data) +{ + return wl_proxy_add_listener((struct wl_proxy *) screenshooter, + (void (**)(void)) listener, data); +} + #define SCREENSHOOTER_SHOOT 0 static inline void