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