Mir
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"
26 
27 namespace mir
28 {
29 namespace input
30 {
31 class InputSink
32 {
33 public:
34  InputSink() = default;
35  virtual ~InputSink() = default;
36  virtual void handle_input(MirEvent& event) = 0;
40  virtual void confine_pointer(mir::geometry::Point& position) = 0;
41 
45  virtual mir::geometry::Rectangle bounding_rectangle() const = 0;
46 
47 private:
48  InputSink(InputSink const&) = delete;
49  InputSink& operator=(InputSink const&) = delete;
50 };
51 }
52 }
53 
54 #endif
All things Mir.
Definition: atomic_callback.h:25
virtual ~InputSink()=default
Definition: point.h:30
virtual void confine_pointer(mir::geometry::Point &position)=0
Confine position of a pointer.
virtual void handle_input(MirEvent &event)=0
virtual mir::geometry::Rectangle bounding_rectangle() const =0
! Obtain the bounding rectangle of the destination area for this input sink
Definition: rectangle.h:33
Definition: event_private.h:178
Definition: input_sink.h:31

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015