+1 for this idea, this looks a lot cleaner to work with then what we had before. I've gone through all the patches, and since most of it is refactoring the only issue I can see is the typo in #4. Consider it
Reviewed-by: Lyude <[email protected]> On Mon, 2015-12-14 at 12:00 +1000, Peter Hutterer wrote: > This patchset changes the Tablet API from an API where we have a few > functions that take an axis type into one where we have an API that is > specific to each axis type. > > The one-size-fits-all approach turned out to be too inflexible to be useful > and forced a couple of special API behaviours, e.g. get_value for a relative > wheel must always returns 0, has_axis for x/y is always true, etc. > Changing the API to be per-axis is a lot more expressive in code and allows > us to document and adjust the specific behaviour for each axis accordingly. > > Rather than libinput_tablet_tool_has_axis(tool, > LIBINPUT_TABLET_TOOL_AXIS_PRESSURE), the new call is now > libinput_tablet_tool_has_pressure(tool). > and a similar change for the events. > > The functionality largely stays the same, but there are a few notiable > differences: > * has_x() and has_y() is not available - it wouldn't be a tablet if it > doesn't have those > * has_tilt() instead of has_tilt_x() + has_tilt_y(). We don't init devices > with only one tilt axis as tablet. > * delta support (including delta_discrete) was dropped for all but the rel > wheel. > delta_discrete was already 0 for all but the wheel, the others were simple > delta = old - current. We can punt that to the caller. > > The last change enables us to introduce a get_dx/get_dy in the future for > accelerated motion data - required in relative mode. > > Note that this is just the change to the public API. The internals work the > same as before, but will be adjusted once we agree on the public API. > > Cheers, > Peter > _______________________________________________ > wayland-devel mailing list > [email protected] > http://lists.freedesktop.org/mailman/listinfo/wayland-devel -- Cheers, Lyude _______________________________________________ wayland-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/wayland-devel
