My Project
Mir.h
1 /*
2  * Copyright (C) 2015 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_MIR_H
18 #define UNITY_SHELL_APPLICATION_MIR_H
19 
20 #include <QObject>
21 
25 class Mir : public QObject
26 {
27  Q_OBJECT
28  Q_ENUMS(Type)
29  Q_ENUMS(State)
30  Q_ENUMS(OrientationAngle)
31  Q_ENUMS(ShellChrome)
32  Q_ENUMS(FormFactor)
33 
34 
39  Q_PROPERTY(QString cursorName READ cursorName WRITE setCursorName NOTIFY cursorNameChanged)
40 
41 public:
45  enum Type {
46  UnknownType,
47  NormalType,
48  UtilityType,
49  DialogType,
50  GlossType,
51  FreeStyleType,
52  MenuType,
53  InputMethodType,
54  SatelliteType,
55  TipType,
56  };
57 
61  enum State {
62  UnknownState,
63  RestoredState,
64  MinimizedState,
65  MaximizedState,
66  VertMaximizedState,
67  FullscreenState,
68  HorizMaximizedState,
69  HiddenState,
70  };
71 
76  Angle0 = 0,
77  Angle90 = 90,
78  Angle180 = 180,
79  Angle270 = 270
80  };
81 
85  enum ShellChrome {
86  NormalChrome,
87  LowChrome,
88  };
89 
93  enum FormFactor {
94  FormFactorUnknown,
95  FormFactorPhone,
96  FormFactorTablet,
97  FormFactorMonitor,
98  FormFactorTV,
99  FormFactorProjector,
100  };
101 
103  virtual void setCursorName(const QString &cursorName) = 0;
104  virtual QString cursorName() const = 0;
106 
107 Q_SIGNALS:
109  void cursorNameChanged(const QString &cursorName);
111 };
112 
113 Q_DECLARE_METATYPE(Mir::OrientationAngle)
114 Q_DECLARE_METATYPE(Mir::ShellChrome)
115 
116 #endif // UNITY_SHELL_APPLICATION_MIR_H
FormFactor
Form Factor.
Definition: Mir.h:93
Type
Surface type.
Definition: Mir.h:45
State
Surface state.
Definition: Mir.h:61
ShellChrome
Shell chrome.
Definition: Mir.h:85
QString cursorName
Name of the mouse cursor to be used. Follows the X Cursor naming convention.
Definition: Mir.h:39
OrientationAngle
Surface orientation angle.
Definition: Mir.h:75
Acting mostly as a namespace to hold enums and such for use in QML.
Definition: Mir.h:25