summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-04-18 10:33:25 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-04-20 14:20:02 -0400
commitcf57dc52ff4609f27fb874063e47608402e6bf9f (patch)
tree6d2341a6dcac06866c465b4f9acd3a8a1c9f7371
parent91342c6081ae6df924d021b6e130af80caab0a1c (diff)
Update to work with scanner that doesn't hardcode wl_*
This lets us drop the wl_ prefix for the un-officual screenshooter protocol.
-rw-r--r--clients/screenshot.c8
-rw-r--r--compositor/screenshooter.c10
2 files changed, 9 insertions, 9 deletions
diff --git a/clients/screenshot.c b/clients/screenshot.c
index 3582cc4..8f76a09 100644
--- a/clients/screenshot.c
+++ b/clients/screenshot.c
@@ -39,10 +39,10 @@ static void
handle_global(struct wl_display *display, uint32_t id,
const char *interface, uint32_t version, void *data)
{
- struct wl_screenshooter **screenshooter = data;
+ struct screenshooter **screenshooter = data;
if (strcmp(interface, "screenshooter") == 0)
- *screenshooter = wl_screenshooter_create(display, id, 1);
+ *screenshooter = screenshooter_create(display, id, 1);
}
int main(int argc, char *argv[])
@@ -50,7 +50,7 @@ int main(int argc, char *argv[])
struct wl_display *display;
GMainLoop *loop;
GSource *source;
- struct wl_screenshooter *screenshooter;
+ struct screenshooter *screenshooter;
display = wl_display_connect(NULL);
if (display == NULL) {
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
source = wl_glib_source_new(display);
g_source_attach(source, NULL);
- wl_screenshooter_shoot(screenshooter);
+ screenshooter_shoot(screenshooter);
g_idle_add((GSourceFunc) g_main_loop_quit, loop);
g_main_loop_run(loop);
diff --git a/compositor/screenshooter.c b/compositor/screenshooter.c
index 53ed931..78d0be3 100644
--- a/compositor/screenshooter.c
+++ b/compositor/screenshooter.c
@@ -23,13 +23,13 @@
#include "compositor.h"
#include "screenshooter-server-protocol.h"
-struct wl_screenshooter {
+struct screenshooter {
struct wl_object base;
struct wlsc_compositor *ec;
};
static void
-screenshooter_shoot(struct wl_client *client, struct wl_screenshooter *shooter)
+screenshooter_shoot(struct wl_client *client, struct screenshooter *shooter)
{
struct wlsc_compositor *ec = shooter->ec;
struct wlsc_output *output;
@@ -65,20 +65,20 @@ screenshooter_shoot(struct wl_client *client, struct wl_screenshooter *shooter)
}
}
-struct wl_screenshooter_interface screenshooter_implementation = {
+struct screenshooter_interface screenshooter_implementation = {
screenshooter_shoot
};
void
screenshooter_create(struct wlsc_compositor *ec)
{
- struct wl_screenshooter *shooter;
+ struct screenshooter *shooter;
shooter = malloc(sizeof *shooter);
if (shooter == NULL)
return;
- shooter->base.interface = &wl_screenshooter_interface;
+ shooter->base.interface = &screenshooter_interface;
shooter->base.implementation =
(void(**)(void)) &screenshooter_implementation;
shooter->ec = ec;