blob: befc770b4136532f56bfea3ee54130ed5df46516 [file] [log] [blame]
Jeff Brown349703e2010-06-22 01:27:15 -07001/*
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
17package com.android.server;
18
19import android.view.InputChannel;
20
21/**
22 * Describes input-related window properties for use by the input dispatcher.
23 *
24 * @hide
25 */
26public final class InputWindow {
27 // The input channel associated with the window.
28 public InputChannel inputChannel;
29
Jeff Brown519e0242010-09-15 15:18:56 -070030 // The window name.
31 public String name;
32
Jeff Brown349703e2010-06-22 01:27:15 -070033 // Window layout params attributes. (WindowManager.LayoutParams)
34 public int layoutParamsFlags;
35 public int layoutParamsType;
36
37 // Dispatching timeout.
38 public long dispatchingTimeoutNanos;
39
Jeff Brown85a31762010-09-01 17:01:00 -070040 // Window frame area.
Jeff Brown349703e2010-06-22 01:27:15 -070041 public int frameLeft;
42 public int frameTop;
Jeff Brown85a31762010-09-01 17:01:00 -070043 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 Brown349703e2010-06-22 01:27:15 -070051
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 Brown519e0242010-09-15 15:18:56 -070061 // Window can receive keys.
62 public boolean canReceiveKeys;
63
Jeff Brown349703e2010-06-22 01:27:15 -070064 // 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 Brown519e0242010-09-15 15:18:56 -070073 // Window layer.
74 public int layer;
75
Jeff Brown349703e2010-06-22 01:27:15 -070076 // 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}