mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-02-19 13:33:59 +08:00
phonelibs -> third_party (#22477)
* git mv to third_party
* find and replace
* fix release tests
* update pre-commit
* update tici bins
* update eon bins
Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 5b641379ae
This commit is contained in:
215
third_party/android_frameworks_native/include/android/asset_manager.h
vendored
Normal file
215
third_party/android_frameworks_native/include/android/asset_manager.h
vendored
Normal file
@@ -0,0 +1,215 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Asset
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file asset_manager.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_ASSET_MANAGER_H
|
||||
#define ANDROID_ASSET_MANAGER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct AAssetManager;
|
||||
/**
|
||||
* {@link AAssetManager} provides access to an application's raw assets by
|
||||
* creating {@link AAsset} objects.
|
||||
*
|
||||
* AAssetManager is a wrapper to the low-level native implementation
|
||||
* of the java {@link AAssetManager}, a pointer can be obtained using
|
||||
* AAssetManager_fromJava().
|
||||
*
|
||||
* The asset hierarchy may be examined like a filesystem, using
|
||||
* {@link AAssetDir} objects to peruse a single directory.
|
||||
*
|
||||
* A native {@link AAssetManager} pointer may be shared across multiple threads.
|
||||
*/
|
||||
typedef struct AAssetManager AAssetManager;
|
||||
|
||||
struct AAssetDir;
|
||||
/**
|
||||
* {@link AAssetDir} provides access to a chunk of the asset hierarchy as if
|
||||
* it were a single directory. The contents are populated by the
|
||||
* {@link AAssetManager}.
|
||||
*
|
||||
* The list of files will be sorted in ascending order by ASCII value.
|
||||
*/
|
||||
typedef struct AAssetDir AAssetDir;
|
||||
|
||||
struct AAsset;
|
||||
/**
|
||||
* {@link AAsset} provides access to a read-only asset.
|
||||
*
|
||||
* {@link AAsset} objects are NOT thread-safe, and should not be shared across
|
||||
* threads.
|
||||
*/
|
||||
typedef struct AAsset AAsset;
|
||||
|
||||
/** Available access modes for opening assets with {@link AAssetManager_open} */
|
||||
enum {
|
||||
/** No specific information about how data will be accessed. **/
|
||||
AASSET_MODE_UNKNOWN = 0,
|
||||
/** Read chunks, and seek forward and backward. */
|
||||
AASSET_MODE_RANDOM = 1,
|
||||
/** Read sequentially, with an occasional forward seek. */
|
||||
AASSET_MODE_STREAMING = 2,
|
||||
/** Caller plans to ask for a read-only buffer with all data. */
|
||||
AASSET_MODE_BUFFER = 3
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Open the named directory within the asset hierarchy. The directory can then
|
||||
* be inspected with the AAssetDir functions. To open the top-level directory,
|
||||
* pass in "" as the dirName.
|
||||
*
|
||||
* The object returned here should be freed by calling AAssetDir_close().
|
||||
*/
|
||||
AAssetDir* AAssetManager_openDir(AAssetManager* mgr, const char* dirName);
|
||||
|
||||
/**
|
||||
* Open an asset.
|
||||
*
|
||||
* The object returned here should be freed by calling AAsset_close().
|
||||
*/
|
||||
AAsset* AAssetManager_open(AAssetManager* mgr, const char* filename, int mode);
|
||||
|
||||
/**
|
||||
* Iterate over the files in an asset directory. A NULL string is returned
|
||||
* when all the file names have been returned.
|
||||
*
|
||||
* The returned file name is suitable for passing to AAssetManager_open().
|
||||
*
|
||||
* The string returned here is owned by the AssetDir implementation and is not
|
||||
* guaranteed to remain valid if any other calls are made on this AAssetDir
|
||||
* instance.
|
||||
*/
|
||||
const char* AAssetDir_getNextFileName(AAssetDir* assetDir);
|
||||
|
||||
/**
|
||||
* Reset the iteration state of AAssetDir_getNextFileName() to the beginning.
|
||||
*/
|
||||
void AAssetDir_rewind(AAssetDir* assetDir);
|
||||
|
||||
/**
|
||||
* Close an opened AAssetDir, freeing any related resources.
|
||||
*/
|
||||
void AAssetDir_close(AAssetDir* assetDir);
|
||||
|
||||
/**
|
||||
* Attempt to read 'count' bytes of data from the current offset.
|
||||
*
|
||||
* Returns the number of bytes read, zero on EOF, or < 0 on error.
|
||||
*/
|
||||
int AAsset_read(AAsset* asset, void* buf, size_t count);
|
||||
|
||||
/**
|
||||
* Seek to the specified offset within the asset data. 'whence' uses the
|
||||
* same constants as lseek()/fseek().
|
||||
*
|
||||
* Returns the new position on success, or (off_t) -1 on error.
|
||||
*/
|
||||
off_t AAsset_seek(AAsset* asset, off_t offset, int whence);
|
||||
|
||||
/**
|
||||
* Seek to the specified offset within the asset data. 'whence' uses the
|
||||
* same constants as lseek()/fseek().
|
||||
*
|
||||
* Uses 64-bit data type for large files as opposed to the 32-bit type used
|
||||
* by AAsset_seek.
|
||||
*
|
||||
* Returns the new position on success, or (off64_t) -1 on error.
|
||||
*/
|
||||
off64_t AAsset_seek64(AAsset* asset, off64_t offset, int whence);
|
||||
|
||||
/**
|
||||
* Close the asset, freeing all associated resources.
|
||||
*/
|
||||
void AAsset_close(AAsset* asset);
|
||||
|
||||
/**
|
||||
* Get a pointer to a buffer holding the entire contents of the assset.
|
||||
*
|
||||
* Returns NULL on failure.
|
||||
*/
|
||||
const void* AAsset_getBuffer(AAsset* asset);
|
||||
|
||||
/**
|
||||
* Report the total size of the asset data.
|
||||
*/
|
||||
off_t AAsset_getLength(AAsset* asset);
|
||||
|
||||
/**
|
||||
* Report the total size of the asset data. Reports the size using a 64-bit
|
||||
* number insted of 32-bit as AAsset_getLength.
|
||||
*/
|
||||
off64_t AAsset_getLength64(AAsset* asset);
|
||||
|
||||
/**
|
||||
* Report the total amount of asset data that can be read from the current position.
|
||||
*/
|
||||
off_t AAsset_getRemainingLength(AAsset* asset);
|
||||
|
||||
/**
|
||||
* Report the total amount of asset data that can be read from the current position.
|
||||
*
|
||||
* Uses a 64-bit number instead of a 32-bit number as AAsset_getRemainingLength does.
|
||||
*/
|
||||
off64_t AAsset_getRemainingLength64(AAsset* asset);
|
||||
|
||||
/**
|
||||
* Open a new file descriptor that can be used to read the asset data. If the
|
||||
* start or length cannot be represented by a 32-bit number, it will be
|
||||
* truncated. If the file is large, use AAsset_openFileDescriptor64 instead.
|
||||
*
|
||||
* Returns < 0 if direct fd access is not possible (for example, if the asset is
|
||||
* compressed).
|
||||
*/
|
||||
int AAsset_openFileDescriptor(AAsset* asset, off_t* outStart, off_t* outLength);
|
||||
|
||||
/**
|
||||
* Open a new file descriptor that can be used to read the asset data.
|
||||
*
|
||||
* Uses a 64-bit number for the offset and length instead of 32-bit instead of
|
||||
* as AAsset_openFileDescriptor does.
|
||||
*
|
||||
* Returns < 0 if direct fd access is not possible (for example, if the asset is
|
||||
* compressed).
|
||||
*/
|
||||
int AAsset_openFileDescriptor64(AAsset* asset, off64_t* outStart, off64_t* outLength);
|
||||
|
||||
/**
|
||||
* Returns whether this asset's internal buffer is allocated in ordinary RAM (i.e. not
|
||||
* mmapped).
|
||||
*/
|
||||
int AAsset_isAllocated(AAsset* asset);
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_ASSET_MANAGER_H
|
||||
|
||||
/** @} */
|
||||
50
third_party/android_frameworks_native/include/android/asset_manager_jni.h
vendored
Normal file
50
third_party/android_frameworks_native/include/android/asset_manager_jni.h
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Asset
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file asset_manager_jni.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_ASSET_MANAGER_JNI_H
|
||||
#define ANDROID_ASSET_MANAGER_JNI_H
|
||||
|
||||
#include <android/asset_manager.h>
|
||||
#include <jni.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Given a Dalvik AssetManager object, obtain the corresponding native AAssetManager
|
||||
* object. Note that the caller is responsible for obtaining and holding a VM reference
|
||||
* to the jobject to prevent its being garbage collected while the native object is
|
||||
* in use.
|
||||
*/
|
||||
AAssetManager* AAssetManager_fromJava(JNIEnv* env, jobject assetManager);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_ASSET_MANAGER_JNI_H
|
||||
|
||||
/** @} */
|
||||
112
third_party/android_frameworks_native/include/android/bitmap.h
vendored
Normal file
112
third_party/android_frameworks_native/include/android/bitmap.h
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
/*
|
||||
* Copyright (C) 2009 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Bitmap
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file bitmap.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_BITMAP_H
|
||||
#define ANDROID_BITMAP_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <jni.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** AndroidBitmap functions result code. */
|
||||
enum {
|
||||
/** Operation was successful. */
|
||||
ANDROID_BITMAP_RESULT_SUCCESS = 0,
|
||||
/** Bad parameter. */
|
||||
ANDROID_BITMAP_RESULT_BAD_PARAMETER = -1,
|
||||
/** JNI exception occured. */
|
||||
ANDROID_BITMAP_RESULT_JNI_EXCEPTION = -2,
|
||||
/** Allocation failed. */
|
||||
ANDROID_BITMAP_RESULT_ALLOCATION_FAILED = -3,
|
||||
};
|
||||
|
||||
/** Backward compatibility: this macro used to be misspelled. */
|
||||
#define ANDROID_BITMAP_RESUT_SUCCESS ANDROID_BITMAP_RESULT_SUCCESS
|
||||
|
||||
/** Bitmap pixel format. */
|
||||
enum AndroidBitmapFormat {
|
||||
/** No format. */
|
||||
ANDROID_BITMAP_FORMAT_NONE = 0,
|
||||
/** Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. **/
|
||||
ANDROID_BITMAP_FORMAT_RGBA_8888 = 1,
|
||||
/** Red: 5 bits, Green: 6 bits, Blue: 5 bits. **/
|
||||
ANDROID_BITMAP_FORMAT_RGB_565 = 4,
|
||||
/** Red: 4 bits, Green: 4 bits, Blue: 4 bits, Alpha: 4 bits. **/
|
||||
ANDROID_BITMAP_FORMAT_RGBA_4444 = 7,
|
||||
/** Deprecated. */
|
||||
ANDROID_BITMAP_FORMAT_A_8 = 8,
|
||||
};
|
||||
|
||||
/** Bitmap info, see AndroidBitmap_getInfo(). */
|
||||
typedef struct {
|
||||
/** The bitmap width in pixels. */
|
||||
uint32_t width;
|
||||
/** The bitmap height in pixels. */
|
||||
uint32_t height;
|
||||
/** The number of byte per row. */
|
||||
uint32_t stride;
|
||||
/** The bitmap pixel format. See {@link AndroidBitmapFormat} */
|
||||
int32_t format;
|
||||
/** Unused. */
|
||||
uint32_t flags; // 0 for now
|
||||
} AndroidBitmapInfo;
|
||||
|
||||
/**
|
||||
* Given a java bitmap object, fill out the AndroidBitmapInfo struct for it.
|
||||
* If the call fails, the info parameter will be ignored.
|
||||
*/
|
||||
int AndroidBitmap_getInfo(JNIEnv* env, jobject jbitmap,
|
||||
AndroidBitmapInfo* info);
|
||||
|
||||
/**
|
||||
* Given a java bitmap object, attempt to lock the pixel address.
|
||||
* Locking will ensure that the memory for the pixels will not move
|
||||
* until the unlockPixels call, and ensure that, if the pixels had been
|
||||
* previously purged, they will have been restored.
|
||||
*
|
||||
* If this call succeeds, it must be balanced by a call to
|
||||
* AndroidBitmap_unlockPixels, after which time the address of the pixels should
|
||||
* no longer be used.
|
||||
*
|
||||
* If this succeeds, *addrPtr will be set to the pixel address. If the call
|
||||
* fails, addrPtr will be ignored.
|
||||
*/
|
||||
int AndroidBitmap_lockPixels(JNIEnv* env, jobject jbitmap, void** addrPtr);
|
||||
|
||||
/**
|
||||
* Call this to balance a successful call to AndroidBitmap_lockPixels.
|
||||
*/
|
||||
int AndroidBitmap_unlockPixels(JNIEnv* env, jobject jbitmap);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
708
third_party/android_frameworks_native/include/android/configuration.h
vendored
Normal file
708
third_party/android_frameworks_native/include/android/configuration.h
vendored
Normal file
@@ -0,0 +1,708 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Configuration
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file configuration.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_CONFIGURATION_H
|
||||
#define ANDROID_CONFIGURATION_H
|
||||
|
||||
#include <android/asset_manager.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
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
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">port</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_ORIENTATION_PORT = 0x0001,
|
||||
/**
|
||||
* Orientation: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">land</a>
|
||||
* 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
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">notouch</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_TOUCHSCREEN_NOTOUCH = 0x0001,
|
||||
/** @deprecated Not currently supported or used. */
|
||||
ACONFIGURATION_TOUCHSCREEN_STYLUS = 0x0002,
|
||||
/**
|
||||
* Touchscreen: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">finger</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_TOUCHSCREEN_FINGER = 0x0003,
|
||||
|
||||
/** Density: default density. */
|
||||
ACONFIGURATION_DENSITY_DEFAULT = 0,
|
||||
/**
|
||||
* Density: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">ldpi</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_DENSITY_LOW = 120,
|
||||
/**
|
||||
* Density: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">mdpi</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_DENSITY_MEDIUM = 160,
|
||||
/**
|
||||
* Density: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">tvdpi</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_DENSITY_TV = 213,
|
||||
/**
|
||||
* Density: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">hdpi</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_DENSITY_HIGH = 240,
|
||||
/**
|
||||
* Density: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xhdpi</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_DENSITY_XHIGH = 320,
|
||||
/**
|
||||
* Density: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xxhdpi</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_DENSITY_XXHIGH = 480,
|
||||
/**
|
||||
* Density: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">xxxhdpi</a>
|
||||
* 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
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">nokeys</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_KEYBOARD_NOKEYS = 0x0001,
|
||||
/**
|
||||
* Keyboard: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">qwerty</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_KEYBOARD_QWERTY = 0x0002,
|
||||
/**
|
||||
* Keyboard: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">12key</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_KEYBOARD_12KEY = 0x0003,
|
||||
|
||||
/** Navigation: not specified. */
|
||||
ACONFIGURATION_NAVIGATION_ANY = 0x0000,
|
||||
/**
|
||||
* Navigation: value corresponding to the
|
||||
* <a href="@@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">nonav</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_NAVIGATION_NONAV = 0x0001,
|
||||
/**
|
||||
* Navigation: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">dpad</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_NAVIGATION_DPAD = 0x0002,
|
||||
/**
|
||||
* Navigation: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">trackball</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_NAVIGATION_TRACKBALL = 0x0003,
|
||||
/**
|
||||
* Navigation: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">wheel</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_NAVIGATION_WHEEL = 0x0004,
|
||||
|
||||
/** Keyboard availability: not specified. */
|
||||
ACONFIGURATION_KEYSHIDDEN_ANY = 0x0000,
|
||||
/**
|
||||
* Keyboard availability: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keysexposed</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_KEYSHIDDEN_NO = 0x0001,
|
||||
/**
|
||||
* Keyboard availability: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyshidden</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_KEYSHIDDEN_YES = 0x0002,
|
||||
/**
|
||||
* Keyboard availability: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyssoft</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_KEYSHIDDEN_SOFT = 0x0003,
|
||||
|
||||
/** Navigation availability: not specified. */
|
||||
ACONFIGURATION_NAVHIDDEN_ANY = 0x0000,
|
||||
/**
|
||||
* Navigation availability: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavAvailQualifier">navexposed</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_NAVHIDDEN_NO = 0x0001,
|
||||
/**
|
||||
* Navigation availability: value corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavAvailQualifier">navhidden</a>
|
||||
* 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
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">small</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_SCREENSIZE_SMALL = 0x01,
|
||||
/**
|
||||
* Screen size: value indicating the screen is at least
|
||||
* approximately 320x470 dp units, corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">normal</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_SCREENSIZE_NORMAL = 0x02,
|
||||
/**
|
||||
* Screen size: value indicating the screen is at least
|
||||
* approximately 480x640 dp units, corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">large</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_SCREENSIZE_LARGE = 0x03,
|
||||
/**
|
||||
* Screen size: value indicating the screen is at least
|
||||
* approximately 720x960 dp units, corresponding to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">xlarge</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_SCREENSIZE_XLARGE = 0x04,
|
||||
|
||||
/** Screen layout: not specified. */
|
||||
ACONFIGURATION_SCREENLONG_ANY = 0x00,
|
||||
/**
|
||||
* Screen layout: value that corresponds to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">notlong</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_SCREENLONG_NO = 0x1,
|
||||
/**
|
||||
* Screen layout: value that corresponds to the
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenAspectQualifier">long</a>
|
||||
* resource qualifier.
|
||||
*/
|
||||
ACONFIGURATION_SCREENLONG_YES = 0x2,
|
||||
|
||||
ACONFIGURATION_SCREENROUND_ANY = 0x00,
|
||||
ACONFIGURATION_SCREENROUND_NO = 0x1,
|
||||
ACONFIGURATION_SCREENROUND_YES = 0x2,
|
||||
|
||||
/** UI mode: not specified. */
|
||||
ACONFIGURATION_UI_MODE_TYPE_ANY = 0x00,
|
||||
/**
|
||||
* UI mode: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">no
|
||||
* UI mode type</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01,
|
||||
/**
|
||||
* UI mode: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">desk</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02,
|
||||
/**
|
||||
* UI mode: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">car</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
|
||||
/**
|
||||
* UI mode: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">television</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
|
||||
/**
|
||||
* UI mode: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">appliance</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_UI_MODE_TYPE_APPLIANCE = 0x05,
|
||||
/**
|
||||
* UI mode: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">watch</a> 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
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NightQualifier">notnight</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
|
||||
/**
|
||||
* UI night mode: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NightQualifier">night</a> 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
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldltr</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_LAYOUTDIR_LTR = 0x01,
|
||||
/**
|
||||
* Layout direction: value that corresponds to
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">ldrtl</a> resource qualifier specified.
|
||||
*/
|
||||
ACONFIGURATION_LAYOUTDIR_RTL = 0x02,
|
||||
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#MccQualifier">mcc</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_MCC = 0x0001,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#MccQualifier">mnc</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_MNC = 0x0002,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="{@docRoot}guide/topics/resources/providing-resources.html#LocaleQualifier">locale</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_LOCALE = 0x0004,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#TouchscreenQualifier">touchscreen</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_TOUCHSCREEN = 0x0008,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ImeQualifier">keyboard</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_KEYBOARD = 0x0010,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#KeyboardAvailQualifier">keyboardHidden</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_KEYBOARD_HIDDEN = 0x0020,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#NavigationQualifier">navigation</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_NAVIGATION = 0x0040,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#OrientationQualifier">orientation</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_ORIENTATION = 0x0080,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#DensityQualifier">density</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_DENSITY = 0x0100,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#ScreenSizeQualifier">screen size</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_SCREEN_SIZE = 0x0200,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#VersionQualifier">platform version</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_VERSION = 0x0400,
|
||||
/**
|
||||
* Bit mask for screen layout configuration.
|
||||
*/
|
||||
ACONFIGURATION_SCREEN_LAYOUT = 0x0800,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#UiModeQualifier">ui mode</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_UI_MODE = 0x1000,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#SmallestScreenWidthQualifier">smallest screen width</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000,
|
||||
/**
|
||||
* Bit mask for
|
||||
* <a href="@dacRoot/guide/topics/resources/providing-resources.html#LayoutDirectionQualifier">layout direction</a>
|
||||
* configuration.
|
||||
*/
|
||||
ACONFIGURATION_LAYOUTDIR = 0x4000,
|
||||
ACONFIGURATION_SCREEN_ROUND = 0x8000,
|
||||
/**
|
||||
* 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,
|
||||
};
|
||||
|
||||
/**
|
||||
* Create a new AConfiguration, initialized with no values set.
|
||||
*/
|
||||
AConfiguration* AConfiguration_new();
|
||||
|
||||
/**
|
||||
* Free an AConfiguration that was previously created with
|
||||
* AConfiguration_new().
|
||||
*/
|
||||
void AConfiguration_delete(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Create and return a new AConfiguration based on the current configuration in
|
||||
* use in the given {@link AAssetManager}.
|
||||
*/
|
||||
void AConfiguration_fromAssetManager(AConfiguration* out, AAssetManager* am);
|
||||
|
||||
/**
|
||||
* Copy the contents of 'src' to 'dest'.
|
||||
*/
|
||||
void AConfiguration_copy(AConfiguration* dest, AConfiguration* src);
|
||||
|
||||
/**
|
||||
* Return the current MCC set in the configuration. 0 if not set.
|
||||
*/
|
||||
int32_t AConfiguration_getMcc(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current MCC in the configuration. 0 to clear.
|
||||
*/
|
||||
void AConfiguration_setMcc(AConfiguration* config, int32_t mcc);
|
||||
|
||||
/**
|
||||
* Return the current MNC set in the configuration. 0 if not set.
|
||||
*/
|
||||
int32_t AConfiguration_getMnc(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current MNC in the configuration. 0 to clear.
|
||||
*/
|
||||
void AConfiguration_setMnc(AConfiguration* config, int32_t mnc);
|
||||
|
||||
/**
|
||||
* Return the current language code set in the configuration. The output will
|
||||
* be filled with an array of two characters. They are not 0-terminated. If
|
||||
* a language is not set, they will be 0.
|
||||
*/
|
||||
void AConfiguration_getLanguage(AConfiguration* config, char* outLanguage);
|
||||
|
||||
/**
|
||||
* Set the current language code in the configuration, from the first two
|
||||
* characters in the string.
|
||||
*/
|
||||
void AConfiguration_setLanguage(AConfiguration* config, const char* language);
|
||||
|
||||
/**
|
||||
* Return the current country code set in the configuration. The output will
|
||||
* be filled with an array of two characters. They are not 0-terminated. If
|
||||
* a country is not set, they will be 0.
|
||||
*/
|
||||
void AConfiguration_getCountry(AConfiguration* config, char* outCountry);
|
||||
|
||||
/**
|
||||
* Set the current country code in the configuration, from the first two
|
||||
* characters in the string.
|
||||
*/
|
||||
void AConfiguration_setCountry(AConfiguration* config, const char* country);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_ORIENTATION_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getOrientation(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current orientation in the configuration.
|
||||
*/
|
||||
void AConfiguration_setOrientation(AConfiguration* config, int32_t orientation);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_TOUCHSCREEN_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getTouchscreen(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current touchscreen in the configuration.
|
||||
*/
|
||||
void AConfiguration_setTouchscreen(AConfiguration* config, int32_t touchscreen);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_DENSITY_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getDensity(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current density in the configuration.
|
||||
*/
|
||||
void AConfiguration_setDensity(AConfiguration* config, int32_t density);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_KEYBOARD_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getKeyboard(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current keyboard in the configuration.
|
||||
*/
|
||||
void AConfiguration_setKeyboard(AConfiguration* config, int32_t keyboard);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_NAVIGATION_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getNavigation(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current navigation in the configuration.
|
||||
*/
|
||||
void AConfiguration_setNavigation(AConfiguration* config, int32_t navigation);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_KEYSHIDDEN_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getKeysHidden(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current keys hidden in the configuration.
|
||||
*/
|
||||
void AConfiguration_setKeysHidden(AConfiguration* config, int32_t keysHidden);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_NAVHIDDEN_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getNavHidden(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current nav hidden in the configuration.
|
||||
*/
|
||||
void AConfiguration_setNavHidden(AConfiguration* config, int32_t navHidden);
|
||||
|
||||
/**
|
||||
* Return the current SDK (API) version set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getSdkVersion(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current SDK version in the configuration.
|
||||
*/
|
||||
void AConfiguration_setSdkVersion(AConfiguration* config, int32_t sdkVersion);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_SCREENSIZE_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getScreenSize(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current screen size in the configuration.
|
||||
*/
|
||||
void AConfiguration_setScreenSize(AConfiguration* config, int32_t screenSize);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_SCREENLONG_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getScreenLong(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current screen long in the configuration.
|
||||
*/
|
||||
void AConfiguration_setScreenLong(AConfiguration* config, int32_t screenLong);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_SCREENROUND_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getScreenRound(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current screen round in the configuration.
|
||||
*/
|
||||
void AConfiguration_setScreenRound(AConfiguration* config, int32_t screenRound);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_UI_MODE_TYPE_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getUiModeType(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current UI mode type in the configuration.
|
||||
*/
|
||||
void AConfiguration_setUiModeType(AConfiguration* config, int32_t uiModeType);
|
||||
|
||||
/**
|
||||
* Return the current ACONFIGURATION_UI_MODE_NIGHT_* set in the configuration.
|
||||
*/
|
||||
int32_t AConfiguration_getUiModeNight(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the current UI mode night in the configuration.
|
||||
*/
|
||||
void AConfiguration_setUiModeNight(AConfiguration* config, int32_t uiModeNight);
|
||||
|
||||
/**
|
||||
* Return the current configuration screen width in dp units, or
|
||||
* ACONFIGURATION_SCREEN_WIDTH_DP_ANY if not set.
|
||||
*/
|
||||
int32_t AConfiguration_getScreenWidthDp(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the configuration's current screen width in dp units.
|
||||
*/
|
||||
void AConfiguration_setScreenWidthDp(AConfiguration* config, int32_t value);
|
||||
|
||||
/**
|
||||
* Return the current configuration screen height in dp units, or
|
||||
* ACONFIGURATION_SCREEN_HEIGHT_DP_ANY if not set.
|
||||
*/
|
||||
int32_t AConfiguration_getScreenHeightDp(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the configuration's current screen width in dp units.
|
||||
*/
|
||||
void AConfiguration_setScreenHeightDp(AConfiguration* config, int32_t value);
|
||||
|
||||
/**
|
||||
* Return the configuration's smallest screen width in dp units, or
|
||||
* ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY if not set.
|
||||
*/
|
||||
int32_t AConfiguration_getSmallestScreenWidthDp(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the configuration's smallest screen width in dp units.
|
||||
*/
|
||||
void AConfiguration_setSmallestScreenWidthDp(AConfiguration* config, int32_t value);
|
||||
|
||||
/**
|
||||
* Return the configuration's layout direction, or
|
||||
* ACONFIGURATION_LAYOUTDIR_ANY if not set.
|
||||
*/
|
||||
int32_t AConfiguration_getLayoutDirection(AConfiguration* config);
|
||||
|
||||
/**
|
||||
* Set the configuration's layout direction.
|
||||
*/
|
||||
void AConfiguration_setLayoutDirection(AConfiguration* config, int32_t value);
|
||||
|
||||
/**
|
||||
* Perform a diff between two configurations. Returns a bit mask of
|
||||
* ACONFIGURATION_* constants, each bit set meaning that configuration element
|
||||
* is different between them.
|
||||
*/
|
||||
int32_t AConfiguration_diff(AConfiguration* config1, AConfiguration* config2);
|
||||
|
||||
/**
|
||||
* Determine whether 'base' is a valid configuration for use within the
|
||||
* environment 'requested'. Returns 0 if there are any values in 'base'
|
||||
* that conflict with 'requested'. Returns 1 if it does not conflict.
|
||||
*/
|
||||
int32_t AConfiguration_match(AConfiguration* base, AConfiguration* requested);
|
||||
|
||||
/**
|
||||
* Determine whether the configuration in 'test' is better than the existing
|
||||
* configuration in 'base'. If 'requested' is non-NULL, this decision is based
|
||||
* on the overall configuration given there. If it is NULL, this decision is
|
||||
* simply based on which configuration is more specific. Returns non-0 if
|
||||
* 'test' is better than 'base'.
|
||||
*
|
||||
* This assumes you have already filtered the configurations with
|
||||
* AConfiguration_match().
|
||||
*/
|
||||
int32_t AConfiguration_isBetterThan(AConfiguration* base, AConfiguration* test,
|
||||
AConfiguration* requested);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_CONFIGURATION_H
|
||||
|
||||
/** @} */
|
||||
1317
third_party/android_frameworks_native/include/android/input.h
vendored
Normal file
1317
third_party/android_frameworks_native/include/android/input.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
752
third_party/android_frameworks_native/include/android/keycodes.h
vendored
Normal file
752
third_party/android_frameworks_native/include/android/keycodes.h
vendored
Normal file
@@ -0,0 +1,752 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Input
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file keycodes.h
|
||||
*/
|
||||
|
||||
#ifndef _ANDROID_KEYCODES_H
|
||||
#define _ANDROID_KEYCODES_H
|
||||
|
||||
/******************************************************************
|
||||
*
|
||||
* IMPORTANT NOTICE:
|
||||
*
|
||||
* This file is part of Android's set of stable system headers
|
||||
* exposed by the Android NDK (Native Development Kit).
|
||||
*
|
||||
* Third-party source AND binary code relies on the definitions
|
||||
* here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
|
||||
*
|
||||
* - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
|
||||
* - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
|
||||
* - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
|
||||
* - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Key codes.
|
||||
*/
|
||||
enum {
|
||||
/** Unknown key code. */
|
||||
AKEYCODE_UNKNOWN = 0,
|
||||
/** Soft Left key.
|
||||
* Usually situated below the display on phones and used as a multi-function
|
||||
* feature key for selecting a software defined function shown on the bottom left
|
||||
* of the display. */
|
||||
AKEYCODE_SOFT_LEFT = 1,
|
||||
/** Soft Right key.
|
||||
* Usually situated below the display on phones and used as a multi-function
|
||||
* feature key for selecting a software defined function shown on the bottom right
|
||||
* of the display. */
|
||||
AKEYCODE_SOFT_RIGHT = 2,
|
||||
/** Home key.
|
||||
* This key is handled by the framework and is never delivered to applications. */
|
||||
AKEYCODE_HOME = 3,
|
||||
/** Back key. */
|
||||
AKEYCODE_BACK = 4,
|
||||
/** Call key. */
|
||||
AKEYCODE_CALL = 5,
|
||||
/** End Call key. */
|
||||
AKEYCODE_ENDCALL = 6,
|
||||
/** '0' key. */
|
||||
AKEYCODE_0 = 7,
|
||||
/** '1' key. */
|
||||
AKEYCODE_1 = 8,
|
||||
/** '2' key. */
|
||||
AKEYCODE_2 = 9,
|
||||
/** '3' key. */
|
||||
AKEYCODE_3 = 10,
|
||||
/** '4' key. */
|
||||
AKEYCODE_4 = 11,
|
||||
/** '5' key. */
|
||||
AKEYCODE_5 = 12,
|
||||
/** '6' key. */
|
||||
AKEYCODE_6 = 13,
|
||||
/** '7' key. */
|
||||
AKEYCODE_7 = 14,
|
||||
/** '8' key. */
|
||||
AKEYCODE_8 = 15,
|
||||
/** '9' key. */
|
||||
AKEYCODE_9 = 16,
|
||||
/** '*' key. */
|
||||
AKEYCODE_STAR = 17,
|
||||
/** '#' key. */
|
||||
AKEYCODE_POUND = 18,
|
||||
/** Directional Pad Up key.
|
||||
* May also be synthesized from trackball motions. */
|
||||
AKEYCODE_DPAD_UP = 19,
|
||||
/** Directional Pad Down key.
|
||||
* May also be synthesized from trackball motions. */
|
||||
AKEYCODE_DPAD_DOWN = 20,
|
||||
/** Directional Pad Left key.
|
||||
* May also be synthesized from trackball motions. */
|
||||
AKEYCODE_DPAD_LEFT = 21,
|
||||
/** Directional Pad Right key.
|
||||
* May also be synthesized from trackball motions. */
|
||||
AKEYCODE_DPAD_RIGHT = 22,
|
||||
/** Directional Pad Center key.
|
||||
* May also be synthesized from trackball motions. */
|
||||
AKEYCODE_DPAD_CENTER = 23,
|
||||
/** Volume Up key.
|
||||
* Adjusts the speaker volume up. */
|
||||
AKEYCODE_VOLUME_UP = 24,
|
||||
/** Volume Down key.
|
||||
* Adjusts the speaker volume down. */
|
||||
AKEYCODE_VOLUME_DOWN = 25,
|
||||
/** Power key. */
|
||||
AKEYCODE_POWER = 26,
|
||||
/** Camera key.
|
||||
* Used to launch a camera application or take pictures. */
|
||||
AKEYCODE_CAMERA = 27,
|
||||
/** Clear key. */
|
||||
AKEYCODE_CLEAR = 28,
|
||||
/** 'A' key. */
|
||||
AKEYCODE_A = 29,
|
||||
/** 'B' key. */
|
||||
AKEYCODE_B = 30,
|
||||
/** 'C' key. */
|
||||
AKEYCODE_C = 31,
|
||||
/** 'D' key. */
|
||||
AKEYCODE_D = 32,
|
||||
/** 'E' key. */
|
||||
AKEYCODE_E = 33,
|
||||
/** 'F' key. */
|
||||
AKEYCODE_F = 34,
|
||||
/** 'G' key. */
|
||||
AKEYCODE_G = 35,
|
||||
/** 'H' key. */
|
||||
AKEYCODE_H = 36,
|
||||
/** 'I' key. */
|
||||
AKEYCODE_I = 37,
|
||||
/** 'J' key. */
|
||||
AKEYCODE_J = 38,
|
||||
/** 'K' key. */
|
||||
AKEYCODE_K = 39,
|
||||
/** 'L' key. */
|
||||
AKEYCODE_L = 40,
|
||||
/** 'M' key. */
|
||||
AKEYCODE_M = 41,
|
||||
/** 'N' key. */
|
||||
AKEYCODE_N = 42,
|
||||
/** 'O' key. */
|
||||
AKEYCODE_O = 43,
|
||||
/** 'P' key. */
|
||||
AKEYCODE_P = 44,
|
||||
/** 'Q' key. */
|
||||
AKEYCODE_Q = 45,
|
||||
/** 'R' key. */
|
||||
AKEYCODE_R = 46,
|
||||
/** 'S' key. */
|
||||
AKEYCODE_S = 47,
|
||||
/** 'T' key. */
|
||||
AKEYCODE_T = 48,
|
||||
/** 'U' key. */
|
||||
AKEYCODE_U = 49,
|
||||
/** 'V' key. */
|
||||
AKEYCODE_V = 50,
|
||||
/** 'W' key. */
|
||||
AKEYCODE_W = 51,
|
||||
/** 'X' key. */
|
||||
AKEYCODE_X = 52,
|
||||
/** 'Y' key. */
|
||||
AKEYCODE_Y = 53,
|
||||
/** 'Z' key. */
|
||||
AKEYCODE_Z = 54,
|
||||
/** ',' key. */
|
||||
AKEYCODE_COMMA = 55,
|
||||
/** '.' key. */
|
||||
AKEYCODE_PERIOD = 56,
|
||||
/** Left Alt modifier key. */
|
||||
AKEYCODE_ALT_LEFT = 57,
|
||||
/** Right Alt modifier key. */
|
||||
AKEYCODE_ALT_RIGHT = 58,
|
||||
/** Left Shift modifier key. */
|
||||
AKEYCODE_SHIFT_LEFT = 59,
|
||||
/** Right Shift modifier key. */
|
||||
AKEYCODE_SHIFT_RIGHT = 60,
|
||||
/** Tab key. */
|
||||
AKEYCODE_TAB = 61,
|
||||
/** Space key. */
|
||||
AKEYCODE_SPACE = 62,
|
||||
/** Symbol modifier key.
|
||||
* Used to enter alternate symbols. */
|
||||
AKEYCODE_SYM = 63,
|
||||
/** Explorer special function key.
|
||||
* Used to launch a browser application. */
|
||||
AKEYCODE_EXPLORER = 64,
|
||||
/** Envelope special function key.
|
||||
* Used to launch a mail application. */
|
||||
AKEYCODE_ENVELOPE = 65,
|
||||
/** Enter key. */
|
||||
AKEYCODE_ENTER = 66,
|
||||
/** Backspace key.
|
||||
* Deletes characters before the insertion point, unlike {@link AKEYCODE_FORWARD_DEL}. */
|
||||
AKEYCODE_DEL = 67,
|
||||
/** '`' (backtick) key. */
|
||||
AKEYCODE_GRAVE = 68,
|
||||
/** '-'. */
|
||||
AKEYCODE_MINUS = 69,
|
||||
/** '=' key. */
|
||||
AKEYCODE_EQUALS = 70,
|
||||
/** '[' key. */
|
||||
AKEYCODE_LEFT_BRACKET = 71,
|
||||
/** ']' key. */
|
||||
AKEYCODE_RIGHT_BRACKET = 72,
|
||||
/** '\' key. */
|
||||
AKEYCODE_BACKSLASH = 73,
|
||||
/** ';' key. */
|
||||
AKEYCODE_SEMICOLON = 74,
|
||||
/** ''' (apostrophe) key. */
|
||||
AKEYCODE_APOSTROPHE = 75,
|
||||
/** '/' key. */
|
||||
AKEYCODE_SLASH = 76,
|
||||
/** '@' key. */
|
||||
AKEYCODE_AT = 77,
|
||||
/** Number modifier key.
|
||||
* Used to enter numeric symbols.
|
||||
* This key is not {@link AKEYCODE_NUM_LOCK}; it is more like {@link AKEYCODE_ALT_LEFT}. */
|
||||
AKEYCODE_NUM = 78,
|
||||
/** Headset Hook key.
|
||||
* Used to hang up calls and stop media. */
|
||||
AKEYCODE_HEADSETHOOK = 79,
|
||||
/** Camera Focus key.
|
||||
* Used to focus the camera. */
|
||||
AKEYCODE_FOCUS = 80,
|
||||
/** '+' key. */
|
||||
AKEYCODE_PLUS = 81,
|
||||
/** Menu key. */
|
||||
AKEYCODE_MENU = 82,
|
||||
/** Notification key. */
|
||||
AKEYCODE_NOTIFICATION = 83,
|
||||
/** Search key. */
|
||||
AKEYCODE_SEARCH = 84,
|
||||
/** Play/Pause media key. */
|
||||
AKEYCODE_MEDIA_PLAY_PAUSE= 85,
|
||||
/** Stop media key. */
|
||||
AKEYCODE_MEDIA_STOP = 86,
|
||||
/** Play Next media key. */
|
||||
AKEYCODE_MEDIA_NEXT = 87,
|
||||
/** Play Previous media key. */
|
||||
AKEYCODE_MEDIA_PREVIOUS = 88,
|
||||
/** Rewind media key. */
|
||||
AKEYCODE_MEDIA_REWIND = 89,
|
||||
/** Fast Forward media key. */
|
||||
AKEYCODE_MEDIA_FAST_FORWARD = 90,
|
||||
/** Mute key.
|
||||
* Mutes the microphone, unlike {@link AKEYCODE_VOLUME_MUTE}. */
|
||||
AKEYCODE_MUTE = 91,
|
||||
/** Page Up key. */
|
||||
AKEYCODE_PAGE_UP = 92,
|
||||
/** Page Down key. */
|
||||
AKEYCODE_PAGE_DOWN = 93,
|
||||
/** Picture Symbols modifier key.
|
||||
* Used to switch symbol sets (Emoji, Kao-moji). */
|
||||
AKEYCODE_PICTSYMBOLS = 94,
|
||||
/** Switch Charset modifier key.
|
||||
* Used to switch character sets (Kanji, Katakana). */
|
||||
AKEYCODE_SWITCH_CHARSET = 95,
|
||||
/** A Button key.
|
||||
* On a game controller, the A button should be either the button labeled A
|
||||
* or the first button on the bottom row of controller buttons. */
|
||||
AKEYCODE_BUTTON_A = 96,
|
||||
/** B Button key.
|
||||
* On a game controller, the B button should be either the button labeled B
|
||||
* or the second button on the bottom row of controller buttons. */
|
||||
AKEYCODE_BUTTON_B = 97,
|
||||
/** C Button key.
|
||||
* On a game controller, the C button should be either the button labeled C
|
||||
* or the third button on the bottom row of controller buttons. */
|
||||
AKEYCODE_BUTTON_C = 98,
|
||||
/** X Button key.
|
||||
* On a game controller, the X button should be either the button labeled X
|
||||
* or the first button on the upper row of controller buttons. */
|
||||
AKEYCODE_BUTTON_X = 99,
|
||||
/** Y Button key.
|
||||
* On a game controller, the Y button should be either the button labeled Y
|
||||
* or the second button on the upper row of controller buttons. */
|
||||
AKEYCODE_BUTTON_Y = 100,
|
||||
/** Z Button key.
|
||||
* On a game controller, the Z button should be either the button labeled Z
|
||||
* or the third button on the upper row of controller buttons. */
|
||||
AKEYCODE_BUTTON_Z = 101,
|
||||
/** L1 Button key.
|
||||
* On a game controller, the L1 button should be either the button labeled L1 (or L)
|
||||
* or the top left trigger button. */
|
||||
AKEYCODE_BUTTON_L1 = 102,
|
||||
/** R1 Button key.
|
||||
* On a game controller, the R1 button should be either the button labeled R1 (or R)
|
||||
* or the top right trigger button. */
|
||||
AKEYCODE_BUTTON_R1 = 103,
|
||||
/** L2 Button key.
|
||||
* On a game controller, the L2 button should be either the button labeled L2
|
||||
* or the bottom left trigger button. */
|
||||
AKEYCODE_BUTTON_L2 = 104,
|
||||
/** R2 Button key.
|
||||
* On a game controller, the R2 button should be either the button labeled R2
|
||||
* or the bottom right trigger button. */
|
||||
AKEYCODE_BUTTON_R2 = 105,
|
||||
/** Left Thumb Button key.
|
||||
* On a game controller, the left thumb button indicates that the left (or only)
|
||||
* joystick is pressed. */
|
||||
AKEYCODE_BUTTON_THUMBL = 106,
|
||||
/** Right Thumb Button key.
|
||||
* On a game controller, the right thumb button indicates that the right
|
||||
* joystick is pressed. */
|
||||
AKEYCODE_BUTTON_THUMBR = 107,
|
||||
/** Start Button key.
|
||||
* On a game controller, the button labeled Start. */
|
||||
AKEYCODE_BUTTON_START = 108,
|
||||
/** Select Button key.
|
||||
* On a game controller, the button labeled Select. */
|
||||
AKEYCODE_BUTTON_SELECT = 109,
|
||||
/** Mode Button key.
|
||||
* On a game controller, the button labeled Mode. */
|
||||
AKEYCODE_BUTTON_MODE = 110,
|
||||
/** Escape key. */
|
||||
AKEYCODE_ESCAPE = 111,
|
||||
/** Forward Delete key.
|
||||
* Deletes characters ahead of the insertion point, unlike {@link AKEYCODE_DEL}. */
|
||||
AKEYCODE_FORWARD_DEL = 112,
|
||||
/** Left Control modifier key. */
|
||||
AKEYCODE_CTRL_LEFT = 113,
|
||||
/** Right Control modifier key. */
|
||||
AKEYCODE_CTRL_RIGHT = 114,
|
||||
/** Caps Lock key. */
|
||||
AKEYCODE_CAPS_LOCK = 115,
|
||||
/** Scroll Lock key. */
|
||||
AKEYCODE_SCROLL_LOCK = 116,
|
||||
/** Left Meta modifier key. */
|
||||
AKEYCODE_META_LEFT = 117,
|
||||
/** Right Meta modifier key. */
|
||||
AKEYCODE_META_RIGHT = 118,
|
||||
/** Function modifier key. */
|
||||
AKEYCODE_FUNCTION = 119,
|
||||
/** System Request / Print Screen key. */
|
||||
AKEYCODE_SYSRQ = 120,
|
||||
/** Break / Pause key. */
|
||||
AKEYCODE_BREAK = 121,
|
||||
/** Home Movement key.
|
||||
* Used for scrolling or moving the cursor around to the start of a line
|
||||
* or to the top of a list. */
|
||||
AKEYCODE_MOVE_HOME = 122,
|
||||
/** End Movement key.
|
||||
* Used for scrolling or moving the cursor around to the end of a line
|
||||
* or to the bottom of a list. */
|
||||
AKEYCODE_MOVE_END = 123,
|
||||
/** Insert key.
|
||||
* Toggles insert / overwrite edit mode. */
|
||||
AKEYCODE_INSERT = 124,
|
||||
/** Forward key.
|
||||
* Navigates forward in the history stack. Complement of {@link AKEYCODE_BACK}. */
|
||||
AKEYCODE_FORWARD = 125,
|
||||
/** Play media key. */
|
||||
AKEYCODE_MEDIA_PLAY = 126,
|
||||
/** Pause media key. */
|
||||
AKEYCODE_MEDIA_PAUSE = 127,
|
||||
/** Close media key.
|
||||
* May be used to close a CD tray, for example. */
|
||||
AKEYCODE_MEDIA_CLOSE = 128,
|
||||
/** Eject media key.
|
||||
* May be used to eject a CD tray, for example. */
|
||||
AKEYCODE_MEDIA_EJECT = 129,
|
||||
/** Record media key. */
|
||||
AKEYCODE_MEDIA_RECORD = 130,
|
||||
/** F1 key. */
|
||||
AKEYCODE_F1 = 131,
|
||||
/** F2 key. */
|
||||
AKEYCODE_F2 = 132,
|
||||
/** F3 key. */
|
||||
AKEYCODE_F3 = 133,
|
||||
/** F4 key. */
|
||||
AKEYCODE_F4 = 134,
|
||||
/** F5 key. */
|
||||
AKEYCODE_F5 = 135,
|
||||
/** F6 key. */
|
||||
AKEYCODE_F6 = 136,
|
||||
/** F7 key. */
|
||||
AKEYCODE_F7 = 137,
|
||||
/** F8 key. */
|
||||
AKEYCODE_F8 = 138,
|
||||
/** F9 key. */
|
||||
AKEYCODE_F9 = 139,
|
||||
/** F10 key. */
|
||||
AKEYCODE_F10 = 140,
|
||||
/** F11 key. */
|
||||
AKEYCODE_F11 = 141,
|
||||
/** F12 key. */
|
||||
AKEYCODE_F12 = 142,
|
||||
/** Num Lock key.
|
||||
* This is the Num Lock key; it is different from {@link AKEYCODE_NUM}.
|
||||
* This key alters the behavior of other keys on the numeric keypad. */
|
||||
AKEYCODE_NUM_LOCK = 143,
|
||||
/** Numeric keypad '0' key. */
|
||||
AKEYCODE_NUMPAD_0 = 144,
|
||||
/** Numeric keypad '1' key. */
|
||||
AKEYCODE_NUMPAD_1 = 145,
|
||||
/** Numeric keypad '2' key. */
|
||||
AKEYCODE_NUMPAD_2 = 146,
|
||||
/** Numeric keypad '3' key. */
|
||||
AKEYCODE_NUMPAD_3 = 147,
|
||||
/** Numeric keypad '4' key. */
|
||||
AKEYCODE_NUMPAD_4 = 148,
|
||||
/** Numeric keypad '5' key. */
|
||||
AKEYCODE_NUMPAD_5 = 149,
|
||||
/** Numeric keypad '6' key. */
|
||||
AKEYCODE_NUMPAD_6 = 150,
|
||||
/** Numeric keypad '7' key. */
|
||||
AKEYCODE_NUMPAD_7 = 151,
|
||||
/** Numeric keypad '8' key. */
|
||||
AKEYCODE_NUMPAD_8 = 152,
|
||||
/** Numeric keypad '9' key. */
|
||||
AKEYCODE_NUMPAD_9 = 153,
|
||||
/** Numeric keypad '/' key (for division). */
|
||||
AKEYCODE_NUMPAD_DIVIDE = 154,
|
||||
/** Numeric keypad '*' key (for multiplication). */
|
||||
AKEYCODE_NUMPAD_MULTIPLY = 155,
|
||||
/** Numeric keypad '-' key (for subtraction). */
|
||||
AKEYCODE_NUMPAD_SUBTRACT = 156,
|
||||
/** Numeric keypad '+' key (for addition). */
|
||||
AKEYCODE_NUMPAD_ADD = 157,
|
||||
/** Numeric keypad '.' key (for decimals or digit grouping). */
|
||||
AKEYCODE_NUMPAD_DOT = 158,
|
||||
/** Numeric keypad ',' key (for decimals or digit grouping). */
|
||||
AKEYCODE_NUMPAD_COMMA = 159,
|
||||
/** Numeric keypad Enter key. */
|
||||
AKEYCODE_NUMPAD_ENTER = 160,
|
||||
/** Numeric keypad '=' key. */
|
||||
AKEYCODE_NUMPAD_EQUALS = 161,
|
||||
/** Numeric keypad '(' key. */
|
||||
AKEYCODE_NUMPAD_LEFT_PAREN = 162,
|
||||
/** Numeric keypad ')' key. */
|
||||
AKEYCODE_NUMPAD_RIGHT_PAREN = 163,
|
||||
/** Volume Mute key.
|
||||
* Mutes the speaker, unlike {@link AKEYCODE_MUTE}.
|
||||
* This key should normally be implemented as a toggle such that the first press
|
||||
* mutes the speaker and the second press restores the original volume. */
|
||||
AKEYCODE_VOLUME_MUTE = 164,
|
||||
/** Info key.
|
||||
* Common on TV remotes to show additional information related to what is
|
||||
* currently being viewed. */
|
||||
AKEYCODE_INFO = 165,
|
||||
/** Channel up key.
|
||||
* On TV remotes, increments the television channel. */
|
||||
AKEYCODE_CHANNEL_UP = 166,
|
||||
/** Channel down key.
|
||||
* On TV remotes, decrements the television channel. */
|
||||
AKEYCODE_CHANNEL_DOWN = 167,
|
||||
/** Zoom in key. */
|
||||
AKEYCODE_ZOOM_IN = 168,
|
||||
/** Zoom out key. */
|
||||
AKEYCODE_ZOOM_OUT = 169,
|
||||
/** TV key.
|
||||
* On TV remotes, switches to viewing live TV. */
|
||||
AKEYCODE_TV = 170,
|
||||
/** Window key.
|
||||
* On TV remotes, toggles picture-in-picture mode or other windowing functions. */
|
||||
AKEYCODE_WINDOW = 171,
|
||||
/** Guide key.
|
||||
* On TV remotes, shows a programming guide. */
|
||||
AKEYCODE_GUIDE = 172,
|
||||
/** DVR key.
|
||||
* On some TV remotes, switches to a DVR mode for recorded shows. */
|
||||
AKEYCODE_DVR = 173,
|
||||
/** Bookmark key.
|
||||
* On some TV remotes, bookmarks content or web pages. */
|
||||
AKEYCODE_BOOKMARK = 174,
|
||||
/** Toggle captions key.
|
||||
* Switches the mode for closed-captioning text, for example during television shows. */
|
||||
AKEYCODE_CAPTIONS = 175,
|
||||
/** Settings key.
|
||||
* Starts the system settings activity. */
|
||||
AKEYCODE_SETTINGS = 176,
|
||||
/** TV power key.
|
||||
* On TV remotes, toggles the power on a television screen. */
|
||||
AKEYCODE_TV_POWER = 177,
|
||||
/** TV input key.
|
||||
* On TV remotes, switches the input on a television screen. */
|
||||
AKEYCODE_TV_INPUT = 178,
|
||||
/** Set-top-box power key.
|
||||
* On TV remotes, toggles the power on an external Set-top-box. */
|
||||
AKEYCODE_STB_POWER = 179,
|
||||
/** Set-top-box input key.
|
||||
* On TV remotes, switches the input mode on an external Set-top-box. */
|
||||
AKEYCODE_STB_INPUT = 180,
|
||||
/** A/V Receiver power key.
|
||||
* On TV remotes, toggles the power on an external A/V Receiver. */
|
||||
AKEYCODE_AVR_POWER = 181,
|
||||
/** A/V Receiver input key.
|
||||
* On TV remotes, switches the input mode on an external A/V Receiver. */
|
||||
AKEYCODE_AVR_INPUT = 182,
|
||||
/** Red "programmable" key.
|
||||
* On TV remotes, acts as a contextual/programmable key. */
|
||||
AKEYCODE_PROG_RED = 183,
|
||||
/** Green "programmable" key.
|
||||
* On TV remotes, actsas a contextual/programmable key. */
|
||||
AKEYCODE_PROG_GREEN = 184,
|
||||
/** Yellow "programmable" key.
|
||||
* On TV remotes, acts as a contextual/programmable key. */
|
||||
AKEYCODE_PROG_YELLOW = 185,
|
||||
/** Blue "programmable" key.
|
||||
* On TV remotes, acts as a contextual/programmable key. */
|
||||
AKEYCODE_PROG_BLUE = 186,
|
||||
/** App switch key.
|
||||
* Should bring up the application switcher dialog. */
|
||||
AKEYCODE_APP_SWITCH = 187,
|
||||
/** Generic Game Pad Button #1.*/
|
||||
AKEYCODE_BUTTON_1 = 188,
|
||||
/** Generic Game Pad Button #2.*/
|
||||
AKEYCODE_BUTTON_2 = 189,
|
||||
/** Generic Game Pad Button #3.*/
|
||||
AKEYCODE_BUTTON_3 = 190,
|
||||
/** Generic Game Pad Button #4.*/
|
||||
AKEYCODE_BUTTON_4 = 191,
|
||||
/** Generic Game Pad Button #5.*/
|
||||
AKEYCODE_BUTTON_5 = 192,
|
||||
/** Generic Game Pad Button #6.*/
|
||||
AKEYCODE_BUTTON_6 = 193,
|
||||
/** Generic Game Pad Button #7.*/
|
||||
AKEYCODE_BUTTON_7 = 194,
|
||||
/** Generic Game Pad Button #8.*/
|
||||
AKEYCODE_BUTTON_8 = 195,
|
||||
/** Generic Game Pad Button #9.*/
|
||||
AKEYCODE_BUTTON_9 = 196,
|
||||
/** Generic Game Pad Button #10.*/
|
||||
AKEYCODE_BUTTON_10 = 197,
|
||||
/** Generic Game Pad Button #11.*/
|
||||
AKEYCODE_BUTTON_11 = 198,
|
||||
/** Generic Game Pad Button #12.*/
|
||||
AKEYCODE_BUTTON_12 = 199,
|
||||
/** Generic Game Pad Button #13.*/
|
||||
AKEYCODE_BUTTON_13 = 200,
|
||||
/** Generic Game Pad Button #14.*/
|
||||
AKEYCODE_BUTTON_14 = 201,
|
||||
/** Generic Game Pad Button #15.*/
|
||||
AKEYCODE_BUTTON_15 = 202,
|
||||
/** Generic Game Pad Button #16.*/
|
||||
AKEYCODE_BUTTON_16 = 203,
|
||||
/** Language Switch key.
|
||||
* Toggles the current input language such as switching between English and Japanese on
|
||||
* a QWERTY keyboard. On some devices, the same function may be performed by
|
||||
* pressing Shift+Spacebar. */
|
||||
AKEYCODE_LANGUAGE_SWITCH = 204,
|
||||
/** Manner Mode key.
|
||||
* Toggles silent or vibrate mode on and off to make the device behave more politely
|
||||
* in certain settings such as on a crowded train. On some devices, the key may only
|
||||
* operate when long-pressed. */
|
||||
AKEYCODE_MANNER_MODE = 205,
|
||||
/** 3D Mode key.
|
||||
* Toggles the display between 2D and 3D mode. */
|
||||
AKEYCODE_3D_MODE = 206,
|
||||
/** Contacts special function key.
|
||||
* Used to launch an address book application. */
|
||||
AKEYCODE_CONTACTS = 207,
|
||||
/** Calendar special function key.
|
||||
* Used to launch a calendar application. */
|
||||
AKEYCODE_CALENDAR = 208,
|
||||
/** Music special function key.
|
||||
* Used to launch a music player application. */
|
||||
AKEYCODE_MUSIC = 209,
|
||||
/** Calculator special function key.
|
||||
* Used to launch a calculator application. */
|
||||
AKEYCODE_CALCULATOR = 210,
|
||||
/** Japanese full-width / half-width key. */
|
||||
AKEYCODE_ZENKAKU_HANKAKU = 211,
|
||||
/** Japanese alphanumeric key. */
|
||||
AKEYCODE_EISU = 212,
|
||||
/** Japanese non-conversion key. */
|
||||
AKEYCODE_MUHENKAN = 213,
|
||||
/** Japanese conversion key. */
|
||||
AKEYCODE_HENKAN = 214,
|
||||
/** Japanese katakana / hiragana key. */
|
||||
AKEYCODE_KATAKANA_HIRAGANA = 215,
|
||||
/** Japanese Yen key. */
|
||||
AKEYCODE_YEN = 216,
|
||||
/** Japanese Ro key. */
|
||||
AKEYCODE_RO = 217,
|
||||
/** Japanese kana key. */
|
||||
AKEYCODE_KANA = 218,
|
||||
/** Assist key.
|
||||
* Launches the global assist activity. Not delivered to applications. */
|
||||
AKEYCODE_ASSIST = 219,
|
||||
/** Brightness Down key.
|
||||
* Adjusts the screen brightness down. */
|
||||
AKEYCODE_BRIGHTNESS_DOWN = 220,
|
||||
/** Brightness Up key.
|
||||
* Adjusts the screen brightness up. */
|
||||
AKEYCODE_BRIGHTNESS_UP = 221,
|
||||
/** Audio Track key.
|
||||
* Switches the audio tracks. */
|
||||
AKEYCODE_MEDIA_AUDIO_TRACK = 222,
|
||||
/** Sleep key.
|
||||
* Puts the device to sleep. Behaves somewhat like {@link AKEYCODE_POWER} but it
|
||||
* has no effect if the device is already asleep. */
|
||||
AKEYCODE_SLEEP = 223,
|
||||
/** Wakeup key.
|
||||
* Wakes up the device. Behaves somewhat like {@link AKEYCODE_POWER} but it
|
||||
* has no effect if the device is already awake. */
|
||||
AKEYCODE_WAKEUP = 224,
|
||||
/** Pairing key.
|
||||
* Initiates peripheral pairing mode. Useful for pairing remote control
|
||||
* devices or game controllers, especially if no other input mode is
|
||||
* available. */
|
||||
AKEYCODE_PAIRING = 225,
|
||||
/** Media Top Menu key.
|
||||
* Goes to the top of media menu. */
|
||||
AKEYCODE_MEDIA_TOP_MENU = 226,
|
||||
/** '11' key. */
|
||||
AKEYCODE_11 = 227,
|
||||
/** '12' key. */
|
||||
AKEYCODE_12 = 228,
|
||||
/** Last Channel key.
|
||||
* Goes to the last viewed channel. */
|
||||
AKEYCODE_LAST_CHANNEL = 229,
|
||||
/** TV data service key.
|
||||
* Displays data services like weather, sports. */
|
||||
AKEYCODE_TV_DATA_SERVICE = 230,
|
||||
/** Voice Assist key.
|
||||
* Launches the global voice assist activity. Not delivered to applications. */
|
||||
AKEYCODE_VOICE_ASSIST = 231,
|
||||
/** Radio key.
|
||||
* Toggles TV service / Radio service. */
|
||||
AKEYCODE_TV_RADIO_SERVICE = 232,
|
||||
/** Teletext key.
|
||||
* Displays Teletext service. */
|
||||
AKEYCODE_TV_TELETEXT = 233,
|
||||
/** Number entry key.
|
||||
* Initiates to enter multi-digit channel nubmber when each digit key is assigned
|
||||
* for selecting separate channel. Corresponds to Number Entry Mode (0x1D) of CEC
|
||||
* User Control Code. */
|
||||
AKEYCODE_TV_NUMBER_ENTRY = 234,
|
||||
/** Analog Terrestrial key.
|
||||
* Switches to analog terrestrial broadcast service. */
|
||||
AKEYCODE_TV_TERRESTRIAL_ANALOG = 235,
|
||||
/** Digital Terrestrial key.
|
||||
* Switches to digital terrestrial broadcast service. */
|
||||
AKEYCODE_TV_TERRESTRIAL_DIGITAL = 236,
|
||||
/** Satellite key.
|
||||
* Switches to digital satellite broadcast service. */
|
||||
AKEYCODE_TV_SATELLITE = 237,
|
||||
/** BS key.
|
||||
* Switches to BS digital satellite broadcasting service available in Japan. */
|
||||
AKEYCODE_TV_SATELLITE_BS = 238,
|
||||
/** CS key.
|
||||
* Switches to CS digital satellite broadcasting service available in Japan. */
|
||||
AKEYCODE_TV_SATELLITE_CS = 239,
|
||||
/** BS/CS key.
|
||||
* Toggles between BS and CS digital satellite services. */
|
||||
AKEYCODE_TV_SATELLITE_SERVICE = 240,
|
||||
/** Toggle Network key.
|
||||
* Toggles selecting broacast services. */
|
||||
AKEYCODE_TV_NETWORK = 241,
|
||||
/** Antenna/Cable key.
|
||||
* Toggles broadcast input source between antenna and cable. */
|
||||
AKEYCODE_TV_ANTENNA_CABLE = 242,
|
||||
/** HDMI #1 key.
|
||||
* Switches to HDMI input #1. */
|
||||
AKEYCODE_TV_INPUT_HDMI_1 = 243,
|
||||
/** HDMI #2 key.
|
||||
* Switches to HDMI input #2. */
|
||||
AKEYCODE_TV_INPUT_HDMI_2 = 244,
|
||||
/** HDMI #3 key.
|
||||
* Switches to HDMI input #3. */
|
||||
AKEYCODE_TV_INPUT_HDMI_3 = 245,
|
||||
/** HDMI #4 key.
|
||||
* Switches to HDMI input #4. */
|
||||
AKEYCODE_TV_INPUT_HDMI_4 = 246,
|
||||
/** Composite #1 key.
|
||||
* Switches to composite video input #1. */
|
||||
AKEYCODE_TV_INPUT_COMPOSITE_1 = 247,
|
||||
/** Composite #2 key.
|
||||
* Switches to composite video input #2. */
|
||||
AKEYCODE_TV_INPUT_COMPOSITE_2 = 248,
|
||||
/** Component #1 key.
|
||||
* Switches to component video input #1. */
|
||||
AKEYCODE_TV_INPUT_COMPONENT_1 = 249,
|
||||
/** Component #2 key.
|
||||
* Switches to component video input #2. */
|
||||
AKEYCODE_TV_INPUT_COMPONENT_2 = 250,
|
||||
/** VGA #1 key.
|
||||
* Switches to VGA (analog RGB) input #1. */
|
||||
AKEYCODE_TV_INPUT_VGA_1 = 251,
|
||||
/** Audio description key.
|
||||
* Toggles audio description off / on. */
|
||||
AKEYCODE_TV_AUDIO_DESCRIPTION = 252,
|
||||
/** Audio description mixing volume up key.
|
||||
* Louden audio description volume as compared with normal audio volume. */
|
||||
AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_UP = 253,
|
||||
/** Audio description mixing volume down key.
|
||||
* Lessen audio description volume as compared with normal audio volume. */
|
||||
AKEYCODE_TV_AUDIO_DESCRIPTION_MIX_DOWN = 254,
|
||||
/** Zoom mode key.
|
||||
* Changes Zoom mode (Normal, Full, Zoom, Wide-zoom, etc.) */
|
||||
AKEYCODE_TV_ZOOM_MODE = 255,
|
||||
/** Contents menu key.
|
||||
* Goes to the title list. Corresponds to Contents Menu (0x0B) of CEC User Control
|
||||
* Code */
|
||||
AKEYCODE_TV_CONTENTS_MENU = 256,
|
||||
/** Media context menu key.
|
||||
* Goes to the context menu of media contents. Corresponds to Media Context-sensitive
|
||||
* Menu (0x11) of CEC User Control Code. */
|
||||
AKEYCODE_TV_MEDIA_CONTEXT_MENU = 257,
|
||||
/** Timer programming key.
|
||||
* Goes to the timer recording menu. Corresponds to Timer Programming (0x54) of
|
||||
* CEC User Control Code. */
|
||||
AKEYCODE_TV_TIMER_PROGRAMMING = 258,
|
||||
/** Help key. */
|
||||
AKEYCODE_HELP = 259,
|
||||
AKEYCODE_NAVIGATE_PREVIOUS = 260,
|
||||
AKEYCODE_NAVIGATE_NEXT = 261,
|
||||
AKEYCODE_NAVIGATE_IN = 262,
|
||||
AKEYCODE_NAVIGATE_OUT = 263,
|
||||
/** Primary stem key for Wear
|
||||
* Main power/reset button on watch. */
|
||||
AKEYCODE_STEM_PRIMARY = 264,
|
||||
/** Generic stem key 1 for Wear */
|
||||
AKEYCODE_STEM_1 = 265,
|
||||
/** Generic stem key 2 for Wear */
|
||||
AKEYCODE_STEM_2 = 266,
|
||||
/** Generic stem key 3 for Wear */
|
||||
AKEYCODE_STEM_3 = 267,
|
||||
AKEYCODE_MEDIA_SKIP_FORWARD = 272,
|
||||
AKEYCODE_MEDIA_SKIP_BACKWARD = 273,
|
||||
AKEYCODE_MEDIA_STEP_FORWARD = 274,
|
||||
AKEYCODE_MEDIA_STEP_BACKWARD = 275,
|
||||
/** Put device to sleep unless a wakelock is held. */
|
||||
AKEYCODE_SOFT_SLEEP = 276
|
||||
|
||||
// NOTE: If you add a new keycode here you must also add it to several other files.
|
||||
// Refer to frameworks/base/core/java/android/view/KeyEvent.java for the full list.
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // _ANDROID_KEYCODES_H
|
||||
|
||||
/** @} */
|
||||
269
third_party/android_frameworks_native/include/android/looper.h
vendored
Normal file
269
third_party/android_frameworks_native/include/android/looper.h
vendored
Normal file
@@ -0,0 +1,269 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Looper
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file looper.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_LOOPER_H
|
||||
#define ANDROID_LOOPER_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct ALooper;
|
||||
/**
|
||||
* ALooper
|
||||
*
|
||||
* A looper is the state tracking an event loop for a thread.
|
||||
* Loopers do not define event structures or other such things; rather
|
||||
* they are a lower-level facility to attach one or more discrete objects
|
||||
* listening for an event. An "event" here is simply data available on
|
||||
* a file descriptor: each attached object has an associated file descriptor,
|
||||
* and waiting for "events" means (internally) polling on all of these file
|
||||
* descriptors until one or more of them have data available.
|
||||
*
|
||||
* A thread can have only one ALooper associated with it.
|
||||
*/
|
||||
typedef struct ALooper ALooper;
|
||||
|
||||
/**
|
||||
* Returns the looper associated with the calling thread, or NULL if
|
||||
* there is not one.
|
||||
*/
|
||||
ALooper* ALooper_forThread();
|
||||
|
||||
/** Option for for ALooper_prepare(). */
|
||||
enum {
|
||||
/**
|
||||
* This looper will accept calls to ALooper_addFd() that do not
|
||||
* have a callback (that is provide NULL for the callback). In
|
||||
* this case the caller of ALooper_pollOnce() or ALooper_pollAll()
|
||||
* MUST check the return from these functions to discover when
|
||||
* data is available on such fds and process it.
|
||||
*/
|
||||
ALOOPER_PREPARE_ALLOW_NON_CALLBACKS = 1<<0
|
||||
};
|
||||
|
||||
/**
|
||||
* Prepares a looper associated with the calling thread, and returns it.
|
||||
* If the thread already has a looper, it is returned. Otherwise, a new
|
||||
* one is created, associated with the thread, and returned.
|
||||
*
|
||||
* The opts may be ALOOPER_PREPARE_ALLOW_NON_CALLBACKS or 0.
|
||||
*/
|
||||
ALooper* ALooper_prepare(int opts);
|
||||
|
||||
/** Result from ALooper_pollOnce() and ALooper_pollAll(). */
|
||||
enum {
|
||||
/**
|
||||
* The poll was awoken using wake() before the timeout expired
|
||||
* and no callbacks were executed and no other file descriptors were ready.
|
||||
*/
|
||||
ALOOPER_POLL_WAKE = -1,
|
||||
|
||||
/**
|
||||
* Result from ALooper_pollOnce() and ALooper_pollAll():
|
||||
* One or more callbacks were executed.
|
||||
*/
|
||||
ALOOPER_POLL_CALLBACK = -2,
|
||||
|
||||
/**
|
||||
* Result from ALooper_pollOnce() and ALooper_pollAll():
|
||||
* The timeout expired.
|
||||
*/
|
||||
ALOOPER_POLL_TIMEOUT = -3,
|
||||
|
||||
/**
|
||||
* Result from ALooper_pollOnce() and ALooper_pollAll():
|
||||
* An error occurred.
|
||||
*/
|
||||
ALOOPER_POLL_ERROR = -4,
|
||||
};
|
||||
|
||||
/**
|
||||
* Acquire a reference on the given ALooper object. This prevents the object
|
||||
* from being deleted until the reference is removed. This is only needed
|
||||
* to safely hand an ALooper from one thread to another.
|
||||
*/
|
||||
void ALooper_acquire(ALooper* looper);
|
||||
|
||||
/**
|
||||
* Remove a reference that was previously acquired with ALooper_acquire().
|
||||
*/
|
||||
void ALooper_release(ALooper* looper);
|
||||
|
||||
/**
|
||||
* Flags for file descriptor events that a looper can monitor.
|
||||
*
|
||||
* These flag bits can be combined to monitor multiple events at once.
|
||||
*/
|
||||
enum {
|
||||
/**
|
||||
* The file descriptor is available for read operations.
|
||||
*/
|
||||
ALOOPER_EVENT_INPUT = 1 << 0,
|
||||
|
||||
/**
|
||||
* The file descriptor is available for write operations.
|
||||
*/
|
||||
ALOOPER_EVENT_OUTPUT = 1 << 1,
|
||||
|
||||
/**
|
||||
* The file descriptor has encountered an error condition.
|
||||
*
|
||||
* The looper always sends notifications about errors; it is not necessary
|
||||
* to specify this event flag in the requested event set.
|
||||
*/
|
||||
ALOOPER_EVENT_ERROR = 1 << 2,
|
||||
|
||||
/**
|
||||
* The file descriptor was hung up.
|
||||
* For example, indicates that the remote end of a pipe or socket was closed.
|
||||
*
|
||||
* The looper always sends notifications about hangups; it is not necessary
|
||||
* to specify this event flag in the requested event set.
|
||||
*/
|
||||
ALOOPER_EVENT_HANGUP = 1 << 3,
|
||||
|
||||
/**
|
||||
* The file descriptor is invalid.
|
||||
* For example, the file descriptor was closed prematurely.
|
||||
*
|
||||
* The looper always sends notifications about invalid file descriptors; it is not necessary
|
||||
* to specify this event flag in the requested event set.
|
||||
*/
|
||||
ALOOPER_EVENT_INVALID = 1 << 4,
|
||||
};
|
||||
|
||||
/**
|
||||
* For callback-based event loops, this is the prototype of the function
|
||||
* that is called when a file descriptor event occurs.
|
||||
* It is given the file descriptor it is associated with,
|
||||
* a bitmask of the poll events that were triggered (typically ALOOPER_EVENT_INPUT),
|
||||
* and the data pointer that was originally supplied.
|
||||
*
|
||||
* Implementations should return 1 to continue receiving callbacks, or 0
|
||||
* to have this file descriptor and callback unregistered from the looper.
|
||||
*/
|
||||
typedef int (*ALooper_callbackFunc)(int fd, int events, void* data);
|
||||
|
||||
/**
|
||||
* Waits for events to be available, with optional timeout in milliseconds.
|
||||
* Invokes callbacks for all file descriptors on which an event occurred.
|
||||
*
|
||||
* If the timeout is zero, returns immediately without blocking.
|
||||
* If the timeout is negative, waits indefinitely until an event appears.
|
||||
*
|
||||
* Returns ALOOPER_POLL_WAKE if the poll was awoken using wake() before
|
||||
* the timeout expired and no callbacks were invoked and no other file
|
||||
* descriptors were ready.
|
||||
*
|
||||
* Returns ALOOPER_POLL_CALLBACK if one or more callbacks were invoked.
|
||||
*
|
||||
* Returns ALOOPER_POLL_TIMEOUT if there was no data before the given
|
||||
* timeout expired.
|
||||
*
|
||||
* Returns ALOOPER_POLL_ERROR if an error occurred.
|
||||
*
|
||||
* Returns a value >= 0 containing an identifier (the same identifier
|
||||
* `ident` passed to ALooper_addFd()) if its file descriptor has data
|
||||
* and it has no callback function (requiring the caller here to
|
||||
* handle it). In this (and only this) case outFd, outEvents and
|
||||
* outData will contain the poll events and data associated with the
|
||||
* fd, otherwise they will be set to NULL.
|
||||
*
|
||||
* This method does not return until it has finished invoking the appropriate callbacks
|
||||
* for all file descriptors that were signalled.
|
||||
*/
|
||||
int ALooper_pollOnce(int timeoutMillis, int* outFd, int* outEvents, void** outData);
|
||||
|
||||
/**
|
||||
* Like ALooper_pollOnce(), but performs all pending callbacks until all
|
||||
* data has been consumed or a file descriptor is available with no callback.
|
||||
* This function will never return ALOOPER_POLL_CALLBACK.
|
||||
*/
|
||||
int ALooper_pollAll(int timeoutMillis, int* outFd, int* outEvents, void** outData);
|
||||
|
||||
/**
|
||||
* Wakes the poll asynchronously.
|
||||
*
|
||||
* This method can be called on any thread.
|
||||
* This method returns immediately.
|
||||
*/
|
||||
void ALooper_wake(ALooper* looper);
|
||||
|
||||
/**
|
||||
* Adds a new file descriptor to be polled by the looper.
|
||||
* If the same file descriptor was previously added, it is replaced.
|
||||
*
|
||||
* "fd" is the file descriptor to be added.
|
||||
* "ident" is an identifier for this event, which is returned from ALooper_pollOnce().
|
||||
* The identifier must be >= 0, or ALOOPER_POLL_CALLBACK if providing a non-NULL callback.
|
||||
* "events" are the poll events to wake up on. Typically this is ALOOPER_EVENT_INPUT.
|
||||
* "callback" is the function to call when there is an event on the file descriptor.
|
||||
* "data" is a private data pointer to supply to the callback.
|
||||
*
|
||||
* There are two main uses of this function:
|
||||
*
|
||||
* (1) If "callback" is non-NULL, then this function will be called when there is
|
||||
* data on the file descriptor. It should execute any events it has pending,
|
||||
* appropriately reading from the file descriptor. The 'ident' is ignored in this case.
|
||||
*
|
||||
* (2) If "callback" is NULL, the 'ident' will be returned by ALooper_pollOnce
|
||||
* when its file descriptor has data available, requiring the caller to take
|
||||
* care of processing it.
|
||||
*
|
||||
* Returns 1 if the file descriptor was added or -1 if an error occurred.
|
||||
*
|
||||
* This method can be called on any thread.
|
||||
* This method may block briefly if it needs to wake the poll.
|
||||
*/
|
||||
int ALooper_addFd(ALooper* looper, int fd, int ident, int events,
|
||||
ALooper_callbackFunc callback, void* data);
|
||||
|
||||
/**
|
||||
* Removes a previously added file descriptor from the looper.
|
||||
*
|
||||
* When this method returns, it is safe to close the file descriptor since the looper
|
||||
* will no longer have a reference to it. However, it is possible for the callback to
|
||||
* already be running or for it to run one last time if the file descriptor was already
|
||||
* signalled. Calling code is responsible for ensuring that this case is safely handled.
|
||||
* For example, if the callback takes care of removing itself during its own execution either
|
||||
* by returning 0 or by calling this method, then it can be guaranteed to not be invoked
|
||||
* again at any later time unless registered anew.
|
||||
*
|
||||
* Returns 1 if the file descriptor was removed, 0 if none was previously registered
|
||||
* or -1 if an error occurred.
|
||||
*
|
||||
* This method can be called on any thread.
|
||||
* This method may block briefly if it needs to wake the poll.
|
||||
*/
|
||||
int ALooper_removeFd(ALooper* looper, int fd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_LOOPER_H
|
||||
|
||||
/** @} */
|
||||
109
third_party/android_frameworks_native/include/android/multinetwork.h
vendored
Normal file
109
third_party/android_frameworks_native/include/android/multinetwork.h
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_MULTINETWORK_H
|
||||
#define ANDROID_MULTINETWORK_H
|
||||
|
||||
#include <netdb.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* The corresponding C type for android.net.Network#getNetworkHandle() return
|
||||
* values. The Java signed long value can be safely cast to a net_handle_t:
|
||||
*
|
||||
* [C] ((net_handle_t) java_long_network_handle)
|
||||
* [C++] static_cast<net_handle_t>(java_long_network_handle)
|
||||
*
|
||||
* as appropriate.
|
||||
*/
|
||||
typedef uint64_t net_handle_t;
|
||||
|
||||
/**
|
||||
* The value NETWORK_UNSPECIFIED indicates no specific network.
|
||||
*
|
||||
* For some functions (documented below), a previous binding may be cleared
|
||||
* by an invocation with NETWORK_UNSPECIFIED.
|
||||
*
|
||||
* Depending on the context it may indicate an error. It is expressly
|
||||
* not used to indicate some notion of the "current default network".
|
||||
*/
|
||||
#define NETWORK_UNSPECIFIED ((net_handle_t)0)
|
||||
|
||||
|
||||
/**
|
||||
* All functions below that return an int return 0 on success or -1
|
||||
* on failure with an appropriate errno value set.
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* Set the network to be used by the given socket file descriptor.
|
||||
*
|
||||
* To clear a previous socket binding invoke with NETWORK_UNSPECIFIED.
|
||||
*
|
||||
* This is the equivalent of:
|
||||
*
|
||||
* [ android.net.Network#bindSocket() ]
|
||||
* https://developer.android.com/reference/android/net/Network.html#bindSocket(java.net.Socket)
|
||||
*/
|
||||
int android_setsocknetwork(net_handle_t network, int fd);
|
||||
|
||||
|
||||
/**
|
||||
* Binds the current process to |network|. All sockets created in the future
|
||||
* (and not explicitly bound via android_setsocknetwork()) will be bound to
|
||||
* |network|. All host name resolutions will be limited to |network| as well.
|
||||
* Note that if the network identified by |network| ever disconnects, all
|
||||
* sockets created in this way will cease to work and all host name
|
||||
* resolutions will fail. This is by design so an application doesn't
|
||||
* accidentally use sockets it thinks are still bound to a particular network.
|
||||
*
|
||||
* To clear a previous process binding invoke with NETWORK_UNSPECIFIED.
|
||||
*
|
||||
* This is the equivalent of:
|
||||
*
|
||||
* [ android.net.ConnectivityManager#setProcessDefaultNetwork() ]
|
||||
* https://developer.android.com/reference/android/net/ConnectivityManager.html#setProcessDefaultNetwork(android.net.Network)
|
||||
*/
|
||||
int android_setprocnetwork(net_handle_t network);
|
||||
|
||||
|
||||
/**
|
||||
* Perform hostname resolution via the DNS servers associated with |network|.
|
||||
*
|
||||
* All arguments (apart from |network|) are used identically as those passed
|
||||
* to getaddrinfo(3). Return and error values are identical to those of
|
||||
* getaddrinfo(3), and in particular gai_strerror(3) can be used as expected.
|
||||
* Similar to getaddrinfo(3):
|
||||
* - |hints| may be NULL (in which case man page documented defaults apply)
|
||||
* - either |node| or |service| may be NULL, but not both
|
||||
* - |res| must not be NULL
|
||||
*
|
||||
* This is the equivalent of:
|
||||
*
|
||||
* [ android.net.Network#getAllByName() ]
|
||||
* https://developer.android.com/reference/android/net/Network.html#getAllByName(java.lang.String)
|
||||
*/
|
||||
int android_getaddrinfofornetwork(net_handle_t network,
|
||||
const char *node, const char *service,
|
||||
const struct addrinfo *hints, struct addrinfo **res);
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif // ANDROID_MULTINETWORK_H
|
||||
340
third_party/android_frameworks_native/include/android/native_activity.h
vendored
Normal file
340
third_party/android_frameworks_native/include/android/native_activity.h
vendored
Normal file
@@ -0,0 +1,340 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup NativeActivity Native Activity
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file native_activity.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_NATIVE_ACTIVITY_H
|
||||
#define ANDROID_NATIVE_ACTIVITY_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#include <android/asset_manager.h>
|
||||
#include <android/input.h>
|
||||
#include <android/native_window.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* {@link ANativeActivityCallbacks}
|
||||
*/
|
||||
struct ANativeActivityCallbacks;
|
||||
|
||||
/**
|
||||
* This structure defines the native side of an android.app.NativeActivity.
|
||||
* It is created by the framework, and handed to the application's native
|
||||
* code as it is being launched.
|
||||
*/
|
||||
typedef struct ANativeActivity {
|
||||
/**
|
||||
* Pointer to the callback function table of the native application.
|
||||
* You can set the functions here to your own callbacks. The callbacks
|
||||
* pointer itself here should not be changed; it is allocated and managed
|
||||
* for you by the framework.
|
||||
*/
|
||||
struct ANativeActivityCallbacks* callbacks;
|
||||
|
||||
/**
|
||||
* The global handle on the process's Java VM.
|
||||
*/
|
||||
JavaVM* vm;
|
||||
|
||||
/**
|
||||
* JNI context for the main thread of the app. Note that this field
|
||||
* can ONLY be used from the main thread of the process; that is, the
|
||||
* thread that calls into the ANativeActivityCallbacks.
|
||||
*/
|
||||
JNIEnv* env;
|
||||
|
||||
/**
|
||||
* The NativeActivity object handle.
|
||||
*
|
||||
* IMPORTANT NOTE: This member is mis-named. It should really be named
|
||||
* 'activity' instead of 'clazz', since it's a reference to the
|
||||
* NativeActivity instance created by the system for you.
|
||||
*
|
||||
* We unfortunately cannot change this without breaking NDK
|
||||
* source-compatibility.
|
||||
*/
|
||||
jobject clazz;
|
||||
|
||||
/**
|
||||
* Path to this application's internal data directory.
|
||||
*/
|
||||
const char* internalDataPath;
|
||||
|
||||
/**
|
||||
* Path to this application's external (removable/mountable) data directory.
|
||||
*/
|
||||
const char* externalDataPath;
|
||||
|
||||
/**
|
||||
* The platform's SDK version code.
|
||||
*/
|
||||
int32_t sdkVersion;
|
||||
|
||||
/**
|
||||
* This is the native instance of the application. It is not used by
|
||||
* the framework, but can be set by the application to its own instance
|
||||
* state.
|
||||
*/
|
||||
void* instance;
|
||||
|
||||
/**
|
||||
* Pointer to the Asset Manager instance for the application. The application
|
||||
* uses this to access binary assets bundled inside its own .apk file.
|
||||
*/
|
||||
AAssetManager* assetManager;
|
||||
|
||||
/**
|
||||
* Available starting with Honeycomb: path to the directory containing
|
||||
* the application's OBB files (if any). If the app doesn't have any
|
||||
* OBB files, this directory may not exist.
|
||||
*/
|
||||
const char* obbPath;
|
||||
} ANativeActivity;
|
||||
|
||||
/**
|
||||
* These are the callbacks the framework makes into a native application.
|
||||
* All of these callbacks happen on the main thread of the application.
|
||||
* By default, all callbacks are NULL; set to a pointer to your own function
|
||||
* to have it called.
|
||||
*/
|
||||
typedef struct ANativeActivityCallbacks {
|
||||
/**
|
||||
* NativeActivity has started. See Java documentation for Activity.onStart()
|
||||
* for more information.
|
||||
*/
|
||||
void (*onStart)(ANativeActivity* activity);
|
||||
|
||||
/**
|
||||
* NativeActivity has resumed. See Java documentation for Activity.onResume()
|
||||
* for more information.
|
||||
*/
|
||||
void (*onResume)(ANativeActivity* activity);
|
||||
|
||||
/**
|
||||
* Framework is asking NativeActivity to save its current instance state.
|
||||
* See Java documentation for Activity.onSaveInstanceState() for more
|
||||
* information. The returned pointer needs to be created with malloc();
|
||||
* the framework will call free() on it for you. You also must fill in
|
||||
* outSize with the number of bytes in the allocation. Note that the
|
||||
* saved state will be persisted, so it can not contain any active
|
||||
* entities (pointers to memory, file descriptors, etc).
|
||||
*/
|
||||
void* (*onSaveInstanceState)(ANativeActivity* activity, size_t* outSize);
|
||||
|
||||
/**
|
||||
* NativeActivity has paused. See Java documentation for Activity.onPause()
|
||||
* for more information.
|
||||
*/
|
||||
void (*onPause)(ANativeActivity* activity);
|
||||
|
||||
/**
|
||||
* NativeActivity has stopped. See Java documentation for Activity.onStop()
|
||||
* for more information.
|
||||
*/
|
||||
void (*onStop)(ANativeActivity* activity);
|
||||
|
||||
/**
|
||||
* NativeActivity is being destroyed. See Java documentation for Activity.onDestroy()
|
||||
* for more information.
|
||||
*/
|
||||
void (*onDestroy)(ANativeActivity* activity);
|
||||
|
||||
/**
|
||||
* Focus has changed in this NativeActivity's window. This is often used,
|
||||
* for example, to pause a game when it loses input focus.
|
||||
*/
|
||||
void (*onWindowFocusChanged)(ANativeActivity* activity, int hasFocus);
|
||||
|
||||
/**
|
||||
* The drawing window for this native activity has been created. You
|
||||
* can use the given native window object to start drawing.
|
||||
*/
|
||||
void (*onNativeWindowCreated)(ANativeActivity* activity, ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* The drawing window for this native activity has been resized. You should
|
||||
* retrieve the new size from the window and ensure that your rendering in
|
||||
* it now matches.
|
||||
*/
|
||||
void (*onNativeWindowResized)(ANativeActivity* activity, ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* The drawing window for this native activity needs to be redrawn. To avoid
|
||||
* transient artifacts during screen changes (such resizing after rotation),
|
||||
* applications should not return from this function until they have finished
|
||||
* drawing their window in its current state.
|
||||
*/
|
||||
void (*onNativeWindowRedrawNeeded)(ANativeActivity* activity, ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* The drawing window for this native activity is going to be destroyed.
|
||||
* You MUST ensure that you do not touch the window object after returning
|
||||
* from this function: in the common case of drawing to the window from
|
||||
* another thread, that means the implementation of this callback must
|
||||
* properly synchronize with the other thread to stop its drawing before
|
||||
* returning from here.
|
||||
*/
|
||||
void (*onNativeWindowDestroyed)(ANativeActivity* activity, ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* The input queue for this native activity's window has been created.
|
||||
* You can use the given input queue to start retrieving input events.
|
||||
*/
|
||||
void (*onInputQueueCreated)(ANativeActivity* activity, AInputQueue* queue);
|
||||
|
||||
/**
|
||||
* The input queue for this native activity's window is being destroyed.
|
||||
* You should no longer try to reference this object upon returning from this
|
||||
* function.
|
||||
*/
|
||||
void (*onInputQueueDestroyed)(ANativeActivity* activity, AInputQueue* queue);
|
||||
|
||||
/**
|
||||
* The rectangle in the window in which content should be placed has changed.
|
||||
*/
|
||||
void (*onContentRectChanged)(ANativeActivity* activity, const ARect* rect);
|
||||
|
||||
/**
|
||||
* The current device AConfiguration has changed. The new configuration can
|
||||
* be retrieved from assetManager.
|
||||
*/
|
||||
void (*onConfigurationChanged)(ANativeActivity* activity);
|
||||
|
||||
/**
|
||||
* The system is running low on memory. Use this callback to release
|
||||
* resources you do not need, to help the system avoid killing more
|
||||
* important processes.
|
||||
*/
|
||||
void (*onLowMemory)(ANativeActivity* activity);
|
||||
} ANativeActivityCallbacks;
|
||||
|
||||
/**
|
||||
* This is the function that must be in the native code to instantiate the
|
||||
* application's native activity. It is called with the activity instance (see
|
||||
* above); if the code is being instantiated from a previously saved instance,
|
||||
* the savedState will be non-NULL and point to the saved data. You must make
|
||||
* any copy of this data you need -- it will be released after you return from
|
||||
* this function.
|
||||
*/
|
||||
typedef void ANativeActivity_createFunc(ANativeActivity* activity,
|
||||
void* savedState, size_t savedStateSize);
|
||||
|
||||
/**
|
||||
* The name of the function that NativeInstance looks for when launching its
|
||||
* native code. This is the default function that is used, you can specify
|
||||
* "android.app.func_name" string meta-data in your manifest to use a different
|
||||
* function.
|
||||
*/
|
||||
extern ANativeActivity_createFunc ANativeActivity_onCreate;
|
||||
|
||||
/**
|
||||
* Finish the given activity. Its finish() method will be called, causing it
|
||||
* to be stopped and destroyed. Note that this method can be called from
|
||||
* *any* thread; it will send a message to the main thread of the process
|
||||
* where the Java finish call will take place.
|
||||
*/
|
||||
void ANativeActivity_finish(ANativeActivity* activity);
|
||||
|
||||
/**
|
||||
* Change the window format of the given activity. Calls getWindow().setFormat()
|
||||
* of the given activity. Note that this method can be called from
|
||||
* *any* thread; it will send a message to the main thread of the process
|
||||
* where the Java finish call will take place.
|
||||
*/
|
||||
void ANativeActivity_setWindowFormat(ANativeActivity* activity, int32_t format);
|
||||
|
||||
/**
|
||||
* Change the window flags of the given activity. Calls getWindow().setFlags()
|
||||
* of the given activity. Note that this method can be called from
|
||||
* *any* thread; it will send a message to the main thread of the process
|
||||
* where the Java finish call will take place. See window.h for flag constants.
|
||||
*/
|
||||
void ANativeActivity_setWindowFlags(ANativeActivity* activity,
|
||||
uint32_t addFlags, uint32_t removeFlags);
|
||||
|
||||
/**
|
||||
* Flags for ANativeActivity_showSoftInput; see the Java InputMethodManager
|
||||
* API for documentation.
|
||||
*/
|
||||
enum {
|
||||
/**
|
||||
* Implicit request to show the input window, not as the result
|
||||
* of a direct request by the user.
|
||||
*/
|
||||
ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT = 0x0001,
|
||||
|
||||
/**
|
||||
* The user has forced the input method open (such as by
|
||||
* long-pressing menu) so it should not be closed until they
|
||||
* explicitly do so.
|
||||
*/
|
||||
ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED = 0x0002,
|
||||
};
|
||||
|
||||
/**
|
||||
* Show the IME while in the given activity. Calls InputMethodManager.showSoftInput()
|
||||
* for the given activity. Note that this method can be called from
|
||||
* *any* thread; it will send a message to the main thread of the process
|
||||
* where the Java finish call will take place.
|
||||
*/
|
||||
void ANativeActivity_showSoftInput(ANativeActivity* activity, uint32_t flags);
|
||||
|
||||
/**
|
||||
* Flags for ANativeActivity_hideSoftInput; see the Java InputMethodManager
|
||||
* API for documentation.
|
||||
*/
|
||||
enum {
|
||||
/**
|
||||
* The soft input window should only be hidden if it was not
|
||||
* explicitly shown by the user.
|
||||
*/
|
||||
ANATIVEACTIVITY_HIDE_SOFT_INPUT_IMPLICIT_ONLY = 0x0001,
|
||||
/**
|
||||
* The soft input window should normally be hidden, unless it was
|
||||
* originally shown with {@link ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED}.
|
||||
*/
|
||||
ANATIVEACTIVITY_HIDE_SOFT_INPUT_NOT_ALWAYS = 0x0002,
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide the IME while in the given activity. Calls InputMethodManager.hideSoftInput()
|
||||
* for the given activity. Note that this method can be called from
|
||||
* *any* thread; it will send a message to the main thread of the process
|
||||
* where the Java finish call will take place.
|
||||
*/
|
||||
void ANativeActivity_hideSoftInput(ANativeActivity* activity, uint32_t flags);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_NATIVE_ACTIVITY_H
|
||||
|
||||
/** @} */
|
||||
150
third_party/android_frameworks_native/include/android/native_window.h
vendored
Normal file
150
third_party/android_frameworks_native/include/android/native_window.h
vendored
Normal file
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup NativeActivity Native Activity
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file native_window.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_NATIVE_WINDOW_H
|
||||
#define ANDROID_NATIVE_WINDOW_H
|
||||
|
||||
#include <android/rect.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Pixel formats that a window can use.
|
||||
*/
|
||||
enum {
|
||||
/** Red: 8 bits, Green: 8 bits, Blue: 8 bits, Alpha: 8 bits. **/
|
||||
WINDOW_FORMAT_RGBA_8888 = 1,
|
||||
/** Red: 8 bits, Green: 8 bits, Blue: 8 bits, Unused: 8 bits. **/
|
||||
WINDOW_FORMAT_RGBX_8888 = 2,
|
||||
/** Red: 5 bits, Green: 6 bits, Blue: 5 bits. **/
|
||||
WINDOW_FORMAT_RGB_565 = 4,
|
||||
};
|
||||
|
||||
struct ANativeWindow;
|
||||
/**
|
||||
* {@link ANativeWindow} is opaque type that provides access to a native window.
|
||||
*
|
||||
* A pointer can be obtained using ANativeWindow_fromSurface().
|
||||
*/
|
||||
typedef struct ANativeWindow ANativeWindow;
|
||||
|
||||
/**
|
||||
* {@link ANativeWindow} is a struct that represents a windows buffer.
|
||||
*
|
||||
* A pointer can be obtained using ANativeWindow_lock().
|
||||
*/
|
||||
typedef struct ANativeWindow_Buffer {
|
||||
// The number of pixels that are show horizontally.
|
||||
int32_t width;
|
||||
|
||||
// The number of pixels that are shown vertically.
|
||||
int32_t height;
|
||||
|
||||
// The number of *pixels* that a line in the buffer takes in
|
||||
// memory. This may be >= width.
|
||||
int32_t stride;
|
||||
|
||||
// The format of the buffer. One of WINDOW_FORMAT_*
|
||||
int32_t format;
|
||||
|
||||
// The actual bits.
|
||||
void* bits;
|
||||
|
||||
// Do not touch.
|
||||
uint32_t reserved[6];
|
||||
} ANativeWindow_Buffer;
|
||||
|
||||
/**
|
||||
* Acquire a reference on the given ANativeWindow object. This prevents the object
|
||||
* from being deleted until the reference is removed.
|
||||
*/
|
||||
void ANativeWindow_acquire(ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* Remove a reference that was previously acquired with ANativeWindow_acquire().
|
||||
*/
|
||||
void ANativeWindow_release(ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* Return the current width in pixels of the window surface. Returns a
|
||||
* negative value on error.
|
||||
*/
|
||||
int32_t ANativeWindow_getWidth(ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* Return the current height in pixels of the window surface. Returns a
|
||||
* negative value on error.
|
||||
*/
|
||||
int32_t ANativeWindow_getHeight(ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* Return the current pixel format of the window surface. Returns a
|
||||
* negative value on error.
|
||||
*/
|
||||
int32_t ANativeWindow_getFormat(ANativeWindow* window);
|
||||
|
||||
/**
|
||||
* Change the format and size of the window buffers.
|
||||
*
|
||||
* The width and height control the number of pixels in the buffers, not the
|
||||
* dimensions of the window on screen. If these are different than the
|
||||
* window's physical size, then it buffer will be scaled to match that size
|
||||
* when compositing it to the screen.
|
||||
*
|
||||
* For all of these parameters, if 0 is supplied then the window's base
|
||||
* value will come back in force.
|
||||
*
|
||||
* width and height must be either both zero or both non-zero.
|
||||
*
|
||||
*/
|
||||
int32_t ANativeWindow_setBuffersGeometry(ANativeWindow* window,
|
||||
int32_t width, int32_t height, int32_t format);
|
||||
|
||||
/**
|
||||
* Lock the window's next drawing surface for writing.
|
||||
* inOutDirtyBounds is used as an in/out parameter, upon entering the
|
||||
* function, it contains the dirty region, that is, the region the caller
|
||||
* intends to redraw. When the function returns, inOutDirtyBounds is updated
|
||||
* with the actual area the caller needs to redraw -- this region is often
|
||||
* extended by ANativeWindow_lock.
|
||||
*/
|
||||
int32_t ANativeWindow_lock(ANativeWindow* window, ANativeWindow_Buffer* outBuffer,
|
||||
ARect* inOutDirtyBounds);
|
||||
|
||||
/**
|
||||
* Unlock the window's drawing surface after previously locking it,
|
||||
* posting the new buffer to the display.
|
||||
*/
|
||||
int32_t ANativeWindow_unlockAndPost(ANativeWindow* window);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_NATIVE_WINDOW_H
|
||||
|
||||
/** @} */
|
||||
51
third_party/android_frameworks_native/include/android/native_window_jni.h
vendored
Normal file
51
third_party/android_frameworks_native/include/android/native_window_jni.h
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup NativeActivity Native Activity
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file native_window_jni.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_NATIVE_WINDOW_JNI_H
|
||||
#define ANDROID_NATIVE_WINDOW_JNI_H
|
||||
|
||||
#include <android/native_window.h>
|
||||
|
||||
#include <jni.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Return the ANativeWindow associated with a Java Surface object,
|
||||
* for interacting with it through native code. This acquires a reference
|
||||
* on the ANativeWindow that is returned; be sure to use ANativeWindow_release()
|
||||
* when done with it so that it doesn't leak.
|
||||
*/
|
||||
ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_NATIVE_WINDOW_H
|
||||
|
||||
/** @} */
|
||||
76
third_party/android_frameworks_native/include/android/obb.h
vendored
Normal file
76
third_party/android_frameworks_native/include/android/obb.h
vendored
Normal file
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Storage
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file obb.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_OBB_H
|
||||
#define ANDROID_OBB_H
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct AObbInfo;
|
||||
/** {@link AObbInfo} is an opaque type representing information for obb storage. */
|
||||
typedef struct AObbInfo AObbInfo;
|
||||
|
||||
/** Flag for an obb file, returned by AObbInfo_getFlags(). */
|
||||
enum {
|
||||
/** overlay */
|
||||
AOBBINFO_OVERLAY = 0x0001,
|
||||
};
|
||||
|
||||
/**
|
||||
* Scan an OBB and get information about it.
|
||||
*/
|
||||
AObbInfo* AObbScanner_getObbInfo(const char* filename);
|
||||
|
||||
/**
|
||||
* Destroy the AObbInfo object. You must call this when finished with the object.
|
||||
*/
|
||||
void AObbInfo_delete(AObbInfo* obbInfo);
|
||||
|
||||
/**
|
||||
* Get the package name for the OBB.
|
||||
*/
|
||||
const char* AObbInfo_getPackageName(AObbInfo* obbInfo);
|
||||
|
||||
/**
|
||||
* Get the version of an OBB file.
|
||||
*/
|
||||
int32_t AObbInfo_getVersion(AObbInfo* obbInfo);
|
||||
|
||||
/**
|
||||
* Get the flags of an OBB file.
|
||||
*/
|
||||
int32_t AObbInfo_getFlags(AObbInfo* obbInfo);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_OBB_H
|
||||
|
||||
/** @} */
|
||||
62
third_party/android_frameworks_native/include/android/rect.h
vendored
Normal file
62
third_party/android_frameworks_native/include/android/rect.h
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup NativeActivity Native Activity
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file rect.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_RECT_H
|
||||
#define ANDROID_RECT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* {@link ARect} is a struct that represents a rectangular window area.
|
||||
*
|
||||
* It is used with {@link
|
||||
* ANativeActivityCallbacks::onContentRectChanged} event callback and
|
||||
* ANativeWindow_lock() function.
|
||||
*/
|
||||
typedef struct ARect {
|
||||
#ifdef __cplusplus
|
||||
typedef int32_t value_type;
|
||||
#endif
|
||||
/** left position */
|
||||
int32_t left;
|
||||
/** top position */
|
||||
int32_t top;
|
||||
/** left position */
|
||||
int32_t right;
|
||||
/** bottom position */
|
||||
int32_t bottom;
|
||||
} ARect;
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_RECT_H
|
||||
|
||||
/** @} */
|
||||
475
third_party/android_frameworks_native/include/android/sensor.h
vendored
Normal file
475
third_party/android_frameworks_native/include/android/sensor.h
vendored
Normal file
@@ -0,0 +1,475 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Sensor
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file sensor.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_SENSOR_H
|
||||
#define ANDROID_SENSOR_H
|
||||
|
||||
/******************************************************************
|
||||
*
|
||||
* IMPORTANT NOTICE:
|
||||
*
|
||||
* This file is part of Android's set of stable system headers
|
||||
* exposed by the Android NDK (Native Development Kit).
|
||||
*
|
||||
* Third-party source AND binary code relies on the definitions
|
||||
* here to be FROZEN ON ALL UPCOMING PLATFORM RELEASES.
|
||||
*
|
||||
* - DO NOT MODIFY ENUMS (EXCEPT IF YOU ADD NEW 32-BIT VALUES)
|
||||
* - DO NOT MODIFY CONSTANTS OR FUNCTIONAL MACROS
|
||||
* - DO NOT CHANGE THE SIGNATURE OF FUNCTIONS IN ANY WAY
|
||||
* - DO NOT CHANGE THE LAYOUT OR SIZE OF STRUCTURES
|
||||
*/
|
||||
|
||||
/**
|
||||
* Structures and functions to receive and process sensor events in
|
||||
* native code.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <android/looper.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Sensor types.
|
||||
* (keep in sync with hardware/sensor.h)
|
||||
*/
|
||||
enum {
|
||||
/**
|
||||
* {@link ASENSOR_TYPE_ACCELEROMETER}
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
* All values are in SI units (m/s^2) and measure the acceleration of the
|
||||
* device minus the force of gravity.
|
||||
*/
|
||||
ASENSOR_TYPE_ACCELEROMETER = 1,
|
||||
/**
|
||||
* {@link ASENSOR_TYPE_MAGNETIC_FIELD}
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
* All values are in micro-Tesla (uT) and measure the geomagnetic
|
||||
* field in the X, Y and Z axis.
|
||||
*/
|
||||
ASENSOR_TYPE_MAGNETIC_FIELD = 2,
|
||||
/**
|
||||
* {@link ASENSOR_TYPE_GYROSCOPE}
|
||||
* reporting-mode: continuous
|
||||
*
|
||||
* All values are in radians/second and measure the rate of rotation
|
||||
* around the X, Y and Z axis.
|
||||
*/
|
||||
ASENSOR_TYPE_GYROSCOPE = 4,
|
||||
/**
|
||||
* {@link ASENSOR_TYPE_LIGHT}
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
* The light sensor value is returned in SI lux units.
|
||||
*/
|
||||
ASENSOR_TYPE_LIGHT = 5,
|
||||
/**
|
||||
* {@link ASENSOR_TYPE_PROXIMITY}
|
||||
* reporting-mode: on-change
|
||||
*
|
||||
* The proximity sensor which turns the screen off and back on during calls is the
|
||||
* wake-up proximity sensor. Implement wake-up proximity sensor before implementing
|
||||
* a non wake-up proximity sensor. For the wake-up proximity sensor set the flag
|
||||
* SENSOR_FLAG_WAKE_UP.
|
||||
* The value corresponds to the distance to the nearest object in centimeters.
|
||||
*/
|
||||
ASENSOR_TYPE_PROXIMITY = 8
|
||||
};
|
||||
|
||||
/**
|
||||
* Sensor accuracy measure.
|
||||
*/
|
||||
enum {
|
||||
/** no contact */
|
||||
ASENSOR_STATUS_NO_CONTACT = -1,
|
||||
/** unreliable */
|
||||
ASENSOR_STATUS_UNRELIABLE = 0,
|
||||
/** low accuracy */
|
||||
ASENSOR_STATUS_ACCURACY_LOW = 1,
|
||||
/** medium accuracy */
|
||||
ASENSOR_STATUS_ACCURACY_MEDIUM = 2,
|
||||
/** high accuracy */
|
||||
ASENSOR_STATUS_ACCURACY_HIGH = 3
|
||||
};
|
||||
|
||||
/**
|
||||
* Sensor Reporting Modes.
|
||||
*/
|
||||
enum {
|
||||
/** continuous reporting */
|
||||
AREPORTING_MODE_CONTINUOUS = 0,
|
||||
/** reporting on change */
|
||||
AREPORTING_MODE_ON_CHANGE = 1,
|
||||
/** on shot reporting */
|
||||
AREPORTING_MODE_ONE_SHOT = 2,
|
||||
/** special trigger reporting */
|
||||
AREPORTING_MODE_SPECIAL_TRIGGER = 3
|
||||
};
|
||||
|
||||
/*
|
||||
* A few useful constants
|
||||
*/
|
||||
|
||||
/** Earth's gravity in m/s^2 */
|
||||
#define ASENSOR_STANDARD_GRAVITY (9.80665f)
|
||||
/** Maximum magnetic field on Earth's surface in uT */
|
||||
#define ASENSOR_MAGNETIC_FIELD_EARTH_MAX (60.0f)
|
||||
/** Minimum magnetic field on Earth's surface in uT*/
|
||||
#define ASENSOR_MAGNETIC_FIELD_EARTH_MIN (30.0f)
|
||||
|
||||
/**
|
||||
* A sensor event.
|
||||
*/
|
||||
|
||||
/* NOTE: Must match hardware/sensors.h */
|
||||
typedef struct ASensorVector {
|
||||
union {
|
||||
float v[3];
|
||||
struct {
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
};
|
||||
struct {
|
||||
float azimuth;
|
||||
float pitch;
|
||||
float roll;
|
||||
};
|
||||
};
|
||||
int8_t status;
|
||||
uint8_t reserved[3];
|
||||
} ASensorVector;
|
||||
|
||||
typedef struct AMetaDataEvent {
|
||||
int32_t what;
|
||||
int32_t sensor;
|
||||
} AMetaDataEvent;
|
||||
|
||||
typedef struct AUncalibratedEvent {
|
||||
union {
|
||||
float uncalib[3];
|
||||
struct {
|
||||
float x_uncalib;
|
||||
float y_uncalib;
|
||||
float z_uncalib;
|
||||
};
|
||||
};
|
||||
union {
|
||||
float bias[3];
|
||||
struct {
|
||||
float x_bias;
|
||||
float y_bias;
|
||||
float z_bias;
|
||||
};
|
||||
};
|
||||
} AUncalibratedEvent;
|
||||
|
||||
typedef struct AHeartRateEvent {
|
||||
float bpm;
|
||||
int8_t status;
|
||||
} AHeartRateEvent;
|
||||
|
||||
/* NOTE: Must match hardware/sensors.h */
|
||||
typedef struct ASensorEvent {
|
||||
int32_t version; /* sizeof(struct ASensorEvent) */
|
||||
int32_t sensor;
|
||||
int32_t type;
|
||||
int32_t reserved0;
|
||||
int64_t timestamp;
|
||||
union {
|
||||
union {
|
||||
float data[16];
|
||||
ASensorVector vector;
|
||||
ASensorVector acceleration;
|
||||
ASensorVector magnetic;
|
||||
float temperature;
|
||||
float distance;
|
||||
float light;
|
||||
float pressure;
|
||||
float relative_humidity;
|
||||
AUncalibratedEvent uncalibrated_gyro;
|
||||
AUncalibratedEvent uncalibrated_magnetic;
|
||||
AMetaDataEvent meta_data;
|
||||
AHeartRateEvent heart_rate;
|
||||
};
|
||||
union {
|
||||
uint64_t data[8];
|
||||
uint64_t step_counter;
|
||||
} u64;
|
||||
};
|
||||
|
||||
uint32_t flags;
|
||||
int32_t reserved1[3];
|
||||
} ASensorEvent;
|
||||
|
||||
struct ASensorManager;
|
||||
/**
|
||||
* {@link ASensorManager} is an opaque type to manage sensors and
|
||||
* events queues.
|
||||
*
|
||||
* {@link ASensorManager} is a singleton that can be obtained using
|
||||
* ASensorManager_getInstance().
|
||||
*
|
||||
* This file provides a set of functions that uses {@link
|
||||
* ASensorManager} to access and list hardware sensors, and
|
||||
* create and destroy event queues:
|
||||
* - ASensorManager_getSensorList()
|
||||
* - ASensorManager_getDefaultSensor()
|
||||
* - ASensorManager_getDefaultSensorEx()
|
||||
* - ASensorManager_createEventQueue()
|
||||
* - ASensorManager_destroyEventQueue()
|
||||
*/
|
||||
typedef struct ASensorManager ASensorManager;
|
||||
|
||||
|
||||
struct ASensorEventQueue;
|
||||
/**
|
||||
* {@link ASensorEventQueue} is an opaque type that provides access to
|
||||
* {@link ASensorEvent} from hardware sensors.
|
||||
*
|
||||
* A new {@link ASensorEventQueue} can be obtained using ASensorManager_createEventQueue().
|
||||
*
|
||||
* This file provides a set of functions to enable and disable
|
||||
* sensors, check and get events, and set event rates on a {@link
|
||||
* ASensorEventQueue}.
|
||||
* - ASensorEventQueue_enableSensor()
|
||||
* - ASensorEventQueue_disableSensor()
|
||||
* - ASensorEventQueue_hasEvents()
|
||||
* - ASensorEventQueue_getEvents()
|
||||
* - ASensorEventQueue_setEventRate()
|
||||
*/
|
||||
typedef struct ASensorEventQueue ASensorEventQueue;
|
||||
|
||||
struct ASensor;
|
||||
/**
|
||||
* {@link ASensor} is an opaque type that provides information about
|
||||
* an hardware sensors.
|
||||
*
|
||||
* A {@link ASensor} pointer can be obtained using
|
||||
* ASensorManager_getDefaultSensor(),
|
||||
* ASensorManager_getDefaultSensorEx() or from a {@link ASensorList}.
|
||||
*
|
||||
* This file provides a set of functions to access properties of a
|
||||
* {@link ASensor}:
|
||||
* - ASensor_getName()
|
||||
* - ASensor_getVendor()
|
||||
* - ASensor_getType()
|
||||
* - ASensor_getResolution()
|
||||
* - ASensor_getMinDelay()
|
||||
* - ASensor_getFifoMaxEventCount()
|
||||
* - ASensor_getFifoReservedEventCount()
|
||||
* - ASensor_getStringType()
|
||||
* - ASensor_getReportingMode()
|
||||
* - ASensor_isWakeUpSensor()
|
||||
*/
|
||||
typedef struct ASensor ASensor;
|
||||
/**
|
||||
* {@link ASensorRef} is a type for constant pointers to {@link ASensor}.
|
||||
*
|
||||
* This is used to define entry in {@link ASensorList} arrays.
|
||||
*/
|
||||
typedef ASensor const* ASensorRef;
|
||||
/**
|
||||
* {@link ASensorList} is an array of reference to {@link ASensor}.
|
||||
*
|
||||
* A {@link ASensorList} can be initialized using ASensorManager_getSensorList().
|
||||
*/
|
||||
typedef ASensorRef const* ASensorList;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* Get a reference to the sensor manager. ASensorManager is a singleton
|
||||
* per package as different packages may have access to different sensors.
|
||||
*
|
||||
* Deprecated: Use ASensorManager_getInstanceForPackage(const char*) instead.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ASensorManager* sensorManager = ASensorManager_getInstance();
|
||||
*
|
||||
*/
|
||||
__attribute__ ((deprecated)) ASensorManager* ASensorManager_getInstance();
|
||||
|
||||
/*
|
||||
* Get a reference to the sensor manager. ASensorManager is a singleton
|
||||
* per package as different packages may have access to different sensors.
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* ASensorManager* sensorManager = ASensorManager_getInstanceForPackage("foo.bar.baz");
|
||||
*
|
||||
*/
|
||||
ASensorManager* ASensorManager_getInstanceForPackage(const char* packageName);
|
||||
|
||||
/**
|
||||
* Returns the list of available sensors.
|
||||
*/
|
||||
int ASensorManager_getSensorList(ASensorManager* manager, ASensorList* list);
|
||||
|
||||
/**
|
||||
* Returns the default sensor for the given type, or NULL if no sensor
|
||||
* of that type exists.
|
||||
*/
|
||||
ASensor const* ASensorManager_getDefaultSensor(ASensorManager* manager, int type);
|
||||
|
||||
/**
|
||||
* Returns the default sensor with the given type and wakeUp properties or NULL if no sensor
|
||||
* of this type and wakeUp properties exists.
|
||||
*/
|
||||
ASensor const* ASensorManager_getDefaultSensorEx(ASensorManager* manager, int type,
|
||||
bool wakeUp);
|
||||
|
||||
/**
|
||||
* Creates a new sensor event queue and associate it with a looper.
|
||||
*
|
||||
* "ident" is a identifier for the events that will be returned when
|
||||
* calling ALooper_pollOnce(). The identifier must be >= 0, or
|
||||
* ALOOPER_POLL_CALLBACK if providing a non-NULL callback.
|
||||
*/
|
||||
ASensorEventQueue* ASensorManager_createEventQueue(ASensorManager* manager,
|
||||
ALooper* looper, int ident, ALooper_callbackFunc callback, void* data);
|
||||
|
||||
/**
|
||||
* Destroys the event queue and free all resources associated to it.
|
||||
*/
|
||||
int ASensorManager_destroyEventQueue(ASensorManager* manager, ASensorEventQueue* queue);
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* Enable the selected sensor. Returns a negative error code on failure.
|
||||
*/
|
||||
int ASensorEventQueue_enableSensor(ASensorEventQueue* queue, ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Disable the selected sensor. Returns a negative error code on failure.
|
||||
*/
|
||||
int ASensorEventQueue_disableSensor(ASensorEventQueue* queue, ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Sets the delivery rate of events in microseconds for the given sensor.
|
||||
* Note that this is a hint only, generally event will arrive at a higher
|
||||
* rate. It is an error to set a rate inferior to the value returned by
|
||||
* ASensor_getMinDelay().
|
||||
* Returns a negative error code on failure.
|
||||
*/
|
||||
int ASensorEventQueue_setEventRate(ASensorEventQueue* queue, ASensor const* sensor, int32_t usec);
|
||||
|
||||
/**
|
||||
* Returns true if there are one or more events available in the
|
||||
* sensor queue. Returns 1 if the queue has events; 0 if
|
||||
* it does not have events; and a negative value if there is an error.
|
||||
*/
|
||||
int ASensorEventQueue_hasEvents(ASensorEventQueue* queue);
|
||||
|
||||
/**
|
||||
* Returns the next available events from the queue. Returns a negative
|
||||
* value if no events are available or an error has occurred, otherwise
|
||||
* the number of events returned.
|
||||
*
|
||||
* Examples:
|
||||
* ASensorEvent event;
|
||||
* ssize_t numEvent = ASensorEventQueue_getEvents(queue, &event, 1);
|
||||
*
|
||||
* ASensorEvent eventBuffer[8];
|
||||
* ssize_t numEvent = ASensorEventQueue_getEvents(queue, eventBuffer, 8);
|
||||
*
|
||||
*/
|
||||
ssize_t ASensorEventQueue_getEvents(ASensorEventQueue* queue,
|
||||
ASensorEvent* events, size_t count);
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
/**
|
||||
* Returns this sensor's name (non localized)
|
||||
*/
|
||||
const char* ASensor_getName(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns this sensor's vendor's name (non localized)
|
||||
*/
|
||||
const char* ASensor_getVendor(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Return this sensor's type
|
||||
*/
|
||||
int ASensor_getType(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns this sensors's resolution
|
||||
*/
|
||||
float ASensor_getResolution(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns the minimum delay allowed between events in microseconds.
|
||||
* A value of zero means that this sensor doesn't report events at a
|
||||
* constant rate, but rather only when a new data is available.
|
||||
*/
|
||||
int ASensor_getMinDelay(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns the maximum size of batches for this sensor. Batches will often be
|
||||
* smaller, as the hardware fifo might be used for other sensors.
|
||||
*/
|
||||
int ASensor_getFifoMaxEventCount(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns the hardware batch fifo size reserved to this sensor.
|
||||
*/
|
||||
int ASensor_getFifoReservedEventCount(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns this sensor's string type.
|
||||
*/
|
||||
const char* ASensor_getStringType(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns the reporting mode for this sensor. One of AREPORTING_MODE_* constants.
|
||||
*/
|
||||
int ASensor_getReportingMode(ASensor const* sensor);
|
||||
|
||||
/**
|
||||
* Returns true if this is a wake up sensor, false otherwise.
|
||||
*/
|
||||
bool ASensor_isWakeUpSensor(ASensor const* sensor);
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_SENSOR_H
|
||||
|
||||
/** @} */
|
||||
154
third_party/android_frameworks_native/include/android/storage_manager.h
vendored
Normal file
154
third_party/android_frameworks_native/include/android/storage_manager.h
vendored
Normal file
@@ -0,0 +1,154 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup Storage
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file storage_manager.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_STORAGE_MANAGER_H
|
||||
#define ANDROID_STORAGE_MANAGER_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct AStorageManager;
|
||||
/**
|
||||
* {@link AStorageManager} manages application OBB storage, a pointer
|
||||
* can be obtained with AStorageManager_new().
|
||||
*/
|
||||
typedef struct AStorageManager AStorageManager;
|
||||
|
||||
/**
|
||||
* The different states of a OBB storage passed to AStorageManager_obbCallbackFunc().
|
||||
*/
|
||||
enum {
|
||||
/**
|
||||
* The OBB container is now mounted and ready for use. Can be returned
|
||||
* as the status for callbacks made during asynchronous OBB actions.
|
||||
*/
|
||||
AOBB_STATE_MOUNTED = 1,
|
||||
|
||||
/**
|
||||
* The OBB container is now unmounted and not usable. Can be returned
|
||||
* as the status for callbacks made during asynchronous OBB actions.
|
||||
*/
|
||||
AOBB_STATE_UNMOUNTED = 2,
|
||||
|
||||
/**
|
||||
* There was an internal system error encountered while trying to
|
||||
* mount the OBB. Can be returned as the status for callbacks made
|
||||
* during asynchronous OBB actions.
|
||||
*/
|
||||
AOBB_STATE_ERROR_INTERNAL = 20,
|
||||
|
||||
/**
|
||||
* The OBB could not be mounted by the system. Can be returned as the
|
||||
* status for callbacks made during asynchronous OBB actions.
|
||||
*/
|
||||
AOBB_STATE_ERROR_COULD_NOT_MOUNT = 21,
|
||||
|
||||
/**
|
||||
* The OBB could not be unmounted. This most likely indicates that a
|
||||
* file is in use on the OBB. Can be returned as the status for
|
||||
* callbacks made during asynchronous OBB actions.
|
||||
*/
|
||||
AOBB_STATE_ERROR_COULD_NOT_UNMOUNT = 22,
|
||||
|
||||
/**
|
||||
* A call was made to unmount the OBB when it was not mounted. Can be
|
||||
* returned as the status for callbacks made during asynchronous OBB
|
||||
* actions.
|
||||
*/
|
||||
AOBB_STATE_ERROR_NOT_MOUNTED = 23,
|
||||
|
||||
/**
|
||||
* The OBB has already been mounted. Can be returned as the status for
|
||||
* callbacks made during asynchronous OBB actions.
|
||||
*/
|
||||
AOBB_STATE_ERROR_ALREADY_MOUNTED = 24,
|
||||
|
||||
/**
|
||||
* The current application does not have permission to use this OBB.
|
||||
* This could be because the OBB indicates it's owned by a different
|
||||
* package. Can be returned as the status for callbacks made during
|
||||
* asynchronous OBB actions.
|
||||
*/
|
||||
AOBB_STATE_ERROR_PERMISSION_DENIED = 25,
|
||||
};
|
||||
|
||||
/**
|
||||
* Obtains a new instance of AStorageManager.
|
||||
*/
|
||||
AStorageManager* AStorageManager_new();
|
||||
|
||||
/**
|
||||
* Release AStorageManager instance.
|
||||
*/
|
||||
void AStorageManager_delete(AStorageManager* mgr);
|
||||
|
||||
/**
|
||||
* Callback function for asynchronous calls made on OBB files.
|
||||
*
|
||||
* "state" is one of the following constants:
|
||||
* - {@link AOBB_STATE_MOUNTED}
|
||||
* - {@link AOBB_STATE_UNMOUNTED}
|
||||
* - {@link AOBB_STATE_ERROR_INTERNAL}
|
||||
* - {@link AOBB_STATE_ERROR_COULD_NOT_MOUNT}
|
||||
* - {@link AOBB_STATE_ERROR_COULD_NOT_UNMOUNT}
|
||||
* - {@link AOBB_STATE_ERROR_NOT_MOUNTED}
|
||||
* - {@link AOBB_STATE_ERROR_ALREADY_MOUNTED}
|
||||
* - {@link AOBB_STATE_ERROR_PERMISSION_DENIED}
|
||||
*/
|
||||
typedef void (*AStorageManager_obbCallbackFunc)(const char* filename, const int32_t state, void* data);
|
||||
|
||||
/**
|
||||
* Attempts to mount an OBB file. This is an asynchronous operation.
|
||||
*/
|
||||
void AStorageManager_mountObb(AStorageManager* mgr, const char* filename, const char* key,
|
||||
AStorageManager_obbCallbackFunc cb, void* data);
|
||||
|
||||
/**
|
||||
* Attempts to unmount an OBB file. This is an asynchronous operation.
|
||||
*/
|
||||
void AStorageManager_unmountObb(AStorageManager* mgr, const char* filename, const int force,
|
||||
AStorageManager_obbCallbackFunc cb, void* data);
|
||||
|
||||
/**
|
||||
* Check whether an OBB is mounted.
|
||||
*/
|
||||
int AStorageManager_isObbMounted(AStorageManager* mgr, const char* filename);
|
||||
|
||||
/**
|
||||
* Get the mounted path for an OBB.
|
||||
*/
|
||||
const char* AStorageManager_getMountedObbPath(AStorageManager* mgr, const char* filename);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_STORAGE_MANAGER_H
|
||||
|
||||
/** @} */
|
||||
55
third_party/android_frameworks_native/include/android/trace.h
vendored
Normal file
55
third_party/android_frameworks_native/include/android/trace.h
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (C) 2015 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ANDROID_NATIVE_TRACE_H
|
||||
#define ANDROID_NATIVE_TRACE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Returns true if tracing is enabled. Use this signal to avoid expensive computation only necessary
|
||||
* when tracing is enabled.
|
||||
*/
|
||||
bool ATrace_isEnabled();
|
||||
|
||||
/**
|
||||
* Writes a tracing message to indicate that the given section of code has begun. This call must be
|
||||
* followed by a corresponding call to endSection() on the same thread.
|
||||
*
|
||||
* Note: At this time the vertical bar character '|' and newline character '\n' are used internally
|
||||
* by the tracing mechanism. If sectionName contains these characters they will be replaced with a
|
||||
* space character in the trace.
|
||||
*/
|
||||
void ATrace_beginSection(const char* sectionName);
|
||||
|
||||
/**
|
||||
* Writes a tracing message to indicate that a given section of code has ended. This call must be
|
||||
* preceeded by a corresponding call to beginSection(char*) on the same thread. Calling this method
|
||||
* will mark the end of the most recently begun section of code, so care must be taken to ensure
|
||||
* that beginSection / endSection pairs are properly nested and called from the same thread.
|
||||
*/
|
||||
void ATrace_endSection();
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_NATIVE_TRACE_H
|
||||
224
third_party/android_frameworks_native/include/android/window.h
vendored
Normal file
224
third_party/android_frameworks_native/include/android/window.h
vendored
Normal file
@@ -0,0 +1,224 @@
|
||||
/*
|
||||
* Copyright (C) 2010 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup NativeActivity Native Activity
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file window.h
|
||||
*/
|
||||
|
||||
#ifndef ANDROID_WINDOW_H
|
||||
#define ANDROID_WINDOW_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Window flags, as per the Java API at android.view.WindowManager.LayoutParams.
|
||||
*/
|
||||
enum {
|
||||
/**
|
||||
* As long as this window is visible to the user, allow the lock
|
||||
* screen to activate while the screen is on. This can be used
|
||||
* independently, or in combination with {@link
|
||||
* AWINDOW_FLAG_KEEP_SCREEN_ON} and/or {@link
|
||||
* AWINDOW_FLAG_SHOW_WHEN_LOCKED}
|
||||
*/
|
||||
AWINDOW_FLAG_ALLOW_LOCK_WHILE_SCREEN_ON = 0x00000001,
|
||||
/** Everything behind this window will be dimmed. */
|
||||
AWINDOW_FLAG_DIM_BEHIND = 0x00000002,
|
||||
/**
|
||||
* Blur everything behind this window.
|
||||
* @deprecated Blurring is no longer supported.
|
||||
*/
|
||||
AWINDOW_FLAG_BLUR_BEHIND = 0x00000004,
|
||||
/**
|
||||
* This window won't ever get key input focus, so the
|
||||
* user can not send key or other button events to it. Those will
|
||||
* instead go to whatever focusable window is behind it. This flag
|
||||
* will also enable {@link AWINDOW_FLAG_NOT_TOUCH_MODAL} whether or not that
|
||||
* is explicitly set.
|
||||
*
|
||||
* Setting this flag also implies that the window will not need to
|
||||
* interact with
|
||||
* a soft input method, so it will be Z-ordered and positioned
|
||||
* independently of any active input method (typically this means it
|
||||
* gets Z-ordered on top of the input method, so it can use the full
|
||||
* screen for its content and cover the input method if needed. You
|
||||
* can use {@link AWINDOW_FLAG_ALT_FOCUSABLE_IM} to modify this behavior.
|
||||
*/
|
||||
AWINDOW_FLAG_NOT_FOCUSABLE = 0x00000008,
|
||||
/** this window can never receive touch events. */
|
||||
AWINDOW_FLAG_NOT_TOUCHABLE = 0x00000010,
|
||||
/**
|
||||
* Even when this window is focusable (its
|
||||
* {@link AWINDOW_FLAG_NOT_FOCUSABLE} is not set), allow any pointer events
|
||||
* outside of the window to be sent to the windows behind it. Otherwise
|
||||
* it will consume all pointer events itself, regardless of whether they
|
||||
* are inside of the window.
|
||||
*/
|
||||
AWINDOW_FLAG_NOT_TOUCH_MODAL = 0x00000020,
|
||||
/**
|
||||
* When set, if the device is asleep when the touch
|
||||
* screen is pressed, you will receive this first touch event. Usually
|
||||
* the first touch event is consumed by the system since the user can
|
||||
* not see what they are pressing on.
|
||||
*
|
||||
* @deprecated This flag has no effect.
|
||||
*/
|
||||
AWINDOW_FLAG_TOUCHABLE_WHEN_WAKING = 0x00000040,
|
||||
/**
|
||||
* As long as this window is visible to the user, keep
|
||||
* the device's screen turned on and bright.
|
||||
*/
|
||||
AWINDOW_FLAG_KEEP_SCREEN_ON = 0x00000080,
|
||||
/**
|
||||
* Place the window within the entire screen, ignoring
|
||||
* decorations around the border (such as the status bar). The
|
||||
* window must correctly position its contents to take the screen
|
||||
* decoration into account.
|
||||
*/
|
||||
AWINDOW_FLAG_LAYOUT_IN_SCREEN = 0x00000100,
|
||||
/** allow window to extend outside of the screen. */
|
||||
AWINDOW_FLAG_LAYOUT_NO_LIMITS = 0x00000200,
|
||||
/**
|
||||
* Hide all screen decorations (such as the status
|
||||
* bar) while this window is displayed. This allows the window to
|
||||
* use the entire display space for itself -- the status bar will
|
||||
* be hidden when an app window with this flag set is on the top
|
||||
* layer. A fullscreen window will ignore a value of {@link
|
||||
* AWINDOW_SOFT_INPUT_ADJUST_RESIZE}; the window will stay
|
||||
* fullscreen and will not resize.
|
||||
*/
|
||||
AWINDOW_FLAG_FULLSCREEN = 0x00000400,
|
||||
/**
|
||||
* Override {@link AWINDOW_FLAG_FULLSCREEN} and force the
|
||||
* screen decorations (such as the status bar) to be shown.
|
||||
*/
|
||||
AWINDOW_FLAG_FORCE_NOT_FULLSCREEN = 0x00000800,
|
||||
/**
|
||||
* Turn on dithering when compositing this window to
|
||||
* the screen.
|
||||
* @deprecated This flag is no longer used.
|
||||
*/
|
||||
AWINDOW_FLAG_DITHER = 0x00001000,
|
||||
/**
|
||||
* Treat the content of the window as secure, preventing
|
||||
* it from appearing in screenshots or from being viewed on non-secure
|
||||
* displays.
|
||||
*/
|
||||
AWINDOW_FLAG_SECURE = 0x00002000,
|
||||
/**
|
||||
* A special mode where the layout parameters are used
|
||||
* to perform scaling of the surface when it is composited to the
|
||||
* screen.
|
||||
*/
|
||||
AWINDOW_FLAG_SCALED = 0x00004000,
|
||||
/**
|
||||
* Intended for windows that will often be used when the user is
|
||||
* holding the screen against their face, it will aggressively
|
||||
* filter the event stream to prevent unintended presses in this
|
||||
* situation that may not be desired for a particular window, when
|
||||
* such an event stream is detected, the application will receive
|
||||
* a {@link AMOTION_EVENT_ACTION_CANCEL} to indicate this so
|
||||
* applications can handle this accordingly by taking no action on
|
||||
* the event until the finger is released.
|
||||
*/
|
||||
AWINDOW_FLAG_IGNORE_CHEEK_PRESSES = 0x00008000,
|
||||
/**
|
||||
* A special option only for use in combination with
|
||||
* {@link AWINDOW_FLAG_LAYOUT_IN_SCREEN}. When requesting layout in the
|
||||
* screen your window may appear on top of or behind screen decorations
|
||||
* such as the status bar. By also including this flag, the window
|
||||
* manager will report the inset rectangle needed to ensure your
|
||||
* content is not covered by screen decorations.
|
||||
*/
|
||||
AWINDOW_FLAG_LAYOUT_INSET_DECOR = 0x00010000,
|
||||
/**
|
||||
* Invert the state of {@link AWINDOW_FLAG_NOT_FOCUSABLE} with
|
||||
* respect to how this window interacts with the current method.
|
||||
* That is, if FLAG_NOT_FOCUSABLE is set and this flag is set,
|
||||
* then the window will behave as if it needs to interact with the
|
||||
* input method and thus be placed behind/away from it; if {@link
|
||||
* AWINDOW_FLAG_NOT_FOCUSABLE} is not set and this flag is set,
|
||||
* then the window will behave as if it doesn't need to interact
|
||||
* with the input method and can be placed to use more space and
|
||||
* cover the input method.
|
||||
*/
|
||||
AWINDOW_FLAG_ALT_FOCUSABLE_IM = 0x00020000,
|
||||
/**
|
||||
* If you have set {@link AWINDOW_FLAG_NOT_TOUCH_MODAL}, you
|
||||
* can set this flag to receive a single special MotionEvent with
|
||||
* the action
|
||||
* {@link AMOTION_EVENT_ACTION_OUTSIDE} for
|
||||
* touches that occur outside of your window. Note that you will not
|
||||
* receive the full down/move/up gesture, only the location of the
|
||||
* first down as an {@link AMOTION_EVENT_ACTION_OUTSIDE}.
|
||||
*/
|
||||
AWINDOW_FLAG_WATCH_OUTSIDE_TOUCH = 0x00040000,
|
||||
/**
|
||||
* Special flag to let windows be shown when the screen
|
||||
* is locked. This will let application windows take precedence over
|
||||
* key guard or any other lock screens. Can be used with
|
||||
* {@link AWINDOW_FLAG_KEEP_SCREEN_ON} to turn screen on and display windows
|
||||
* directly before showing the key guard window. Can be used with
|
||||
* {@link AWINDOW_FLAG_DISMISS_KEYGUARD} to automatically fully dismisss
|
||||
* non-secure keyguards. This flag only applies to the top-most
|
||||
* full-screen window.
|
||||
*/
|
||||
AWINDOW_FLAG_SHOW_WHEN_LOCKED = 0x00080000,
|
||||
/**
|
||||
* Ask that the system wallpaper be shown behind
|
||||
* your window. The window surface must be translucent to be able
|
||||
* to actually see the wallpaper behind it; this flag just ensures
|
||||
* that the wallpaper surface will be there if this window actually
|
||||
* has translucent regions.
|
||||
*/
|
||||
AWINDOW_FLAG_SHOW_WALLPAPER = 0x00100000,
|
||||
/**
|
||||
* When set as a window is being added or made
|
||||
* visible, once the window has been shown then the system will
|
||||
* poke the power manager's user activity (as if the user had woken
|
||||
* up the device) to turn the screen on.
|
||||
*/
|
||||
AWINDOW_FLAG_TURN_SCREEN_ON = 0x00200000,
|
||||
/**
|
||||
* When set the window will cause the keyguard to
|
||||
* be dismissed, only if it is not a secure lock keyguard. Because such
|
||||
* a keyguard is not needed for security, it will never re-appear if
|
||||
* the user navigates to another window (in contrast to
|
||||
* {@link AWINDOW_FLAG_SHOW_WHEN_LOCKED}, which will only temporarily
|
||||
* hide both secure and non-secure keyguards but ensure they reappear
|
||||
* when the user moves to another UI that doesn't hide them).
|
||||
* If the keyguard is currently active and is secure (requires an
|
||||
* unlock pattern) than the user will still need to confirm it before
|
||||
* seeing this window, unless {@link AWINDOW_FLAG_SHOW_WHEN_LOCKED} has
|
||||
* also been set.
|
||||
*/
|
||||
AWINDOW_FLAG_DISMISS_KEYGUARD = 0x00400000,
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif // ANDROID_WINDOW_H
|
||||
|
||||
/** @} */
|
||||
Reference in New Issue
Block a user