1 /** 2 * Copyright (c) 2020, 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 package android.window; 18 19 import android.view.SurfaceControl; 20 21 import android.window.IDisplayAreaOrganizerController; 22 import android.window.ITaskOrganizerController; 23 import android.window.IWindowContainerTransactionCallback; 24 import android.window.WindowContainerToken; 25 import android.window.WindowContainerTransaction; 26 27 /** @hide */ 28 interface IWindowOrganizerController { 29 30 /** 31 * Apply multiple WindowContainer operations at once. 32 * @param t The transaction to apply. 33 */ applyTransaction(in WindowContainerTransaction t)34 void applyTransaction(in WindowContainerTransaction t); 35 36 /** 37 * Apply multiple WindowContainer operations at once. 38 * @param t The transaction to apply. 39 * @param callback This transaction will use the synchronization scheme described in 40 * BLASTSyncEngine.java. The SurfaceControl transaction containing the effects of this 41 * WindowContainer transaction will be passed to this callback when ready. 42 * @return An ID for the sync operation which will later be passed to transactionReady callback. 43 * This lets the caller differentiate overlapping sync operations. 44 */ applySyncTransaction(in WindowContainerTransaction t, in IWindowContainerTransactionCallback callback)45 int applySyncTransaction(in WindowContainerTransaction t, 46 in IWindowContainerTransactionCallback callback); 47 48 /** @return An interface enabling the management of task organizers. */ getTaskOrganizerController()49 ITaskOrganizerController getTaskOrganizerController(); 50 51 /** @return An interface enabling the management of display area organizers. */ getDisplayAreaOrganizerController()52 IDisplayAreaOrganizerController getDisplayAreaOrganizerController(); 53 54 /** 55 * Take a screenshot of the requested Window token and place the content of the screenshot into 56 * outSurfaceControl. The SurfaceControl will be a child of the token's parent, so it will be 57 * a sibling of the token's window 58 * @param token The token for the WindowContainer that should get a screenshot taken. 59 * @param outSurfaceControl The SurfaceControl where the screenshot will be attached. 60 * 61 * @return true if the screenshot was successful, false otherwise. 62 */ takeScreenshot(in WindowContainerToken token, out SurfaceControl outSurfaceControl)63 boolean takeScreenshot(in WindowContainerToken token, out SurfaceControl outSurfaceControl); 64 } 65