1 /* 2 __ 3 / _| 4 __ _ _ _ _ __ ___ _ __ __ _ | |_ ___ ___ ___ 5 / _` | | | | '__/ _ \| '__/ _` | | _/ _ \/ __/ __| 6 | (_| | |_| | | | (_) | | | (_| | | || (_) \__ \__ \ 7 \__,_|\__,_|_| \___/|_| \__,_| |_| \___/|___/___/ 8 9 Copyright (C) 2010 The Android Open Source Project. 10 Copyright (C) 2018-2019 Aurora Free Open Source Software. 11 12 This file is part of the Aurora Free Open Source Software. This 13 organization promote free and open source software that you can 14 redistribute and/or modify under the terms of the GNU Lesser General 15 Public License Version 3 as published by the Free Software Foundation or 16 (at your option) any later version approved by the Aurora Free Open Source 17 Software Organization. The license is available in the package root path 18 as 'LICENSE' file. Please review the following information to ensure the 19 GNU Lesser General Public License version 3 requirements will be met: 20 https://www.gnu.org/licenses/lgpl.html . 21 22 Alternatively, this file may be used under the terms of the GNU General 23 Public License version 3 or later as published by the Free Software 24 Foundation. Please review the following information to ensure the GNU 25 General Public License requirements will be met: 26 https://www.gnu.org/licenses/gpl-3.0.html. 27 28 NOTE: All products, services or anything associated to trademarks and 29 service marks used or referenced on this file are the property of their 30 respective companies/owners or its subsidiaries. Other names and brands 31 may be claimed as the property of others. 32 33 For more info about intellectual property visit: aurorafoss.org or 34 directly send an email to: contact (at) aurorafoss.org . 35 36 This file has bindings for an existing code, part of The Android Open Source 37 Project implementation. Check it out at android.googlesource.com . 38 */ 39 40 module aurorafw.android.platform.window; 41 42 /** 43 * @addtogroup NativeActivity Native Activity 44 * @{ 45 */ 46 47 /** 48 * @file aurorafw/android/platform/window.d 49 */ 50 51 version (Android): 52 extern (C): 53 @system: 54 nothrow: 55 @nogc: 56 57 /** 58 * Window flags, as per the Java API at android.view.WindowManager.LayoutParams. 59 */ 60 enum 61 { 62 /** 63 * As long as this window is visible to the user, allow the lock 64 * screen to activate while the screen is on. This can be used 65 * independently, or in combination with {@link 66 * AWINDOW_FLAG_KEEP_SCREEN_ON} and/or {@link 67 * AWINDOW_FLAG_SHOW_WHEN_LOCKED} 68 */ 69 AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 1, 70 /** Everything behind this window will be dimmed. */ 71 AWINDOW_FLAG_DIM_BEHIND = 2, 72 /** 73 * Blur everything behind this window. 74 * @deprecated Blurring is no longer supported. 75 */ 76 AWINDOW_FLAG_BLUR_BEHIND = 4, 77 /** 78 * This window won't ever get key input focus, so the 79 * user can not send key or other button events to it. Those will 80 * instead go to whatever focusable window is behind it. This flag 81 * will also enable {@link AWINDOW_FLAG_NOT_TOUCH_MODAL} whether or not that 82 * is explicitly set. 83 * 84 * Setting this flag also implies that the window will not need to 85 * interact with 86 * a soft input method, so it will be Z-ordered and positioned 87 * independently of any active input method (typically this means it 88 * gets Z-ordered on top of the input method, so it can use the full 89 * screen for its content and cover the input method if needed. You 90 * can use {@link AWINDOW_FLAG_ALT_FOCUSABLE_IM} to modify this behavior. 91 */ 92 AWINDOW_FLAG_NOT_FOCUSABLE = 8, 93 /** this window can never receive touch events. */ 94 AWINDOW_FLAG_NOT_TOUCHABLE = 16, 95 /** 96 * Even when this window is focusable (its 97 * {@link AWINDOW_FLAG_NOT_FOCUSABLE} is not set), allow any pointer events 98 * outside of the window to be sent to the windows behind it. Otherwise 99 * it will consume all pointer events itself, regardless of whether they 100 * are inside of the window. 101 */ 102 AWINDOW_FLAG_NOT_TOUCH_MODAL = 32, 103 /** 104 * When set, if the device is asleep when the touch 105 * screen is pressed, you will receive this first touch event. Usually 106 * the first touch event is consumed by the system since the user can 107 * not see what they are pressing on. 108 * 109 * @deprecated This flag has no effect. 110 */ 111 AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING = 64, 112 /** 113 * As long as this window is visible to the user, keep 114 * the device's screen turned on and bright. 115 */ 116 AWINDOW_FLAG_KEEP_SCREEN_ON = 128, 117 /** 118 * Place the window within the entire screen, ignoring 119 * decorations around the border (such as the status bar). The 120 * window must correctly position its contents to take the screen 121 * decoration into account. 122 */ 123 AWINDOW_FLAG_LAYOUT_IN_SCREEN = 256, 124 /** allow window to extend outside of the screen. */ 125 AWINDOW_FLAG_LAYOUT_NO_LIMITS = 512, 126 /** 127 * Hide all screen decorations (such as the status 128 * bar) while this window is displayed. This allows the window to 129 * use the entire display space for itself -- the status bar will 130 * be hidden when an app window with this flag set is on the top 131 * layer. A fullscreen window will ignore a value of {@link 132 * AWINDOW_SOFT_INPUT_ADJUST_RESIZE}; the window will stay 133 * fullscreen and will not resize. 134 */ 135 AWINDOW_FLAG_FULLSCREEN = 1024, 136 /** 137 * Override {@link AWINDOW_FLAG_FULLSCREEN} and force the 138 * screen decorations (such as the status bar) to be shown. 139 */ 140 AWINDOW_FLAG_FORCE_NOT_FULLSCREEN = 2048, 141 /** 142 * Turn on dithering when compositing this window to 143 * the screen. 144 * @deprecated This flag is no longer used. 145 */ 146 AWINDOW_FLAG_DITHER = 4096, 147 /** 148 * Treat the content of the window as secure, preventing 149 * it from appearing in screenshots or from being viewed on non-secure 150 * displays. 151 */ 152 AWINDOW_FLAG_SECURE = 8192, 153 /** 154 * A special mode where the layout parameters are used 155 * to perform scaling of the surface when it is composited to the 156 * screen. 157 */ 158 AWINDOW_FLAG_SCALED = 16384, 159 /** 160 * Intended for windows that will often be used when the user is 161 * holding the screen against their face, it will aggressively 162 * filter the event stream to prevent unintended presses in this 163 * situation that may not be desired for a particular window, when 164 * such an event stream is detected, the application will receive 165 * a {@link AMOTION_EVENT_ACTION_CANCEL} to indicate this so 166 * applications can handle this accordingly by taking no action on 167 * the event until the finger is released. 168 */ 169 AWINDOW_FLAG_IGNORE_CHEEK_PRESSES = 32768, 170 /** 171 * A special option only for use in combination with 172 * {@link AWINDOW_FLAG_LAYOUT_IN_SCREEN}. When requesting layout in the 173 * screen your window may appear on top of or behind screen decorations 174 * such as the status bar. By also including this flag, the window 175 * manager will report the inset rectangle needed to ensure your 176 * content is not covered by screen decorations. 177 */ 178 AWINDOW_FLAG_LAYOUT_INSET_DECOR = 65536, 179 /** 180 * Invert the state of {@link AWINDOW_FLAG_NOT_FOCUSABLE} with 181 * respect to how this window interacts with the current method. 182 * That is, if FLAG_NOT_FOCUSABLE is set and this flag is set, 183 * then the window will behave as if it needs to interact with the 184 * input method and thus be placed behind/away from it; if {@link 185 * AWINDOW_FLAG_NOT_FOCUSABLE} is not set and this flag is set, 186 * then the window will behave as if it doesn't need to interact 187 * with the input method and can be placed to use more space and 188 * cover the input method. 189 */ 190 AWINDOW_FLAG_ALT_FOCUSABLE_IM = 131072, 191 /** 192 * If you have set {@link AWINDOW_FLAG_NOT_TOUCH_MODAL}, you 193 * can set this flag to receive a single special MotionEvent with 194 * the action 195 * {@link AMOTION_EVENT_ACTION_OUTSIDE} for 196 * touches that occur outside of your window. Note that you will not 197 * receive the full down/move/up gesture, only the location of the 198 * first down as an {@link AMOTION_EVENT_ACTION_OUTSIDE}. 199 */ 200 AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH = 262144, 201 /** 202 * Special flag to let windows be shown when the screen 203 * is locked. This will let application windows take precedence over 204 * key guard or any other lock screens. Can be used with 205 * {@link AWINDOW_FLAG_KEEP_SCREEN_ON} to turn screen on and display windows 206 * directly before showing the key guard window. Can be used with 207 * {@link AWINDOW_FLAG_DISMISS_KEYGUARD} to automatically fully dismisss 208 * non-secure keyguards. This flag only applies to the top-most 209 * full-screen window. 210 */ 211 AWINDOW_FLAG_SHOW_WHEN_LOCKED = 524288, 212 /** 213 * Ask that the system wallpaper be shown behind 214 * your window. The window surface must be translucent to be able 215 * to actually see the wallpaper behind it; this flag just ensures 216 * that the wallpaper surface will be there if this window actually 217 * has translucent regions. 218 */ 219 AWINDOW_FLAG_SHOW_WALLPAPER = 1048576, 220 /** 221 * When set as a window is being added or made 222 * visible, once the window has been shown then the system will 223 * poke the power manager's user activity (as if the user had woken 224 * up the device) to turn the screen on. 225 */ 226 AWINDOW_FLAG_TURN_SCREEN_ON = 2097152, 227 /** 228 * When set the window will cause the keyguard to 229 * be dismissed, only if it is not a secure lock keyguard. Because such 230 * a keyguard is not needed for security, it will never re-appear if 231 * the user navigates to another window (in contrast to 232 * {@link AWINDOW_FLAG_SHOW_WHEN_LOCKED}, which will only temporarily 233 * hide both secure and non-secure keyguards but ensure they reappear 234 * when the user moves to another UI that doesn't hide them). 235 * If the keyguard is currently active and is secure (requires an 236 * unlock pattern) than the user will still need to confirm it before 237 * seeing this window, unless {@link AWINDOW_FLAG_SHOW_WHEN_LOCKED} has 238 * also been set. 239 */ 240 AWINDOW_FLAG_DISMISS_KEYGUARD = 4194304 241 } 242 243 // ANDROID_WINDOW_H 244 245 /** @} */