2 * Copyright (C) 2014-2016 Canonical, Ltd.
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.
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.
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/>.
17#ifndef SURFACEMANAGER_H
18#define SURFACEMANAGER_H
22#include "MirSurface.h"
23#include "VirtualKeyboard.h"
27class SurfaceManager : public QObject
30 Q_PROPERTY(MirSurface* inputMethodSurface READ inputMethodSurface NOTIFY inputMethodSurfaceChanged)
31 Q_PROPERTY(int newSurfaceMinimumWidth READ newSurfaceMinimumWidth WRITE setNewSurfaceMinimumWidth NOTIFY newSurfaceMinimumWidthChanged)
32 Q_PROPERTY(int newSurfaceMaximumWidth READ newSurfaceMaximumWidth WRITE setNewSurfaceMaximumWidth NOTIFY newSurfaceMaximumWidthChanged)
33 Q_PROPERTY(int newSurfaceMinimumHeight READ newSurfaceMinimumHeight WRITE setNewSurfaceMinimumHeight NOTIFY newSurfaceMinimumHeightChanged)
34 Q_PROPERTY(int newSurfaceMaximumHeight READ newSurfaceMaximumHeight WRITE setNewSurfaceMaximumHeight NOTIFY newSurfaceMaximumHeightChanged)
35 Q_PROPERTY(int newSurfaceWidthIncrement READ newSurfaceWidthIncrement WRITE setNewSurfaceWidthIncrement NOTIFY newSurfaceWidthIncrementChanged)
36 Q_PROPERTY(int newSurfaceHeightIncrement READ newSurfaceHeightIncrement WRITE setNewSurfaceHeightIncrement NOTIFY newSurfaceHeightIncrementChanged)
39 explicit SurfaceManager(QObject *parent = 0);
40 virtual ~SurfaceManager();
42 static SurfaceManager *instance();
44 Q_INVOKABLE MirSurface* createSurface(const QString& name,
47 const QUrl& screenshot);
49 MirSurface* inputMethodSurface() const;
51 int newSurfaceMinimumWidth() const { return m_newSurfaceMinimumWidth; }
52 void setNewSurfaceMinimumWidth(int value);
54 int newSurfaceMaximumWidth() const { return m_newSurfaceMaximumWidth; }
55 void setNewSurfaceMaximumWidth(int value);
57 int newSurfaceMinimumHeight() const { return m_newSurfaceMinimumHeight; }
58 void setNewSurfaceMinimumHeight(int value);
60 int newSurfaceMaximumHeight() const { return m_newSurfaceMaximumHeight; }
61 void setNewSurfaceMaximumHeight(int value);
63 int newSurfaceWidthIncrement() const { return m_newSurfaceWidthIncrement; }
64 void setNewSurfaceWidthIncrement(int);
66 int newSurfaceHeightIncrement() const { return m_newSurfaceHeightIncrement; }
67 void setNewSurfaceHeightIncrement(int);
70 void inputMethodSurfaceChanged();
72 void surfaceCreated(MirSurface *surface);
73 void surfaceDestroyed(MirSurface*surface);
75 void newSurfaceMinimumWidthChanged(int value);
76 void newSurfaceMaximumWidthChanged(int value);
77 void newSurfaceMinimumHeightChanged(int value);
78 void newSurfaceMaximumHeightChanged(int value);
79 void newSurfaceWidthIncrementChanged(int value);
80 void newSurfaceHeightIncrementChanged(int value);
83 static SurfaceManager *the_surface_manager;
84 VirtualKeyboard *m_virtualKeyboard;
86 int m_newSurfaceMinimumWidth{0};
87 int m_newSurfaceMaximumWidth{0};
88 int m_newSurfaceMinimumHeight{0};
89 int m_newSurfaceMaximumHeight{0};
90 int m_newSurfaceWidthIncrement{1};
91 int m_newSurfaceHeightIncrement{1};
94#endif // SURFACEMANAGER_H
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list