Mir
basic_seat.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2015-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 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:
17  * Andreas Pokorny <andreas.pokorny@canonical.com>
18  */
19 
20 #ifndef MIR_BASIC_SEAT_H_
21 #define MIR_BASIC_SEAT_H_
22 
23 #include "mir/input/seat.h"
26 
27 #include <mutex>
28 
29 namespace mir
30 {
31 namespace input
32 {
33 class TouchVisualizer;
34 class CursorListener;
35 class InputRegion;
36 class InputDispatcher;
37 
38 class BasicSeat : public Seat
39 {
40 public:
41  BasicSeat(std::shared_ptr<InputDispatcher> const& dispatcher,
42  std::shared_ptr<TouchVisualizer> const& touch_visualizer,
43  std::shared_ptr<CursorListener> const& cursor_listener,
44  std::shared_ptr<InputRegion> const& input_region);
45  // Seat methods:
46  void add_device(Device const& device) override;
47  void remove_device(Device const& device) override;
48  void dispatch_event(MirEvent& event) override;
49  geometry::Rectangle get_rectangle_for(Device const& dev) override;
50 
51 private:
52  SeatInputDeviceTracker input_state_tracker;
53  std::shared_ptr<InputRegion> const input_region;
54 };
55 }
56 }
57 
58 #endif
All things Mir.
Definition: atomic_callback.h:25
void remove_device(Device const &device) override
Definition: basic_seat.cpp:42
Definition: seat.h:33
void add_device(Device const &device) override
Definition: basic_seat.cpp:37
Definition: seat_input_device_tracker.h:44
void dispatch_event(MirEvent &event) override
Definition: basic_seat.cpp:47
geometry::Rectangle get_rectangle_for(Device const &dev) override
Definition: basic_seat.cpp:52
Definition: rectangle.h:33
Definition: event_private.h:181
Definition: basic_seat.h:38
Definition: device.h:37
BasicSeat(std::shared_ptr< InputDispatcher > const &dispatcher, std::shared_ptr< TouchVisualizer > const &touch_visualizer, std::shared_ptr< CursorListener > const &cursor_listener, std::shared_ptr< InputRegion > const &input_region)
Definition: basic_seat.cpp:29

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016