Mir
include
client
mir_toolkit
events
input
input_event.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014-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: Robert Carr <robert.carr@canonical.com>
17
*/
18
19
#ifndef MIR_TOOLKIT_INPUT_EVENT_H_
20
#define MIR_TOOLKIT_INPUT_EVENT_H_
21
22
#include "
mir_toolkit/events/event.h
"
23
24
#include <stdint.h>
25
#include <stdbool.h>
26
27
#ifdef __cplusplus
28
32
extern
"C"
{
33
#endif
34
35
typedef
int64_t
MirInputDeviceId
;
36
37
typedef
enum
{
38
mir_input_event_type_key
= 0,
39
mir_input_event_type_touch
= 1,
40
mir_input_event_type_pointer
= 2,
41
42
mir_input_event_types
43
}
MirInputEventType
;
44
48
typedef
enum
{
49
mir_input_event_modifier_none
= 1 << 0,
50
mir_input_event_modifier_alt
= 1 << 1,
51
mir_input_event_modifier_alt_left
= 1 << 2,
52
mir_input_event_modifier_alt_right
= 1 << 3,
53
mir_input_event_modifier_shift
= 1 << 4,
54
mir_input_event_modifier_shift_left
= 1 << 5,
55
mir_input_event_modifier_shift_right
= 1 << 6,
56
mir_input_event_modifier_sym
= 1 << 7,
57
mir_input_event_modifier_function
= 1 << 8,
58
mir_input_event_modifier_ctrl
= 1 << 9,
59
mir_input_event_modifier_ctrl_left
= 1 << 10,
60
mir_input_event_modifier_ctrl_right
= 1 << 11,
61
mir_input_event_modifier_meta
= 1 << 12,
62
mir_input_event_modifier_meta_left
= 1 << 13,
63
mir_input_event_modifier_meta_right
= 1 << 14,
64
mir_input_event_modifier_caps_lock
= 1 << 15,
65
mir_input_event_modifier_num_lock
= 1 << 16,
66
mir_input_event_modifier_scroll_lock
= 1 << 17
67
}
MirInputEventModifier
;
68
typedef
unsigned
int
MirInputEventModifiers
;
69
70
#ifdef __cplusplus
71
}
73
#endif
74
75
#include "
mir_toolkit/events/input/touch_event.h
"
76
#include "
mir_toolkit/events/input/keyboard_event.h
"
77
#include "
mir_toolkit/events/input/pointer_event.h
"
78
79
#ifdef __cplusplus
80
84
extern
"C"
{
85
#endif
86
93
MirInputDeviceId
mir_input_event_get_device_id
(
MirInputEvent
const
* event);
94
101
int64_t
mir_input_event_get_event_time
(
MirInputEvent
const
* event);
102
109
MirInputEventType
mir_input_event_get_type
(
MirInputEvent
const
* event);
110
118
MirKeyboardEvent
const
*
mir_input_event_get_keyboard_event
(
MirInputEvent
const
* event);
119
127
MirTouchEvent
const
*
mir_input_event_get_touch_event
(
MirInputEvent
const
* event);
128
136
MirPointerEvent
const
*
mir_input_event_get_pointer_event
(
MirInputEvent
const
* event);
137
144
bool
mir_input_event_has_cookie
(
MirInputEvent
const
* ev);
145
154
MirCookie
const
*
mir_input_event_get_cookie
(
MirInputEvent
const
* ev);
155
156
#ifdef __cplusplus
157
}
159
#endif
160
161
#endif // MIR_TOOLKIT_INPUT_EVENT_H_
pointer_event.h
mir_input_event_modifier_alt
Definition:
input_event.h:50
mir_input_event_modifier_function
Definition:
input_event.h:57
mir_input_event_get_keyboard_event
MirKeyboardEvent const * mir_input_event_get_keyboard_event(MirInputEvent const *event)
Retrieve the MirKeyboardEvent associated with a given input event.
mir_input_event_modifier_shift_left
Definition:
input_event.h:54
keyboard_event.h
mir_input_event_get_device_id
MirInputDeviceId mir_input_event_get_device_id(MirInputEvent const *event)
Retrieves the device id responsible for generating an input event.
MirPointerEvent
struct MirPointerEvent MirPointerEvent
An event type describing a change in pointer device state.
Definition:
pointer_event.h:35
mir_input_event_modifier_meta
Definition:
input_event.h:61
mir_input_event_modifier_scroll_lock
Definition:
input_event.h:66
mir_input_event_modifier_ctrl_left
Definition:
input_event.h:59
mir_input_event_modifier_alt_right
Definition:
input_event.h:52
mir_input_event_type_pointer
Definition:
input_event.h:40
mir_input_event_get_pointer_event
MirPointerEvent const * mir_input_event_get_pointer_event(MirInputEvent const *event)
Retrieve the MirPointerEvent associated with a given input event.
MirInputEventModifiers
unsigned int MirInputEventModifiers
Definition:
input_event.h:68
mir_input_event_has_cookie
bool mir_input_event_has_cookie(MirInputEvent const *ev)
Query if an input event contains a cookie.
MirTouchEvent
struct MirTouchEvent MirTouchEvent
An event type describing a change in touch device state.
Definition:
touch_event.h:33
MirInputEventModifier
MirInputEventModifier
Description of key modifier state.
Definition:
input_event.h:48
MirInputDeviceId
int64_t MirInputDeviceId
Definition:
input_event.h:35
mir_input_event_get_event_time
int64_t mir_input_event_get_event_time(MirInputEvent const *event)
Retrieve the time at which an input event occurred.
mir_input_event_modifier_none
Definition:
input_event.h:49
MirCookie
struct MirCookie MirCookie
Definition:
event.h:65
mir_input_event_modifier_meta_right
Definition:
input_event.h:63
mir_input_event_modifier_shift
Definition:
input_event.h:53
mir_input_event_modifier_meta_left
Definition:
input_event.h:62
mir_input_event_modifier_alt_left
Definition:
input_event.h:51
mir_input_event_modifier_shift_right
Definition:
input_event.h:55
MirKeyboardEvent
struct MirKeyboardEvent MirKeyboardEvent
An event type describing a change in keyboard state.
Definition:
keyboard_event.h:41
mir_input_event_modifier_ctrl_right
Definition:
input_event.h:60
mir_input_event_types
Definition:
input_event.h:42
mir_input_event_get_touch_event
MirTouchEvent const * mir_input_event_get_touch_event(MirInputEvent const *event)
Retrieve the MirTouchEvent associated with a given input event.
MirInputEventType
MirInputEventType
Definition:
input_event.h:37
MirInputEvent
struct MirInputEvent MirInputEvent
Definition:
event.h:58
mir_input_event_type_key
Definition:
input_event.h:38
mir_input_event_modifier_caps_lock
Definition:
input_event.h:64
mir_input_event_modifier_num_lock
Definition:
input_event.h:65
mir_input_event_get_type
MirInputEventType mir_input_event_get_type(MirInputEvent const *event)
Retrieve the type of an input event.
mir_input_event_modifier_sym
Definition:
input_event.h:56
mir_input_event_get_cookie
MirCookie const * mir_input_event_get_cookie(MirInputEvent const *ev)
Returns the cookie associated with an input event.
mir_input_event_modifier_ctrl
Definition:
input_event.h:58
touch_event.h
event.h
mir_input_event_type_touch
Definition:
input_event.h:39
Copyright © 2012-2016 Canonical Ltd.
Generated on Sat Dec 3 12:48:59 UTC 2016