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