idlize
53 строки · 1.3 Кб
1/*
2* Copyright (c) 2024 Huawei Device Co., Ltd.
3* Licensed under the Apache License, Version 2.0 (the "License");
4* you may not use this file except in compliance with the License.
5* You may obtain a copy of the License at
6*
7* http://www.apache.org/licenses/LICENSE-2.0
8*
9* Unless required by applicable law or agreed to in writing, software
10* distributed under the License is distributed on an "AS IS" BASIS,
11* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12* See the License for the specific language governing permissions and
13* limitations under the License.
14*/
15
16
17declare type Resource = import('../resource/resource').Resource;18
19declare type Length = string | number | Resource;20
21declare type ResourceColor = Color | number | string | Resource;22
23declare type PX = `${number}px`;24
25declare type VP = `${number}vp` | number;26
27declare type FP = `${number}fp`;28
29declare type LPX = `${number}lpx`;30
31declare type Percentage = `${number}%`;32
33declare type Dimension = PX | VP | FP | LPX | Percentage | Resource;34
35declare type ResourceStr = string | Resource;36
37declare type Offset = {38dx: Length;39
40dy: Length;41};42
43declare type AltOffset = {44dx1: Length;45dy2: Length;46};47
48declare interface Position {49
50x?: Length;51
52y?: Length;53}