Mir
cursor_images.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 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 
20 #ifndef MIR_INPUT_CURSOR_IMAGES_H_
21 #define MIR_INPUT_CURSOR_IMAGES_H_
22 
23 #include "mir/geometry/size.h"
24 
25 #include <memory>
26 #include <string>
27 
28 namespace mir
29 {
30 namespace graphics
31 {
32 class CursorImage;
33 }
34 
35 namespace input
36 {
38 geometry::Size const default_cursor_size{geometry::Width{24}, geometry::Height{24}};
39 
41 {
42 public:
43  virtual ~CursorImages() = default;
44 
47  virtual std::shared_ptr<graphics::CursorImage> image(std::string const& cursor_name,
48  geometry::Size const& size) = 0;
49 
50 protected:
51  CursorImages() = default;
52  CursorImages(CursorImages const&) = delete;
53  CursorImages& operator=(CursorImages const&) = delete;
54 };
55 }
56 }
57 
58 #endif /* MIR_INPUT_CURSOR_IMAGES_H_ */
Definition: size.h:30
CursorImages & operator=(CursorImages const &)=delete
All things Mir.
Definition: buffer_stream.h:37
Definition: cursor_images.h:40
detail::IntWrapper< detail::height > Height
Definition: dimensions.h:109
detail::IntWrapper< detail::width > Width
Definition: dimensions.h:108
virtual std::shared_ptr< graphics::CursorImage > image(std::string const &cursor_name, geometry::Size const &size)=0
Looks up the image for a named cursor. Cursor names follow the XCursor naming conventions.
virtual ~CursorImages()=default
int const size
Definition: make_socket_rpc_channel.cpp:51

Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015