| Jeff Brown | 349703e | 2010-06-22 01:27:15 -0700 | [diff] [blame] | 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 | |
| Jeff Brown | 519e024 | 2010-09-15 15:18:56 -0700 | [diff] [blame^] | 30 | // The window name. |
| 31 | public String name; |
| 32 | |
| Jeff Brown | 349703e | 2010-06-22 01:27:15 -0700 | [diff] [blame] | 33 | // Window layout params attributes. (WindowManager.LayoutParams) |
| 34 | public int layoutParamsFlags; |
| 35 | public int layoutParamsType; |
| 36 | |
| 37 | // Dispatching timeout. |
| 38 | public long dispatchingTimeoutNanos; |
| 39 | |
| Jeff Brown | 85a3176 | 2010-09-01 17:01:00 -0700 | [diff] [blame] | 40 | // Window frame area. |
| Jeff Brown | 349703e | 2010-06-22 01:27:15 -0700 | [diff] [blame] | 41 | public int frameLeft; |
| 42 | public int frameTop; |
| Jeff Brown | 85a3176 | 2010-09-01 17:01:00 -0700 | [diff] [blame] | 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; |
| Jeff Brown | 349703e | 2010-06-22 01:27:15 -0700 | [diff] [blame] | 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 | |
| Jeff Brown | 519e024 | 2010-09-15 15:18:56 -0700 | [diff] [blame^] | 61 | // Window can receive keys. |
| 62 | public boolean canReceiveKeys; |
| 63 | |
| Jeff Brown | 349703e | 2010-06-22 01:27:15 -0700 | [diff] [blame] | 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 | |
| Jeff Brown | 519e024 | 2010-09-15 15:18:56 -0700 | [diff] [blame^] | 73 | // Window layer. |
| 74 | public int layer; |
| 75 | |
| Jeff Brown | 349703e | 2010-06-22 01:27:15 -0700 | [diff] [blame] | 76 | // Id of process and user that owns the window. |
| 77 | public int ownerPid; |
| 78 | public int ownerUid; |
| 79 | |
| 80 | public void recycle() { |
| 81 | inputChannel = null; |
| 82 | } |
| 83 | } |