Mir
seat_observer.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 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: Brandon Schaefer <brandon.schaefer@canonical.com>
17  */
18 
19 
20 #ifndef MIR_INPUT_SEAT_OBSERVER_H_
21 #define MIR_INPUT_SEAT_OBSERVER_H_
22 
23 #include <string>
24 #include <vector>
25 
26 class MirEvent;
27 
28 namespace mir
29 {
30 namespace geometry
31 {
32 class Rectangles;
33 class Rectangle;
34 }
35 namespace input
36 {
38 {
39 public:
40  virtual ~SeatObserver() = default;
41 
42  virtual void seat_add_device(uint64_t id) = 0;
43  virtual void seat_remove_device(uint64_t id) = 0;
44  virtual void seat_dispatch_event(MirEvent const* event) = 0;
45  virtual void seat_get_rectangle_for(uint64_t id, geometry::Rectangle const& out_rect) = 0;
46  virtual void seat_set_key_state(uint64_t id, std::vector<uint32_t> const& scan_codes) = 0;
47  virtual void seat_set_pointer_state(uint64_t id, unsigned buttons) = 0;
48  virtual void seat_set_cursor_position(float cursor_x, float cursor_y) = 0;
49  virtual void seat_set_confinement_region_called(geometry::Rectangles const& regions) = 0;
50  virtual void seat_reset_confinement_regions() = 0;
51 };
52 }
53 }
54 
55 #endif /* MIR_INPUT_SEAT_OBSERVER_H_ */
Definition: as_render_target.h:27
A collection of rectangles (with possible duplicates).
Definition: rectangles.h:34
struct MirEvent MirEvent
Definition: event.h:84
Definition: rectangle.h:33
Definition: seat_observer.h:37

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 11:07:25 UTC 2017