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"
23 
25 
26 #include <glm/glm.hpp>
27 #include <xkbcommon/xkbcommon.h>
28 
29 namespace mir
30 {
31 namespace geometry
32 {
33 struct Size;
34 struct Point;
35 }
36 namespace graphics
37 {
38 class CursorImage;
39 }
40 
41 namespace scene
42 {
44 {
45 public:
46  virtual void attrib_changed(MirSurfaceAttrib attrib, int value) = 0;
47  virtual void resized_to(geometry::Size const& size) = 0;
48  virtual void moved_to(geometry::Point const& top_left) = 0;
49  virtual void hidden_set_to(bool hide) = 0;
50  virtual void frame_posted(int frames_available) = 0;
51  virtual void alpha_set_to(float alpha) = 0;
52  virtual void orientation_set_to(MirOrientation orientation) = 0;
53  virtual void transformation_set_to(glm::mat4 const& t) = 0;
54  virtual void reception_mode_set_to(input::InputReceptionMode mode) = 0;
55  virtual void cursor_image_set_to(graphics::CursorImage const& image) = 0;
56  virtual void client_surface_close_requested() = 0;
57  virtual void keymap_changed(xkb_rule_names const& names) = 0;
58  virtual void renamed(char const* name) = 0;
59 
60 protected:
61  SurfaceObserver() = default;
62  virtual ~SurfaceObserver() = default;
63  SurfaceObserver(SurfaceObserver const&) = delete;
64  SurfaceObserver& operator=(SurfaceObserver const&) = delete;
65 };
66 }
67 }
68 
69 #endif // MIR_SCENE_SURFACE_OBSERVER_H_
Definition: size.h:30
All things Mir.
Definition: atomic_callback.h:25
Definition: point.h:30
virtual void moved_to(geometry::Point const &top_left)=0
Definition: surface_observer.h:43
virtual void resized_to(geometry::Size const &size)=0
MirOrientation
Direction relative to the "natural" orientation of the display.
Definition: common.h:164
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 void keymap_changed(xkb_rule_names const &names)=0
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:34
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 client_surface_close_requested()=0
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 renamed(char const *name)=0
virtual void reception_mode_set_to(input::InputReceptionMode mode)=0
virtual void cursor_image_set_to(graphics::CursorImage const &image)=0

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015