screenshooter: rename some functions to avoid conflicts

We have two functions with the name weston_screenshooter_shoot():

    1. screenshot protocol function that the screenshooter
    client uses to request screenshots to the compositor

    2. libweston function used by the compositor to take
    screenshots as requested by the screenshooter client

Until now we had no problem with that, but in the next commits
we are going to use the screenshot protocol in the test suite,
which is also user of libweston. So rename screenshot protocol
function to weston_screenshooter_take_shot() to avoid the conflict.

For consistency, also rename screenshooter_shoot() to
screenshooter_take_shot() in compositor/weston-screenshooter.c

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
dev
Leandro Ribeiro 4 years ago committed by Pekka Paalanen
parent 6c7dc70d86
commit bc56729ffe
  1. 2
      clients/screenshot.c
  2. 4
      compositor/weston-screenshooter.c
  3. 2
      protocol/weston-screenshooter.xml

@ -315,7 +315,7 @@ int main(int argc, char *argv[])
output->height, output->height,
&output->data, &output->data,
sh_data.shm); sh_data.shm);
weston_screenshooter_shoot(sh_data.screenshooter, weston_screenshooter_take_shot(sh_data.screenshooter,
output->output, output->output,
output->buffer); output->buffer);
sh_data.buffer_copy_done = 0; sh_data.buffer_copy_done = 0;

@ -61,7 +61,7 @@ screenshooter_done(void *data, enum weston_screenshooter_outcome outcome)
} }
static void static void
screenshooter_shoot(struct wl_client *client, screenshooter_take_shot(struct wl_client *client,
struct wl_resource *resource, struct wl_resource *resource,
struct wl_resource *output_resource, struct wl_resource *output_resource,
struct wl_resource *buffer_resource) struct wl_resource *buffer_resource)
@ -80,7 +80,7 @@ screenshooter_shoot(struct wl_client *client,
} }
struct weston_screenshooter_interface screenshooter_implementation = { struct weston_screenshooter_interface screenshooter_implementation = {
screenshooter_shoot screenshooter_take_shot
}; };
static void static void

@ -1,7 +1,7 @@
<protocol name="weston_screenshooter"> <protocol name="weston_screenshooter">
<interface name="weston_screenshooter" version="1"> <interface name="weston_screenshooter" version="1">
<request name="shoot"> <request name="take_shot">
<arg name="output" type="object" interface="wl_output"/> <arg name="output" type="object" interface="wl_output"/>
<arg name="buffer" type="object" interface="wl_buffer"/> <arg name="buffer" type="object" interface="wl_buffer"/>
</request> </request>

Loading…
Cancel
Save