Mir
cursor_image.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2014 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: Robert Carr <robert.carr@canonical.com>
17  */
18 
19 
20 #ifndef MIR_GRAPHICS_CURSOR_IMAGE_H_
21 #define MIR_GRAPHICS_CURSOR_IMAGE_H_
22 
23 #include "mir/geometry/size.h"
25 
26 namespace mir
27 {
28 namespace graphics
29 {
31 {
32 public:
33  virtual ~CursorImage() = default;
34 
35  virtual void const* as_argb_8888() const = 0;
36  virtual geometry::Size size() const = 0;
37 
38  // We use "hotspot" to mean the offset within a cursor image
39  // which should be placed at the onscreen
40  // location of the pointer.
41  virtual geometry::Displacement hotspot() const = 0;
42 
43 
44 protected:
45  CursorImage() = default;
46  CursorImage(CursorImage const&) = delete;
47  CursorImage& operator=(CursorImage const&) = delete;
48 };
49 }
50 }
51 
52 
53 #endif /* MIR_GRAPHICS_CURSOR_IMAGE_H_ */
Definition: size.h:30
All things Mir.
Definition: atomic_callback.h:25
virtual geometry::Displacement hotspot() const =0
virtual void const * as_argb_8888() const =0
Definition: cursor_image.h:30
CursorImage & operator=(CursorImage const &)=delete
virtual ~CursorImage()=default
Definition: displacement.h:32
virtual geometry::Size size() const =0

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016