Mir
include
client
mir_toolkit
events
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
22
#include <
mir_toolkit/events/event.h
>
23
24
#ifdef __cplusplus
25
29
extern
"C"
{
30
#endif
31
49
MirPointerButtons
mir_input_device_state_event_pointer_buttons
(
50
MirInputDeviceStateEvent
const
* ev);
51
59
float
mir_input_device_state_event_pointer_axis
(
60
MirInputDeviceStateEvent
const
* ev,
MirPointerAxis
axis);
61
68
int64_t
mir_input_device_state_event_time
(
69
MirInputDeviceStateEvent
const
* ev);
70
77
MirInputEventModifiers
mir_input_device_state_event_modifiers
(
78
MirInputDeviceStateEvent
const
* ev);
79
86
uint32_t
mir_input_device_state_event_device_count
(
87
MirInputDeviceStateEvent
const
* ev);
88
96
MirInputDeviceId
mir_input_device_state_event_device_id
(
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
*/
108
uint32_t
mir_input_device_state_event_device_pressed_keys_for_index
(
109
MirInputDeviceStateEvent
const
* ev, uint32_t index, uint32_t pressed_index);
110
118
uint32_t
mir_input_device_state_event_device_pressed_keys_count
(
119
MirInputDeviceStateEvent
const
* ev, uint32_t index);
120
128
MirPointerButtons
mir_input_device_state_event_device_pointer_buttons
(
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_ */
mir_input_device_state_event_device_count
uint32_t mir_input_device_state_event_device_count(MirInputDeviceStateEvent const *ev)
Retrieve the number of attached input devices.
MirInputDeviceStateEvent
struct MirInputDeviceStateEvent MirInputDeviceStateEvent
Definition:
event.h:77
event.h
mir_input_device_state_event_pointer_buttons
MirPointerButtons mir_input_device_state_event_pointer_buttons(MirInputDeviceStateEvent const *ev)
MirInputDeviceStateEvent informs clients about the current state of the input devices.
mir_input_device_state_event_modifiers
MirInputEventModifiers mir_input_device_state_event_modifiers(MirInputDeviceStateEvent const *ev)
Retrieve the modifier keys pressed on all input devices.
mir_input_device_state_event_device_pressed_keys_for_index
uint32_t mir_input_device_state_event_device_pressed_keys_for_index(MirInputDeviceStateEvent const *ev, uint32_t index, uint32_t pressed_index)
mir_input_device_state_event_time
int64_t mir_input_device_state_event_time(MirInputDeviceStateEvent const *ev)
Retrieve the time associated with a MirInputDeviceStateEvent.
MirInputEventModifiers
unsigned int MirInputEventModifiers
Definition:
input_event.h:67
MirInputDeviceId
int64_t MirInputDeviceId
Definition:
mir_input_device_types.h:31
mir_input_device_state_event_device_pointer_buttons
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.
mir_input_device_state_event_pointer_axis
float mir_input_device_state_event_pointer_axis(MirInputDeviceStateEvent const *ev, MirPointerAxis axis)
Retrieve the pointer position.
mir_input_device_state_event_device_id
MirInputDeviceId mir_input_device_state_event_device_id(MirInputDeviceStateEvent const *ev, uint32_t index)
Retrieve the device id.
MirPointerButtons
unsigned int MirPointerButtons
Definition:
pointer_event.h:88
MirPointerAxis
MirPointerAxis
Identifiers for pointer axis.
Definition:
pointer_event.h:58
mir_input_device_state_event_device_pressed_keys_count
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-2018 Canonical Ltd.
Generated on Thu Mar 15 13:04:52 UTC 2018