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