More typing

Robert Carr robert.carr at canonical.com
Thu Jan 22 19:03:09 UTC 2015


Hi dandrader! It seems to me like you have a different series of concerns
than duflu and are concerned about the semantics of the API rather than the
number of characters in the method names.

It's unfortunate that this split is necessary as the current model does
work so well for clicking/tapping. The current model can be kind of
difficult in regards to pointers though in at least a few areas:

1. Pointer/touch actions, e.g. the weird masking stuff...I think the new
model is obviously more clear here
2. Interpretation of hover events "Cursor motion or touchpad hover or
stylus?"
3. Interpretation of strange touch devices, e.g. how do you avoid treating
a button press on a stylus as a click from the system cursor

I hope that doing the pointer/touch event split will solve these issues in
the client library rather than require down-streams to correctly do so.

It perhaps does involve some more typing for downstreams (though a correct
implementation of the above points with current API would require some more
typing too), but I think this is offset
by the fact that its hard to get things wrong.

Thanks,
Robert



On Thu, Jan 22, 2015 at 2:08 AM, Daniel d'Andrada <
daniel.dandrada at canonical.com> wrote:

> On 22/01/15 06:23, Daniel van Vugt wrote:
> > Looking at an example of changing from the old input event API to the
> > new one in Mir 0.10:
> >
> >
> http://bazaar.launchpad.net/~mir-team/mir/development-branch/revision/2246?compare_revid=2128#examples/fingerpaint.c
> >
> >
> > You can see it requires a lot more code now.
> >
> > I'm wondering if anyone has any thoughts on how we might make things
> > simpler for users again before this becomes the norm...?
> >
> > - Daniel
> >
>
> Having a quick look, the cause seems to be because android merged touch
> and mouse input under the same event structure (motion events). For
> things like dragging and clicking/tapping (which comprises most of the
> interactions you do) this is a blessing as you handle both in the same
> way. So you don't have to bother telling them apart unless you want to
> do something mouse or touch specific.
>
> But having touch and mouse in completely separate APIs you end up
> duplicating code.
>
> --
> Mir-devel mailing list
> Mir-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/mir-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/mir-devel/attachments/20150122/a8089b15/attachment.html>


More information about the Mir-devel mailing list