devilhorns pushed a commit to branch master.

commit c2ff1358039e3a7e4e9ea28f23ad458962559cec
Author: Chris Michael <[email protected]>
Date:   Tue Jul 23 13:01:45 2013 +0100

    Update screenshot protocol for done event.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 .../wl_screenshot/e_screenshooter_client_protocol.c       |  7 ++++++-
 .../wl_screenshot/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 258d725..ef0a9d6 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 0265f67..b92c682 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

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to