The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 1 | /* //device/java/android/android/view/IWindowSession.aidl |
| 2 | ** |
| 3 | ** Copyright 2006, The Android Open Source Project |
| 4 | ** |
Vishnu Nair | f7645aa | 2019-06-18 11:14:01 -0700 | [diff] [blame] | 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 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 8 | ** |
Vishnu Nair | f7645aa | 2019-06-18 11:14:01 -0700 | [diff] [blame] | 9 | ** http://www.apache.org/licenses/LICENSE-2.0 |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 10 | ** |
Vishnu Nair | f7645aa | 2019-06-18 11:14:01 -0700 | [diff] [blame] | 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. |
Andrii Kulian | 4460796 | 2017-03-16 11:06:24 -0700 | [diff] [blame] | 14 | ** See the License for the specific language governing permissions and |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 15 | ** limitations under the License. |
| 16 | */ |
| 17 | |
| 18 | package android.view; |
| 19 | |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 20 | import android.content.ClipData; |
Valerie Hau | 3036055 | 2020-01-14 16:12:01 -0800 | [diff] [blame] | 21 | import android.graphics.Point; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | import android.graphics.Rect; |
| 23 | import android.graphics.Region; |
Dianne Hackborn | 7580493 | 2009-10-20 20:15:20 -0700 | [diff] [blame] | 24 | import android.os.Bundle; |
Andrii Kulian | 4460796 | 2017-03-16 11:06:24 -0700 | [diff] [blame] | 25 | import android.util.MergedConfiguration; |
Adrian Roos | 5c6b622 | 2017-11-07 17:36:10 +0100 | [diff] [blame] | 26 | import android.view.DisplayCutout; |
Jeff Brown | 46b9ac0 | 2010-04-22 18:58:52 -0700 | [diff] [blame] | 27 | import android.view.InputChannel; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 28 | import android.view.IWindow; |
Dianne Hackborn | e3f23a3 | 2013-03-01 13:25:35 -0800 | [diff] [blame] | 29 | import android.view.IWindowId; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 30 | import android.view.MotionEvent; |
| 31 | import android.view.WindowManager; |
Jorim Jaggi | f96c90a | 2018-09-26 16:55:15 +0200 | [diff] [blame] | 32 | import android.view.InsetsState; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 33 | import android.view.Surface; |
Daichi Hirono | a1fb9be | 2017-12-18 17:02:54 +0900 | [diff] [blame] | 34 | import android.view.SurfaceControl; |
Vishnu Nair | 676cdb3 | 2019-09-12 09:27:43 -0700 | [diff] [blame] | 35 | import android.view.SurfaceControl.Transaction; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 36 | |
Adrian Roos | 4ffc897 | 2019-02-07 20:45:11 +0100 | [diff] [blame] | 37 | import java.util.List; |
| 38 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | /** |
| 40 | * System private per-application interface to the window manager. |
| 41 | * |
| 42 | * {@hide} |
| 43 | */ |
| 44 | interface IWindowSession { |
Craig Mautner | 6881a10 | 2012-07-27 13:04:51 -0700 | [diff] [blame] | 45 | int addToDisplay(IWindow window, int seq, in WindowManager.LayoutParams attrs, |
Adrian Roos | 9e370f2 | 2018-03-06 18:19:45 +0100 | [diff] [blame] | 46 | in int viewVisibility, in int layerStackId, out Rect outFrame, |
Jorim Jaggi | f081f06 | 2019-10-24 16:24:54 +0200 | [diff] [blame] | 47 | out Rect outContentInsets, out Rect outStableInsets, |
Jorim Jaggi | f96c90a | 2018-09-26 16:55:15 +0200 | [diff] [blame] | 48 | out DisplayCutout.ParcelableWrapper displayCutout, out InputChannel outInputChannel, |
| 49 | out InsetsState insetsState); |
Craig Mautner | 6881a10 | 2012-07-27 13:04:51 -0700 | [diff] [blame] | 50 | int addToDisplayWithoutInputChannel(IWindow window, int seq, in WindowManager.LayoutParams attrs, |
Adrian Roos | 37d7a68 | 2014-11-06 18:15:16 +0100 | [diff] [blame] | 51 | in int viewVisibility, in int layerStackId, out Rect outContentInsets, |
Jorim Jaggi | f96c90a | 2018-09-26 16:55:15 +0200 | [diff] [blame] | 52 | out Rect outStableInsets, out InsetsState insetsState); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 53 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 54 | void remove(IWindow window); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 55 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 56 | /** |
| 57 | * Change the parameters of a window. You supply the |
| 58 | * new parameters, it returns the new frame of the window on screen (the |
| 59 | * position should be ignored) and surface of the window. The surface |
| 60 | * will be invalid if the window is currently hidden, else you can use it |
| 61 | * to draw the window's contents. |
Vishnu Nair | f7645aa | 2019-06-18 11:14:01 -0700 | [diff] [blame] | 62 | * |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 63 | * @param window The window being modified. |
Dianne Hackborn | 9a230e0 | 2011-10-06 11:51:27 -0700 | [diff] [blame] | 64 | * @param seq Ordering sequence number. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 65 | * @param attrs If non-null, new attributes to apply to the window. |
| 66 | * @param requestedWidth The width the window wants to be. |
| 67 | * @param requestedHeight The height the window wants to be. |
| 68 | * @param viewVisibility Window root view's visibility. |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 69 | * @param flags Request flags: {@link WindowManagerGlobal#RELAYOUT_INSETS_PENDING}, |
| 70 | * {@link WindowManagerGlobal#RELAYOUT_DEFER_SURFACE_DESTROY}. |
chaviw | be43ac8 | 2018-04-04 15:14:49 -0700 | [diff] [blame] | 71 | * @param frameNumber A frame number in which changes requested in this layout will be rendered. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 72 | * @param outFrame Rect in which is placed the new position/size on |
| 73 | * screen. |
| 74 | * @param outContentInsets Rect in which is placed the offsets from |
| 75 | * <var>outFrame</var> in which the content of the window should be |
| 76 | * placed. This can be used to modify the window layout to ensure its |
| 77 | * contents are visible to the user, taking into account system windows |
| 78 | * like the status bar or a soft keyboard. |
| 79 | * @param outVisibleInsets Rect in which is placed the offsets from |
| 80 | * <var>outFrame</var> in which the window is actually completely visible |
| 81 | * to the user. This can be used to temporarily scroll the window's |
| 82 | * contents to make sure the user can see it. This is different than |
| 83 | * <var>outContentInsets</var> in that these insets change transiently, |
| 84 | * so complex relayout of the window should not happen based on them. |
Filip Gruszczynski | 2217f61 | 2015-05-26 11:32:08 -0700 | [diff] [blame] | 85 | * @param outOutsets Rect in which is placed the dead area of the screen that we would like to |
| 86 | * treat as real display. Example of such area is a chin in some models of wearable devices. |
Jorim Jaggi | 2e95a48 | 2016-01-14 17:36:55 -0800 | [diff] [blame] | 87 | * @param outBackdropFrame Rect which is used draw the resizing background during a resize |
| 88 | * operation. |
Andrii Kulian | 4460796 | 2017-03-16 11:06:24 -0700 | [diff] [blame] | 89 | * @param outMergedConfiguration New config container that holds global, override and merged |
| 90 | * config for window, if it is now becoming visible and the merged configuration has changed |
| 91 | * since it was last displayed. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 92 | * @param outSurface Object in which is placed the new display surface. |
Jorim Jaggi | f96c90a | 2018-09-26 16:55:15 +0200 | [diff] [blame] | 93 | * @param insetsState The current insets state in the system. |
Valerie Hau | 3036055 | 2020-01-14 16:12:01 -0800 | [diff] [blame] | 94 | * @param outSurfaceSize The width and height of the surface control |
Robert Carr | 2e20bcd | 2020-01-22 13:32:38 -0800 | [diff] [blame^] | 95 | * @param outBlastSurfaceControl A BLAST SurfaceControl allocated by the WindowManager |
| 96 | * the SurfaceControl willl be managed by the client side, but the WindowManager |
| 97 | * may use it as a deferTransaction barrier. |
Filip Gruszczynski | 2217f61 | 2015-05-26 11:32:08 -0700 | [diff] [blame] | 98 | * |
Jeff Brown | 98365d7 | 2012-08-19 20:30:52 -0700 | [diff] [blame] | 99 | * @return int Result flags: {@link WindowManagerGlobal#RELAYOUT_SHOW_FOCUS}, |
| 100 | * {@link WindowManagerGlobal#RELAYOUT_FIRST_TIME}. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 101 | */ |
Dianne Hackborn | 9a230e0 | 2011-10-06 11:51:27 -0700 | [diff] [blame] | 102 | int relayout(IWindow window, int seq, in WindowManager.LayoutParams attrs, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 103 | int requestedWidth, int requestedHeight, int viewVisibility, |
Jorim Jaggi | f081f06 | 2019-10-24 16:24:54 +0200 | [diff] [blame] | 104 | int flags, long frameNumber, out Rect outFrame, |
Adrian Roos | fa10423 | 2014-06-20 16:10:14 -0700 | [diff] [blame] | 105 | out Rect outContentInsets, out Rect outVisibleInsets, out Rect outStableInsets, |
Jorim Jaggi | f081f06 | 2019-10-24 16:24:54 +0200 | [diff] [blame] | 106 | out Rect outBackdropFrame, |
Adrian Roos | 5c6b622 | 2017-11-07 17:36:10 +0100 | [diff] [blame] | 107 | out DisplayCutout.ParcelableWrapper displayCutout, |
Robert Carr | 5fea55b | 2018-12-10 13:05:52 -0800 | [diff] [blame] | 108 | out MergedConfiguration outMergedConfiguration, out SurfaceControl outSurfaceControl, |
Robert Carr | 2e20bcd | 2020-01-22 13:32:38 -0800 | [diff] [blame^] | 109 | out InsetsState insetsState, out Point outSurfaceSize, |
| 110 | out SurfaceControl outBlastSurfaceControl); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 111 | |
Robert Carr | 23fa16b | 2016-01-13 13:19:58 -0800 | [diff] [blame] | 112 | /* |
| 113 | * Notify the window manager that an application is relaunching and |
Robert Carr | 77bdfb5 | 2016-05-02 18:18:31 -0700 | [diff] [blame] | 114 | * windows should be prepared for replacement. |
Robert Carr | 23fa16b | 2016-01-13 13:19:58 -0800 | [diff] [blame] | 115 | * |
| 116 | * @param appToken The application |
Robert Carr | 77bdfb5 | 2016-05-02 18:18:31 -0700 | [diff] [blame] | 117 | * @param childrenOnly Whether to only prepare child windows for replacement |
| 118 | * (for example when main windows are being reused via preservation). |
Robert Carr | 23fa16b | 2016-01-13 13:19:58 -0800 | [diff] [blame] | 119 | */ |
Robert Carr | 77bdfb5 | 2016-05-02 18:18:31 -0700 | [diff] [blame] | 120 | void prepareToReplaceWindows(IBinder appToken, boolean childrenOnly); |
Robert Carr | 23fa16b | 2016-01-13 13:19:58 -0800 | [diff] [blame] | 121 | |
Rob Carr | 64e516f | 2015-10-29 00:20:45 +0000 | [diff] [blame] | 122 | /** |
Dianne Hackborn | 6482517 | 2011-03-02 21:32:58 -0800 | [diff] [blame] | 123 | * Called by a client to report that it ran out of graphics memory. |
| 124 | */ |
| 125 | boolean outOfMemory(IWindow window); |
| 126 | |
| 127 | /** |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 128 | * Give the window manager a hint of the part of the window that is |
| 129 | * completely transparent, allowing it to work with the surface flinger |
| 130 | * to optimize compositing of this part of the window. |
| 131 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 132 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 133 | void setTransparentRegion(IWindow window, in Region region); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 134 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 135 | /** |
| 136 | * Tell the window manager about the content and visible insets of the |
| 137 | * given window, which can be used to adjust the <var>outContentInsets</var> |
| 138 | * and <var>outVisibleInsets</var> values returned by |
| 139 | * {@link #relayout relayout()} for windows behind this one. |
| 140 | * |
| 141 | * @param touchableInsets Controls which part of the window inside of its |
| 142 | * frame can receive pointer events, as defined by |
| 143 | * {@link android.view.ViewTreeObserver.InternalInsetsInfo}. |
| 144 | */ |
| 145 | void setInsets(IWindow window, int touchableInsets, in Rect contentInsets, |
Jeff Brown | fbf0977 | 2011-01-16 14:06:57 -0800 | [diff] [blame] | 146 | in Rect visibleInsets, in Region touchableRegion); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 147 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 148 | /** |
| 149 | * Return the current display size in which the window is being laid out, |
| 150 | * accounting for screen decorations around it. |
| 151 | */ |
| 152 | void getDisplayFrame(IWindow window, out Rect outDisplayFrame); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 153 | |
Vishnu Nair | f7645aa | 2019-06-18 11:14:01 -0700 | [diff] [blame] | 154 | /** |
| 155 | * Called when the client has finished drawing the surface, if needed. |
| 156 | * |
| 157 | * @param postDrawTransaction transaction filled by the client that can be |
| 158 | * used to synchronize any post draw transactions with the server. Transaction |
| 159 | * is null if there is no sync required. |
| 160 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 161 | @UnsupportedAppUsage |
Vishnu Nair | 676cdb3 | 2019-09-12 09:27:43 -0700 | [diff] [blame] | 162 | void finishDrawing(IWindow window, in SurfaceControl.Transaction postDrawTransaction); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 163 | |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 164 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 165 | void setInTouchMode(boolean showFocus); |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 166 | @UnsupportedAppUsage |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 167 | boolean getInTouchMode(); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 168 | |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 169 | @UnsupportedAppUsage |
Arthur Hung | a4c5206 | 2019-02-19 11:31:44 +0800 | [diff] [blame] | 170 | boolean performHapticFeedback(int effectId, boolean always); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 171 | |
Dianne Hackborn | c8a0a75 | 2009-08-10 23:05:49 -0700 | [diff] [blame] | 172 | /** |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 173 | * Initiate the drag operation itself |
Daichi Hirono | fabca09 | 2017-12-19 15:02:50 +0900 | [diff] [blame] | 174 | * |
| 175 | * @param window Window which initiates drag operation. |
| 176 | * @param flags See {@code View#startDragAndDrop} |
| 177 | * @param surface Surface containing drag shadow image |
| 178 | * @param touchSource See {@code InputDevice#getSource()} |
Daichi Hirono | 1456b92 | 2018-01-24 15:37:26 +0900 | [diff] [blame] | 179 | * @param touchX X coordinate of last touch point |
| 180 | * @param touchY Y coordinate of last touch point |
Daichi Hirono | fabca09 | 2017-12-19 15:02:50 +0900 | [diff] [blame] | 181 | * @param thumbCenterX X coordinate for the position within the shadow image that should be |
| 182 | * underneath the touch point during the drag and drop operation. |
| 183 | * @param thumbCenterY Y coordinate for the position within the shadow image that should be |
| 184 | * underneath the touch point during the drag and drop operation. |
| 185 | * @param data Data transferred by drag and drop |
| 186 | * @return Token of drag operation which will be passed to cancelDragAndDrop. |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 187 | */ |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 188 | @UnsupportedAppUsage |
Daichi Hirono | fabca09 | 2017-12-19 15:02:50 +0900 | [diff] [blame] | 189 | IBinder performDrag(IWindow window, int flags, in SurfaceControl surface, int touchSource, |
Vladislav Kaznacheev | ba76112 | 2016-01-22 12:09:45 -0800 | [diff] [blame] | 190 | float touchX, float touchY, float thumbCenterX, float thumbCenterY, in ClipData data); |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 191 | |
Daichi Hirono | a1fb9be | 2017-12-18 17:02:54 +0900 | [diff] [blame] | 192 | /** |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 193 | * Report the result of a drop action targeted to the given window. |
| 194 | * consumed is 'true' when the drop was accepted by a valid recipient, |
| 195 | * 'false' otherwise. |
| 196 | */ |
Daichi Hirono | a1fb9be | 2017-12-18 17:02:54 +0900 | [diff] [blame] | 197 | void reportDropResult(IWindow window, boolean consumed); |
Chris Tate | d4533f1 | 2010-10-19 15:15:08 -0700 | [diff] [blame] | 198 | |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 199 | /** |
Vladislav Kaznacheev | 8206391 | 2015-11-20 14:20:13 -0800 | [diff] [blame] | 200 | * Cancel the current drag operation. |
Daichi Hirono | 3e9d510 | 2019-04-15 15:58:11 +0900 | [diff] [blame] | 201 | * skipAnimation is 'true' when it should skip the drag cancel animation which brings the drag |
| 202 | * shadow image back to the drag start position. |
Vladislav Kaznacheev | 8206391 | 2015-11-20 14:20:13 -0800 | [diff] [blame] | 203 | */ |
Daichi Hirono | 3e9d510 | 2019-04-15 15:58:11 +0900 | [diff] [blame] | 204 | void cancelDragAndDrop(IBinder dragToken, boolean skipAnimation); |
Vladislav Kaznacheev | 8206391 | 2015-11-20 14:20:13 -0800 | [diff] [blame] | 205 | |
| 206 | /** |
Christopher Tate | a53146c | 2010-09-07 11:57:52 -0700 | [diff] [blame] | 207 | * Tell the OS that we've just dragged into a View that is willing to accept the drop |
| 208 | */ |
| 209 | void dragRecipientEntered(IWindow window); |
| 210 | |
| 211 | /** |
| 212 | * Tell the OS that we've just dragged *off* of a View that was willing to accept the drop |
| 213 | */ |
| 214 | void dragRecipientExited(IWindow window); |
| 215 | |
| 216 | /** |
Dianne Hackborn | c8a0a75 | 2009-08-10 23:05:49 -0700 | [diff] [blame] | 217 | * For windows with the wallpaper behind them, and the wallpaper is |
| 218 | * larger than the screen, set the offset within the screen. |
Marco Nelissen | bf6956b | 2009-11-09 15:21:13 -0800 | [diff] [blame] | 219 | * For multi screen launcher type applications, xstep and ystep indicate |
| 220 | * how big the increment is from one screen to another. |
Dianne Hackborn | c8a0a75 | 2009-08-10 23:05:49 -0700 | [diff] [blame] | 221 | */ |
Marco Nelissen | bf6956b | 2009-11-09 15:21:13 -0800 | [diff] [blame] | 222 | void setWallpaperPosition(IBinder windowToken, float x, float y, float xstep, float ystep); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 223 | |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 224 | @UnsupportedAppUsage |
Dianne Hackborn | 19382ac | 2009-09-11 21:13:37 -0700 | [diff] [blame] | 225 | void wallpaperOffsetsComplete(IBinder window); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 226 | |
Dianne Hackborn | 067e5f6 | 2014-09-07 23:14:30 -0700 | [diff] [blame] | 227 | /** |
| 228 | * Apply a raw offset to the wallpaper service when shown behind this window. |
| 229 | */ |
| 230 | void setWallpaperDisplayOffset(IBinder windowToken, int x, int y); |
| 231 | |
Dianne Hackborn | 7580493 | 2009-10-20 20:15:20 -0700 | [diff] [blame] | 232 | Bundle sendWallpaperCommand(IBinder window, String action, int x, int y, |
| 233 | int z, in Bundle extras, boolean sync); |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 234 | |
Andrei Onea | f4fb6fb | 2019-02-27 14:46:52 +0000 | [diff] [blame] | 235 | @UnsupportedAppUsage |
Dianne Hackborn | 7580493 | 2009-10-20 20:15:20 -0700 | [diff] [blame] | 236 | void wallpaperCommandComplete(IBinder window, in Bundle result); |
Dianne Hackborn | a4b7f2f | 2012-05-21 11:28:41 -0700 | [diff] [blame] | 237 | |
Svetoslav Ganov | 1cf70bb | 2012-08-06 10:53:34 -0700 | [diff] [blame] | 238 | /** |
| 239 | * Notifies that a rectangle on the screen has been requested. |
| 240 | */ |
Svetoslav | f7174e8 | 2014-06-12 11:29:35 -0700 | [diff] [blame] | 241 | void onRectangleOnScreenRequested(IBinder token, in Rect rectangle); |
Dianne Hackborn | e3f23a3 | 2013-03-01 13:25:35 -0800 | [diff] [blame] | 242 | |
| 243 | IWindowId getWindowId(IBinder window); |
Jeff Brown | c2932a1 | 2014-11-20 18:04:05 -0800 | [diff] [blame] | 244 | |
| 245 | /** |
| 246 | * When the system is dozing in a low-power partially suspended state, pokes a short |
| 247 | * lived wake lock and ensures that the display is ready to accept the next frame |
| 248 | * of content drawn in the window. |
| 249 | * |
| 250 | * This mechanism is bound to the window rather than to the display manager or the |
| 251 | * power manager so that the system can ensure that the window is actually visible |
| 252 | * and prevent runaway applications from draining the battery. This is similar to how |
| 253 | * FLAG_KEEP_SCREEN_ON works. |
| 254 | * |
| 255 | * This method is synchronous because it may need to acquire a wake lock before returning. |
| 256 | * The assumption is that this method will be called rather infrequently. |
| 257 | */ |
| 258 | void pokeDrawLock(IBinder window); |
Chong Zhang | 8e89b31 | 2015-09-09 15:09:30 -0700 | [diff] [blame] | 259 | |
| 260 | /** |
| 261 | * Starts a task window move with {startX, startY} as starting point. The amount of move |
| 262 | * will be the offset between {startX, startY} and the new cursor position. |
| 263 | * |
| 264 | * Returns true if the move started successfully; false otherwise. |
| 265 | */ |
| 266 | boolean startMovingTask(IWindow window, float startX, float startY); |
Vladislav Kaznacheev | 989b58a | 2016-02-10 12:19:33 -0800 | [diff] [blame] | 267 | |
yj81.kwon | 19585ff | 2019-04-23 18:53:57 -0700 | [diff] [blame] | 268 | void finishMovingTask(IWindow window); |
| 269 | |
Vladislav Kaznacheev | 989b58a | 2016-02-10 12:19:33 -0800 | [diff] [blame] | 270 | void updatePointerIcon(IWindow window); |
Andrii Kulian | 4b6599e | 2018-01-15 17:24:08 -0800 | [diff] [blame] | 271 | |
| 272 | /** |
Tiger Huang | d8ec938 | 2019-04-18 14:35:09 -0700 | [diff] [blame] | 273 | * Reparent the top layers for a display to the requested SurfaceControl. The display that is |
| 274 | * going to be re-parented (the displayId passed in) needs to have been created by the same |
| 275 | * process that is requesting the re-parent. This is to ensure clients can't just re-parent |
| 276 | * display content info to any SurfaceControl, as this would be a security issue. |
| 277 | * |
| 278 | * @param window The window which owns the SurfaceControl. This indicates the z-order of the |
| 279 | * windows of this display against the windows on the parent display. |
| 280 | * @param sc The SurfaceControl that the top level layers for the display should be re-parented |
| 281 | * to. |
| 282 | * @param displayId The id of the display to be re-parented. |
| 283 | */ |
| 284 | void reparentDisplayContent(IWindow window, in SurfaceControl sc, int displayId); |
| 285 | |
| 286 | /** |
| 287 | * Update the location of a child display in its parent window. This enables windows in the |
| 288 | * child display to compute the global transformation matrix. |
| 289 | * |
| 290 | * @param window The parent window of the display. |
| 291 | * @param x The x coordinate in the parent window. |
| 292 | * @param y The y coordinate in the parent window. |
| 293 | * @param displayId The id of the display to be notified. |
| 294 | */ |
| 295 | void updateDisplayContentLocation(IWindow window, int x, int y, int displayId); |
| 296 | |
| 297 | /** |
Tiger Huang | 2b210c2 | 2019-03-18 21:21:26 +0800 | [diff] [blame] | 298 | * Update a tap exclude region identified by provided id in the window. Touches on this region |
| 299 | * will neither be dispatched to this window nor change the focus to this window. Passing an |
| 300 | * invalid region will remove the area from the exclude region of this window. |
Andrii Kulian | 4b6599e | 2018-01-15 17:24:08 -0800 | [diff] [blame] | 301 | */ |
chaviw | aa0d74e | 2019-12-26 14:13:40 -0800 | [diff] [blame] | 302 | void updateTapExcludeRegion(IWindow window, in Region region); |
Jorim Jaggi | e35c059 | 2018-11-06 16:21:08 +0100 | [diff] [blame] | 303 | |
| 304 | /** |
| 305 | * Called when the client has changed the local insets state, and now the server should reflect |
| 306 | * that new state. |
| 307 | */ |
| 308 | void insetsModified(IWindow window, in InsetsState state); |
Adrian Roos | 4ffc897 | 2019-02-07 20:45:11 +0100 | [diff] [blame] | 309 | |
| 310 | |
| 311 | /** |
| 312 | * Called when the system gesture exclusion has changed. |
| 313 | */ |
Adrian Roos | 2dccd14 | 2019-07-16 18:35:15 +0200 | [diff] [blame] | 314 | oneway void reportSystemGestureExclusionChanged(IWindow window, in List<Rect> exclusionRects); |
Robert Carr | 9d431e1 | 2018-12-17 13:11:48 -0800 | [diff] [blame] | 315 | |
| 316 | /** |
| 317 | * Request the server to call setInputWindowInfo on a given Surface, and return |
| 318 | * an input channel where the client can receive input. |
| 319 | */ |
Vishnu Nair | 5cf25319 | 2019-11-07 15:33:20 -0800 | [diff] [blame] | 320 | void grantInputChannel(int displayId, in SurfaceControl surface, in IWindow window, |
| 321 | in IBinder hostInputToken, out InputChannel outInputChannel); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 322 | } |