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
29extern "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_ */
unsigned int MirPointerButtons
Definition: pointer_event.h:88
int64_t mir_input_device_state_event_time(MirInputDeviceStateEvent const *ev)
Retrieve the time associated with a MirInputDeviceStateEvent.
struct MirInputDeviceStateEvent MirInputDeviceStateEvent
Definition: event.h:77
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.
uint32_t mir_input_device_state_event_device_count(MirInputDeviceStateEvent const *ev)
Retrieve the number of attached 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 MirInputDeviceId
Definition: mir_input_device_types.h:31
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_count(MirInputDeviceStateEvent const *ev, uint32_t index)
Retrieve the size of scan code array of the device identified by the index.
MirPointerButtons mir_input_device_state_event_pointer_buttons(MirInputDeviceStateEvent const *ev)
MirInputDeviceStateEvent informs clients about the current state of the input devices.
MirInputDeviceId mir_input_device_state_event_device_id(MirInputDeviceStateEvent const *ev, uint32_t index)
Retrieve the device id.
float mir_input_device_state_event_pointer_axis(MirInputDeviceStateEvent const *ev, MirPointerAxis axis)
Retrieve the pointer position.
MirPointerAxis
Identifiers for pointer axis.
Definition: pointer_event.h:58
unsigned int MirInputEventModifiers
Definition: input_event.h:67

Copyright © 2012-2022 Canonical Ltd.
Generated on Sun Oct 9 06:13:38 UTC 2022
This documentation is licensed under the GPL version 2 or 3.