xref: /aosp_15_r20/development/tools/winscope/src/viewers/common/curated_properties.ts (revision 90c8c64db3049935a07c6143d7fd006e26f8ecca)
1/*
2 * Copyright (C) 2024 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17import {PropertyTreeNode} from 'trace/tree_node/property_tree_node';
18
19export interface SfLayerSummary {
20  layerId: string;
21  nodeId: string;
22  name: string;
23}
24
25export interface SfSummaryProperty {
26  key: string;
27  desc?: string;
28  simpleValue?: string;
29  layerValues?: SfLayerSummary[];
30}
31
32export interface SfCuratedProperties {
33  summary: SfSummaryProperty[];
34  flags: string;
35  calcTransform: PropertyTreeNode | undefined;
36  calcCrop: string;
37  finalBounds: string;
38  reqTransform: PropertyTreeNode | undefined;
39  reqCrop: string;
40  bufferSize: string;
41  frameNumber: string;
42  bufferTransformType: string;
43  destinationFrame: string;
44  z: string;
45  relativeParent: string | SfLayerSummary;
46  relativeChildren: SfLayerSummary[];
47  calcColor: string;
48  calcShadowRadius: string;
49  calcCornerRadius: string;
50  calcCornerRadiusCrop: string;
51  backgroundBlurRadius: string;
52  reqColor: string;
53  reqCornerRadius: string;
54  inputTransform: PropertyTreeNode | undefined;
55  inputRegion: string | undefined;
56  focusable: string;
57  cropTouchRegionWithItem: string;
58  replaceTouchRegionWithCrop: string;
59  inputConfig: string;
60  ignoreDestinationFrame: boolean;
61  hasInputChannel: boolean;
62}
63
64export interface VcCuratedProperties {
65  className: string;
66  hashcode: string;
67  left: string;
68  top: string;
69  elevation: string;
70  height: string;
71  width: string;
72  translationX: string;
73  translationY: string;
74  scrollX: string;
75  scrollY: string;
76  scaleX: string;
77  scaleY: string;
78  visibility: string;
79  alpha: string;
80  willNotDraw: string;
81  clipChildren: string;
82}
83
84export type CuratedProperties = SfCuratedProperties | VcCuratedProperties;
85