Steven Timotius | af03df6 | 2017-07-18 16:56:43 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2017 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 | |
| 17 | syntax = "proto3"; |
| 18 | |
| 19 | import "frameworks/base/core/proto/android/graphics/rect.proto"; |
| 20 | import "frameworks/base/core/proto/android/view/displayinfo.proto"; |
| 21 | import "frameworks/base/core/proto/android/view/windowlayoutparams.proto"; |
| 22 | |
| 23 | package com.android.server.wm.proto; |
| 24 | |
| 25 | option java_multiple_files = true; |
| 26 | |
| 27 | message WindowManagerServiceProto { |
| 28 | WindowManagerPolicyProto policy = 1; |
| 29 | /* window manager hierarchy structure */ |
| 30 | repeated DisplayProto displays = 2; |
| 31 | /* window references in top down z order */ |
| 32 | repeated IdentifierProto windows = 3; |
| 33 | IdentifierProto focused_window = 4; |
| 34 | string focused_app = 5; |
| 35 | IdentifierProto input_method_window = 6; |
| 36 | bool display_frozen = 7; |
| 37 | int32 rotation = 8; |
| 38 | int32 last_orientation = 9; |
| 39 | AppTransitionProto app_transition = 10; |
| 40 | } |
| 41 | |
| 42 | /* represents PhoneWindowManager */ |
| 43 | message WindowManagerPolicyProto { |
| 44 | .android.graphics.RectProto stable_bounds = 1; |
| 45 | } |
| 46 | |
| 47 | /* represents AppTransition */ |
| 48 | message AppTransitionProto { |
| 49 | enum AppState { |
| 50 | APP_STATE_IDLE = 0; |
| 51 | APP_STATE_READY = 1; |
| 52 | APP_STATE_RUNNING = 2; |
| 53 | APP_STATE_TIMEOUT = 3; |
| 54 | } |
| 55 | AppState app_transition_state = 1; |
| 56 | /* definitions for constants found in {@link com.android.server.wm.AppTransition} */ |
| 57 | enum TransitionType { |
| 58 | TRANSIT_NONE = 0; |
| 59 | TRANSIT_UNSET = -1; |
| 60 | TRANSIT_ACTIVITY_OPEN = 6; |
| 61 | TRANSIT_ACTIVITY_CLOSE = 7; |
| 62 | TRANSIT_TASK_OPEN = 8; |
| 63 | TRANSIT_TASK_CLOSE = 9; |
| 64 | TRANSIT_TASK_TO_FRONT = 10; |
| 65 | TRANSIT_TASK_TO_BACK = 11; |
| 66 | TRANSIT_WALLPAPER_CLOSE = 12; |
| 67 | TRANSIT_WALLPAPER_OPEN = 13; |
| 68 | TRANSIT_WALLPAPER_INTRA_OPEN = 14; |
| 69 | TRANSIT_WALLPAPER_INTRA_CLOSE = 15; |
| 70 | TRANSIT_TASK_OPEN_BEHIND = 16; |
| 71 | TRANSIT_TASK_IN_PLACE = 17; |
| 72 | TRANSIT_ACTIVITY_RELAUNCH = 18; |
| 73 | TRANSIT_DOCK_TASK_FROM_RECENTS = 19; |
| 74 | TRANSIT_KEYGUARD_GOING_AWAY = 20; |
| 75 | TRANSIT_KEYGUARD_GOING_AWAY_ON_WALLPAPER = 21; |
| 76 | TRANSIT_KEYGUARD_OCCLUDE = 22; |
| 77 | TRANSIT_KEYGUARD_UNOCCLUDE = 23; |
| 78 | } |
| 79 | TransitionType last_used_app_transition = 2; |
| 80 | } |
| 81 | |
| 82 | /* represents DisplayContent */ |
| 83 | message DisplayProto { |
| 84 | int32 id = 1; |
| 85 | repeated StackProto stacks = 2; |
| 86 | DockedStackDividerControllerProto docked_stack_divider_controller = 3; |
| 87 | PinnedStackControllerProto pinned_stack_controller = 4; |
| 88 | /* non app windows */ |
| 89 | repeated WindowTokenProto above_app_windows = 5; |
| 90 | repeated WindowTokenProto below_app_windows = 6; |
| 91 | repeated WindowTokenProto ime_windows = 7; |
| 92 | int32 dpi = 8; |
| 93 | .android.view.DisplayInfoProto display_info = 9; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | /* represents DockedStackDividerController */ |
| 98 | message DockedStackDividerControllerProto { |
| 99 | bool minimized_dock = 1; |
| 100 | } |
| 101 | |
| 102 | /* represents PinnedStackController */ |
| 103 | message PinnedStackControllerProto { |
| 104 | .android.graphics.RectProto default_bounds = 1; |
| 105 | .android.graphics.RectProto movement_bounds = 2; |
| 106 | } |
| 107 | |
| 108 | /* represents TaskStack */ |
| 109 | message StackProto { |
| 110 | int32 id = 1; |
| 111 | repeated TaskProto tasks = 2; |
| 112 | bool fills_parent = 3; |
| 113 | .android.graphics.RectProto bounds = 4; |
| 114 | bool animation_background_surface_is_dimming = 5; |
| 115 | } |
| 116 | |
| 117 | /* represents Task */ |
| 118 | message TaskProto { |
| 119 | int32 id = 1; |
| 120 | repeated AppWindowTokenProto app_window_tokens = 2; |
| 121 | bool fills_parent = 3; |
| 122 | .android.graphics.RectProto bounds = 4; |
| 123 | .android.graphics.RectProto temp_inset_bounds = 5; |
| 124 | } |
| 125 | |
| 126 | /* represents AppWindowToken */ |
| 127 | message AppWindowTokenProto { |
| 128 | /* obtained from ActivityRecord */ |
| 129 | string name = 1; |
| 130 | WindowTokenProto window_token = 2; |
| 131 | } |
| 132 | |
| 133 | /* represents WindowToken */ |
| 134 | message WindowTokenProto { |
| 135 | int32 hash_code = 1; |
| 136 | repeated WindowStateProto windows = 2; |
| 137 | } |
| 138 | |
| 139 | /* represents WindowState */ |
| 140 | message WindowStateProto { |
| 141 | IdentifierProto identifier = 1; |
| 142 | int32 display_id = 2; |
| 143 | int32 stack_id = 3; |
| 144 | .android.view.WindowLayoutParamsProto attributes = 4; |
| 145 | .android.graphics.RectProto given_content_insets = 5; |
| 146 | .android.graphics.RectProto frame = 6; |
| 147 | .android.graphics.RectProto containing_frame = 7; |
| 148 | .android.graphics.RectProto parent_frame = 8; |
| 149 | .android.graphics.RectProto content_frame = 9; |
| 150 | .android.graphics.RectProto content_insets = 10; |
| 151 | .android.graphics.RectProto surface_insets = 11; |
| 152 | WindowStateAnimatorProto animator = 12; |
| 153 | bool animating_exit = 13; |
| 154 | repeated WindowStateProto child_windows = 14; |
| 155 | } |
| 156 | |
| 157 | message IdentifierProto { |
| 158 | int32 hash_code = 1; |
| 159 | int32 user_id = 2; |
| 160 | string title = 3; |
| 161 | } |
| 162 | |
| 163 | /* represents WindowStateAnimator */ |
| 164 | message WindowStateAnimatorProto { |
| 165 | .android.graphics.RectProto last_clip_rect = 1; |
| 166 | WindowSurfaceControllerProto surface = 2; |
| 167 | } |
| 168 | |
| 169 | /* represents WindowSurfaceController */ |
| 170 | message WindowSurfaceControllerProto { |
| 171 | bool shown = 1; |
| 172 | int32 layer = 2; |
| 173 | } |