2
* Copyright © 2016 Canonical Ltd.
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.
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.
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/>.
16
* Authored by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
20
#ifndef MIR_INPUT_SEAT_OBSERVER_MULTIPLEXER_H_
21
#define MIR_INPUT_SEAT_OBSERVER_MULTIPLEXER_H_
23
#include "mir/input/seat_observer.h"
24
#include "mir/observer_multiplexer.h"
31
class SeatObserverMultiplexer : public ObserverMultiplexer<SeatObserver>
34
SeatObserverMultiplexer(std::shared_ptr<Executor> const& default_executor);
36
void seat_add_device(uint64_t id) override;
38
void seat_remove_device(uint64_t id) override;
40
void seat_dispatch_event(MirEvent const* event) override;
42
void seat_get_rectangle_for(uint64_t id, geometry::Rectangle const& out_rect) override;
44
void seat_set_key_state(uint64_t id, std::vector<uint32_t> const& scan_codes) override;
46
void seat_set_pointer_state(uint64_t id, unsigned buttons) override;
48
void seat_set_cursor_position(float cursor_x, float cursor_y) override;
50
void seat_set_confinement_region_called(geometry::Rectangles const& regions) override;
52
void seat_reset_confinement_regions() override;
55
std::shared_ptr<Executor> const executor;
61
#endif //MIR_INPUT_SEAT_OBSERVER_MULTIPLEXER_H_