Mir
android_input_targeter.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2013 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: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_INPUT_ANDROID_TARGET_H_
20 #define MIR_INPUT_ANDROID_TARGET_H_
21 
23 
24 #include <mutex>
25 
26 namespace android
27 {
28 class InputDispatcherInterface;
29 class InputWindowHandle;
30 }
31 
32 namespace droidinput = android;
33 
34 namespace mir
35 {
36 namespace input
37 {
38 namespace android
39 {
40 class InputConfiguration;
41 class WindowHandleRepository;
42 
44 {
45 public:
46  explicit InputTargeter(std::shared_ptr<droidinput::InputDispatcherInterface> const& input_dispatcher,
47  std::shared_ptr<WindowHandleRepository> const& repository);
48  virtual ~InputTargeter() noexcept(true);
49 
50  void set_focus(std::shared_ptr<input::Surface> const& focus_surface);
51  void clear_focus();
52 
53 protected:
54  InputTargeter(const InputTargeter&) = delete;
55  InputTargeter& operator=(const InputTargeter&) = delete;
56 
57 private:
58  std::shared_ptr<droidinput::InputDispatcherInterface> input_dispatcher;
59 
60  std::shared_ptr<WindowHandleRepository> const repository;
61 };
62 
63 }
64 }
65 } // namespace mir
66 
67 #endif // MIR_INPUT_ANDROID_TARGET_H_
All things Mir.
Definition: atomic_callback.h:25
Definition: android_input_targeter.h:43
InputTargeter & operator=(const InputTargeter &)=delete
An interface used to control the selection of keyboard input focus.
Definition: input_targeter.h:35
Definition: android_input_receiver.h:36
virtual ~InputTargeter() noexcept(true)
void set_focus(std::shared_ptr< input::Surface > const &focus_surface)

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