summaryrefslogtreecommitdiff
path: root/libs/input/android/os/InputConfig.aidl
blob: 4e644fff06174861760f4780aae15185b9bbaad6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/**
 * Copyright (c) 2022, The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.os;


/**
 * Input configurations flags used to determine the behavior of input windows.
 * @hide
 */
@Backing(type="int")
enum InputConfig {

    /**
     * The default InputConfig value with no flags set.
     */
    DEFAULT                      = 0,

    /**
     * Does not construct an input channel for this window.  The channel will therefore
     * be incapable of receiving input.
     */
    NO_INPUT_CHANNEL             = 1 << 0,

    /**
     * Indicates that this input window is not visible, and thus will not be considered as
     * an input target and will not obscure other windows.
     */
    NOT_VISIBLE                  = 1 << 1,

    /**
     * Indicates that this input window cannot be a focus target, and this will not
     * receive any input events that can only be directed for the focused window, such
     * as key events.
     */
    NOT_FOCUSABLE                = 1 << 2,

    /**
     * Indicates that this input window cannot receive any events directed at a
     * specific location on the screen, such as touchscreen, mouse, and stylus events.
     * The window will not be considered as a touch target, but can still obscure other
     * windows.
     */
    NOT_TOUCHABLE                = 1 << 3,

    /**
     * Indicates that this window will not accept a touch event that is split between
     * more than one window. When set:
     *  - If this window receives a DOWN event with the first pointer, all successive
     *    pointers that go down, regardless of their location on the screen, will be
     *    directed to this window;
     *  - If the DOWN event lands outside the touchable bounds of this window, no
     *    successive pointers that go down, regardless of their location on the screen,
     *    will be directed to this window.
     */
    PREVENT_SPLITTING            = 1 << 4,

    /**
     * Indicates that this window shows the wallpaper behind it, so all touch events
     * that it receives should also be sent to the wallpaper.
     */
    DUPLICATE_TOUCH_TO_WALLPAPER = 1 << 5,

    /** Indicates that this the wallpaper's input window. */
    IS_WALLPAPER                 = 1 << 6,

    /**
     * Indicates that input events should not be dispatched to this window. When set,
     * input events directed towards this window will simply be dropped, and will not
     * be dispatched to windows behind it.
     */
    PAUSE_DISPATCHING            = 1 << 7,

    /**
     * This flag is set when the window is of a trusted type that is allowed to silently
     * overlay other windows for the purpose of implementing the secure views feature.
     * Trusted overlays, such as IME windows, can partly obscure other windows without causing
     * motion events to be delivered to them with AMOTION_EVENT_FLAG_WINDOW_IS_OBSCURED.
     */
    TRUSTED_OVERLAY              = 1 << 8,

    /**
     * Indicates that this window wants to listen for when there is a touch DOWN event
     * that occurs outside its touchable bounds. When such an event occurs, this window
     * will receive a MotionEvent with ACTION_OUTSIDE.
     */
    WATCH_OUTSIDE_TOUCH          = 1 << 9,

    /**
     * When set, this flag allows touches to leave the current window whenever the finger
     * moves above another window. When this happens, the window that touch has just left
     * (the current window) will receive ACTION_CANCEL, and the window that touch has entered
     * will receive ACTION_DOWN, and the remainder of the touch gesture will only go to the
     * new window. Without this flag, the entire gesture is sent to the current window, even
     * if the touch leaves the window's bounds.
     */
    SLIPPERY                     = 1 << 10,

    /**
     * When this window has focus, does not call user activity for all input events so
     * the application will have to do it itself.
     */
    DISABLE_USER_ACTIVITY        = 1 << 11,

    /**
     * Internal flag used to indicate that input should be dropped on this window.
     */
    DROP_INPUT                   = 1 << 12,

    /**
     * Internal flag used to indicate that input should be dropped on this window if this window
     * is obscured.
     */
    DROP_INPUT_IF_OBSCURED       = 1 << 13,

    /**
     * An input spy window. This window will receive all pointer events within its touchable
     * area, but will not stop events from being sent to other windows below it in z-order.
     * An input event will be dispatched to all spy windows above the top non-spy window at the
     * event's coordinates.
     */
    SPY                          = 1 << 14,

    /**
     * When used with {@link #NOT_TOUCHABLE}, this window will continue to receive events from
     * a stylus device within its touchable region. All other pointer events, such as from a
     * mouse or touchscreen, will be dispatched to the windows behind it.
     *
     * This configuration has no effect when the config {@link #NOT_TOUCHABLE} is not set.
     *
     * It is not valid to set this configuration if {@link #TRUSTED_OVERLAY} is not set.
     */
    INTERCEPTS_STYLUS            = 1 << 15,

    /**
     * The window is a clone of another window. This may be treated differently since there's
     * likely a duplicate window with the same client token, but different bounds.
     */
    CLONE                        = 1 << 16,
}