summaryrefslogtreecommitdiff
path: root/clients
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2015-11-17 16:00:34 +0800
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2015-11-19 15:07:24 +0200
commitcf1efd2ab75cdffc83b9490041a8bd4660b3e64e (patch)
tree780096a58160d4517eb102ed3efd5e5c2cd7ea27 /clients
parent6d6fb61a32d8718befaecb2f004cf7d3754a063e (diff)
downloadweston-cf1efd2ab75cdffc83b9490041a8bd4660b3e64e.tar.gz
Rename screenshooter protocol to weston_screenshooter
Due to the effort of moving a way from non-prefixed protocols, rename the weston specific screenshooter protocol to weston_screenshooter. Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mariusz Ceier <mceier+wayland@gmail.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'clients')
-rw-r--r--clients/screenshot.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/clients/screenshot.c b/clients/screenshot.c
index f11e3baa..18b5f88f 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -36,7 +36,7 @@
#include <cairo.h>
#include <wayland-client.h>
-#include "screenshooter-client-protocol.h"
+#include "weston-screenshooter-client-protocol.h"
#include "shared/os-compatibility.h"
/* The screenshooter is a good example of a custom object exposed by
@@ -44,7 +44,7 @@
* side marshalling outside libwayland.so */
static struct wl_shm *shm;
-static struct screenshooter *screenshooter;
+static struct weston_screenshooter *screenshooter;
static struct wl_list output_list;
int min_x, min_y, max_x, max_y;
int buffer_copy_done;
@@ -118,12 +118,12 @@ static const struct wl_output_listener output_listener = {
};
static void
-screenshot_done(void *data, struct screenshooter *screenshooter)
+screenshot_done(void *data, struct weston_screenshooter *screenshooter)
{
buffer_copy_done = 1;
}
-static const struct screenshooter_listener screenshooter_listener = {
+static const struct weston_screenshooter_listener screenshooter_listener = {
screenshot_done
};
@@ -141,9 +141,10 @@ handle_global(void *data, struct wl_registry *registry,
wl_output_add_listener(output->output, &output_listener, output);
} else if (strcmp(interface, "wl_shm") == 0) {
shm = wl_registry_bind(registry, name, &wl_shm_interface, 1);
- } else if (strcmp(interface, "screenshooter") == 0) {
+ } else if (strcmp(interface, "weston_screenshooter") == 0) {
screenshooter = wl_registry_bind(registry, name,
- &screenshooter_interface, 1);
+ &weston_screenshooter_interface,
+ 1);
}
}
@@ -290,7 +291,9 @@ int main(int argc, char *argv[])
return -1;
}
- screenshooter_add_listener(screenshooter, &screenshooter_listener, screenshooter);
+ weston_screenshooter_add_listener(screenshooter,
+ &screenshooter_listener,
+ screenshooter);
if (set_buffer_size(&width, &height))
return -1;
@@ -298,7 +301,9 @@ int main(int argc, char *argv[])
wl_list_for_each(output, &output_list, link) {
output->buffer = create_shm_buffer(output->width, output->height, &output->data);
- screenshooter_shoot(screenshooter, output->output, output->buffer);
+ weston_screenshooter_shoot(screenshooter,
+ output->output,
+ output->buffer);
buffer_copy_done = 0;
while (!buffer_copy_done)
wl_display_roundtrip(display);