• 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    addChild(c: IView): boolean;
34    getChildById(elmtId: number) : IView | undefined;
35    removeChild(child: IView): boolean;
36    findViewInHierarchy(id: number): ViewPU | ViewV2 | undefined;
37
38    purgeDeleteElmtId(rmElmtId: number): boolean;
39    initialRenderView(): void;
40    forceCompleteRerender(deep: boolean): void;
41    forceRerenderNode(elmtId: number): void;
42
43    uiNodeNeedUpdateV2(elmtId: number) : void;
44
45    // FIXME replace updateStateVarsOfChildByElmtId by new solution
46    updateStateVarsOfChildByElmtId(elmtId, params: Object): void;
47
48    aboutToBeDeleted(): void;
49    isDeleting(): boolean;
50    setDeleting(): void;
51    setDeleteStatusRecursively(): void;
52
53    isCompFreezeAllowed(): boolean;
54    setActiveInternal(newState: boolean, isReuse: boolean): void;
55
56    findProvidePU(providedPropName: string): ObservedPropertyAbstractPU<any> | undefined;
57
58    localStorage_ : LocalStorage;
59
60    debugInfoViewHierarchyInternal(depth: number, recursive: boolean): string;
61    debugInfoUpdateFuncByElmtIdInternal(counter: ProfileRecursionCounter, depth: number, recursive: boolean): string;
62    debugInfoDirtDescendantElementIdsInternal(depth: number, recursive: boolean, counter: ProfileRecursionCounter): string;
63
64    onGlobalThemeChanged(): void;
65}
66