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.view.DragEvent; 25 import android.view.KeyEvent; 26 import android.view.MotionEvent; 27 import android.view.DisplayCutout; 28 import android.view.InsetsState; 29 import android.view.InsetsSourceControl; 30 31 import com.android.internal.os.IResultReceiver; 32 import android.util.MergedConfiguration; 33 34 /** 35 * API back to a client window that the Window Manager uses to inform it of 36 * interesting things happening. 37 * 38 * {@hide} 39 */ 40 oneway interface IWindow { 41 /** 42 * ===== NOTICE ===== 43 * The first method must remain the first method. Scripts 44 * and tools rely on their transaction number to work properly. 45 */ 46 47 /** 48 * Invoked by the view server to tell a window to execute the specified 49 * command. Any response from the receiver must be sent through the 50 * specified file descriptor. 51 */ executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor)52 void executeCommand(String command, String parameters, in ParcelFileDescriptor descriptor); 53 resized(in Rect frame, in Rect overscanInsets, in Rect contentInsets, in Rect visibleInsets, in Rect stableInsets, in Rect outsets, boolean reportDraw, in MergedConfiguration newMergedConfiguration, in Rect backDropFrame, boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, in DisplayCutout.ParcelableWrapper displayCutout)54 void resized(in Rect frame, in Rect overscanInsets, in Rect contentInsets, 55 in Rect visibleInsets, in Rect stableInsets, in Rect outsets, boolean reportDraw, 56 in MergedConfiguration newMergedConfiguration, in Rect backDropFrame, 57 boolean forceLayout, boolean alwaysConsumeSystemBars, int displayId, 58 in DisplayCutout.ParcelableWrapper displayCutout); 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 */ insetsChanged(in InsetsState insetsState)69 void insetsChanged(in InsetsState insetsState); 70 71 /** 72 * Called when this window retrieved control over a specified set of inset sources. 73 */ insetsControlChanged(in InsetsState insetsState, in InsetsSourceControl[] activeControls)74 void insetsControlChanged(in InsetsState insetsState, in InsetsSourceControl[] activeControls); 75 moved(int newX, int newY)76 void moved(int newX, int newY); dispatchAppVisibility(boolean visible)77 void dispatchAppVisibility(boolean visible); dispatchGetNewSurface()78 void dispatchGetNewSurface(); 79 80 /** 81 * Tell the window that it is either gaining or losing focus. Keep it up 82 * to date on the current state showing navigational focus (touch mode) too. 83 */ windowFocusChanged(boolean hasFocus, boolean inTouchMode)84 void windowFocusChanged(boolean hasFocus, boolean inTouchMode); 85 closeSystemDialogs(String reason)86 void closeSystemDialogs(String reason); 87 88 /** 89 * Called for wallpaper windows when their offsets change. 90 */ dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, boolean sync)91 void dispatchWallpaperOffsets(float x, float y, float xStep, float yStep, boolean sync); 92 dispatchWallpaperCommand(String action, int x, int y, int z, in Bundle extras, boolean sync)93 void dispatchWallpaperCommand(String action, int x, int y, 94 int z, in Bundle extras, boolean sync); 95 96 /** 97 * Drag/drop events 98 */ dispatchDragEvent(in DragEvent event)99 void dispatchDragEvent(in DragEvent event); 100 101 /** 102 * Pointer icon events 103 */ updatePointerIcon(float x, float y)104 void updatePointerIcon(float x, float y); 105 106 /** 107 * System chrome visibility changes 108 */ dispatchSystemUiVisibilityChanged(int seq, int globalVisibility, int localValue, int localChanges)109 void dispatchSystemUiVisibilityChanged(int seq, int globalVisibility, 110 int localValue, int localChanges); 111 112 /** 113 * Called for non-application windows when the enter animation has completed. 114 */ dispatchWindowShown()115 void dispatchWindowShown(); 116 117 /** 118 * Called when Keyboard Shortcuts are requested for the window. 119 */ requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId)120 void requestAppKeyboardShortcuts(IResultReceiver receiver, int deviceId); 121 122 /** 123 * Tell the window that it is either gaining or losing pointer capture. 124 */ dispatchPointerCaptureChanged(boolean hasCapture)125 void dispatchPointerCaptureChanged(boolean hasCapture); 126 } 127