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>
This commit is contained in:
parent
6c7dc70d86
commit
bc56729ffe
@ -315,9 +315,9 @@ int main(int argc, char *argv[])
|
||||
output->height,
|
||||
&output->data,
|
||||
sh_data.shm);
|
||||
weston_screenshooter_shoot(sh_data.screenshooter,
|
||||
output->output,
|
||||
output->buffer);
|
||||
weston_screenshooter_take_shot(sh_data.screenshooter,
|
||||
output->output,
|
||||
output->buffer);
|
||||
sh_data.buffer_copy_done = 0;
|
||||
while (!sh_data.buffer_copy_done)
|
||||
wl_display_roundtrip(display);
|
||||
|
@ -61,10 +61,10 @@ screenshooter_done(void *data, enum weston_screenshooter_outcome outcome)
|
||||
}
|
||||
|
||||
static void
|
||||
screenshooter_shoot(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
struct wl_resource *output_resource,
|
||||
struct wl_resource *buffer_resource)
|
||||
screenshooter_take_shot(struct wl_client *client,
|
||||
struct wl_resource *resource,
|
||||
struct wl_resource *output_resource,
|
||||
struct wl_resource *buffer_resource)
|
||||
{
|
||||
struct weston_output *output =
|
||||
weston_head_from_resource(output_resource)->output;
|
||||
@ -80,7 +80,7 @@ screenshooter_shoot(struct wl_client *client,
|
||||
}
|
||||
|
||||
struct weston_screenshooter_interface screenshooter_implementation = {
|
||||
screenshooter_shoot
|
||||
screenshooter_take_shot
|
||||
};
|
||||
|
||||
static void
|
||||
|
@ -1,7 +1,7 @@
|
||||
<protocol name="weston_screenshooter">
|
||||
|
||||
<interface name="weston_screenshooter" version="1">
|
||||
<request name="shoot">
|
||||
<request name="take_shot">
|
||||
<arg name="output" type="object" interface="wl_output"/>
|
||||
<arg name="buffer" type="object" interface="wl_buffer"/>
|
||||
</request>
|
||||
|
Loading…
Reference in New Issue
Block a user