Mir
cursor.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 Lesser 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 Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 
20 #ifndef MIR_GRAPHICS_CURSOR_H_
21 #define MIR_GRAPHICS_CURSOR_H_
22 
23 #include "mir/geometry/size.h"
24 #include "mir/geometry/point.h"
25 
26 #include <memory>
27 
28 namespace mir
29 {
30 namespace graphics
31 {
32 class CursorImage;
33 class Cursor
34 {
35 public:
36  virtual void show() = 0;
37  virtual void show(CursorImage const& cursor_image) = 0;
38  virtual void hide() = 0;
39 
40  virtual void move_to(geometry::Point position) = 0;
41 
42 protected:
43  Cursor() = default;
44  virtual ~Cursor() = default;
45  Cursor(Cursor const&) = delete;
46  Cursor& operator=(Cursor const&) = delete;
47 };
48 }
49 }
50 
51 
52 #endif /* MIR_GRAPHICS_CURSOR_H_ */
Definition: as_render_target.h:27
virtual void move_to(geometry::Point position)=0
Definition: point.h:30
virtual void hide()=0
Definition: cursor_image.h:30
Definition: cursor.h:33
virtual ~Cursor()=default
Cursor & operator=(Cursor const &)=delete
virtual void show()=0

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Mar 27 12:06:55 UTC 2017