[RFC libinput] Add dial input device support

Peter Hutterer peter.hutterer at who-t.net
Fri Feb 19 02:47:26 UTC 2016


On Thu, Feb 18, 2016 at 02:08:09PM +0530, PrasannaKumar Muralidharan wrote:
> Hi Peter,
> 
> Thanks for your time in looking at the patch.
> 
> > First: yes, implementing support for dial interfaces is within the scope of
> > libinput, I think it makes sense to add this. But not quite in this form,
> > the various CAP flags are libinput interfaces that denote a specific
> > functionality. We should not add one per event group.
> 
> Makes sense.
> 
> > A while ago we started work on the so-called buttonset interface which is
> > a generic interface to support a bunch of devices like yours:
> > https://lists.freedesktop.org/archives/wayland-devel/2016-January/026670.html
> >
> > Since that patchset we've split out the wacom-specific parts so you can
> > ignore any strip/ring handling. There is no dial axis atm, but there
> > could be.
> >
> > Have a look at that patchset, the documentation should explain what the
> > interface is for, etc. I think adding dial to buttonset and then getting
> > that interface ready for merging is the best approach here.
> 
> Thanks for the info. Could not find the buttonset interface patch in
> master branch yet. Will use buttonset interface and provide a patch
> once it is merged. Does that make sense?

yeah, thanks. the buttonset interface is still WIP and I've been rebasing it
heavily. I'll try to get this sorted next week to have something that
applies on master with the new pad-related interface.

> > One comment on the API (to save you from scrolling down):
> > libinput_event_dial_get_rotation_count() should simply be
> > libinput_event_dial_get_rotation() and return the value in degrees. This is
> > more flexible than the current one which reads like it's multiples of 360
> > degrees?
> 
> Certainly not multiple of 360 degree, value need not be in degree.
> Dial is relative and returns +1, +2 or -2.
> Will change the API based on the buttonset interface API convention.

right. the approach we used for this was to have an API that exports the
value in degrees and an API for get_value_discrete() or similarly named.
Look up the libinput_event_pointer*axis* API to get an idea.

Cheers,
   Peter




More information about the wayland-devel mailing list