Mir
input_configuration_event.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015 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: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_
20 #define MIR_TOOLKIT_EVENTS_INPUT_CONFIGURATION_EVENT_H_
21 
23 
24 #ifdef __cplusplus
25 
29 extern "C" {
30 #endif
31 
42 
43 typedef enum
44 {
48 
49 /*
50  * Retrieve the input configuration action which occurred.
51  *
52  * \param[in] ev The input configuration event
53  * \return The action
54  */
56 
57 /*
58  * Retreive the time associated with a MirInputConfiguration event
59 
60  * \param[in] ev The input configuration event
61  * \return The time in nanoseconds since epoch
62  */
64 
65 /*
66  * Retreive the device id associated with a MirInputConfiguration event
67 
68  * \param[in] ev The input configuration event
69  * \return The device id or -1 if not applicable to events of this action
70  */
72 
73 #ifdef __cplusplus
74 }
76 #endif
77 
78 #endif /* MIR_TOOLKIT_INPUT_CONFIGURATION_EVENT_H_ */
Definition: input_configuration_event.h:45
MirInputConfigurationAction mir_input_configuration_event_get_action(MirInputConfigurationEvent const *ev)
Definition: event.cpp:213
int64_t mir_input_configuration_event_get_time(MirInputConfigurationEvent const *ev)
Definition: event.cpp:219
int64_t MirInputDeviceId
Definition: input_event.h:34
MirInputConfigurationAction
MirInputConfigurationEvent indicates a configuration change in the input device subsystem. Eventually it'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 mir_input_configuration_event_get_device_id(MirInputConfigurationEvent const *ev)
Definition: event.cpp:225
Definition: input_configuration_event.h:46
Definition: event_private.h:110

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015