• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
17/**
18 *
19 * This file includes only framework internal classes and functions
20 * non are part of SDK. Do not access from app.
21 *
22 * IView is an interface implemented by both ViewPU and ViewV2
23 *
24 */
25
26interface IView {
27    id__() : number;
28    debugInfo__() : string;
29
30    getCardId(): number; // implemented in NativeViewPartialUpdate
31    getParent(): IView | undefined;
32    setParent(p: IView) : void;
33    setParentBuilderNode__(node: ViewBuildNodeBase): void;
34    addChild(c: IView): boolean;
35    getChildById(elmtId: number) : IView | undefined;
36    removeChild(child: IView): boolean;
37    findViewInHierarchy(id: number): ViewPU | ViewV2 | undefined;
38
39    purgeDeleteElmtId(rmElmtId: number): boolean;
40    initialRenderView(): void;
41    forceCompleteRerender(deep: boolean): void;
42    forceRerenderNode(elmtId: number): void;
43
44    uiNodeNeedUpdateV2(elmtId: number) : void;
45
46    // FIXME replace updateStateVarsOfChildByElmtId by new solution
47    updateStateVarsOfChildByElmtId(elmtId, params: Object): void;
48
49    aboutToBeDeleted(): void;
50    isDeleting(): boolean;
51    setDeleting(): void;
52    setDeleteStatusRecursively(): void;
53
54    isCompFreezeAllowed(): boolean;
55    setActiveInternal(newState: boolean, isReuse: boolean): void;
56
57    findProvidePU__(providedPropName: string): ObservedPropertyAbstractPU<any> | undefined;
58
59    localStorage_ : LocalStorage;
60
61    debugInfoViewHierarchyInternal(depth: number, recursive: boolean): string;
62    debugInfoUpdateFuncByElmtIdInternal(counter: ProfileRecursionCounter, depth: number, recursive: boolean): string;
63    debugInfoDirtDescendantElementIdsInternal(depth: number, recursive: boolean, counter: ProfileRecursionCounter): string;
64
65    onGlobalThemeChanged(): void;
66
67    __ClearAllRecyle__PUV2ViewBase__Internal(): void;
68}
69