Mir
input_device_state_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 2 or 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: Andreas Pokorny <andreas.pokorny@canonical.com>
17  */
18 
19 #ifndef MIR_TOOLKIT_EVENTS_INPUT_DEVICE_STATE_EVENT_H_
20 #define MIR_TOOLKIT_EVENTS_INPUT_DEVICE_STATE_EVENT_H_
21 
23 
24 #ifdef __cplusplus
25 
29 extern "C" {
30 #endif
31 
50  MirInputDeviceStateEvent const* ev);
51 
61 
69  MirInputDeviceStateEvent const* ev);
70 
78  MirInputDeviceStateEvent const* ev);
79 
87  MirInputDeviceStateEvent const* ev);
88 
97  MirInputDeviceStateEvent const* ev, uint32_t index);
98 
99 /*
100  * Retrieve a pressed key on the device identified by the \a index.
101  * The key is encoded as a scan code.
102  *
103  * \param[in] ev The input device state event
104  * \param[in] index The index of the input device
105  * \param[in] pressed_index The index of the pressed key
106  * \return The pressed key at index pressed_index
107  */
109  MirInputDeviceStateEvent const* ev, uint32_t index, uint32_t pressed_index);
110 
119  MirInputDeviceStateEvent const* ev, uint32_t index);
120 
129  MirInputDeviceStateEvent const* ev, uint32_t index);
130 
131 #ifdef __cplusplus
132 }
134 #endif
135 
136 #endif /* MIR_TOOLKIT_EVENTS_INPUT_DEVICE_STATE_EVENT_H_ */
uint32_t mir_input_device_state_event_device_count(MirInputDeviceStateEvent const *ev)
Retrieve the number of attached input devices.
struct MirInputDeviceStateEvent MirInputDeviceStateEvent
Definition: event.h:77
MirPointerButtons mir_input_device_state_event_pointer_buttons(MirInputDeviceStateEvent const *ev)
MirInputDeviceStateEvent informs clients about the current state of the input devices.
MirInputEventModifiers mir_input_device_state_event_modifiers(MirInputDeviceStateEvent const *ev)
Retrieve the modifier keys pressed on all input devices.
uint32_t mir_input_device_state_event_device_pressed_keys_for_index(MirInputDeviceStateEvent const *ev, uint32_t index, uint32_t pressed_index)
int64_t mir_input_device_state_event_time(MirInputDeviceStateEvent const *ev)
Retrieve the time associated with a MirInputDeviceStateEvent.
unsigned int MirInputEventModifiers
Definition: input_event.h:67
int64_t MirInputDeviceId
Definition: mir_input_device_types.h:31
MirPointerButtons mir_input_device_state_event_device_pointer_buttons(MirInputDeviceStateEvent const *ev, uint32_t index)
Retrieve the pointer button state of the device identified by the index.
float mir_input_device_state_event_pointer_axis(MirInputDeviceStateEvent const *ev, MirPointerAxis axis)
Retrieve the pointer position.
MirInputDeviceId mir_input_device_state_event_device_id(MirInputDeviceStateEvent const *ev, uint32_t index)
Retrieve the device id.
unsigned int MirPointerButtons
Definition: pointer_event.h:88
MirPointerAxis
Identifiers for pointer axis.
Definition: pointer_event.h:58
uint32_t mir_input_device_state_event_device_pressed_keys_count(MirInputDeviceStateEvent const *ev, uint32_t index)
Retrieve the size of scan code array of the device identified by the index.

Copyright © 2012-2022 Canonical Ltd.
Generated on Thu Jan 27 21:10:36 UTC 2022
This documentation is licensed under the GPL version 2 or 3.