Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 1 | /* |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 2 | * Copyright (C) 2010 The Android Open Source Project. |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 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 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 17 | /** |
| 18 | * @addtogroup Configuration |
| 19 | * @{ |
| 20 | */ |
| 21 | |
| 22 | /** |
| 23 | * @file configuration.h |
| 24 | */ |
| 25 | |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 26 | #ifndef ANDROID_CONFIGURATION_H |
| 27 | #define ANDROID_CONFIGURATION_H |
| 28 | |
Dan Albert | 494ed55 | 2016-09-23 15:57:45 -0700 | [diff] [blame] | 29 | #include <sys/cdefs.h> |
| 30 | |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 31 | #include <android/asset_manager.h> |
| 32 | |
Elliott Hughes | c2fcafc | 2018-06-18 12:28:46 -0700 | [diff] [blame] | 33 | #if !defined(__INTRODUCED_IN) |
| 34 | #define __INTRODUCED_IN(__api_level) /* nothing */ |
| 35 | #endif |
| 36 | |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 37 | #ifdef __cplusplus |
| 38 | extern "C" { |
| 39 | #endif |
| 40 | |
| 41 | struct AConfiguration; |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 42 | /** |
| 43 | * {@link AConfiguration} is an opaque type used to get and set |
| 44 | * various subsystem configurations. |
| 45 | * |
| 46 | * A {@link AConfiguration} pointer can be obtained using: |
| 47 | * - AConfiguration_new() |
| 48 | * - AConfiguration_fromAssetManager() |
| 49 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 50 | typedef struct AConfiguration AConfiguration; |
| 51 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * Define flags and constants for various subsystem configurations. |
| 55 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 56 | enum { |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 57 | /** Orientation: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 58 | ACONFIGURATION_ORIENTATION_ANY = 0x0000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 59 | /** |
| 60 | * Orientation: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 61 | * <a href="/guide/topics/resources/providing-resources.html#OrientationQualifier">port</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 62 | * resource qualifier. |
| 63 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 64 | ACONFIGURATION_ORIENTATION_PORT = 0x0001, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 65 | /** |
| 66 | * Orientation: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 67 | * <a href="/guide/topics/resources/providing-resources.html#OrientationQualifier">land</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 68 | * resource qualifier. |
| 69 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 70 | ACONFIGURATION_ORIENTATION_LAND = 0x0002, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 71 | /** @deprecated Not currently supported or used. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 72 | ACONFIGURATION_ORIENTATION_SQUARE = 0x0003, |
| 73 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 74 | /** Touchscreen: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 75 | ACONFIGURATION_TOUCHSCREEN_ANY = 0x0000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 76 | /** |
| 77 | * Touchscreen: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 78 | * <a href="/guide/topics/resources/providing-resources.html#TouchscreenQualifier">notouch</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 79 | * resource qualifier. |
| 80 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 81 | ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 0x0001, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 82 | /** @deprecated Not currently supported or used. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 83 | ACONFIGURATION_TOUCHSCREEN_STYLUS = 0x0002, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 84 | /** |
| 85 | * Touchscreen: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 86 | * <a href="/guide/topics/resources/providing-resources.html#TouchscreenQualifier">finger</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 87 | * resource qualifier. |
| 88 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 89 | ACONFIGURATION_TOUCHSCREEN_FINGER = 0x0003, |
| 90 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 91 | /** Density: default density. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 92 | ACONFIGURATION_DENSITY_DEFAULT = 0, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 93 | /** |
| 94 | * Density: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 95 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">ldpi</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 96 | * resource qualifier. |
| 97 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 98 | ACONFIGURATION_DENSITY_LOW = 120, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 99 | /** |
| 100 | * Density: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 101 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">mdpi</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 102 | * resource qualifier. |
| 103 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 104 | ACONFIGURATION_DENSITY_MEDIUM = 160, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 105 | /** |
| 106 | * Density: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 107 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">tvdpi</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 108 | * resource qualifier. |
| 109 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 110 | ACONFIGURATION_DENSITY_TV = 213, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 111 | /** |
| 112 | * Density: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 113 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">hdpi</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 114 | * resource qualifier. |
| 115 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 116 | ACONFIGURATION_DENSITY_HIGH = 240, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 117 | /** |
| 118 | * Density: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 119 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">xhdpi</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 120 | * resource qualifier. |
| 121 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 122 | ACONFIGURATION_DENSITY_XHIGH = 320, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 123 | /** |
| 124 | * Density: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 125 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">xxhdpi</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 126 | * resource qualifier. |
| 127 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 128 | ACONFIGURATION_DENSITY_XXHIGH = 480, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 129 | /** |
| 130 | * Density: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 131 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">xxxhdpi</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 132 | * resource qualifier. |
| 133 | */ |
Dianne Hackborn | 6303d06 | 2013-02-12 15:36:31 -0800 | [diff] [blame] | 134 | ACONFIGURATION_DENSITY_XXXHIGH = 640, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 135 | /** Density: any density. */ |
Adam Lesinski | 16d08a5 | 2014-08-22 22:23:08 -0700 | [diff] [blame] | 136 | ACONFIGURATION_DENSITY_ANY = 0xfffe, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 137 | /** Density: no density specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 138 | ACONFIGURATION_DENSITY_NONE = 0xffff, |
| 139 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 140 | /** Keyboard: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 141 | ACONFIGURATION_KEYBOARD_ANY = 0x0000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 142 | /** |
| 143 | * Keyboard: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 144 | * <a href="/guide/topics/resources/providing-resources.html#ImeQualifier">nokeys</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 145 | * resource qualifier. |
| 146 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 147 | ACONFIGURATION_KEYBOARD_NOKEYS = 0x0001, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 148 | /** |
| 149 | * Keyboard: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 150 | * <a href="/guide/topics/resources/providing-resources.html#ImeQualifier">qwerty</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 151 | * resource qualifier. |
| 152 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 153 | ACONFIGURATION_KEYBOARD_QWERTY = 0x0002, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 154 | /** |
| 155 | * Keyboard: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 156 | * <a href="/guide/topics/resources/providing-resources.html#ImeQualifier">12key</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 157 | * resource qualifier. |
| 158 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 159 | ACONFIGURATION_KEYBOARD_12KEY = 0x0003, |
| 160 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 161 | /** Navigation: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 162 | ACONFIGURATION_NAVIGATION_ANY = 0x0000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 163 | /** |
| 164 | * Navigation: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 165 | * <a href="@/guide/topics/resources/providing-resources.html#NavigationQualifier">nonav</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 166 | * resource qualifier. |
| 167 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 168 | ACONFIGURATION_NAVIGATION_NONAV = 0x0001, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 169 | /** |
| 170 | * Navigation: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 171 | * <a href="/guide/topics/resources/providing-resources.html#NavigationQualifier">dpad</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 172 | * resource qualifier. |
| 173 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 174 | ACONFIGURATION_NAVIGATION_DPAD = 0x0002, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 175 | /** |
| 176 | * Navigation: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 177 | * <a href="/guide/topics/resources/providing-resources.html#NavigationQualifier">trackball</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 178 | * resource qualifier. |
| 179 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 180 | ACONFIGURATION_NAVIGATION_TRACKBALL = 0x0003, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 181 | /** |
| 182 | * Navigation: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 183 | * <a href="/guide/topics/resources/providing-resources.html#NavigationQualifier">wheel</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 184 | * resource qualifier. |
| 185 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 186 | ACONFIGURATION_NAVIGATION_WHEEL = 0x0004, |
| 187 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 188 | /** Keyboard availability: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 189 | ACONFIGURATION_KEYSHIDDEN_ANY = 0x0000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 190 | /** |
| 191 | * Keyboard availability: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 192 | * <a href="/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keysexposed</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 193 | * resource qualifier. |
| 194 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 195 | ACONFIGURATION_KEYSHIDDEN_NO = 0x0001, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 196 | /** |
| 197 | * Keyboard availability: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 198 | * <a href="/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyshidden</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 199 | * resource qualifier. |
| 200 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 201 | ACONFIGURATION_KEYSHIDDEN_YES = 0x0002, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 202 | /** |
| 203 | * Keyboard availability: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 204 | * <a href="/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyssoft</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 205 | * resource qualifier. |
| 206 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 207 | ACONFIGURATION_KEYSHIDDEN_SOFT = 0x0003, |
| 208 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 209 | /** Navigation availability: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 210 | ACONFIGURATION_NAVHIDDEN_ANY = 0x0000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 211 | /** |
| 212 | * Navigation availability: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 213 | * <a href="/guide/topics/resources/providing-resources.html#NavAvailQualifier">navexposed</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 214 | * resource qualifier. |
| 215 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 216 | ACONFIGURATION_NAVHIDDEN_NO = 0x0001, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 217 | /** |
| 218 | * Navigation availability: value corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 219 | * <a href="/guide/topics/resources/providing-resources.html#NavAvailQualifier">navhidden</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 220 | * resource qualifier. |
| 221 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 222 | ACONFIGURATION_NAVHIDDEN_YES = 0x0002, |
| 223 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 224 | /** Screen size: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 225 | ACONFIGURATION_SCREENSIZE_ANY = 0x00, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 226 | /** |
| 227 | * Screen size: value indicating the screen is at least |
| 228 | * approximately 320x426 dp units, corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 229 | * <a href="/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">small</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 230 | * resource qualifier. |
| 231 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 232 | ACONFIGURATION_SCREENSIZE_SMALL = 0x01, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 233 | /** |
| 234 | * Screen size: value indicating the screen is at least |
| 235 | * approximately 320x470 dp units, corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 236 | * <a href="/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">normal</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 237 | * resource qualifier. |
| 238 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 239 | ACONFIGURATION_SCREENSIZE_NORMAL = 0x02, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 240 | /** |
| 241 | * Screen size: value indicating the screen is at least |
| 242 | * approximately 480x640 dp units, corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 243 | * <a href="/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">large</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 244 | * resource qualifier. |
| 245 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 246 | ACONFIGURATION_SCREENSIZE_LARGE = 0x03, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 247 | /** |
| 248 | * Screen size: value indicating the screen is at least |
| 249 | * approximately 720x960 dp units, corresponding to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 250 | * <a href="/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">xlarge</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 251 | * resource qualifier. |
| 252 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 253 | ACONFIGURATION_SCREENSIZE_XLARGE = 0x04, |
| 254 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 255 | /** Screen layout: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 256 | ACONFIGURATION_SCREENLONG_ANY = 0x00, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 257 | /** |
| 258 | * Screen layout: value that corresponds to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 259 | * <a href="/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">notlong</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 260 | * resource qualifier. |
| 261 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 262 | ACONFIGURATION_SCREENLONG_NO = 0x1, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 263 | /** |
| 264 | * Screen layout: value that corresponds to the |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 265 | * <a href="/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">long</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 266 | * resource qualifier. |
| 267 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 268 | ACONFIGURATION_SCREENLONG_YES = 0x2, |
| 269 | |
Adam Lesinski | 7eb1459 | 2015-05-14 14:28:32 -0700 | [diff] [blame] | 270 | ACONFIGURATION_SCREENROUND_ANY = 0x00, |
| 271 | ACONFIGURATION_SCREENROUND_NO = 0x1, |
| 272 | ACONFIGURATION_SCREENROUND_YES = 0x2, |
| 273 | |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 274 | /** Wide color gamut: not specified. */ |
| 275 | ACONFIGURATION_WIDE_COLOR_GAMUT_ANY = 0x00, |
| 276 | /** |
| 277 | * Wide color gamut: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 278 | * <a href="/guide/topics/resources/providing-resources.html#WideColorGamutQualifier">no |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 279 | * nowidecg</a> resource qualifier specified. |
| 280 | */ |
| 281 | ACONFIGURATION_WIDE_COLOR_GAMUT_NO = 0x1, |
| 282 | /** |
| 283 | * Wide color gamut: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 284 | * <a href="/guide/topics/resources/providing-resources.html#WideColorGamutQualifier"> |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 285 | * widecg</a> resource qualifier specified. |
| 286 | */ |
| 287 | ACONFIGURATION_WIDE_COLOR_GAMUT_YES = 0x2, |
| 288 | |
| 289 | /** HDR: not specified. */ |
| 290 | ACONFIGURATION_HDR_ANY = 0x00, |
| 291 | /** |
| 292 | * HDR: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 293 | * <a href="/guide/topics/resources/providing-resources.html#HDRQualifier"> |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 294 | * lowdr</a> resource qualifier specified. |
| 295 | */ |
| 296 | ACONFIGURATION_HDR_NO = 0x1, |
| 297 | /** |
| 298 | * HDR: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 299 | * <a href="/guide/topics/resources/providing-resources.html#HDRQualifier"> |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 300 | * highdr</a> resource qualifier specified. |
| 301 | */ |
| 302 | ACONFIGURATION_HDR_YES = 0x2, |
| 303 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 304 | /** UI mode: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 305 | ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 306 | /** |
| 307 | * UI mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 308 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">no |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 309 | * UI mode type</a> resource qualifier specified. |
| 310 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 311 | ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 312 | /** |
| 313 | * UI mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 314 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">desk</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 315 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 316 | ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 317 | /** |
| 318 | * UI mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 319 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">car</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 320 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 321 | ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 322 | /** |
| 323 | * UI mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 324 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">television</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 325 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 326 | ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 327 | /** |
| 328 | * UI mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 329 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">appliance</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 330 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 331 | ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 332 | /** |
| 333 | * UI mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 334 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">watch</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 335 | */ |
John Spurlock | ad98ad0 | 2014-04-03 16:39:17 -0400 | [diff] [blame] | 336 | ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06, |
Zak Cohen | a62fb16 | 2016-12-09 15:06:02 -0800 | [diff] [blame] | 337 | /** |
| 338 | * UI mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 339 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">vr</a> resource qualifier specified. |
Zak Cohen | a62fb16 | 2016-12-09 15:06:02 -0800 | [diff] [blame] | 340 | */ |
| 341 | ACONFIGURATION_UI_MODE_TYPE_VR_HEADSET = 0x07, |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 342 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 343 | /** UI night mode: not specified.*/ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 344 | ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 345 | /** |
| 346 | * UI night mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 347 | * <a href="/guide/topics/resources/providing-resources.html#NightQualifier">notnight</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 348 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 349 | ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 350 | /** |
| 351 | * UI night mode: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 352 | * <a href="/guide/topics/resources/providing-resources.html#NightQualifier">night</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 353 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 354 | ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2, |
| 355 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 356 | /** Screen width DPI: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 357 | ACONFIGURATION_SCREEN_WIDTH_DP_ANY = 0x0000, |
| 358 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 359 | /** Screen height DPI: not specified. */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 360 | ACONFIGURATION_SCREEN_HEIGHT_DP_ANY = 0x0000, |
| 361 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 362 | /** Smallest screen width DPI: not specified.*/ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 363 | ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY = 0x0000, |
| 364 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 365 | /** Layout direction: not specified. */ |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 366 | ACONFIGURATION_LAYOUTDIR_ANY = 0x00, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 367 | /** |
| 368 | * Layout direction: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 369 | * <a href="/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldltr</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 370 | */ |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 371 | ACONFIGURATION_LAYOUTDIR_LTR = 0x01, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 372 | /** |
| 373 | * Layout direction: value that corresponds to |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 374 | * <a href="/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldrtl</a> resource qualifier specified. |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 375 | */ |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 376 | ACONFIGURATION_LAYOUTDIR_RTL = 0x02, |
| 377 | |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 378 | /** |
| 379 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 380 | * <a href="/guide/topics/resources/providing-resources.html#MccQualifier">mcc</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 381 | * configuration. |
| 382 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 383 | ACONFIGURATION_MCC = 0x0001, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 384 | /** |
| 385 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 386 | * <a href="/guide/topics/resources/providing-resources.html#MccQualifier">mnc</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 387 | * configuration. |
| 388 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 389 | ACONFIGURATION_MNC = 0x0002, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 390 | /** |
| 391 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 392 | * <a href="/guide/topics/resources/providing-resources.html#LocaleQualifier">locale</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 393 | * configuration. |
| 394 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 395 | ACONFIGURATION_LOCALE = 0x0004, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 396 | /** |
| 397 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 398 | * <a href="/guide/topics/resources/providing-resources.html#TouchscreenQualifier">touchscreen</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 399 | * configuration. |
| 400 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 401 | ACONFIGURATION_TOUCHSCREEN = 0x0008, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 402 | /** |
| 403 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 404 | * <a href="/guide/topics/resources/providing-resources.html#ImeQualifier">keyboard</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 405 | * configuration. |
| 406 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 407 | ACONFIGURATION_KEYBOARD = 0x0010, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 408 | /** |
| 409 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 410 | * <a href="/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyboardHidden</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 411 | * configuration. |
| 412 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 413 | ACONFIGURATION_KEYBOARD_HIDDEN = 0x0020, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 414 | /** |
| 415 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 416 | * <a href="/guide/topics/resources/providing-resources.html#NavigationQualifier">navigation</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 417 | * configuration. |
| 418 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 419 | ACONFIGURATION_NAVIGATION = 0x0040, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 420 | /** |
| 421 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 422 | * <a href="/guide/topics/resources/providing-resources.html#OrientationQualifier">orientation</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 423 | * configuration. |
| 424 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 425 | ACONFIGURATION_ORIENTATION = 0x0080, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 426 | /** |
| 427 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 428 | * <a href="/guide/topics/resources/providing-resources.html#DensityQualifier">density</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 429 | * configuration. |
| 430 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 431 | ACONFIGURATION_DENSITY = 0x0100, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 432 | /** |
| 433 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 434 | * <a href="/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">screen size</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 435 | * configuration. |
| 436 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 437 | ACONFIGURATION_SCREEN_SIZE = 0x0200, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 438 | /** |
| 439 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 440 | * <a href="/guide/topics/resources/providing-resources.html#VersionQualifier">platform version</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 441 | * configuration. |
| 442 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 443 | ACONFIGURATION_VERSION = 0x0400, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 444 | /** |
| 445 | * Bit mask for screen layout configuration. |
| 446 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 447 | ACONFIGURATION_SCREEN_LAYOUT = 0x0800, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 448 | /** |
| 449 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 450 | * <a href="/guide/topics/resources/providing-resources.html#UiModeQualifier">ui mode</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 451 | * configuration. |
| 452 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 453 | ACONFIGURATION_UI_MODE = 0x1000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 454 | /** |
| 455 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 456 | * <a href="/guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">smallest screen width</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 457 | * configuration. |
| 458 | */ |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 459 | ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 460 | /** |
| 461 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 462 | * <a href="/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">layout direction</a> |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 463 | * configuration. |
| 464 | */ |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 465 | ACONFIGURATION_LAYOUTDIR = 0x4000, |
Adam Lesinski | 7eb1459 | 2015-05-14 14:28:32 -0700 | [diff] [blame] | 466 | ACONFIGURATION_SCREEN_ROUND = 0x8000, |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 467 | /** |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 468 | * Bit mask for |
Nick Cook | 7a73212 | 2020-06-03 22:55:05 +0000 | [diff] [blame] | 469 | * <a href="/guide/topics/resources/providing-resources.html#WideColorGamutQualifier">wide color gamut</a> |
| 470 | * and <a href="/guide/topics/resources/providing-resources.html#HDRQualifier">HDR</a> configurations. |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 471 | */ |
Romain Guy | 3119ff0 | 2017-01-23 16:58:08 -0800 | [diff] [blame] | 472 | ACONFIGURATION_COLOR_MODE = 0x10000, |
Romain Guy | a2310b9 | 2017-01-18 16:36:21 -0800 | [diff] [blame] | 473 | /** |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 474 | * Constant used to to represent MNC (Mobile Network Code) zero. |
| 475 | * 0 cannot be used, since it is used to represent an undefined MNC. |
| 476 | */ |
Johan Redestig | 8df483c | 2013-05-30 08:30:42 +0200 | [diff] [blame] | 477 | ACONFIGURATION_MNC_ZERO = 0xffff, |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 478 | }; |
| 479 | |
| 480 | /** |
| 481 | * Create a new AConfiguration, initialized with no values set. |
| 482 | */ |
| 483 | AConfiguration* AConfiguration_new(); |
| 484 | |
| 485 | /** |
| 486 | * Free an AConfiguration that was previously created with |
| 487 | * AConfiguration_new(). |
| 488 | */ |
| 489 | void AConfiguration_delete(AConfiguration* config); |
| 490 | |
| 491 | /** |
| 492 | * Create and return a new AConfiguration based on the current configuration in |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 493 | * use in the given {@link AAssetManager}. |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 494 | */ |
| 495 | void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am); |
| 496 | |
| 497 | /** |
| 498 | * Copy the contents of 'src' to 'dest'. |
| 499 | */ |
| 500 | void AConfiguration_copy(AConfiguration* dest, AConfiguration* src); |
| 501 | |
| 502 | /** |
| 503 | * Return the current MCC set in the configuration. 0 if not set. |
| 504 | */ |
| 505 | int32_t AConfiguration_getMcc(AConfiguration* config); |
| 506 | |
| 507 | /** |
| 508 | * Set the current MCC in the configuration. 0 to clear. |
| 509 | */ |
| 510 | void AConfiguration_setMcc(AConfiguration* config, int32_t mcc); |
| 511 | |
| 512 | /** |
| 513 | * Return the current MNC set in the configuration. 0 if not set. |
| 514 | */ |
| 515 | int32_t AConfiguration_getMnc(AConfiguration* config); |
| 516 | |
| 517 | /** |
| 518 | * Set the current MNC in the configuration. 0 to clear. |
| 519 | */ |
| 520 | void AConfiguration_setMnc(AConfiguration* config, int32_t mnc); |
| 521 | |
| 522 | /** |
| 523 | * Return the current language code set in the configuration. The output will |
| 524 | * be filled with an array of two characters. They are not 0-terminated. If |
| 525 | * a language is not set, they will be 0. |
| 526 | */ |
| 527 | void AConfiguration_getLanguage(AConfiguration* config, char* outLanguage); |
| 528 | |
| 529 | /** |
| 530 | * Set the current language code in the configuration, from the first two |
| 531 | * characters in the string. |
| 532 | */ |
| 533 | void AConfiguration_setLanguage(AConfiguration* config, const char* language); |
| 534 | |
| 535 | /** |
| 536 | * Return the current country code set in the configuration. The output will |
| 537 | * be filled with an array of two characters. They are not 0-terminated. If |
| 538 | * a country is not set, they will be 0. |
| 539 | */ |
| 540 | void AConfiguration_getCountry(AConfiguration* config, char* outCountry); |
| 541 | |
| 542 | /** |
| 543 | * Set the current country code in the configuration, from the first two |
| 544 | * characters in the string. |
| 545 | */ |
| 546 | void AConfiguration_setCountry(AConfiguration* config, const char* country); |
| 547 | |
| 548 | /** |
| 549 | * Return the current ACONFIGURATION_ORIENTATION_* set in the configuration. |
| 550 | */ |
| 551 | int32_t AConfiguration_getOrientation(AConfiguration* config); |
| 552 | |
| 553 | /** |
| 554 | * Set the current orientation in the configuration. |
| 555 | */ |
| 556 | void AConfiguration_setOrientation(AConfiguration* config, int32_t orientation); |
| 557 | |
| 558 | /** |
| 559 | * Return the current ACONFIGURATION_TOUCHSCREEN_* set in the configuration. |
| 560 | */ |
| 561 | int32_t AConfiguration_getTouchscreen(AConfiguration* config); |
| 562 | |
| 563 | /** |
| 564 | * Set the current touchscreen in the configuration. |
| 565 | */ |
| 566 | void AConfiguration_setTouchscreen(AConfiguration* config, int32_t touchscreen); |
| 567 | |
| 568 | /** |
| 569 | * Return the current ACONFIGURATION_DENSITY_* set in the configuration. |
| 570 | */ |
| 571 | int32_t AConfiguration_getDensity(AConfiguration* config); |
| 572 | |
| 573 | /** |
| 574 | * Set the current density in the configuration. |
| 575 | */ |
| 576 | void AConfiguration_setDensity(AConfiguration* config, int32_t density); |
| 577 | |
| 578 | /** |
| 579 | * Return the current ACONFIGURATION_KEYBOARD_* set in the configuration. |
| 580 | */ |
| 581 | int32_t AConfiguration_getKeyboard(AConfiguration* config); |
| 582 | |
| 583 | /** |
| 584 | * Set the current keyboard in the configuration. |
| 585 | */ |
| 586 | void AConfiguration_setKeyboard(AConfiguration* config, int32_t keyboard); |
| 587 | |
| 588 | /** |
| 589 | * Return the current ACONFIGURATION_NAVIGATION_* set in the configuration. |
| 590 | */ |
| 591 | int32_t AConfiguration_getNavigation(AConfiguration* config); |
| 592 | |
| 593 | /** |
| 594 | * Set the current navigation in the configuration. |
| 595 | */ |
| 596 | void AConfiguration_setNavigation(AConfiguration* config, int32_t navigation); |
| 597 | |
| 598 | /** |
| 599 | * Return the current ACONFIGURATION_KEYSHIDDEN_* set in the configuration. |
| 600 | */ |
| 601 | int32_t AConfiguration_getKeysHidden(AConfiguration* config); |
| 602 | |
| 603 | /** |
| 604 | * Set the current keys hidden in the configuration. |
| 605 | */ |
| 606 | void AConfiguration_setKeysHidden(AConfiguration* config, int32_t keysHidden); |
| 607 | |
| 608 | /** |
| 609 | * Return the current ACONFIGURATION_NAVHIDDEN_* set in the configuration. |
| 610 | */ |
| 611 | int32_t AConfiguration_getNavHidden(AConfiguration* config); |
| 612 | |
| 613 | /** |
| 614 | * Set the current nav hidden in the configuration. |
| 615 | */ |
| 616 | void AConfiguration_setNavHidden(AConfiguration* config, int32_t navHidden); |
| 617 | |
| 618 | /** |
| 619 | * Return the current SDK (API) version set in the configuration. |
| 620 | */ |
| 621 | int32_t AConfiguration_getSdkVersion(AConfiguration* config); |
| 622 | |
| 623 | /** |
| 624 | * Set the current SDK version in the configuration. |
| 625 | */ |
| 626 | void AConfiguration_setSdkVersion(AConfiguration* config, int32_t sdkVersion); |
| 627 | |
| 628 | /** |
| 629 | * Return the current ACONFIGURATION_SCREENSIZE_* set in the configuration. |
| 630 | */ |
| 631 | int32_t AConfiguration_getScreenSize(AConfiguration* config); |
| 632 | |
| 633 | /** |
| 634 | * Set the current screen size in the configuration. |
| 635 | */ |
| 636 | void AConfiguration_setScreenSize(AConfiguration* config, int32_t screenSize); |
| 637 | |
| 638 | /** |
| 639 | * Return the current ACONFIGURATION_SCREENLONG_* set in the configuration. |
| 640 | */ |
| 641 | int32_t AConfiguration_getScreenLong(AConfiguration* config); |
| 642 | |
| 643 | /** |
| 644 | * Set the current screen long in the configuration. |
| 645 | */ |
| 646 | void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong); |
| 647 | |
| 648 | /** |
Adam Lesinski | 7eb1459 | 2015-05-14 14:28:32 -0700 | [diff] [blame] | 649 | * Return the current ACONFIGURATION_SCREENROUND_* set in the configuration. |
Elliott Hughes | ba80a0f | 2019-12-18 15:13:40 -0800 | [diff] [blame] | 650 | * |
| 651 | * Available since API level 30. |
Adam Lesinski | 7eb1459 | 2015-05-14 14:28:32 -0700 | [diff] [blame] | 652 | */ |
Elliott Hughes | ba80a0f | 2019-12-18 15:13:40 -0800 | [diff] [blame] | 653 | int32_t AConfiguration_getScreenRound(AConfiguration* config) __INTRODUCED_IN(30); |
Adam Lesinski | 7eb1459 | 2015-05-14 14:28:32 -0700 | [diff] [blame] | 654 | |
| 655 | /** |
| 656 | * Set the current screen round in the configuration. |
| 657 | */ |
| 658 | void AConfiguration_setScreenRound(AConfiguration* config, int32_t screenRound); |
| 659 | |
| 660 | /** |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 661 | * Return the current ACONFIGURATION_UI_MODE_TYPE_* set in the configuration. |
| 662 | */ |
| 663 | int32_t AConfiguration_getUiModeType(AConfiguration* config); |
| 664 | |
| 665 | /** |
| 666 | * Set the current UI mode type in the configuration. |
| 667 | */ |
| 668 | void AConfiguration_setUiModeType(AConfiguration* config, int32_t uiModeType); |
| 669 | |
| 670 | /** |
| 671 | * Return the current ACONFIGURATION_UI_MODE_NIGHT_* set in the configuration. |
| 672 | */ |
| 673 | int32_t AConfiguration_getUiModeNight(AConfiguration* config); |
| 674 | |
| 675 | /** |
| 676 | * Set the current UI mode night in the configuration. |
| 677 | */ |
| 678 | void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight); |
| 679 | |
| 680 | /** |
| 681 | * Return the current configuration screen width in dp units, or |
| 682 | * ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set. |
| 683 | */ |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 684 | int32_t AConfiguration_getScreenWidthDp(AConfiguration* config); |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 685 | |
| 686 | /** |
| 687 | * Set the configuration's current screen width in dp units. |
| 688 | */ |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 689 | void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value); |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 690 | |
| 691 | /** |
| 692 | * Return the current configuration screen height in dp units, or |
| 693 | * ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set. |
| 694 | */ |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 695 | int32_t AConfiguration_getScreenHeightDp(AConfiguration* config); |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 696 | |
| 697 | /** |
| 698 | * Set the configuration's current screen width in dp units. |
| 699 | */ |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 700 | void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value); |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 701 | |
| 702 | /** |
| 703 | * Return the configuration's smallest screen width in dp units, or |
| 704 | * ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set. |
| 705 | */ |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 706 | int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config); |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 707 | |
| 708 | /** |
| 709 | * Set the configuration's smallest screen width in dp units. |
| 710 | */ |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 711 | void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value); |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 712 | |
| 713 | /** |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 714 | * Return the configuration's layout direction, or |
| 715 | * ACONFIGURATION_LAYOUTDIR_ANY if not set. |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 716 | * |
| 717 | * Available since API level 17. |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 718 | */ |
Elliott Hughes | c2fcafc | 2018-06-18 12:28:46 -0700 | [diff] [blame] | 719 | int32_t AConfiguration_getLayoutDirection(AConfiguration* config) __INTRODUCED_IN(17); |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 720 | |
| 721 | /** |
| 722 | * Set the configuration's layout direction. |
Elliott Hughes | 0556547 | 2019-10-29 08:59:39 -0700 | [diff] [blame] | 723 | * |
| 724 | * Available since API level 17. |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 725 | */ |
Elliott Hughes | c2fcafc | 2018-06-18 12:28:46 -0700 | [diff] [blame] | 726 | void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value) __INTRODUCED_IN(17); |
Fabrice Di Meglio | 8855e6f | 2012-06-20 15:47:21 -0700 | [diff] [blame] | 727 | |
| 728 | /** |
Mathias Agopian | e1c61d3 | 2012-03-23 14:19:36 -0700 | [diff] [blame] | 729 | * Perform a diff between two configurations. Returns a bit mask of |
| 730 | * ACONFIGURATION_* constants, each bit set meaning that configuration element |
| 731 | * is different between them. |
| 732 | */ |
| 733 | int32_t AConfiguration_diff(AConfiguration* config1, AConfiguration* config2); |
| 734 | |
| 735 | /** |
| 736 | * Determine whether 'base' is a valid configuration for use within the |
| 737 | * environment 'requested'. Returns 0 if there are any values in 'base' |
| 738 | * that conflict with 'requested'. Returns 1 if it does not conflict. |
| 739 | */ |
| 740 | int32_t AConfiguration_match(AConfiguration* base, AConfiguration* requested); |
| 741 | |
| 742 | /** |
| 743 | * Determine whether the configuration in 'test' is better than the existing |
| 744 | * configuration in 'base'. If 'requested' is non-NULL, this decision is based |
| 745 | * on the overall configuration given there. If it is NULL, this decision is |
| 746 | * simply based on which configuration is more specific. Returns non-0 if |
| 747 | * 'test' is better than 'base'. |
| 748 | * |
| 749 | * This assumes you have already filtered the configurations with |
| 750 | * AConfiguration_match(). |
| 751 | */ |
| 752 | int32_t AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test, |
| 753 | AConfiguration* requested); |
| 754 | |
| 755 | #ifdef __cplusplus |
| 756 | }; |
| 757 | #endif |
| 758 | |
| 759 | #endif // ANDROID_CONFIGURATION_H |
Johan Euphrosine | bf6d5e0 | 2015-03-27 17:15:43 -0700 | [diff] [blame] | 760 | |
| 761 | /** @} */ |