Mir
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
include
platform
mir
input
input_sink.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2014-2015 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:
17
* Andreas Pokorny <andreas.pokorny@canonical.com>
18
*/
19
20
#ifndef MIR_INPUT_INPUT_SINK_H_
21
#define MIR_INPUT_INPUT_SINK_H_
22
23
#include "
mir_toolkit/event.h
"
24
#include "
mir/geometry/rectangle.h
"
25
#include "
mir/geometry/displacement.h
"
26
27
#include <vector>
28
29
namespace
mir
30
{
31
namespace
input
32
{
33
class
InputSink
34
{
35
public
:
36
InputSink
() =
default
;
37
virtual
~InputSink
() =
default
;
38
virtual
void
handle_input
(
MirEvent
& event) = 0;
42
virtual
mir::geometry::Rectangle
bounding_rectangle
()
const
= 0;
43
55
virtual
void
key_state
(std::vector<uint32_t>
const
& scan_codes) = 0;
60
virtual
void
pointer_state
(
MirPointerButtons
buttons) = 0;
64
private
:
65
InputSink
(
InputSink
const
&) =
delete
;
66
InputSink
& operator=(
InputSink
const
&) =
delete
;
67
};
68
}
69
}
70
71
#endif
mir
Definition:
as_render_target.h:27
mir::input::InputSink::~InputSink
virtual ~InputSink()=default
mir::input::InputSink::InputSink
InputSink()=default
mir::input::InputSink::pointer_state
virtual void pointer_state(MirPointerButtons buttons)=0
Set button state of a pointing device.
mir::input::InputSink::handle_input
virtual void handle_input(MirEvent &event)=0
rectangle.h
mir::input::InputSink::bounding_rectangle
virtual mir::geometry::Rectangle bounding_rectangle() const =0
! Obtain the bounding rectangle of the destination area for this input sink
MirEvent
struct MirEvent MirEvent
Definition:
event.h:84
MirPointerButtons
unsigned int MirPointerButtons
Definition:
pointer_event.h:88
event.h
mir::geometry::Rectangle
Definition:
rectangle.h:33
displacement.h
mir::input::InputSink::key_state
virtual void key_state(std::vector< uint32_t > const &scan_codes)=0
Set all pressed scan codes.
mir::input::InputSink
Definition:
input_sink.h:33
Copyright © 2012-2016 Canonical Ltd.
Generated on Fri Dec 20 06:52:43 UTC 2019