Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
include
common
mir
events
contact_state.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 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
* Author: Andreas Pokorny <andreas.pokorny@canonical.com>
17
*/
18
19
#ifndef MIR_EVENTS_CONTACT_STATE_H_
20
#define MIR_EVENTS_CONTACT_STATE_H_
21
22
#include "
mir_toolkit/event.h
"
23
24
namespace
mir
25
{
26
namespace
events
27
{
28
29
struct
ContactState
30
{
31
MirTouchId
touch_id
;
32
MirTouchAction
action
;
33
MirTouchTooltype
tooltype
;
34
float
x
;
35
float
y
;
36
float
pressure
;
37
float
touch_major
;
38
float
touch_minor
;
39
float
orientation
;
40
};
41
42
inline
bool
operator==
(
ContactState
const
& lhs,
ContactState
const
& rhs)
43
{
44
return
lhs.
touch_id
== rhs.
touch_id
&&
45
lhs.
action
== rhs.
action
&&
46
lhs.
tooltype
== rhs.
tooltype
&&
47
lhs.
x
== rhs.
x
&&
48
lhs.
y
== rhs.
y
&&
49
lhs.
pressure
== rhs.
pressure
&&
50
lhs.
touch_major
== rhs.
touch_major
&&
51
lhs.
touch_minor
== rhs.
touch_minor
&&
52
lhs.
orientation
== rhs.
orientation
;
53
}
54
55
}
56
}
57
58
#endif // MIR_EVENTS_CONTACT_STATE_H_
mir
Definition:
as_render_target.h:27
mir::events::ContactState::y
float y
Definition:
contact_state.h:35
mir::events::ContactState::x
float x
Definition:
contact_state.h:34
MirTouchId
int32_t MirTouchId
An identifier for a touch-point.
Definition:
touch_event.h:40
mir::events::operator==
bool operator==(ContactState const &lhs, ContactState const &rhs)
Definition:
contact_state.h:42
mir::events::ContactState
Definition:
contact_state.h:29
mir::events::ContactState::touch_major
float touch_major
Definition:
contact_state.h:37
mir::events::ContactState::tooltype
MirTouchTooltype tooltype
Definition:
contact_state.h:33
MirTouchTooltype
MirTouchTooltype
Identifiers for per-touch tool types.
Definition:
touch_event.h:82
mir::events::ContactState::orientation
float orientation
Definition:
contact_state.h:39
event.h
mir::events::ContactState::touch_id
MirTouchId touch_id
Definition:
contact_state.h:31
MirTouchAction
MirTouchAction
Possible per touch actions for state changing.
Definition:
touch_event.h:45
mir::events::ContactState::action
MirTouchAction action
Definition:
contact_state.h:32
mir::events::ContactState::touch_minor
float touch_minor
Definition:
contact_state.h:38
mir::events::ContactState::pressure
float pressure
Definition:
contact_state.h:36
Copyright © 2012-2016 Canonical Ltd.
Generated on Wed Oct 11 22:26:23 UTC 2017