My Project
MirFocusControllerInterface.h
1 /*
2  * Copyright (C) 2016 Canonical, Ltd.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; version 3.
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 
17 #ifndef UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
18 #define UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
19 
20 #include <QObject>
21 
22 namespace unity {
23 namespace shell {
24 namespace application {
25 
26 class MirSurfaceInterface;
27 
35 class MirFocusControllerInterface : public QObject
36 {
37  Q_OBJECT
38 
49  WRITE setFocusedSurface
50  NOTIFY focusedSurfaceChanged)
51 public:
53  MirFocusControllerInterface(QObject *parent = 0) : QObject(parent) {}
54  virtual ~MirFocusControllerInterface() {}
55 
56  virtual void setFocusedSurface(MirSurfaceInterface *surface) = 0;
57  virtual MirSurfaceInterface* focusedSurface() const = 0;
59 Q_SIGNALS:
61  void focusedSurfaceChanged();
63 };
64 
65 } // namespace application
66 } // namespace shell
67 } // namespace unity
68 
69 #endif // UNITY_SHELL_APPLICATION_MIRFOCUSCONTROLLERINTERFACE_H
Top-level namespace for all things Unity-related.
Definition: Version.h:37
unity::shell::application::MirSurfaceInterface focusedSurface
The MirSurface which currently has focus, if any.
Definition: MirFocusControllerInterface.h:50
Defines which MirSurface has focus.
Definition: MirFocusControllerInterface.h:35
Holds a Mir surface. Pretty much an opaque class.
Definition: MirSurfaceInterface.h:40