2
* Copyright © 2012 Canonical Ltd.
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License version 3,
6
* as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Robert Carr <robert.carr@canonical.com>
19
#ifndef MIR_TEST_EVENT_FACTORY_H
20
#define MIR_TEST_EVENT_FACTORY_H
22
#include "mir/geometry/point.h"
31
enum class EventAction
41
KeyParameters& from_device(int device_id);
42
KeyParameters& of_scancode(int scancode);
43
KeyParameters& with_action(EventAction action);
49
KeyParameters a_key_down_event();
50
KeyParameters a_key_up_event();
52
class ButtonParameters
56
ButtonParameters& from_device(int device_id);
57
ButtonParameters& of_button(int scancode);
58
ButtonParameters& with_action(EventAction action);
64
ButtonParameters a_button_down_event();
65
ButtonParameters a_button_up_event();
67
class MotionParameters
71
MotionParameters& from_device(int device_id);
72
MotionParameters& with_movement(int rel_x, int rel_y);
78
MotionParameters a_motion_event();
91
TouchParameters& from_device(int device_id);
92
TouchParameters& at_position(geometry::Point abs_pos);
93
TouchParameters& with_action(Action touch_action);
100
TouchParameters a_touch_event();
106
#endif /* MIR_TEST_EVENT_FACTORY_H */