Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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"
23 
25 
26 #include <glm/glm.hpp>
27 
28 namespace mir
29 {
30 namespace geometry
31 {
32 struct Size;
33 struct Point;
34 }
35 namespace graphics
36 {
37 class CursorImage;
38 }
39 
40 namespace scene
41 {
43 {
44 public:
45  virtual void attrib_changed(MirSurfaceAttrib attrib, int value) = 0;
46  virtual void resized_to(geometry::Size const& size) = 0;
47  virtual void moved_to(geometry::Point const& top_left) = 0;
48  virtual void hidden_set_to(bool hide) = 0;
49  virtual void frame_posted(int frames_available) = 0;
50  virtual void alpha_set_to(float alpha) = 0;
51  virtual void orientation_set_to(MirOrientation orientation) = 0;
52  virtual void transformation_set_to(glm::mat4 const& t) = 0;
53  virtual void reception_mode_set_to(input::InputReceptionMode mode) = 0;
54  virtual void cursor_image_set_to(graphics::CursorImage const& image) = 0;
55 
56 protected:
57  SurfaceObserver() = default;
58  virtual ~SurfaceObserver() = default;
59  SurfaceObserver(SurfaceObserver const&) = delete;
60  SurfaceObserver& operator=(SurfaceObserver const&) = delete;
61 };
62 }
63 }
64 
65 #endif // MIR_SCENE_SURFACE_OBSERVER_H_
Definition: size.h:30
All things Mir.
Definition: aging_buffer.h:24
Definition: point.h:30
virtual void moved_to(geometry::Point const &top_left)=0
Definition: surface_observer.h:42
virtual void resized_to(geometry::Size const &size)=0
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:134
Definition: cursor_image.h:30
virtual void frame_posted(int frames_available)=0
virtual void alpha_set_to(float alpha)=0
SurfaceObserver & operator=(SurfaceObserver const &)=delete
virtual ~SurfaceObserver()=default
MirSurfaceAttrib
Attributes of a surface that the client and server/shell may wish to get or set over the wire...
Definition: common.h:36
virtual void orientation_set_to(MirOrientation orientation)=0
virtual void attrib_changed(MirSurfaceAttrib attrib, int value)=0
InputReceptionMode
Definition: input_reception_mode.h:27
virtual void transformation_set_to(glm::mat4 const &t)=0
virtual void hidden_set_to(bool hide)=0
int const size
Definition: make_socket_rpc_channel.cpp:51
virtual void reception_mode_set_to(input::InputReceptionMode mode)=0
virtual void cursor_image_set_to(graphics::CursorImage const &image)=0

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014