Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
include
server
mir
input
touch_visualizer.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014 Canonical Ltd.
3
*
4
* This program is free software: you can redistribute it and/or modify it
5
* under the terms of the GNU 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 General Public License for more details.
12
*
13
* You should have received a copy of the GNU 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_INPUT_TOUCH_VISUALIZER_H_
20
#define MIR_INPUT_TOUCH_VISUALIZER_H_
21
22
#include "
mir/geometry/point.h
"
23
24
#include <vector>
25
26
namespace
mir
27
{
28
namespace
input
29
{
30
32
// a "spot" style visualization.
33
class
TouchVisualizer
34
{
35
public
:
36
virtual
~TouchVisualizer
() =
default
;
37
38
struct
Spot
39
{
40
geometry::Point
touch_location
;
41
42
// If pressure is zero, the touch-point can be interpreted as a hover.
43
float
pressure
;
44
};
45
46
// Toggle visualization of touches
47
virtual
void
enable
() = 0;
48
virtual
void
disable
() = 0;
49
50
// Visualize a given set of touches statelessly.
51
virtual
void
visualize_touches
(std::vector<Spot>
const
& touches) = 0;
52
53
protected
:
54
TouchVisualizer
() =
default
;
55
TouchVisualizer
(
const
TouchVisualizer
&) =
delete
;
56
TouchVisualizer
&
operator=
(
const
TouchVisualizer
&) =
delete
;
57
};
58
59
}
60
}
61
62
#endif // MIR_INPUT_TOUCH_VISUALIZER_H_
mir::input::TouchVisualizer
An interface for listening to a low level stream of touches, in order to provide. ...
Definition:
touch_visualizer.h:33
mir
All things Mir.
Definition:
buffer_stream.h:37
mir::geometry::Point
Definition:
point.h:30
point.h
mir::input::TouchVisualizer::TouchVisualizer
TouchVisualizer()=default
mir::input::TouchVisualizer::Spot
Definition:
touch_visualizer.h:38
mir::input::TouchVisualizer::operator=
TouchVisualizer & operator=(const TouchVisualizer &)=delete
mir::input::TouchVisualizer::visualize_touches
virtual void visualize_touches(std::vector< Spot > const &touches)=0
mir::input::TouchVisualizer::~TouchVisualizer
virtual ~TouchVisualizer()=default
mir::input::TouchVisualizer::Spot::pressure
float pressure
Definition:
touch_visualizer.h:43
mir::input::TouchVisualizer::enable
virtual void enable()=0
mir::input::TouchVisualizer::disable
virtual void disable()=0
mir::input::TouchVisualizer::Spot::touch_location
geometry::Point touch_location
Definition:
touch_visualizer.h:40
Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015