devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=0160c9910317577cc1144c230eed6d913cb6f25e

commit 0160c9910317577cc1144c230eed6d913cb6f25e
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed Jul 8 15:02:29 2015 -0400

    shot: Add screenshooter client protocol files
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/modules/shot/screenshooter-client-protocol.c | 26 +++++++++
 src/modules/shot/screenshooter-client-protocol.h | 68 ++++++++++++++++++++++++
 2 files changed, 94 insertions(+)

diff --git a/src/modules/shot/screenshooter-client-protocol.c 
b/src/modules/shot/screenshooter-client-protocol.c
new file mode 100644
index 0000000..5a3a8fb
--- /dev/null
+++ b/src/modules/shot/screenshooter-client-protocol.c
@@ -0,0 +1,26 @@
+#include <stdlib.h>
+#include <stdint.h>
+#include "wayland-util.h"
+
+extern const struct wl_interface wl_buffer_interface;
+extern const struct wl_interface wl_output_interface;
+
+static const struct wl_interface *types[] = {
+       &wl_output_interface,
+       &wl_buffer_interface,
+};
+
+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,
+       1, screenshooter_requests,
+       1, screenshooter_events,
+};
+
diff --git a/src/modules/shot/screenshooter-client-protocol.h 
b/src/modules/shot/screenshooter-client-protocol.h
new file mode 100644
index 0000000..5518f2b
--- /dev/null
+++ b/src/modules/shot/screenshooter-client-protocol.h
@@ -0,0 +1,68 @@
+#ifndef SCREENSHOOTER_CLIENT_PROTOCOL_H
+#define SCREENSHOOTER_CLIENT_PROTOCOL_H
+
+#ifdef  __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+struct wl_client;
+struct wl_resource;
+
+struct screenshooter;
+struct wl_buffer;
+struct wl_output;
+
+extern const struct wl_interface screenshooter_interface;
+
+struct screenshooter_listener {
+       /**
+        * done - (none)
+        */
+       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
+screenshooter_set_user_data(struct screenshooter *screenshooter, void 
*user_data)
+{
+       wl_proxy_set_user_data((struct wl_proxy *) screenshooter, user_data);
+}
+
+static inline void *
+screenshooter_get_user_data(struct screenshooter *screenshooter)
+{
+       return wl_proxy_get_user_data((struct wl_proxy *) screenshooter);
+}
+
+static inline void
+screenshooter_destroy(struct screenshooter *screenshooter)
+{
+       wl_proxy_destroy((struct wl_proxy *) screenshooter);
+}
+
+static inline void
+screenshooter_shoot(struct screenshooter *screenshooter, struct wl_output 
*output, struct wl_buffer *buffer)
+{
+       wl_proxy_marshal((struct wl_proxy *) screenshooter,
+                        SCREENSHOOTER_SHOOT, output, buffer);
+}
+
+#ifdef  __cplusplus
+}
+#endif
+
+#endif

-- 


Reply via email to