[PATCH weston 09/20] evdev: expose the generic evdev API

Pekka Paalanen ppaalanen at gmail.com
Mon Aug 6 04:16:11 PDT 2012


On Fri, 3 Aug 2012 13:22:37 -0400
Kristian Høgsberg <hoegsberg at gmail.com> wrote:

> On Fri, Aug 03, 2012 at 02:39:05PM +0300, Pekka Paalanen wrote:
> > This API does not depend on udev or launcher-util.
...
> > diff --git a/src/evdev.h b/src/evdev.h
> > index 2455770..66773e7 100644
> > --- a/src/evdev.h
> > +++ b/src/evdev.h
> > @@ -132,4 +132,18 @@ evdev_enable_udev_monitor(struct udev *udev, struct weston_seat *seat_base);
> >  void
> >  evdev_disable_udev_monitor(struct weston_seat *seat_base);
> >  
> > +void
> > +evdev_led_update(struct wl_list *evdev_devices, enum weston_led leds);
> > +
> > +struct evdev_input_device *
> > +evdev_input_device_create(struct weston_seat *seat,
> > +			  const char *path, int device_fd);
> > +
> > +void
> > +evdev_input_device_destroy(struct evdev_input_device *device);
> > +
> > +void
> > +evdev_notify_keyboard_focus(struct weston_seat *seat,
> > +			    struct wl_list *evdev_devices);
> > +
> 
> I'm committing this as-is, but I think the API is a little odd here with the wl_list arg.  It may be cleaner to just make it
> 
>   void
>   evdev_led_update(struct evdev_input_device *device, enum weston_led leds);
> 
> and then do the loop in the drm_seat/android_seat code.  Maybe we
> should also just call it an evdev_device instead, shorter not really
> ambiguous.

I'll implement those, except not sure what to do with
evdev_notify_keyboard_focus().


Thanks,
pq


More information about the wayland-devel mailing list