Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
fake_event_hub_input_configuration.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  * Author: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 #ifndef MIR_TEST_DOUBLES_FAKE_EVENT_HUB_INPUT_CONFIGURATION_H_
20 #define MIR_TEST_DOUBLES_FAKE_EVENT_HUB_INPUT_CONFIGURATION_H_
21 
23 
24 #include <utils/StrongPointer.h>
25 
26 namespace droidinput = android;
27 
28 namespace android
29 {
30 class EventHubInterface;
31 }
32 
33 namespace mir
34 {
35 namespace input
36 {
37 class CursorListener;
38 class EventFilter;
39 class InputReport;
40 
41 namespace android
42 {
43 class FakeEventHub;
44 }
45 }
46 namespace test
47 {
48 namespace doubles
49 {
50 
51 class FakeEventHubInputConfiguration : public input::android::DefaultInputConfiguration
52 {
53 public:
54  FakeEventHubInputConfiguration(std::shared_ptr<input::EventFilter> const& event_filter,
55  std::shared_ptr<input::InputRegion> const& input_region,
56  std::shared_ptr<input::CursorListener> const& cursor_listener,
57  std::shared_ptr<input::InputReport> const& input_report);
59 
60  droidinput::sp<droidinput::EventHubInterface> the_event_hub();
61  input::android::FakeEventHub* the_fake_event_hub();
62 
63  bool is_key_repeat_enabled() override { return false; }
64 
65 
66 protected:
69 
70 private:
71  droidinput::sp<input::android::FakeEventHub> event_hub;
72 };
73 
74 }
75 }
76 } // namespace mir
77 
78 #endif /* MIR_TEST_DOUBLES_FAKE_EVENT_HUB_INPUT_CONFIGURATION_H_ */

Copyright © 2012,2013 Canonical Ltd.
Generated on Wed Oct 30 18:52:19 UTC 2013