Ejemplo n.º 1
0
mir::EventUPtr mi::DefaultEventBuilder::pointer_event(Timestamp timestamp, MirPointerAction action,
        MirPointerButtons buttons_pressed, float hscroll_value, float vscroll_value,
        float relative_x_value, float relative_y_value)
{
    const float x_axis_value = 0;
    const float y_axis_value = 0;
    uint64_t mac = 0;
    if (action == mir_pointer_action_button_up || action == mir_pointer_action_button_down)
        mac = cookie_factory->timestamp_to_cookie(timestamp.count()).mac;
    return me::make_event(device_id, timestamp, mac, mir_input_event_modifier_none, action, buttons_pressed, x_axis_value, y_axis_value,
                          hscroll_value, vscroll_value, relative_x_value, relative_y_value);
}
Ejemplo n.º 2
0
mir::EventUPtr mi::DefaultEventBuilder::key_event(Timestamp timestamp, MirKeyboardAction action, xkb_keysym_t key_code,
        int scan_code)
{
    uint64_t mac = cookie_factory->timestamp_to_cookie(timestamp.count()).mac;
    return me::make_event(device_id, timestamp, mac, action, key_code, scan_code, mir_input_event_modifier_none);
}