1 /* 2 * Copyright (C) 2010 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.server; 18 19 import android.view.InputChannel; 20 21 /** 22 * Describes input-related window properties for use by the input dispatcher. 23 * 24 * @hide 25 */ 26 public final class InputWindow { 27 // The input channel associated with the window. 28 public InputChannel inputChannel; 29 30 // The window name. 31 public String name; 32 33 // Window layout params attributes. (WindowManager.LayoutParams) 34 public int layoutParamsFlags; 35 public int layoutParamsType; 36 37 // Dispatching timeout. 38 public long dispatchingTimeoutNanos; 39 40 // Window frame area. 41 public int frameLeft; 42 public int frameTop; 43 public int frameRight; 44 public int frameBottom; 45 46 // Window visible frame area. 47 public int visibleFrameLeft; 48 public int visibleFrameTop; 49 public int visibleFrameRight; 50 public int visibleFrameBottom; 51 52 // Window touchable area. 53 public int touchableAreaLeft; 54 public int touchableAreaTop; 55 public int touchableAreaRight; 56 public int touchableAreaBottom; 57 58 // Window is visible. 59 public boolean visible; 60 61 // Window can receive keys. 62 public boolean canReceiveKeys; 63 64 // Window has focus. 65 public boolean hasFocus; 66 67 // Window has wallpaper. (window is the current wallpaper target) 68 public boolean hasWallpaper; 69 70 // Input event dispatching is paused. 71 public boolean paused; 72 73 // Window layer. 74 public int layer; 75 76 // Id of process and user that owns the window. 77 public int ownerPid; 78 public int ownerUid; 79 recycle()80 public void recycle() { 81 inputChannel = null; 82 } 83 } 84