Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dummy_android_pointer_controller.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012 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_DUMMY_POINTER_CONTROLLER_H__
20 #define MIR_INPUT_ANDROID_DUMMY_POINTER_CONTROLLER_H__
21 
22 #include <PointerController.h>
23 namespace droidinput = android;
24 
25 namespace mir
26 {
27 namespace input
28 {
29 namespace android
30 {
31 
32 class DummyPointerController : public droidinput::PointerControllerInterface
33 {
34  public:
35 
36  // From PointerControllerInterface
37  virtual bool getBounds(float* out_min_x, float* out_min_y, float* out_max_x, float* out_max_y) const
38  {
39  (void)out_min_x;
40  (void)out_min_y;
41  (void)out_max_x;
42  (void)out_max_y;
43  // The bounds could not be fetched
44  return false;
45  }
46  virtual void move(float delta_x, float delta_y)
47  {
48  (void)delta_x;
49  (void)delta_y;
50  }
51  virtual void setButtonState(int32_t button_state)
52  {
53  (void)button_state;
54  }
55  virtual int32_t getButtonState() const
56  {
57  return 0;
58  }
59  virtual void setPosition(float x, float y)
60  {
61  (void)x;
62  (void)y;
63  }
64  virtual void getPosition(float* out_x, float* out_y) const
65  {
66  (void)out_x;
67  (void)out_y;
68  }
69  virtual void fade(Transition transition)
70  {
71  (void)transition;
72  }
73  virtual void unfade(Transition transition)
74  {
75  (void)transition;
76  }
77 
78  virtual void setPresentation(Presentation presentation)
79  {
80  (void)presentation;
81  }
82  virtual void setSpots(const droidinput::PointerCoords* spot_coords,
83  const uint32_t* spot_id_to_index, droidinput::BitSet32 spot_id_nits)
84  {
85  (void)spot_coords;
86  (void)spot_id_to_index;
87  (void)spot_id_nits;
88  }
89  virtual void clearSpots()
90  {
91  }
92 
93  virtual void setDisplaySize(int32_t width, int32_t height)
94  {
95  (void)width;
96  (void)height;
97  }
98  virtual void setDisplayOrientation(int32_t orientation)
99  {
100  (void)orientation;
101  }
102 };
103 
104 }
105 }
106 } // namespace mir
107 
108 #endif // MIR_ANDROID_DUMMY_POINTER_CONTROLER_H__

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