> *Discussion Needed*
> The input_event 'method name' is mir_input_event_get_time. The derived
> structures do not use '_get_' for getters. But why not stick with time instead
> of timestamp? That would mean 'mir_keyboard_event_time'.
>
> Libinput has a similar thing with base and specific events and there the
> solution is to provide a libinput_{specific_event}_get_base_event function.
I considered that, but felt the code I wanted to write (in qtmir) would be clearer with this approach.
Vis:
auto const timestamp = mir_keyboard_event_timestamp(kev);
as opposed to:
auto const input_event = mir_keyboard_event_get_base_event(kev);
auto const timestamp = mir_input_event_get_time(input_event);
or, more consistently:
auto const input_event = mir_keyboard_event_input_event(kev);
auto const timestamp = mir_input_event_get_time(input_event);
But as Alexandros mentions this suggestion would avoid writing 3*n (trivially different) functions where 3 would suffice.
In any case I have a mild preference for this approach but will conform to the majority view.
> *Discussion Needed* event_get_ time. The derived event_time' . {specific_ event}_ get_base_ event function.
> The input_event 'method name' is mir_input_
> structures do not use '_get_' for getters. But why not stick with time instead
> of timestamp? That would mean 'mir_keyboard_
>
> Libinput has a similar thing with base and specific events and there the
> solution is to provide a libinput_
I considered that, but felt the code I wanted to write (in qtmir) would be clearer with this approach.
Vis:
auto const timestamp = mir_keyboard_ event_timestamp (kev);
as opposed to:
auto const input_event = mir_keyboard_ event_get_ base_event( kev); event_get_ time(input_ event);
auto const timestamp = mir_input_
or, more consistently:
auto const input_event = mir_keyboard_ event_input_ event(kev) ; event_get_ time(input_ event);
auto const timestamp = mir_input_
But as Alexandros mentions this suggestion would avoid writing 3*n (trivially different) functions where 3 would suffice.
In any case I have a mild preference for this approach but will conform to the majority view.