on abe56ae help sign in
unity8/plugins/WindowManager/WindowManagerObjects.h
66 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>
22#include "WindowManagerGlobal.h"
24namespace unity {
25 namespace shell {
26 namespace application {
27 class SurfaceManagerInterface;
28 class ApplicationManagerInterface;
29 }
30 }
33class WINDOWMANAGERQML_EXPORT WindowManagerObjects : public QObject
35 Q_OBJECT
37 Q_PROPERTY(unity::shell::application::SurfaceManagerInterface* surfaceManager
38 READ surfaceManager
39 WRITE setSurfaceManager
40 NOTIFY surfaceManagerChanged)
42 Q_PROPERTY(unity::shell::application::ApplicationManagerInterface* applicationManager
43 READ applicationManager
44 WRITE setApplicationManager
45 NOTIFY applicationManagerChanged)
46public:
47 explicit WindowManagerObjects(QObject *parent = 0);
49 static WindowManagerObjects *instance();
51 unity::shell::application::SurfaceManagerInterface *surfaceManager() const { return m_surfaceManager; }
52 void setSurfaceManager(unity::shell::application::SurfaceManagerInterface*);
54 unity::shell::application::ApplicationManagerInterface *applicationManager() const { return m_applicationManager; }
55 void setApplicationManager(unity::shell::application::ApplicationManagerInterface*);
57Q_SIGNALS:
58 void surfaceManagerChanged(unity::shell::application::SurfaceManagerInterface*);
59 void applicationManagerChanged(unity::shell::application::ApplicationManagerInterface*);
61private:
62 unity::shell::application::SurfaceManagerInterface* m_surfaceManager;
63 unity::shell::application::ApplicationManagerInterface* m_applicationManager;
64};
66#endif // WINDOWMANAGEROBJECTS_H