1 /* dstep -I/path/to/ndk-r9d/platforms/android-9/arch-x86/usr/include -I/path/to/ndk-r9d/toolchains/llvm-3.4/prebuilt/linux-x86/lib/clang/3.4/include /path/to/ndk-r9d/platforms/android-9/arch-x86/usr/include/android/configuration.h -o configuration.d*/
2 
3 module android.configuration;
4 
5 import android.asset_manager;
6 
7 version (Android):
8 extern (C):
9 @system:
10 nothrow:
11 @nogc:
12 
13 enum
14 {
15     ACONFIGURATION_ORIENTATION_ANY = 0,
16     ACONFIGURATION_ORIENTATION_PORT = 1,
17     ACONFIGURATION_ORIENTATION_LAND = 2,
18     ACONFIGURATION_ORIENTATION_SQUARE = 3,
19 
20     ACONFIGURATION_TOUCHSCREEN_ANY = 0,
21     ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 1,
22     ACONFIGURATION_TOUCHSCREEN_STYLUS = 2,
23     ACONFIGURATION_TOUCHSCREEN_FINGER = 3,
24 
25     ACONFIGURATION_DENSITY_DEFAULT = 0,
26     ACONFIGURATION_DENSITY_LOW = 120,
27     ACONFIGURATION_DENSITY_MEDIUM = 160,
28     ACONFIGURATION_DENSITY_HIGH = 240,
29     ACONFIGURATION_DENSITY_NONE = 65535,
30 
31     ACONFIGURATION_KEYBOARD_ANY = 0,
32     ACONFIGURATION_KEYBOARD_NOKEYS = 1,
33     ACONFIGURATION_KEYBOARD_QWERTY = 2,
34     ACONFIGURATION_KEYBOARD_12KEY = 3,
35 
36     ACONFIGURATION_NAVIGATION_ANY = 0,
37     ACONFIGURATION_NAVIGATION_NONAV = 1,
38     ACONFIGURATION_NAVIGATION_DPAD = 2,
39     ACONFIGURATION_NAVIGATION_TRACKBALL = 3,
40     ACONFIGURATION_NAVIGATION_WHEEL = 4,
41 
42     ACONFIGURATION_KEYSHIDDEN_ANY = 0,
43     ACONFIGURATION_KEYSHIDDEN_NO = 1,
44     ACONFIGURATION_KEYSHIDDEN_YES = 2,
45     ACONFIGURATION_KEYSHIDDEN_SOFT = 3,
46 
47     ACONFIGURATION_NAVHIDDEN_ANY = 0,
48     ACONFIGURATION_NAVHIDDEN_NO = 1,
49     ACONFIGURATION_NAVHIDDEN_YES = 2,
50 
51     ACONFIGURATION_SCREENSIZE_ANY = 0,
52     ACONFIGURATION_SCREENSIZE_SMALL = 1,
53     ACONFIGURATION_SCREENSIZE_NORMAL = 2,
54     ACONFIGURATION_SCREENSIZE_LARGE = 3,
55     ACONFIGURATION_SCREENSIZE_XLARGE = 4,
56 
57     ACONFIGURATION_SCREENLONG_ANY = 0,
58     ACONFIGURATION_SCREENLONG_NO = 1,
59     ACONFIGURATION_SCREENLONG_YES = 2,
60 
61     ACONFIGURATION_UI_MODE_TYPE_ANY = 0,
62     ACONFIGURATION_UI_MODE_TYPE_NORMAL = 1,
63     ACONFIGURATION_UI_MODE_TYPE_DESK = 2,
64     ACONFIGURATION_UI_MODE_TYPE_CAR = 3,
65 
66     ACONFIGURATION_UI_MODE_NIGHT_ANY = 0,
67     ACONFIGURATION_UI_MODE_NIGHT_NO = 1,
68     ACONFIGURATION_UI_MODE_NIGHT_YES = 2,
69 
70     ACONFIGURATION_MCC = 1,
71     ACONFIGURATION_MNC = 2,
72     ACONFIGURATION_LOCALE = 4,
73     ACONFIGURATION_TOUCHSCREEN = 8,
74     ACONFIGURATION_KEYBOARD = 16,
75     ACONFIGURATION_KEYBOARD_HIDDEN = 32,
76     ACONFIGURATION_NAVIGATION = 64,
77     ACONFIGURATION_ORIENTATION = 128,
78     ACONFIGURATION_DENSITY = 256,
79     ACONFIGURATION_SCREEN_SIZE = 512,
80     ACONFIGURATION_VERSION = 1024,
81     ACONFIGURATION_SCREEN_LAYOUT = 2048,
82     ACONFIGURATION_UI_MODE = 4096
83 }
84 
85 struct AConfiguration;
86 
87 AConfiguration* AConfiguration_new();
88 void AConfiguration_delete(AConfiguration* config);
89 void AConfiguration_fromAssetManager(AConfiguration* out_, AAssetManager* am);
90 void AConfiguration_copy(AConfiguration* dest, AConfiguration* src);
91 int AConfiguration_getMcc(AConfiguration* config);
92 void AConfiguration_setMcc(AConfiguration* config, int mcc);
93 int AConfiguration_getMnc(AConfiguration* config);
94 void AConfiguration_setMnc(AConfiguration* config, int mnc);
95 void AConfiguration_getLanguage(AConfiguration* config, char* outLanguage);
96 void AConfiguration_setLanguage(AConfiguration* config, const(char)* language);
97 void AConfiguration_getCountry(AConfiguration* config, char* outCountry);
98 void AConfiguration_setCountry(AConfiguration* config, const(char)* country);
99 int AConfiguration_getOrientation(AConfiguration* config);
100 void AConfiguration_setOrientation(AConfiguration* config, int orientation);
101 int AConfiguration_getTouchscreen(AConfiguration* config);
102 void AConfiguration_setTouchscreen(AConfiguration* config, int touchscreen);
103 int AConfiguration_getDensity(AConfiguration* config);
104 void AConfiguration_setDensity(AConfiguration* config, int density);
105 int AConfiguration_getKeyboard(AConfiguration* config);
106 void AConfiguration_setKeyboard(AConfiguration* config, int keyboard);
107 int AConfiguration_getNavigation(AConfiguration* config);
108 void AConfiguration_setNavigation(AConfiguration* config, int navigation);
109 int AConfiguration_getKeysHidden(AConfiguration* config);
110 void AConfiguration_setKeysHidden(AConfiguration* config, int keysHidden);
111 int AConfiguration_getNavHidden(AConfiguration* config);
112 void AConfiguration_setNavHidden(AConfiguration* config, int navHidden);
113 int AConfiguration_getSdkVersion(AConfiguration* config);
114 void AConfiguration_setSdkVersion(AConfiguration* config, int sdkVersion);
115 int AConfiguration_getScreenSize(AConfiguration* config);
116 void AConfiguration_setScreenSize(AConfiguration* config, int screenSize);
117 int AConfiguration_getScreenLong(AConfiguration* config);
118 void AConfiguration_setScreenLong(AConfiguration* config, int screenLong);
119 int AConfiguration_getUiModeType(AConfiguration* config);
120 void AConfiguration_setUiModeType(AConfiguration* config, int uiModeType);
121 int AConfiguration_getUiModeNight(AConfiguration* config);
122 void AConfiguration_setUiModeNight(AConfiguration* config, int uiModeNight);
123 int AConfiguration_diff(AConfiguration* config1, AConfiguration* config2);
124 int AConfiguration_match(AConfiguration* base, AConfiguration* requested);
125 int AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test, AConfiguration* requested);