More typing

Daniel van Vugt daniel.van.vugt at
Thu Jan 22 08:35:37 UTC 2015

Initial thoughts:

"InputEvent/input_event" is mentioned too much. So:

     MirInputEvent* input = mir_event_get_input_event(event);
     MirTouchInputEvent* touch =
     x = mir_touch_input_event_get_touch_axis_value(
             touch, 0, mir_touch_input_axis_x);

could be easily renamed to something like:

     MirInput* input = mir_event_get_input(event);
     MirTouch* touch = mir_input_get_touch(input);
     x = mir_touch_get_axis(touch, 0, mir_touch_axis_x);

I'm not sure if we really need MirInput(Event) in there either. So it 
could be simpler again:

     MirTouch* touch = mir_event_get_touch(event);
     x = mir_touch_get_axis(touch, 0, mir_touch_axis_x);

- Daniel

On 22/01/15 16: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:
> 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

More information about the Mir-devel mailing list