1 /* //device/java/android/android/view/IWindow.aidl 2 ** 3 ** Copyright 2007, The Android Open Source Project 4 ** 5 ** Licensed under the Apache License, Version 2.0 (the "License"); 6 ** you may not use this file except in compliance with the License. 7 ** You may obtain a copy of the License at 8 ** 9 ** http://www.apache.org/licenses/LICENSE-2.0 10 ** 11 ** Unless required by applicable law or agreed to in writing, software 12 ** distributed under the License is distributed on an "AS IS" BASIS, 13 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 ** See the License for the specific language governing permissions and 15 ** limitations under the License. 16 */ 17 18 package android.view; 19 20 import android.graphics.Point; 21 import android.graphics.Rect; 22 import android.os.Bundle; 23 import android.os.ParcelFileDescriptor; 24 import android.util.MergedConfiguration; 25 import android.view.DisplayCutout; 26 import android.view.DragEvent; 27 import android.view.InsetsSourceControl; 28 import android.view.InsetsState; 29 import android.view.IScrollCaptureResponseListener; 30 import android.view.KeyEvent; 31 import android.view.MotionEvent; 32 import android.view.inputmethod.ImeTracker; 33 import android.window.ActivityWindowInfo; 34 import android.window.ClientWindowFrames; 35 36 import com.android.internal.os.IResultReceiver; 37 38 /** 39 * API back to a client window that the Window Manager uses to inform it of 40 * interesting things happening. 41 * 42 * {@hide} 43 */ 44 oneway interface IWindow { 45 /** 46 * ===== NOTICE ===== 47 * The first method must remain the first method. Scripts 48 * and tools rely on their transaction number to work properly. 49 */ 50 51 /** 52 * Invoked by the view server to tell a window to execute the specified 53 * command. Any response from the receiver must be sent through the 54 * specified file descriptor. 55 */ executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor)56 void executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor); 57 58 /** 59 * Please dispatch through WindowStateResizeItem instead of directly calling this method from 60 * the system server. 61 */ resized(in ClientWindowFrames frames, boolean reportDraw, in MergedConfiguration newMergedConfiguration, in InsetsState insetsState, boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, int syncSeqId, boolean dragResizing, in @nullable ActivityWindowInfo activityWindowInfo)62 void resized(in ClientWindowFrames frames, boolean reportDraw, 63 in MergedConfiguration newMergedConfiguration, in InsetsState insetsState, 64 boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, 65 int syncSeqId, boolean dragResizing, 66 in @nullable ActivityWindowInfo activityWindowInfo); 67 68 /** 69 * Called when this window retrieved control over a specified set of insets sources. 70 */ insetsControlChanged(in InsetsState insetsState, in InsetsSourceControl.Array activeControls)71 void insetsControlChanged(in InsetsState insetsState, 72 in InsetsSourceControl.Array activeControls); 73 74 /** 75 * Called when a set of insets source window should be shown by policy. 76 * 77 * @param types internal insets types (WindowInsets.Type.InsetsType) to show 78 * @param fromIme true if this request originated from IME (InputMethodService). 79 * @param statsToken the token tracking the current IME request or {@code null} otherwise. 80 */ showInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken)81 void showInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken); 82 83 /** 84 * Called when a set of insets source window should be hidden by policy. 85 * 86 * @param types internal insets types (WindowInsets.Type.InsetsType) to hide 87 * @param fromIme true if this request originated from IME (InputMethodService). 88 * @param statsToken the token tracking the current IME request or {@code null} otherwise. 89 */ hideInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken)90 void hideInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken); 91 moved(int newX, int newY)92 void moved(int newX, int newY); dispatchAppVisibility(boolean visible)93 void dispatchAppVisibility(boolean visible); dispatchGetNewSurface()94 void dispatchGetNewSurface(); 95 closeSystemDialogs(String reason)96 void closeSystemDialogs(String reason); 97 98 /** 99 * Called for wallpaper windows when their offsets or zoom level change. 100 */ dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync)101 void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync); 102 dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras, boolean sync)103 void dispatchWallpaperCommand(String action, int x, int y, 104 int z, in Bundle extras, boolean sync); 105 106 /** 107 * Drag/drop events 108 */ dispatchDragEvent(in DragEvent event)109 void dispatchDragEvent(in DragEvent event); 110 111 /** 112 * Called for non-application windows when the enter animation has completed. 113 */ dispatchWindowShown()114 void dispatchWindowShown(); 115 116 /** 117 * Called when Keyboard Shortcuts are requested for the window. 118 */ requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId)119 void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId); 120 121 /** 122 * Called when Scroll Capture support is requested for a window. 123 * 124 * @param callbacks to receive responses 125 */ requestScrollCapture(in IScrollCaptureResponseListener callbacks)126 void requestScrollCapture(in IScrollCaptureResponseListener callbacks); 127 128 /** 129 * Dump the details of a window. 130 */ dumpWindow(in ParcelFileDescriptor pfd)131 void dumpWindow(in ParcelFileDescriptor pfd); 132 } 133