Mir
input_configuration_event.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 3,
6  * as published by the Free Software Foundation.
7  *
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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Brandon Schaefer <brandon.schaefer@canonical.com>
17  */
18 
19 #ifndef MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_
20 #define MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_
21 
22 #include <chrono>
23 #include <limits>
24 
25 #include "mir/events/event.h"
26 
28 {
30 
33 
34  std::chrono::nanoseconds when() const;
35  void set_when(std::chrono::nanoseconds const& when);
36 
37  MirInputDeviceId id() const;
38  void set_id(MirInputDeviceId id);
39 
40 private:
42  std::chrono::nanoseconds when_{0};
43  MirInputDeviceId id_{std::numeric_limits<MirInputDeviceId>::max()};
44 };
45 
46 #endif /* MIR_COMMON_INPUT_CONFIGURATION_EVENT_H_ */
std::chrono::nanoseconds when() const
Definition: input_configuration_event.cpp:36
MirInputConfigurationAction action() const
Definition: input_configuration_event.cpp:26
void set_when(std::chrono::nanoseconds const &when)
Definition: input_configuration_event.cpp:41
int64_t MirInputDeviceId
Definition: input_event.h:35
void set_id(MirInputDeviceId id)
Definition: input_configuration_event.cpp:51
MirInputConfigurationAction
MirInputConfigurationEvent indicates a configuration change in the input device subsystem. Eventually it&#39;s usage will be required to properly interpret MirInputEvent, for example: If we receive a button down, and then a device reset, we should not expect to receive the button up.
Definition: input_configuration_event.h:43
MirInputDeviceId id() const
Definition: input_configuration_event.cpp:46
MirInputConfigurationEvent()
Definition: input_configuration_event.cpp:21
void set_action(MirInputConfigurationAction action)
Definition: input_configuration_event.cpp:31
Definition: input_configuration_event.h:27
Definition: event.h:30

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016