My Project
Loading...
Searching...
No Matches
Mir.h
1
/*
2
* Copyright (C) 2015-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 LOMIRI_SHELL_APPLICATION_MIR_H
18
#define LOMIRI_SHELL_APPLICATION_MIR_H
19
20
#include <QObject>
21
25
class
Mir
:
public
QObject
26
{
27
Q_OBJECT
28
34
Q_PROPERTY(QString
cursorName
READ
cursorName
WRITE setCursorName NOTIFY cursorNameChanged)
35
36
41
Q_PROPERTY(QString
currentKeymap
READ
currentKeymap
WRITE setCurrentKeymap NOTIFY currentKeymapChanged)
42
43
public:
47
enum
Type
{
48
UnknownType,
49
NormalType,
50
UtilityType,
51
DialogType,
52
GlossType,
53
FreeStyleType,
54
MenuType,
55
InputMethodType,
56
SatelliteType,
57
TipType,
58
};
59
Q_ENUM(
Type
)
60
61
64
enum
State
{
65
UnknownState,
66
RestoredState,
67
MinimizedState,
68
MaximizedState,
69
FullscreenState,
70
MaximizedLeftState,
71
MaximizedRightState,
72
HorizMaximizedState,
73
VertMaximizedState,
74
MaximizedTopLeftState,
75
MaximizedTopRightState,
76
MaximizedBottomLeftState,
77
MaximizedBottomRightState,
78
HiddenState,
79
AttachedState,
80
};
81
Q_ENUM(
State
)
82
83
86
enum
OrientationAngle
{
87
Angle0 = 0,
88
Angle90 = 90,
89
Angle180 = 180,
90
Angle270 = 270
91
};
92
Q_ENUM(
OrientationAngle
)
93
94
97
enum
ShellChrome
{
98
NormalChrome,
99
LowChrome,
100
};
101
Q_ENUM(
ShellChrome
)
102
103
106
enum
FormFactor
{
107
FormFactorUnknown,
108
FormFactorPhone,
109
FormFactorTablet,
110
FormFactorMonitor,
111
FormFactorTV,
112
FormFactorProjector,
113
};
114
Q_ENUM(
FormFactor
)
115
116
117
virtual
void
setCursorName(
const
QString &
cursorName
) = 0;
118
virtual
QString
cursorName
()
const
= 0;
119
120
virtual
QString
currentKeymap
()
const
= 0;
121
virtual
void
setCurrentKeymap(
const
QString &
currentKeymap
) = 0;
123
124
Q_SIGNALS:
126
void
cursorNameChanged(
const
QString &
cursorName
);
127
void
currentKeymapChanged(
const
QString &
currentKeymap
);
129
};
130
131
Q_DECLARE_METATYPE(
Mir::Type
)
132
Q_DECLARE_METATYPE(
Mir::State
)
133
Q_DECLARE_METATYPE(
Mir::OrientationAngle
)
134
Q_DECLARE_METATYPE(
Mir::ShellChrome
)
135
Q_DECLARE_METATYPE(
Mir::FormFactor
)
136
137
#endif
// LOMIRI_SHELL_APPLICATION_MIR_H
Mir
Acting mostly as a namespace to hold enums and such for use in QML.
Definition
Mir.h:26
Mir::FormFactor
FormFactor
Form Factor.
Definition
Mir.h:106
Mir::currentKeymap
QString currentKeymap
Definition
Mir.h:41
Mir::State
State
Surface state.
Definition
Mir.h:64
Mir::ShellChrome
ShellChrome
Shell chrome.
Definition
Mir.h:97
Mir::Type
Type
Surface type.
Definition
Mir.h:47
Mir::OrientationAngle
OrientationAngle
Surface orientation angle.
Definition
Mir.h:86
Mir::cursorName
QString cursorName
Name of the mouse cursor to be used. Follows the X Cursor naming convention.
Definition
Mir.h:34
include
lomiri
shell
application
Mir.h
Generated on Mon Jan 15 2024 00:00:00 for My Project by
1.10.0