on 80fc88d help sign in
unity8/plugins/WindowManager/WindowManagerObjects.h
64 lines 2.3 kB history raw
1/*
2 * Copyright (C) 2017 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 */
17#ifndef WINDOWMANAGEROBJECTS_H
18#define WINDOWMANAGEROBJECTS_H
20#include <QObject>
22namespace unity {
23 namespace shell {
24 namespace application {
25 class SurfaceManagerInterface;
26 class ApplicationManagerInterface;
27 }
28 }
31class WindowManagerObjects : public QObject
33 Q_OBJECT
35 Q_PROPERTY(unity::shell::application::SurfaceManagerInterface* surfaceManager
36 READ surfaceManager
37 WRITE setSurfaceManager
38 NOTIFY surfaceManagerChanged)
40 Q_PROPERTY(unity::shell::application::ApplicationManagerInterface* applicationManager
41 READ applicationManager
42 WRITE setApplicationManager
43 NOTIFY applicationManagerChanged)
44public:
45 explicit WindowManagerObjects(QObject *parent = 0);
47 static WindowManagerObjects *instance();
49 unity::shell::application::SurfaceManagerInterface *surfaceManager() const { return m_surfaceManager; }
50 void setSurfaceManager(unity::shell::application::SurfaceManagerInterface*);
52 unity::shell::application::ApplicationManagerInterface *applicationManager() const { return m_applicationManager; }
53 void setApplicationManager(unity::shell::application::ApplicationManagerInterface*);
55Q_SIGNALS:
56 void surfaceManagerChanged(unity::shell::application::SurfaceManagerInterface*);
57 void applicationManagerChanged(unity::shell::application::ApplicationManagerInterface*);
59private:
60 unity::shell::application::SurfaceManagerInterface* m_surfaceManager;
61 unity::shell::application::ApplicationManagerInterface* m_applicationManager;
62};
64#endif // WINDOWMANAGEROBJECTS_H