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