Mir
surface_observer.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: Alan Griffiths <alan@octopull.co.uk>
17  */
18 
19 #ifndef MIR_SCENE_SURFACE_OBSERVER_H_
20 #define MIR_SCENE_SURFACE_OBSERVER_H_
21 
22 #include "mir_toolkit/common.h"
24 
26 
27 #include <glm/glm.hpp>
28 #include <string>
29 
30 namespace mir
31 {
32 namespace geometry
33 {
34 struct Size;
35 struct Point;
36 }
37 namespace graphics
38 {
39 class CursorImage;
40 }
41 
42 namespace scene
43 {
45 {
46 public:
47  virtual void attrib_changed(MirSurfaceAttrib attrib, int value) = 0;
48  virtual void resized_to(geometry::Size const& size) = 0;
49  virtual void moved_to(geometry::Point const& top_left) = 0;
50  virtual void hidden_set_to(bool hide) = 0;
51  virtual void frame_posted(int frames_available, geometry::Size const& size) = 0;
52  virtual void alpha_set_to(float alpha) = 0;
53  virtual void orientation_set_to(MirOrientation orientation) = 0;
54  virtual void transformation_set_to(glm::mat4 const& t) = 0;
55  virtual void reception_mode_set_to(input::InputReceptionMode mode) = 0;
56  virtual void cursor_image_set_to(graphics::CursorImage const& image) = 0;
57  virtual void client_surface_close_requested() = 0;
58  virtual void keymap_changed(MirInputDeviceId id, std::string const& model, std::string const& layout,
59  std::string const& variant, std::string const& options) = 0;
60  virtual void renamed(char const* name) = 0;
61  virtual void cursor_image_removed() = 0;
62 
63 protected:
64  SurfaceObserver() = default;
65  virtual ~SurfaceObserver() = default;
66  SurfaceObserver(SurfaceObserver const&) = delete;
67  SurfaceObserver& operator=(SurfaceObserver const&) = delete;
68 };
69 }
70 }
71 
72 #endif // MIR_SCENE_SURFACE_OBSERVER_H_
Definition: size.h:30
All things Mir.
Definition: atomic_callback.h:25
Definition: point.h:30
Definition: surface_observer.h:44
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:164
Definition: cursor_image.h:30
int64_t MirInputDeviceId
Definition: input_event.h:35
MirSurfaceAttrib
Attributes of a surface that the client and server/shell may wish to get or set over the wire...
Definition: common.h:34
InputReceptionMode
Definition: input_reception_mode.h:27
int const size
Definition: make_socket_rpc_channel.cpp:51

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