Update screenshot protocol for done event.
authorChris Michael <cp.michael@samsung.com>
Tue, 23 Jul 2013 12:01:45 +0000 (13:01 +0100)
committerChris Michael <cp.michael@samsung.com>
Tue, 23 Jul 2013 12:01:45 +0000 (13:01 +0100)
Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/modules/wl_screenshot/e_screenshooter_client_protocol.c
src/modules/wl_screenshot/e_screenshooter_client_protocol.h

index 258d725..ef0a9d6 100644 (file)
@@ -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,
 };
 
index 0265f67..b92c682 100644 (file)
@@ -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