Lines Matching refs:proto
22 WindowState.fromProto = function (proto: any, isActivityInTree: Boolean): WindowState {
23 if (proto == null) {
26 const windowParams = createWindowLayoutParams(proto.attributes);
27 const identifierName = getIdentifier(proto);
28 const windowType = getWindowType(proto, identifierName);
31 /* proto */ proto.windowContainer,
32 /* protoChildren */ proto.windowContainer.children.reverse(),
35 /* identifierOverride */ proto.identifier
40 proto.displayId,
41 proto.stackId,
42 proto.animator?.surface?.layer ?? 0,
43 proto.animator?.surface?.shown ?? false,
45 new Size(proto.requestedWidth, proto.requestedHeight),
46 toRect(proto.surfacePosition),
47 toRect(proto.windowFrames?.frame ?? null),
48 toRect(proto.windowFrames?.containingFrame ?? null),
49 toRect(proto.windowFrames?.parentFrame ?? null),
50 toRect(proto.windowFrames?.contentFrame ?? null),
51 toRect(proto.windowFrames?.contentInsets ?? null),
52 toRect(proto.surfaceInsets),
53 toRect(proto.givenContentInsets),
54 toRect(proto.animator?.lastClipRect ?? null),
59 addAttributes(entry, proto);
64 function createWindowLayoutParams(proto: any): WindowLayoutParams {
66 /* type */ proto?.type ?? 0,
67 /* x */ proto?.x ?? 0,
68 /* y */ proto?.y ?? 0,
69 /* width */ proto?.width ?? 0,
70 /* height */ proto?.height ?? 0,
71 /* horizontalMargin */ proto?.horizontalMargin ?? 0,
72 /* verticalMargin */ proto?.verticalMargin ?? 0,
73 /* gravity */ proto?.gravity ?? 0,
74 /* softInputMode */ proto?.softInputMode ?? 0,
75 /* format */ proto?.format ?? 0,
76 /* windowAnimations */ proto?.windowAnimations ?? 0,
77 /* alpha */ proto?.alpha ?? 0,
78 /* screenBrightness */ proto?.screenBrightness ?? 0,
79 /* buttonBrightness */ proto?.buttonBrightness ?? 0,
80 /* rotationAnimation */ proto?.rotationAnimation ?? 0,
81 /* preferredRefreshRate */ proto?.preferredRefreshRate ?? 0,
82 /* preferredDisplayModeId */ proto?.preferredDisplayModeId ?? 0,
83 /* hasSystemUiListeners */ proto?.hasSystemUiListeners ?? false,
84 /* inputFeatureFlags */ proto?.inputFeatureFlags ?? 0,
85 /* userActivityTimeout */ proto?.userActivityTimeout ?? 0,
86 /* colorMode */ proto?.colorMode ?? 0,
87 /* flags */ proto?.flags ?? 0,
88 /* privateFlags */ proto?.privateFlags ?? 0,
89 /* systemUiVisibilityFlags */ proto?.systemUiVisibilityFlags ?? 0,
90 /* subtreeSystemUiVisibilityFlags */ proto?.subtreeSystemUiVisibilityFlags ?? 0,
91 /* appearance */ proto?.appearance ?? 0,
92 /* behavior */ proto?.behavior ?? 0,
93 /* fitInsetsTypes */ proto?.fitInsetsTypes ?? 0,
94 /* fitInsetsSides */ proto?.fitInsetsSides ?? 0,
95 /* fitIgnoreVisibility */ proto?.fitIgnoreVisibility ?? false
99 function getWindowType(proto: any, identifierName: string): number {
102 } else if (proto.animatingExit) {
123 function getIdentifier(proto: any): string {
124 return proto.windowContainer.identifier?.title ?? proto.identifier?.title ?? "";
127 function addAttributes(entry: WindowState, proto: any) {
132 entry.proto = proto;