1// Copyright (c) 2021 Huawei Device Co., Ltd.
2// Licensed under the Apache License, Version 2.0 (the "License");
3// you may not use this file except in compliance with the License.
4// You may obtain a copy of the License at
5//
6//     http://www.apache.org/licenses/LICENSE-2.0
7//
8// Unless required by applicable law or agreed to in writing, software
9// distributed under the License is distributed on an "AS IS" BASIS,
10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11// See the License for the specific language governing permissions and
12// limitations under the License.
13
14// WMLayout
15
16// # window type {
17//     // all mode attribute define
18//     attr: value;
19//     &:mode {
20//         // special mode attribute define
21//         attr: value;
22//     }
23// }
24
25// layout_attribute: left, top, width, height
26// align_attribute: horizon-align, vertical-align
27// other_attribute: z-index, position
28
29// z-index: {number}
30// position: relative, fixed, static
31// horizon-align: left, middle, right
32// vertical-align: top, middle, bottom
33// left, top, width, height: {number}%
34
35// "&:mode": full, free, unset(default in type)
36
37// relative layout in Relative Rectangle
38// Relative Rectangle = FullScreen Rectangle - all of (Static Rectangle)
39// fixed layout don't affect other layout
40
41#WINDOW_TYPE_NORMAL {
42    z-index: 0;
43    position: relative;
44    horizon-align: middle;
45    vertical-align: middle;
46    width: 100.0%;
47    height: 100.0%;
48    &:free {
49        z-index: 51;
50    }
51}
52
53#WINDOW_TYPE_SPLIT_LINE {
54    z-index: 0;
55    position: relative;
56    horizon-align: middle;
57    vertical-align: middle;
58    width: 100.0%;
59    height: 100.0%;
60}
61
62#WINDOW_TYPE_STATUS_BAR {
63    z-index: 10;
64    position: static;
65    horizon-align: middle;
66    vertical-align: top;
67    width: 100%;
68    height: 7%;
69}
70
71#WINDOW_TYPE_NAVI_BAR {
72    z-index: 20;
73    position: static;
74    horizon-align: middle;
75    vertical-align: bottom;
76    width: 100%;
77    height: 7%;
78}
79
80#WINDOW_TYPE_ALARM_SCREEN {
81    z-index: 30;
82    position: fixed;
83    horizon-align: middle;
84    vertical-align: middle;
85    width: 80%;
86    height: 30%;
87}
88
89#WINDOW_TYPE_SYSTEM_UI {
90    z-index: 31;
91    position: relative;
92    width: 100%;
93    height: 100%;
94}
95
96#WINDOW_TYPE_LAUNCHER {
97    z-index: 40;
98    position: relative;
99    horizon-align: middle;
100    vertical-align: middle;
101    width: 100.0%;
102    height: 100.0%;
103}
104
105#WINDOW_TYPE_VIDEO {
106    z-index: 41;
107}
108
109#WINDOW_TYPE_INPUT_METHOD {
110    z-index: 50;
111    position: relative;
112    horizon-align: middle;
113    vertical-align: bottom;
114    width: 100.0%;
115    height: 33.3%;
116}
117
118#WINDOW_TYPE_INPUT_METHOD_SELECTOR {
119    z-index: 60;
120    position: relative;
121    horizon-align: middle;
122    vertical-align: bottom;
123    width: 90.0%;
124    height: 33.3%;
125}
126
127#WINDOW_TYPE_VOLUME_OVERLAY {
128    z-index: 70;
129    position: fixed;
130    horizon-align: middle;
131    width: 95.0%;
132
133    top: 2.5%;
134    height: 40.0%;
135}
136
137#WINDOW_TYPE_NOTIFICATION_SHADE {
138    z-index: 80;
139    position: fixed;
140    horizon-align: middle;
141    vertical-align: top;
142    width: 100%;
143    height: 50%;
144}
145
146#WINDOW_TYPE_FLOAT {
147    z-index: 90;
148    position: relative;
149    horizon-align: middle;
150    width: 85%;
151
152    top: 7.5%;
153    height: 50%;
154}
155
156#WINDOW_TYPE_SCREENSAVER {
157    z-index: 100;
158    position: fixed;
159    horizon-align: middle;
160    vertical-align: middle;
161    width: 100.0%;
162    height: 100.0%;
163}
164
165#WINDOW_TYPE_SEARCHER {
166    z-index: 110;
167    position: relative;
168    horizon-align: middle;
169    vertical-align: bottom;
170    width: 80.0%;
171    height: 7%;
172}
173
174#WINDOW_TYPE_CALLING {
175    z-index: 120;
176    horizon-align: middle;
177    top: 5%;
178    width: 80.0%;
179    height: 7%;
180}
181
182#WINDOW_TYPE_TOAST {
183    z-index: 130;
184    position: relative;
185    horizon-align: middle;
186    width: 80.0%;
187    top: 86%;
188    height: 7%;
189}
190
191#WINDOW_TYPE_SCREENSAVER_CALLING {
192    z-index: 140;
193    position: relative;
194    horizon-align: middle;
195    vertical-align: middle;
196    width: 100.0%;
197    height: 100.0%;
198}
199
200#WINDOW_TYPE_SCREENSAVER_DIALOG {
201    z-index: 150;
202    position: relative;
203    horizon-align: middle;
204    // vertical-align: top;
205    top: 40%;
206    width: 90.0%;
207    height: 10.0%;
208}
209
210#WINDOW_TYPE_SYSTEM_ERROR {
211    z-index: 160;
212    position: relative;
213    horizon-align: middle;
214    vertical-align: middle;
215    width: 80%;
216    height: 30%;
217}
218
219#WINDOW_TYPE_WALLPAPER {
220    z-index: 170;
221    position: fixed;
222    horizon-align: middle;
223    vertical-align: middle;
224    width: 100%;
225    height: 100%;
226}
227
228#WINDOW_TYPE_STATUS_SCREEN {
229    z-index: 180;
230    position: fixed;
231    horizon-align: middle;
232    vertical-align: top;
233    width: 100%;
234    height: 100%;
235}
236
237#WINDOW_TYPE_SAFE_OVERLAY {
238    z-index: 190;
239    position: fixed;
240    horizon-align: middle;
241    vertical-align: bottom;
242    width: 100%;
243    height: 100%;
244}
245
246#WINDOW_TYPE_FULL_SCREEN {
247    z-index: 200;
248    position: fixed;
249    horizon-align: middle;
250    vertical-align: middle;
251    width: 100%;
252    height: 100%;
253}
254
255#WINDOW_TYPE_POPUP {
256    z-index: 210;
257    position: relative;
258    horizon-align: middle;
259    vertical-align: top;
260    width: 80%;
261    height: 18%;
262}
263
264#WINDOW_TYPE_ANIMATION {
265    z-index: 990;
266    position: fixed;
267    width: 100%;
268    height: 100%;
269}
270
271#WINDOW_TYPE_LAUNCH_PAGE {
272    z-index: 0;
273    position: fixed;
274    vertical-align: top;
275    width: 100%;
276    height: 93%;
277}
278
279#WINDOW_TYPE_CURSOR {
280    z-index: 999;
281    position: fixed;
282    width: 1%;
283    height: 1%;
284}
285
286#WINDOW_TYPE_APPLICATION_BASE {
287    z-index: 1;
288    position: relative;
289    horizon-align: middle;
290    vertical-align: middle;
291    width: 100%;
292    height: 100%;
293}
294
295#WINDOW_TYPE_APPLICATION_FIRST {
296    z-index: 2;
297    position: relative;
298    horizon-align: middle;
299    vertical-align: middle;
300    width: 100%;
301    height: 100%;
302}
303
304#WINDOW_TYPE_APPLICATION_NORMAL {
305    z-index: 3;
306    position: relative;
307    horizon-align: middle;
308    vertical-align: middle;
309    width: 100%;
310    height: 100%;
311}
312
313//This Window is Toppest
314#WINDOW_TYPE_TOP {
315    z-index: 9999;
316    position: fixed;
317    horizon-align: middle;
318    vertical-align: middle;
319    width: 100%;
320    height: 100%;
321}
322