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 #include "mir/geometry/rectangle.h"
27 
28 #include <glm/glm.hpp>
29 #include <string>
30 
31 namespace mir
32 {
33 namespace geometry
34 {
35 struct Size;
36 struct Point;
37 }
38 namespace graphics
39 {
40 class CursorImage;
41 }
42 
43 namespace scene
44 {
46 {
47 public:
48  virtual void attrib_changed(MirWindowAttrib attrib, int value) = 0;
49  virtual void resized_to(geometry::Size const& size) = 0;
50  virtual void moved_to(geometry::Point const& top_left) = 0;
51  virtual void hidden_set_to(bool hide) = 0;
52  virtual void frame_posted(int frames_available, geometry::Size const& size) = 0;
53  virtual void alpha_set_to(float alpha) = 0;
54  virtual void orientation_set_to(MirOrientation orientation) = 0;
55  virtual void transformation_set_to(glm::mat4 const& t) = 0;
56  virtual void reception_mode_set_to(input::InputReceptionMode mode) = 0;
57  virtual void cursor_image_set_to(graphics::CursorImage const& image) = 0;
58  virtual void client_surface_close_requested() = 0;
59  virtual void keymap_changed(MirInputDeviceId id, std::string const& model, std::string const& layout,
60  std::string const& variant, std::string const& options) = 0;
61  virtual void renamed(char const* name) = 0;
62  virtual void cursor_image_removed() = 0;
63  virtual void placed_relative(geometry::Rectangle const& placement) = 0;
64 
65 protected:
66  SurfaceObserver() = default;
67  virtual ~SurfaceObserver() = default;
68  SurfaceObserver(SurfaceObserver const&) = delete;
69  SurfaceObserver& operator=(SurfaceObserver const&) = delete;
70 };
71 }
72 }
73 
74 #endif // MIR_SCENE_SURFACE_OBSERVER_H_
Definition: size.h:30
Definition: as_render_target.h:27
Definition: point.h:30
MirWindowAttrib
Attributes of a window that the client and server/shell may wish to get or set over the wire...
Definition: common.h:76
Definition: surface_observer.h:45
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:271
Definition: cursor_image.h:30
int64_t MirInputDeviceId
Definition: mir_input_device_types.h:31
Definition: rectangle.h:33
char const * name
Definition: client_types.h:170
InputReceptionMode
Definition: input_reception_mode.h:27

Copyright © 2012-2016 Canonical Ltd.
Generated on Fri Dec 20 06:52:43 UTC 2019