From bf6d5e012cd9b15568c2351831f3349cf564bf18 Mon Sep 17 00:00:00 2001 From: Johan Euphrosine Date: Fri, 27 Mar 2015 17:15:43 -0700 Subject: frameworks/native: document native types and enums Change-Id: Id94b610f27b87426abb30e13484cbd16990aa995 --- include/android/configuration.h | 312 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 310 insertions(+), 2 deletions(-) (limited to 'include/android/configuration.h') diff --git a/include/android/configuration.h b/include/android/configuration.h index be00066418..287865eba1 100644 --- a/include/android/configuration.h +++ b/include/android/configuration.h @@ -14,6 +14,15 @@ * limitations under the License. */ +/** + * @addtogroup Configuration + * @{ + */ + +/** + * @file configuration.h + */ + #ifndef ANDROID_CONFIGURATION_H #define ANDROID_CONFIGURATION_H @@ -24,98 +33,395 @@ extern "C" { #endif struct AConfiguration; +/** + * {@link AConfiguration} is an opaque type used to get and set + * various subsystem configurations. + * + * A {@link AConfiguration} pointer can be obtained using: + * - AConfiguration_new() + * - AConfiguration_fromAssetManager() + */ typedef struct AConfiguration AConfiguration; + +/** + * Define flags and constants for various subsystem configurations. + */ enum { + /** Orientation: not specified. */ ACONFIGURATION_ORIENTATION_ANY = 0x0000, + /** + * Orientation: value corresponding to the + * port + * resource qualifier. + */ ACONFIGURATION_ORIENTATION_PORT = 0x0001, + /** + * Orientation: value corresponding to the + * land + * resource qualifier. + */ ACONFIGURATION_ORIENTATION_LAND = 0x0002, + /** @deprecated Not currently supported or used. */ ACONFIGURATION_ORIENTATION_SQUARE = 0x0003, + /** Touchscreen: not specified. */ ACONFIGURATION_TOUCHSCREEN_ANY = 0x0000, + /** + * Touchscreen: value corresponding to the + * notouch + * resource qualifier. + */ ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 0x0001, + /** @deprecated Not currently supported or used. */ ACONFIGURATION_TOUCHSCREEN_STYLUS = 0x0002, + /** + * Touchscreen: value corresponding to the + * finger + * resource qualifier. + */ ACONFIGURATION_TOUCHSCREEN_FINGER = 0x0003, + /** Density: default density. */ ACONFIGURATION_DENSITY_DEFAULT = 0, + /** + * Density: value corresponding to the + * ldpi + * resource qualifier. + */ ACONFIGURATION_DENSITY_LOW = 120, + /** + * Density: value corresponding to the + * mdpi + * resource qualifier. + */ ACONFIGURATION_DENSITY_MEDIUM = 160, + /** + * Density: value corresponding to the + * tvdpi + * resource qualifier. + */ ACONFIGURATION_DENSITY_TV = 213, + /** + * Density: value corresponding to the + * hdpi + * resource qualifier. + */ ACONFIGURATION_DENSITY_HIGH = 240, + /** + * Density: value corresponding to the + * xhdpi + * resource qualifier. + */ ACONFIGURATION_DENSITY_XHIGH = 320, + /** + * Density: value corresponding to the + * xxhdpi + * resource qualifier. + */ ACONFIGURATION_DENSITY_XXHIGH = 480, + /** + * Density: value corresponding to the + * xxxhdpi + * resource qualifier. + */ ACONFIGURATION_DENSITY_XXXHIGH = 640, + /** Density: any density. */ ACONFIGURATION_DENSITY_ANY = 0xfffe, + /** Density: no density specified. */ ACONFIGURATION_DENSITY_NONE = 0xffff, + /** Keyboard: not specified. */ ACONFIGURATION_KEYBOARD_ANY = 0x0000, + /** + * Keyboard: value corresponding to the + * nokeys + * resource qualifier. + */ ACONFIGURATION_KEYBOARD_NOKEYS = 0x0001, + /** + * Keyboard: value corresponding to the + * qwerty + * resource qualifier. + */ ACONFIGURATION_KEYBOARD_QWERTY = 0x0002, + /** + * Keyboard: value corresponding to the + * 12key + * resource qualifier. + */ ACONFIGURATION_KEYBOARD_12KEY = 0x0003, + /** Navigation: not specified. */ ACONFIGURATION_NAVIGATION_ANY = 0x0000, + /** + * Navigation: value corresponding to the + * nonav + * resource qualifier. + */ ACONFIGURATION_NAVIGATION_NONAV = 0x0001, + /** + * Navigation: value corresponding to the + * dpad + * resource qualifier. + */ ACONFIGURATION_NAVIGATION_DPAD = 0x0002, + /** + * Navigation: value corresponding to the + * trackball + * resource qualifier. + */ ACONFIGURATION_NAVIGATION_TRACKBALL = 0x0003, + /** + * Navigation: value corresponding to the + * wheel + * resource qualifier. + */ ACONFIGURATION_NAVIGATION_WHEEL = 0x0004, + /** Keyboard availability: not specified. */ ACONFIGURATION_KEYSHIDDEN_ANY = 0x0000, + /** + * Keyboard availability: value corresponding to the + * keysexposed + * resource qualifier. + */ ACONFIGURATION_KEYSHIDDEN_NO = 0x0001, + /** + * Keyboard availability: value corresponding to the + * keyshidden + * resource qualifier. + */ ACONFIGURATION_KEYSHIDDEN_YES = 0x0002, + /** + * Keyboard availability: value corresponding to the + * keyssoft + * resource qualifier. + */ ACONFIGURATION_KEYSHIDDEN_SOFT = 0x0003, + /** Navigation availability: not specified. */ ACONFIGURATION_NAVHIDDEN_ANY = 0x0000, + /** + * Navigation availability: value corresponding to the + * navexposed + * resource qualifier. + */ ACONFIGURATION_NAVHIDDEN_NO = 0x0001, + /** + * Navigation availability: value corresponding to the + * navhidden + * resource qualifier. + */ ACONFIGURATION_NAVHIDDEN_YES = 0x0002, + /** Screen size: not specified. */ ACONFIGURATION_SCREENSIZE_ANY = 0x00, + /** + * Screen size: value indicating the screen is at least + * approximately 320x426 dp units, corresponding to the + * small + * resource qualifier. + */ ACONFIGURATION_SCREENSIZE_SMALL = 0x01, + /** + * Screen size: value indicating the screen is at least + * approximately 320x470 dp units, corresponding to the + * normal + * resource qualifier. + */ ACONFIGURATION_SCREENSIZE_NORMAL = 0x02, + /** + * Screen size: value indicating the screen is at least + * approximately 480x640 dp units, corresponding to the + * large + * resource qualifier. + */ ACONFIGURATION_SCREENSIZE_LARGE = 0x03, + /** + * Screen size: value indicating the screen is at least + * approximately 720x960 dp units, corresponding to the + * xlarge + * resource qualifier. + */ ACONFIGURATION_SCREENSIZE_XLARGE = 0x04, + /** Screen layout: not specified. */ ACONFIGURATION_SCREENLONG_ANY = 0x00, + /** + * Screen layout: value that corresponds to the + * notlong + * resource qualifier. + */ ACONFIGURATION_SCREENLONG_NO = 0x1, + /** + * Screen layout: value that corresponds to the + * long + * resource qualifier. + */ ACONFIGURATION_SCREENLONG_YES = 0x2, + /** UI mode: not specified. */ ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00, + /** + * UI mode: value that corresponds to + * no + * UI mode type resource qualifier specified. + */ ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01, + /** + * UI mode: value that corresponds to + * desk resource qualifier specified. + */ ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02, + /** + * UI mode: value that corresponds to + * car resource qualifier specified. + */ ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03, + /** + * UI mode: value that corresponds to + * television resource qualifier specified. + */ ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04, + /** + * UI mode: value that corresponds to + * appliance resource qualifier specified. + */ ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05, + /** + * UI mode: value that corresponds to + * watch resource qualifier specified. + */ ACONFIGURATION_UI_MODE_TYPE_WATCH = 0x06, + /** UI night mode: not specified.*/ ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00, + /** + * UI night mode: value that corresponds to + * notnight resource qualifier specified. + */ ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1, + /** + * UI night mode: value that corresponds to + * night resource qualifier specified. + */ ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2, + /** Screen width DPI: not specified. */ ACONFIGURATION_SCREEN_WIDTH_DP_ANY = 0x0000, + /** Screen height DPI: not specified. */ ACONFIGURATION_SCREEN_HEIGHT_DP_ANY = 0x0000, + /** Smallest screen width DPI: not specified.*/ ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY = 0x0000, + /** Layout direction: not specified. */ ACONFIGURATION_LAYOUTDIR_ANY = 0x00, + /** + * Layout direction: value that corresponds to + * ldltr resource qualifier specified. + */ ACONFIGURATION_LAYOUTDIR_LTR = 0x01, + /** + * Layout direction: value that corresponds to + * ldrtl resource qualifier specified. + */ ACONFIGURATION_LAYOUTDIR_RTL = 0x02, + /** + * Bit mask for + * mcc + * configuration. + */ ACONFIGURATION_MCC = 0x0001, + /** + * Bit mask for + * mnc + * configuration. + */ ACONFIGURATION_MNC = 0x0002, + /** + * Bit mask for + * locale + * configuration. + */ ACONFIGURATION_LOCALE = 0x0004, + /** + * Bit mask for + * touchscreen + * configuration. + */ ACONFIGURATION_TOUCHSCREEN = 0x0008, + /** + * Bit mask for + * keyboard + * configuration. + */ ACONFIGURATION_KEYBOARD = 0x0010, + /** + * Bit mask for + * keyboardHidden + * configuration. + */ ACONFIGURATION_KEYBOARD_HIDDEN = 0x0020, + /** + * Bit mask for + * navigation + * configuration. + */ ACONFIGURATION_NAVIGATION = 0x0040, + /** + * Bit mask for + * orientation + * configuration. + */ ACONFIGURATION_ORIENTATION = 0x0080, + /** + * Bit mask for + * density + * configuration. + */ ACONFIGURATION_DENSITY = 0x0100, + /** + * Bit mask for + * screen size + * configuration. + */ ACONFIGURATION_SCREEN_SIZE = 0x0200, + /** + * Bit mask for + * platform version + * configuration. + */ ACONFIGURATION_VERSION = 0x0400, + /** + * Bit mask for screen layout configuration. + */ ACONFIGURATION_SCREEN_LAYOUT = 0x0800, + /** + * Bit mask for + * ui mode + * configuration. + */ ACONFIGURATION_UI_MODE = 0x1000, + /** + * Bit mask for + * smallest screen width + * configuration. + */ ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000, + /** + * Bit mask for + * layout direction + * configuration. + */ ACONFIGURATION_LAYOUTDIR = 0x4000, - + /** + * Constant used to to represent MNC (Mobile Network Code) zero. + * 0 cannot be used, since it is used to represent an undefined MNC. + */ ACONFIGURATION_MNC_ZERO = 0xffff, }; @@ -132,7 +438,7 @@ void AConfiguration_delete(AConfiguration* config); /** * Create and return a new AConfiguration based on the current configuration in - * use in the given AssetManager. + * use in the given {@link AAssetManager}. */ void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am); @@ -383,3 +689,5 @@ int32_t AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test, #endif #endif // ANDROID_CONFIGURATION_H + +/** @} */ -- cgit v1.2.3-59-g8ed1b