[PATCH weston v1 05/17] clients: add missing getters for input objects

Marek Chalupa mchqwerty at gmail.com
Wed Dec 10 03:56:35 PST 2014


On 9 December 2014 at 21:33, Derek Foreman <derekf at osg.samsung.com> wrote:

> On 05/12/14 07:36 AM, Marek Chalupa wrote:
> > We need get wayland objects from toytoolkit display
> > (there already are display_get_output, input_get_seat, ...),
> > so that we can use them in the tests. This patch adds:
> >
> >   display_get_input()
> >   input_get_wl_pointer()
> >   input_get_wl_keyboard()
> >   input_get_wl_touch()
>
> Is there any reason we'd want these to be unavailable to toytoolkit apps?
>

Since toytoolkit is weston-private, I don't think the is any.


>
> > Signed-off-by: Marek Chalupa <mchqwerty at gmail.com>
> > ---
> >  clients/window.c | 24 ++++++++++++++++++++++++
> >  clients/window.h | 12 ++++++++++++
> >  2 files changed, 36 insertions(+)
> >
> > diff --git a/clients/window.c b/clients/window.c
> > index cc1e272..8dbf878 100644
> > --- a/clients/window.c
> > +++ b/clients/window.c
> > @@ -5211,6 +5211,24 @@ input_destroy(struct input *input)
> >       free(input);
> >  }
> >
> > +struct wl_pointer *
> > +input_get_wl_pointer(struct input *input)
> > +{
> > +     return input->pointer;
> > +}
> > +
> > +struct wl_keyboard *
> > +input_get_wl_keyboard(struct input *input)
> > +{
> > +     return input->keyboard;
> > +}
> > +
> > +struct wl_touch *
> > +input_get_wl_touch(struct input *input)
> > +{
> > +     return input->touch;
> > +}
> > +
> >  static void
> >  init_workspace_manager(struct display *d, uint32_t id)
> >  {
> > @@ -5664,6 +5682,12 @@ display_get_output(struct display *display)
> >       return container_of(display->output_list.next, struct output,
> link);
> >  }
> >
> > +struct input *
> > +display_get_input(struct display *display)
> > +{
> > +     return container_of(display->input_list.next, struct input, link);
> > +}
> > +
> >  struct wl_compositor *
> >  display_get_compositor(struct display *display)
> >  {
> > diff --git a/clients/window.h b/clients/window.h
> > index 5247f19..20d3fa0 100644
> > --- a/clients/window.h
> > +++ b/clients/window.h
> > @@ -93,6 +93,9 @@ display_get_compositor(struct display *display);
> >  struct output *
> >  display_get_output(struct display *display);
> >
> > +struct input *
> > +display_get_input(struct display *display);
> > +
> >  uint32_t
> >  display_get_serial(struct display *display);
> >
> > @@ -613,6 +616,15 @@ output_get_allocation(struct output *output, struct
> rectangle *allocation);
> >  struct wl_output *
> >  output_get_wl_output(struct output *output);
> >
> > +struct wl_pointer *
> > +input_get_wl_pointer(struct input *input);
> > +
> > +struct wl_keyboard *
> > +input_get_wl_keyboard(struct input *input);
> > +
> > +struct wl_touch *
> > +input_get_wl_touch(struct input *input);
> > +
> >  enum wl_output_transform
> >  output_get_transform(struct output *output);
> >
> >
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>

Regards,
Marek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20141210/8462de25/attachment.html>


More information about the wayland-devel mailing list