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.ClientWindowFrames; 34 35 import com.android.internal.os.IResultReceiver; 36 37 /** 38 * API back to a client window that the Window Manager uses to inform it of 39 * interesting things happening. 40 * 41 * {@hide} 42 */ 43 oneway interface IWindow { 44 /** 45 * ===== NOTICE ===== 46 * The first method must remain the first method. Scripts 47 * and tools rely on their transaction number to work properly. 48 */ 49 50 /** 51 * Invoked by the view server to tell a window to execute the specified 52 * command. Any response from the receiver must be sent through the 53 * specified file descriptor. 54 */ executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor)55 void executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor); 56 resized(in ClientWindowFrames frames, boolean reportDraw, in MergedConfiguration newMergedConfiguration, in InsetsState insetsState, boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, int syncSeqId, boolean dragResizing)57 void resized(in ClientWindowFrames frames, boolean reportDraw, 58 in MergedConfiguration newMergedConfiguration, in InsetsState insetsState, 59 boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, 60 int syncSeqId, boolean dragResizing); 61 62 /** 63 * Called when this window retrieved control over a specified set of insets sources. 64 */ insetsControlChanged(in InsetsState insetsState, in InsetsSourceControl[] activeControls)65 void insetsControlChanged(in InsetsState insetsState, in InsetsSourceControl[] activeControls); 66 67 /** 68 * Called when a set of insets source window should be shown by policy. 69 * 70 * @param types internal insets types (WindowInsets.Type.InsetsType) to show 71 * @param fromIme true if this request originated from IME (InputMethodService). 72 * @param statsToken the token tracking the current IME show request or {@code null} otherwise. 73 */ showInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken)74 void showInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken); 75 76 /** 77 * Called when a set of insets source window should be hidden by policy. 78 * 79 * @param types internal insets types (WindowInsets.Type.InsetsType) to hide 80 * @param fromIme true if this request originated from IME (InputMethodService). 81 * @param statsToken the token tracking the current IME hide request or {@code null} otherwise. 82 */ hideInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken)83 void hideInsets(int types, boolean fromIme, in @nullable ImeTracker.Token statsToken); 84 moved(int newX, int newY)85 void moved(int newX, int newY); dispatchAppVisibility(boolean visible)86 void dispatchAppVisibility(boolean visible); dispatchGetNewSurface()87 void dispatchGetNewSurface(); 88 closeSystemDialogs(String reason)89 void closeSystemDialogs(String reason); 90 91 /** 92 * Called for wallpaper windows when their offsets or zoom level change. 93 */ dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync)94 void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, float zoom, boolean sync); 95 dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras, boolean sync)96 void dispatchWallpaperCommand(String action, int x, int y, 97 int z, in Bundle extras, boolean sync); 98 99 /** 100 * Drag/drop events 101 */ dispatchDragEvent(in DragEvent event)102 void dispatchDragEvent(in DragEvent event); 103 104 /** 105 * Pointer icon events 106 */ updatePointerIcon(float x, float y)107 void updatePointerIcon(float x, float y); 108 109 /** 110 * Called for non-application windows when the enter animation has completed. 111 */ dispatchWindowShown()112 void dispatchWindowShown(); 113 114 /** 115 * Called when Keyboard Shortcuts are requested for the window. 116 */ requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId)117 void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId); 118 119 /** 120 * Called when Scroll Capture support is requested for a window. 121 * 122 * @param callbacks to receive responses 123 */ requestScrollCapture(in IScrollCaptureResponseListener callbacks)124 void requestScrollCapture(in IScrollCaptureResponseListener callbacks); 125 } 126