summaryrefslogtreecommitdiffstats
path: root/9/platforms/android-14/arch-x86/usr/include/android
diff options
context:
space:
mode:
authorAndrew Hsieh <andrewhsieh@google.com>2013-11-11 15:54:42 +0800
committerAndrew Hsieh <andrewhsieh@google.com>2013-11-11 15:58:28 +0800
commite02e042b38d282df98814709a68d40cbcf614216 (patch)
tree7b4397b72d0afef5d4030209383f2723da918389 /9/platforms/android-14/arch-x86/usr/include/android
parent80382fb8411116a733a37ba4f9cc4659427e6894 (diff)
downloadprebuilts_ndk-e02e042b38d282df98814709a68d40cbcf614216.zip
prebuilts_ndk-e02e042b38d282df98814709a68d40cbcf614216.tar.gz
prebuilts_ndk-e02e042b38d282df98814709a68d40cbcf614216.tar.bz2
Refresh prebuilts/ndk/9/platforms with r9b+, part 1/2
Part 1: modify the existing API level Change-Id: Ib14a58f8c1d52d7e5ec95a2f3d64077046c6c0fe
Diffstat (limited to '9/platforms/android-14/arch-x86/usr/include/android')
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h41
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/configuration.h42
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/input.h240
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/keycodes.h96
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/looper.h3
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/native_activity.h7
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/native_window.h11
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h8
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/rect.h2
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/sensor.h2
-rw-r--r--9/platforms/android-14/arch-x86/usr/include/android/tts.h313
11 files changed, 717 insertions, 48 deletions
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h b/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h
index 57dd7cb..f5df46b 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/asset_manager.h
@@ -18,8 +18,6 @@
#ifndef ANDROID_ASSET_MANAGER_H
#define ANDROID_ASSET_MANAGER_H
-#include <sys/types.h>
-
#ifdef __cplusplus
extern "C" {
#endif
@@ -96,6 +94,17 @@ int AAsset_read(AAsset* asset, void* buf, size_t count);
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);
@@ -113,12 +122,27 @@ const void* AAsset_getBuffer(AAsset* asset);
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);
/**
- * Open a new file descriptor that can be used to read the asset data.
+ * 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).
@@ -126,6 +150,17 @@ off_t AAsset_getRemainingLength(AAsset* asset);
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).
*/
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/configuration.h b/9/platforms/android-14/arch-x86/usr/include/android/configuration.h
index 99e8f97..2444c4b 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/configuration.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/configuration.h
@@ -40,6 +40,7 @@ enum {
ACONFIGURATION_DENSITY_DEFAULT = 0,
ACONFIGURATION_DENSITY_LOW = 120,
ACONFIGURATION_DENSITY_MEDIUM = 160,
+ ACONFIGURATION_DENSITY_TV = 213,
ACONFIGURATION_DENSITY_HIGH = 240,
ACONFIGURATION_DENSITY_NONE = 0xffff,
@@ -77,11 +78,18 @@ enum {
ACONFIGURATION_UI_MODE_TYPE_NORMAL = 0x01,
ACONFIGURATION_UI_MODE_TYPE_DESK = 0x02,
ACONFIGURATION_UI_MODE_TYPE_CAR = 0x03,
+ ACONFIGURATION_UI_MODE_TYPE_TELEVISION = 0x04,
ACONFIGURATION_UI_MODE_NIGHT_ANY = 0x00,
ACONFIGURATION_UI_MODE_NIGHT_NO = 0x1,
ACONFIGURATION_UI_MODE_NIGHT_YES = 0x2,
+ ACONFIGURATION_SCREEN_WIDTH_DP_ANY = 0x0000,
+
+ ACONFIGURATION_SCREEN_HEIGHT_DP_ANY = 0x0000,
+
+ ACONFIGURATION_SMALLEST_SCREEN_WIDTH_DP_ANY = 0x0000,
+
ACONFIGURATION_MCC = 0x0001,
ACONFIGURATION_MNC = 0x0002,
ACONFIGURATION_LOCALE = 0x0004,
@@ -95,6 +103,7 @@ enum {
ACONFIGURATION_VERSION = 0x0400,
ACONFIGURATION_SCREEN_LAYOUT = 0x0800,
ACONFIGURATION_UI_MODE = 0x1000,
+ ACONFIGURATION_SMALLEST_SCREEN_SIZE = 0x2000,
};
/**
@@ -286,6 +295,39 @@ int32_t AConfiguration_getUiModeNight(AConfiguration* config);
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);
+
+/**
* Perform a diff between two configurations. Returns a bit mask of
* ACONFIGURATION_* constants, each bit set meaning that configuration element
* is different between them.
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/input.h b/9/platforms/android-14/arch-x86/usr/include/android/input.h
index b9dffad..ac7bcc0 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/input.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/input.h
@@ -93,7 +93,37 @@ enum {
AMETA_SHIFT_RIGHT_ON = 0x80,
/* This mask is used to check whether the SYM meta key is pressed. */
- AMETA_SYM_ON = 0x04
+ AMETA_SYM_ON = 0x04,
+
+ /* This mask is used to check whether the FUNCTION meta key is pressed. */
+ AMETA_FUNCTION_ON = 0x08,
+
+ /* This mask is used to check whether one of the CTRL meta keys is pressed. */
+ AMETA_CTRL_ON = 0x1000,
+
+ /* This mask is used to check whether the left CTRL meta key is pressed. */
+ AMETA_CTRL_LEFT_ON = 0x2000,
+
+ /* This mask is used to check whether the right CTRL meta key is pressed. */
+ AMETA_CTRL_RIGHT_ON = 0x4000,
+
+ /* This mask is used to check whether one of the META meta keys is pressed. */
+ AMETA_META_ON = 0x10000,
+
+ /* This mask is used to check whether the left META meta key is pressed. */
+ AMETA_META_LEFT_ON = 0x20000,
+
+ /* This mask is used to check whether the right META meta key is pressed. */
+ AMETA_META_RIGHT_ON = 0x40000,
+
+ /* This mask is used to check whether the CAPS LOCK meta key is on. */
+ AMETA_CAPS_LOCK_ON = 0x100000,
+
+ /* This mask is used to check whether the NUM LOCK meta key is on. */
+ AMETA_NUM_LOCK_ON = 0x200000,
+
+ /* This mask is used to check whether the SCROLL LOCK meta key is on. */
+ AMETA_SCROLL_LOCK_ON = 0x400000,
};
/*
@@ -185,7 +215,15 @@ enum {
* tracked from its initial down. That is, somebody requested that tracking
* started on the key down and a long press has not caused
* the tracking to be canceled. */
- AKEY_EVENT_FLAG_TRACKING = 0x200
+ AKEY_EVENT_FLAG_TRACKING = 0x200,
+
+ /* Set when a key event has been synthesized to implement default behavior
+ * for an event that the application did not handle.
+ * Fallback key events are generated by unhandled trackball motions
+ * (to emulate a directional keypad) and by certain unhandled key presses
+ * that are declared in the key map (such as special function numeric keypad
+ * keys when numlock is off). */
+ AKEY_EVENT_FLAG_FALLBACK = 0x400,
};
/*
@@ -243,7 +281,30 @@ enum {
/* A non-primary pointer has gone up.
* The bits in AMOTION_EVENT_ACTION_POINTER_INDEX_MASK indicate which pointer changed.
*/
- AMOTION_EVENT_ACTION_POINTER_UP = 6
+ AMOTION_EVENT_ACTION_POINTER_UP = 6,
+
+ /* A change happened but the pointer is not down (unlike AMOTION_EVENT_ACTION_MOVE).
+ * The motion contains the most recent point, as well as any intermediate points since
+ * the last hover move event.
+ */
+ AMOTION_EVENT_ACTION_HOVER_MOVE = 7,
+
+ /* The motion event contains relative vertical and/or horizontal scroll offsets.
+ * Use getAxisValue to retrieve the information from AMOTION_EVENT_AXIS_VSCROLL
+ * and AMOTION_EVENT_AXIS_HSCROLL.
+ * The pointer may or may not be down when this event is dispatched.
+ * This action is always delivered to the winder under the pointer, which
+ * may not be the window currently touched.
+ */
+ AMOTION_EVENT_ACTION_SCROLL = 8,
+
+ /* The pointer is not down but has entered the boundaries of a window or view.
+ */
+ AMOTION_EVENT_ACTION_HOVER_ENTER = 9,
+
+ /* The pointer is not down but has exited the boundaries of a window or view.
+ */
+ AMOTION_EVENT_ACTION_HOVER_EXIT = 10,
};
/*
@@ -283,6 +344,82 @@ enum {
};
/*
+ * Constants that identify each individual axis of a motion event.
+ * Refer to the documentation on the MotionEvent class for descriptions of each axis.
+ */
+enum {
+ AMOTION_EVENT_AXIS_X = 0,
+ AMOTION_EVENT_AXIS_Y = 1,
+ AMOTION_EVENT_AXIS_PRESSURE = 2,
+ AMOTION_EVENT_AXIS_SIZE = 3,
+ AMOTION_EVENT_AXIS_TOUCH_MAJOR = 4,
+ AMOTION_EVENT_AXIS_TOUCH_MINOR = 5,
+ AMOTION_EVENT_AXIS_TOOL_MAJOR = 6,
+ AMOTION_EVENT_AXIS_TOOL_MINOR = 7,
+ AMOTION_EVENT_AXIS_ORIENTATION = 8,
+ AMOTION_EVENT_AXIS_VSCROLL = 9,
+ AMOTION_EVENT_AXIS_HSCROLL = 10,
+ AMOTION_EVENT_AXIS_Z = 11,
+ AMOTION_EVENT_AXIS_RX = 12,
+ AMOTION_EVENT_AXIS_RY = 13,
+ AMOTION_EVENT_AXIS_RZ = 14,
+ AMOTION_EVENT_AXIS_HAT_X = 15,
+ AMOTION_EVENT_AXIS_HAT_Y = 16,
+ AMOTION_EVENT_AXIS_LTRIGGER = 17,
+ AMOTION_EVENT_AXIS_RTRIGGER = 18,
+ AMOTION_EVENT_AXIS_THROTTLE = 19,
+ AMOTION_EVENT_AXIS_RUDDER = 20,
+ AMOTION_EVENT_AXIS_WHEEL = 21,
+ AMOTION_EVENT_AXIS_GAS = 22,
+ AMOTION_EVENT_AXIS_BRAKE = 23,
+ AMOTION_EVENT_AXIS_DISTANCE = 24,
+ AMOTION_EVENT_AXIS_TILT = 25,
+ AMOTION_EVENT_AXIS_GENERIC_1 = 32,
+ AMOTION_EVENT_AXIS_GENERIC_2 = 33,
+ AMOTION_EVENT_AXIS_GENERIC_3 = 34,
+ AMOTION_EVENT_AXIS_GENERIC_4 = 35,
+ AMOTION_EVENT_AXIS_GENERIC_5 = 36,
+ AMOTION_EVENT_AXIS_GENERIC_6 = 37,
+ AMOTION_EVENT_AXIS_GENERIC_7 = 38,
+ AMOTION_EVENT_AXIS_GENERIC_8 = 39,
+ AMOTION_EVENT_AXIS_GENERIC_9 = 40,
+ AMOTION_EVENT_AXIS_GENERIC_10 = 41,
+ AMOTION_EVENT_AXIS_GENERIC_11 = 42,
+ AMOTION_EVENT_AXIS_GENERIC_12 = 43,
+ AMOTION_EVENT_AXIS_GENERIC_13 = 44,
+ AMOTION_EVENT_AXIS_GENERIC_14 = 45,
+ AMOTION_EVENT_AXIS_GENERIC_15 = 46,
+ AMOTION_EVENT_AXIS_GENERIC_16 = 47,
+
+ // NOTE: If you add a new axis here you must also add it to several other files.
+ // Refer to frameworks/base/core/java/android/view/MotionEvent.java for the full list.
+};
+
+/*
+ * Constants that identify buttons that are associated with motion events.
+ * Refer to the documentation on the MotionEvent class for descriptions of each button.
+ */
+enum {
+ AMOTION_EVENT_BUTTON_PRIMARY = 1 << 0,
+ AMOTION_EVENT_BUTTON_SECONDARY = 1 << 1,
+ AMOTION_EVENT_BUTTON_TERTIARY = 1 << 2,
+ AMOTION_EVENT_BUTTON_BACK = 1 << 3,
+ AMOTION_EVENT_BUTTON_FORWARD = 1 << 4,
+};
+
+/*
+ * Constants that identify tool types.
+ * Refer to the documentation on the MotionEvent class for descriptions of each tool type.
+ */
+enum {
+ AMOTION_EVENT_TOOL_TYPE_UNKNOWN = 0,
+ AMOTION_EVENT_TOOL_TYPE_FINGER = 1,
+ AMOTION_EVENT_TOOL_TYPE_STYLUS = 2,
+ AMOTION_EVENT_TOOL_TYPE_MOUSE = 3,
+ AMOTION_EVENT_TOOL_TYPE_ERASER = 4,
+};
+
+/*
* Input sources.
*
* Refer to the documentation on android.view.InputDevice for more details about input sources
@@ -295,6 +432,7 @@ enum {
AINPUT_SOURCE_CLASS_POINTER = 0x00000002,
AINPUT_SOURCE_CLASS_NAVIGATION = 0x00000004,
AINPUT_SOURCE_CLASS_POSITION = 0x00000008,
+ AINPUT_SOURCE_CLASS_JOYSTICK = 0x00000010,
};
enum {
@@ -302,10 +440,13 @@ enum {
AINPUT_SOURCE_KEYBOARD = 0x00000100 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_DPAD = 0x00000200 | AINPUT_SOURCE_CLASS_BUTTON,
+ AINPUT_SOURCE_GAMEPAD = 0x00000400 | AINPUT_SOURCE_CLASS_BUTTON,
AINPUT_SOURCE_TOUCHSCREEN = 0x00001000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_MOUSE = 0x00002000 | AINPUT_SOURCE_CLASS_POINTER,
+ AINPUT_SOURCE_STYLUS = 0x00004000 | AINPUT_SOURCE_CLASS_POINTER,
AINPUT_SOURCE_TRACKBALL = 0x00010000 | AINPUT_SOURCE_CLASS_NAVIGATION,
AINPUT_SOURCE_TOUCHPAD = 0x00100000 | AINPUT_SOURCE_CLASS_POSITION,
+ AINPUT_SOURCE_JOYSTICK = 0x01000000 | AINPUT_SOURCE_CLASS_JOYSTICK,
AINPUT_SOURCE_ANY = 0xffffff00,
};
@@ -327,18 +468,20 @@ enum {
*
* Refer to the documentation on android.view.InputDevice for more details about input sources
* and their correct interpretation.
+ *
+ * DEPRECATION NOTICE: These constants are deprecated. Use AMOTION_EVENT_AXIS_* constants instead.
*/
enum {
- AINPUT_MOTION_RANGE_X = 0,
- AINPUT_MOTION_RANGE_Y = 1,
- AINPUT_MOTION_RANGE_PRESSURE = 2,
- AINPUT_MOTION_RANGE_SIZE = 3,
- AINPUT_MOTION_RANGE_TOUCH_MAJOR = 4,
- AINPUT_MOTION_RANGE_TOUCH_MINOR = 5,
- AINPUT_MOTION_RANGE_TOOL_MAJOR = 6,
- AINPUT_MOTION_RANGE_TOOL_MINOR = 7,
- AINPUT_MOTION_RANGE_ORIENTATION = 8,
-};
+ AINPUT_MOTION_RANGE_X = AMOTION_EVENT_AXIS_X,
+ AINPUT_MOTION_RANGE_Y = AMOTION_EVENT_AXIS_Y,
+ AINPUT_MOTION_RANGE_PRESSURE = AMOTION_EVENT_AXIS_PRESSURE,
+ AINPUT_MOTION_RANGE_SIZE = AMOTION_EVENT_AXIS_SIZE,
+ AINPUT_MOTION_RANGE_TOUCH_MAJOR = AMOTION_EVENT_AXIS_TOUCH_MAJOR,
+ AINPUT_MOTION_RANGE_TOUCH_MINOR = AMOTION_EVENT_AXIS_TOUCH_MINOR,
+ AINPUT_MOTION_RANGE_TOOL_MAJOR = AMOTION_EVENT_AXIS_TOOL_MAJOR,
+ AINPUT_MOTION_RANGE_TOOL_MINOR = AMOTION_EVENT_AXIS_TOOL_MINOR,
+ AINPUT_MOTION_RANGE_ORIENTATION = AMOTION_EVENT_AXIS_ORIENTATION,
+} __attribute__ ((deprecated));
/*
@@ -416,6 +559,9 @@ int32_t AMotionEvent_getFlags(const AInputEvent* motion_event);
* event was generated. */
int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event);
+/* Get the button state of all buttons that are pressed. */
+int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event);
+
/* Get a bitfield indicating which edges, if any, were touched by this motion event.
* For touch events, clients can use this to determine if the user's finger was
* touching the edge of the display. */
@@ -433,61 +579,66 @@ int64_t AMotionEvent_getEventTime(const AInputEvent* motion_event);
* For touch events on the screen, this is the delta that was added to the raw
* screen coordinates to adjust for the absolute position of the containing windows
* and views. */
-float AMotionEvent_getXOffset(const AInputEvent* motion_event);
+float AMotionEvent_getXOffset(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the precision of the Y coordinates being reported.
* For touch events on the screen, this is the delta that was added to the raw
* screen coordinates to adjust for the absolute position of the containing windows
* and views. */
-float AMotionEvent_getYOffset(const AInputEvent* motion_event);
+float AMotionEvent_getYOffset(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the precision of the X coordinates being reported.
* You can multiply this number with an X coordinate sample to find the
* actual hardware value of the X coordinate. */
-float AMotionEvent_getXPrecision(const AInputEvent* motion_event);
+float AMotionEvent_getXPrecision(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the precision of the Y coordinates being reported.
* You can multiply this number with a Y coordinate sample to find the
* actual hardware value of the Y coordinate. */
-float AMotionEvent_getYPrecision(const AInputEvent* motion_event);
+float AMotionEvent_getYPrecision(const AInputEvent* motion_event) __NDK_FPABI__;
/* Get the number of pointers of data contained in this event.
* Always >= 1. */
size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event);
/* Get the pointer identifier associated with a particular pointer
- * data index is this event. The identifier tells you the actual pointer
+ * data index in this event. The identifier tells you the actual pointer
* number associated with the data, accounting for individual pointers
* going up and down since the start of the current gesture. */
int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index);
+/* Get the tool type of a pointer for the given pointer index.
+ * The tool type indicates the type of tool used to make contact such as a
+ * finger or stylus, if known. */
+int32_t AMotionEvent_getToolType(const AInputEvent* motion_event, size_t pointer_index);
+
/* Get the original raw X coordinate of this event.
* For touch events on the screen, this is the original location of the event
* on the screen, before it had been adjusted for the containing window
* and views. */
-float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getRawX(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the original raw X coordinate of this event.
* For touch events on the screen, this is the original location of the event
* on the screen, before it had been adjusted for the containing window
* and views. */
-float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getRawY(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current X coordinate of this event for the given pointer index.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
-float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getX(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current Y coordinate of this event for the given pointer index.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
-float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getY(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current pressure of this event for the given pointer index.
* The pressure generally ranges from 0 (no pressure at all) to 1 (normal pressure),
* although values higher than 1 may be generated depending on the calibration of
* the input device. */
-float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current scaled value of the approximate size for the given pointer index.
* This represents some approximation of the area of the screen being
@@ -495,27 +646,27 @@ float AMotionEvent_getPressure(const AInputEvent* motion_event, size_t pointer_i
* touch is normalized with the device specific range of values
* and scaled to a value between 0 and 1. The value of size can be used to
* determine fat touch events. */
-float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getSize(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the major axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index. */
-float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getTouchMajor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the minor axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index. */
-float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getTouchMinor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the major axis of an ellipse that describes the size
* of the approaching tool for the given pointer index.
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
-float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getToolMajor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current length of the minor axis of an ellipse that describes the size
* of the approaching tool for the given pointer index.
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
-float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
/* Get the current orientation of the touch area and tool area in radians clockwise from
* vertical for the given pointer index.
@@ -525,7 +676,11 @@ float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_
* indicates that the major axis of contact is oriented to the left.
* The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
* (finger pointing fully right). */
-float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index);
+float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index) __NDK_FPABI__;
+
+/* Get the value of the request axis for the given pointer index. */
+float AMotionEvent_getAxisValue(const AInputEvent* motion_event,
+ int32_t axis, size_t pointer_index) __NDK_FPABI__;
/* Get the number of historical points in this event. These are movements that
* have occurred between this event and the previous event. This only applies
@@ -546,7 +701,7 @@ int64_t AMotionEvent_getHistoricalEventTime(const AInputEvent* motion_event,
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical raw Y coordinate of this event for the given pointer index that
* occurred between this event and the previous motion event.
@@ -556,21 +711,21 @@ float AMotionEvent_getHistoricalRawX(const AInputEvent* motion_event, size_t poi
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalRawY(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical X coordinate of this event for the given pointer index that
* occurred between this event and the previous motion event.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalX(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical Y coordinate of this event for the given pointer index that
* occurred between this event and the previous motion event.
* Whole numbers are pixels; the value may have a fraction for input devices
* that are sub-pixel precise. */
float AMotionEvent_getHistoricalY(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical pressure of this event for the given pointer index that
* occurred between this event and the previous motion event.
@@ -578,7 +733,7 @@ float AMotionEvent_getHistoricalY(const AInputEvent* motion_event, size_t pointe
* although values higher than 1 may be generated depending on the calibration of
* the input device. */
float AMotionEvent_getHistoricalPressure(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the current scaled value of the approximate size for the given pointer index that
* occurred between this event and the previous motion event.
@@ -588,19 +743,19 @@ float AMotionEvent_getHistoricalPressure(const AInputEvent* motion_event, size_t
* and scaled to a value between 0 and 1. The value of size can be used to
* determine fat touch events. */
float AMotionEvent_getHistoricalSize(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the major axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index that
* occurred between this event and the previous motion event. */
float AMotionEvent_getHistoricalTouchMajor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the minor axis of an ellipse that describes the touch area
* at the point of contact for the given pointer index that
* occurred between this event and the previous motion event. */
float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the major axis of an ellipse that describes the size
* of the approaching tool for the given pointer index that
@@ -608,7 +763,7 @@ float AMotionEvent_getHistoricalTouchMinor(const AInputEvent* motion_event, size
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical length of the minor axis of an ellipse that describes the size
* of the approaching tool for the given pointer index that
@@ -616,7 +771,7 @@ float AMotionEvent_getHistoricalToolMajor(const AInputEvent* motion_event, size_
* The tool area represents the estimated size of the finger or pen that is
* touching the device independent of its actual touch area at the point of contact. */
float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
/* Get the historical orientation of the touch area and tool area in radians clockwise from
* vertical for the given pointer index that
@@ -628,7 +783,12 @@ float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_
* The full range is from -PI/2 radians (finger pointing fully left) to PI/2 radians
* (finger pointing fully right). */
float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index,
- size_t history_index);
+ size_t history_index) __NDK_FPABI__;
+
+/* Get the historical value of the request axis for the given pointer index
+ * that occurred between this event and the previous motion event. */
+float AMotionEvent_getHistoricalAxisValue(const AInputEvent* motion_event,
+ int32_t axis, size_t pointer_index, size_t history_index) __NDK_FPABI__;
/*
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h b/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h
index 496eccc..5d49775 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/keycodes.h
@@ -154,6 +154,102 @@ enum {
AKEYCODE_BUTTON_START = 108,
AKEYCODE_BUTTON_SELECT = 109,
AKEYCODE_BUTTON_MODE = 110,
+ AKEYCODE_ESCAPE = 111,
+ AKEYCODE_FORWARD_DEL = 112,
+ AKEYCODE_CTRL_LEFT = 113,
+ AKEYCODE_CTRL_RIGHT = 114,
+ AKEYCODE_CAPS_LOCK = 115,
+ AKEYCODE_SCROLL_LOCK = 116,
+ AKEYCODE_META_LEFT = 117,
+ AKEYCODE_META_RIGHT = 118,
+ AKEYCODE_FUNCTION = 119,
+ AKEYCODE_SYSRQ = 120,
+ AKEYCODE_BREAK = 121,
+ AKEYCODE_MOVE_HOME = 122,
+ AKEYCODE_MOVE_END = 123,
+ AKEYCODE_INSERT = 124,
+ AKEYCODE_FORWARD = 125,
+ AKEYCODE_MEDIA_PLAY = 126,
+ AKEYCODE_MEDIA_PAUSE = 127,
+ AKEYCODE_MEDIA_CLOSE = 128,
+ AKEYCODE_MEDIA_EJECT = 129,
+ AKEYCODE_MEDIA_RECORD = 130,
+ AKEYCODE_F1 = 131,
+ AKEYCODE_F2 = 132,
+ AKEYCODE_F3 = 133,
+ AKEYCODE_F4 = 134,
+ AKEYCODE_F5 = 135,
+ AKEYCODE_F6 = 136,
+ AKEYCODE_F7 = 137,
+ AKEYCODE_F8 = 138,
+ AKEYCODE_F9 = 139,
+ AKEYCODE_F10 = 140,
+ AKEYCODE_F11 = 141,
+ AKEYCODE_F12 = 142,
+ AKEYCODE_NUM_LOCK = 143,
+ AKEYCODE_NUMPAD_0 = 144,
+ AKEYCODE_NUMPAD_1 = 145,
+ AKEYCODE_NUMPAD_2 = 146,
+ AKEYCODE_NUMPAD_3 = 147,
+ AKEYCODE_NUMPAD_4 = 148,
+ AKEYCODE_NUMPAD_5 = 149,
+ AKEYCODE_NUMPAD_6 = 150,
+ AKEYCODE_NUMPAD_7 = 151,
+ AKEYCODE_NUMPAD_8 = 152,
+ AKEYCODE_NUMPAD_9 = 153,
+ AKEYCODE_NUMPAD_DIVIDE = 154,
+ AKEYCODE_NUMPAD_MULTIPLY = 155,
+ AKEYCODE_NUMPAD_SUBTRACT = 156,
+ AKEYCODE_NUMPAD_ADD = 157,
+ AKEYCODE_NUMPAD_DOT = 158,
+ AKEYCODE_NUMPAD_COMMA = 159,
+ AKEYCODE_NUMPAD_ENTER = 160,
+ AKEYCODE_NUMPAD_EQUALS = 161,
+ AKEYCODE_NUMPAD_LEFT_PAREN = 162,
+ AKEYCODE_NUMPAD_RIGHT_PAREN = 163,
+ AKEYCODE_VOLUME_MUTE = 164,
+ AKEYCODE_INFO = 165,
+ AKEYCODE_CHANNEL_UP = 166,
+ AKEYCODE_CHANNEL_DOWN = 167,
+ AKEYCODE_ZOOM_IN = 168,
+ AKEYCODE_ZOOM_OUT = 169,
+ AKEYCODE_TV = 170,
+ AKEYCODE_WINDOW = 171,
+ AKEYCODE_GUIDE = 172,
+ AKEYCODE_DVR = 173,
+ AKEYCODE_BOOKMARK = 174,
+ AKEYCODE_CAPTIONS = 175,
+ AKEYCODE_SETTINGS = 176,
+ AKEYCODE_TV_POWER = 177,
+ AKEYCODE_TV_INPUT = 178,
+ AKEYCODE_STB_POWER = 179,
+ AKEYCODE_STB_INPUT = 180,
+ AKEYCODE_AVR_POWER = 181,
+ AKEYCODE_AVR_INPUT = 182,
+ AKEYCODE_PROG_RED = 183,
+ AKEYCODE_PROG_GREEN = 184,
+ AKEYCODE_PROG_YELLOW = 185,
+ AKEYCODE_PROG_BLUE = 186,
+ AKEYCODE_APP_SWITCH = 187,
+ AKEYCODE_BUTTON_1 = 188,
+ AKEYCODE_BUTTON_2 = 189,
+ AKEYCODE_BUTTON_3 = 190,
+ AKEYCODE_BUTTON_4 = 191,
+ AKEYCODE_BUTTON_5 = 192,
+ AKEYCODE_BUTTON_6 = 193,
+ AKEYCODE_BUTTON_7 = 194,
+ AKEYCODE_BUTTON_8 = 195,
+ AKEYCODE_BUTTON_9 = 196,
+ AKEYCODE_BUTTON_10 = 197,
+ AKEYCODE_BUTTON_11 = 198,
+ AKEYCODE_BUTTON_12 = 199,
+ AKEYCODE_BUTTON_13 = 200,
+ AKEYCODE_BUTTON_14 = 201,
+ AKEYCODE_BUTTON_15 = 202,
+ AKEYCODE_BUTTON_16 = 203,
+ AKEYCODE_LANGUAGE_SWITCH = 204,
+ AKEYCODE_MANNER_MODE = 205,
+ AKEYCODE_3D_MODE = 206,
// 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.
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/looper.h b/9/platforms/android-14/arch-x86/usr/include/android/looper.h
index a9d8426..24e3967 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/looper.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/looper.h
@@ -148,7 +148,8 @@ enum {
/**
* For callback-based event loops, this is the prototype of the function
- * that is called. It is given the file descriptor it is associated with,
+ * 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.
*
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h b/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h
index 52997bf..bc70f88 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/native_activity.h
@@ -98,6 +98,13 @@ typedef struct ANativeActivity {
* 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;
/**
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/native_window.h b/9/platforms/android-14/arch-x86/usr/include/android/native_window.h
index f3d7550..2f4f2d3 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/native_window.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/native_window.h
@@ -95,11 +95,20 @@ int32_t ANativeWindow_getFormat(ANativeWindow* window);
*
* 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);
+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);
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h b/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h
index b9e72ef..408c263 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/native_window_jni.h
@@ -33,6 +33,14 @@ extern "C" {
*/
ANativeWindow* ANativeWindow_fromSurface(JNIEnv* env, jobject surface);
+/**
+ * Return the ANativeWindow associated with a Java SurfaceTexture 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_fromSurfaceTexture(JNIEnv* env, jobject surfaceTexture);
+
#ifdef __cplusplus
};
#endif
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/rect.h b/9/platforms/android-14/arch-x86/usr/include/android/rect.h
index bcd42a9..64d487d 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/rect.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/rect.h
@@ -18,8 +18,6 @@
#ifndef ANDROID_RECT_H
#define ANDROID_RECT_H
-#include <stdint.h>
-
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/sensor.h b/9/platforms/android-14/arch-x86/usr/include/android/sensor.h
index f163f18..e6a63c2 100644
--- a/9/platforms/android-14/arch-x86/usr/include/android/sensor.h
+++ b/9/platforms/android-14/arch-x86/usr/include/android/sensor.h
@@ -239,7 +239,7 @@ int ASensor_getType(ASensor const* sensor);
/*
* Returns this sensors's resolution
*/
-float ASensor_getResolution(ASensor const* sensor);
+float ASensor_getResolution(ASensor const* sensor) __NDK_FPABI__;
/*
* Returns the minimum delay allowed between events in microseconds.
diff --git a/9/platforms/android-14/arch-x86/usr/include/android/tts.h b/9/platforms/android-14/arch-x86/usr/include/android/tts.h
new file mode 100644
index 0000000..fb15108
--- /dev/null
+++ b/9/platforms/android-14/arch-x86/usr/include/android/tts.h
@@ -0,0 +1,313 @@
+/*
+ * Copyright (C) 2009 Google Inc.
+ *
+ * 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_TTS_H
+#define ANDROID_TTS_H
+
+// This header defines the interface used by the Android platform
+// to access Text-To-Speech functionality in shared libraries that implement
+// speech synthesis and the management of resources associated with the
+// synthesis.
+
+// The shared library must contain a function named "android_getTtsEngine"
+// that returns an 'android_tts_engine_t' instance.
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ANDROID_TTS_ENGINE_PROPERTY_CONFIG "engineConfig"
+#define ANDROID_TTS_ENGINE_PROPERTY_PITCH "pitch"
+#define ANDROID_TTS_ENGINE_PROPERTY_RATE "rate"
+#define ANDROID_TTS_ENGINE_PROPERTY_VOLUME "volume"
+
+typedef enum {
+ ANDROID_TTS_SUCCESS = 0,
+ ANDROID_TTS_FAILURE = -1,
+ ANDROID_TTS_FEATURE_UNSUPPORTED = -2,
+ ANDROID_TTS_VALUE_INVALID = -3,
+ ANDROID_TTS_PROPERTY_UNSUPPORTED = -4,
+ ANDROID_TTS_PROPERTY_SIZE_TOO_SMALL = -5,
+ ANDROID_TTS_MISSING_RESOURCES = -6
+} android_tts_result_t;
+
+typedef enum {
+ ANDROID_TTS_LANG_COUNTRY_VAR_AVAILABLE = 2,
+ ANDROID_TTS_LANG_COUNTRY_AVAILABLE = 1,
+ ANDROID_TTS_LANG_AVAILABLE = 0,
+ ANDROID_TTS_LANG_MISSING_DATA = -1,
+ ANDROID_TTS_LANG_NOT_SUPPORTED = -2
+} android_tts_support_result_t;
+
+typedef enum {
+ ANDROID_TTS_SYNTH_DONE = 0,
+ ANDROID_TTS_SYNTH_PENDING = 1
+} android_tts_synth_status_t;
+
+typedef enum {
+ ANDROID_TTS_CALLBACK_HALT = 0,
+ ANDROID_TTS_CALLBACK_CONTINUE = 1
+} android_tts_callback_status_t;
+
+// Supported audio formats
+typedef enum {
+ ANDROID_TTS_AUDIO_FORMAT_INVALID = -1,
+ ANDROID_TTS_AUDIO_FORMAT_DEFAULT = 0,
+ ANDROID_TTS_AUDIO_FORMAT_PCM_16_BIT = 1,
+ ANDROID_TTS_AUDIO_FORMAT_PCM_8_BIT = 2,
+} android_tts_audio_format_t;
+
+
+/* An android_tts_engine_t object can be anything, but must have,
+ * as its first field, a pointer to a table of functions.
+ *
+ * See the full definition of struct android_tts_engine_t_funcs_t
+ * below for details.
+ */
+typedef struct android_tts_engine_funcs_t android_tts_engine_funcs_t;
+
+typedef struct {
+ android_tts_engine_funcs_t *funcs;
+} android_tts_engine_t;
+
+/* This function must be located in the TTS Engine shared library
+ * and must return the address of an android_tts_engine_t library.
+ */
+extern android_tts_engine_t *android_getTtsEngine();
+
+/* Including the old version for legacy support (Froyo compatibility).
+ * This should return the same thing as android_getTtsEngine.
+ */
+extern "C" android_tts_engine_t *getTtsEngine();
+
+// A callback type used to notify the framework of new synthetized
+// audio samples, status will be SYNTH_DONE for the last sample of
+// the last request, of SYNTH_PENDING otherwise.
+//
+// This is passed by the framework to the engine through the
+// 'engine_init' function (see below).
+//
+// The callback for synthesis completed takes:
+// @param [inout] void *& - The userdata pointer set in the original
+// synth call
+// @param [in] uint32_t - Track sampling rate in Hz
+// @param [in] uint32_t - The audio format
+// @param [in] int - The number of channels
+// @param [inout] int8_t *& - A buffer of audio data only valid during the
+// execution of the callback
+// @param [inout] size_t & - The size of the buffer
+// @param [in] tts_synth_status - indicate whether the synthesis is done, or
+// if more data is to be synthesized.
+// @return TTS_CALLBACK_HALT to indicate the synthesis must stop,
+// TTS_CALLBACK_CONTINUE to indicate the synthesis must continue if
+// there is more data to produce.
+typedef android_tts_callback_status_t (*android_tts_synth_cb_t)
+ (void **pUserData,
+ uint32_t trackSamplingHz,
+ android_tts_audio_format_t audioFormat,
+ int channelCount,
+ int8_t **pAudioBuffer,
+ size_t *pBufferSize,
+ android_tts_synth_status_t status);
+
+
+// The table of function pointers that the android_tts_engine_t must point to.
+// Note that each of these functions will take a handle to the engine itself
+// as their first parameter.
+//
+
+struct android_tts_engine_funcs_t {
+ // reserved fields, ignored by the framework
+ // they must be placed here to ensure binary compatibility
+ // of legacy binary plugins.
+ void *reserved[2];
+
+ // Initialize the TTS engine and returns whether initialization succeeded.
+ // @param synthDoneCBPtr synthesis callback function pointer
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*init)
+ (void *engine,
+ android_tts_synth_cb_t synthDonePtr,
+ const char *engineConfig);
+
+ // Shut down the TTS engine and releases all associated resources.
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*shutdown)
+ (void *engine);
+
+ // Interrupt synthesis and flushes any synthesized data that hasn't been
+ // output yet. This will block until callbacks underway are completed.
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*stop)
+ (void *engine);
+
+ // Returns the level of support for the language, country and variant.
+ // @return TTS_LANG_COUNTRY_VAR_AVAILABLE if the language, country and variant are supported,
+ // and the corresponding resources are correctly installed
+ // TTS_LANG_COUNTRY_AVAILABLE if the language and country are supported and the
+ // corresponding resources are correctly installed, but there is no match for
+ // the specified variant
+ // TTS_LANG_AVAILABLE if the language is supported and the
+ // corresponding resources are correctly installed, but there is no match for
+ // the specified country and variant
+ // TTS_LANG_MISSING_DATA if the required resources to provide any level of support
+ // for the language are not correctly installed
+ // TTS_LANG_NOT_SUPPORTED if the language is not supported by the TTS engine.
+ android_tts_support_result_t (*isLanguageAvailable)
+ (void *engine,
+ const char *lang,
+ const char *country,
+ const char *variant);
+
+ // Load the resources associated with the specified language. The loaded
+ // language will only be used once a call to setLanguage() with the same
+ // language value is issued. Language and country values are coded according to the ISO three
+ // letter codes for languages and countries, as can be retrieved from a java.util.Locale
+ // instance. The variant value is encoded as the variant string retrieved from a
+ // java.util.Locale instance built with that variant data.
+ // @param lang pointer to the ISO three letter code for the language
+ // @param country pointer to the ISO three letter code for the country
+ // @param variant pointer to the variant code
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*loadLanguage)
+ (void *engine,
+ const char *lang,
+ const char *country,
+ const char *variant);
+
+ // Load the resources associated with the specified language, country and Locale variant.
+ // The loaded language will only be used once a call to setLanguageFromLocale() with the same
+ // language value is issued. Language and country values are coded according to the ISO three
+ // letter codes for languages and countries, as can be retrieved from a java.util.Locale
+ // instance. The variant value is encoded as the variant string retrieved from a
+ // java.util.Locale instance built with that variant data.
+ // @param lang pointer to the ISO three letter code for the language
+ // @param country pointer to the ISO three letter code for the country
+ // @param variant pointer to the variant code
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*setLanguage)
+ (void *engine,
+ const char *lang,
+ const char *country,
+ const char *variant);
+
+ // Retrieve the currently set language, country and variant, or empty strings if none of
+ // parameters have been set. Language and country are represented by their 3-letter ISO code
+ // @param[out] pointer to the retrieved 3-letter code language value
+ // @param[out] pointer to the retrieved 3-letter code country value
+ // @param[out] pointer to the retrieved variant value
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*getLanguage)
+ (void *engine,
+ char *language,
+ char *country,
+ char *variant);
+
+ // Notifies the engine what audio parameters should be used for the synthesis.
+ // This is meant to be used as a hint, the engine implementation will set the output values
+ // to those of the synthesis format, based on a given hint.
+ // @param[inout] encoding in: the desired audio sample format
+ // out: the format used by the TTS engine
+ // @param[inout] rate in: the desired audio sample rate
+ // out: the sample rate used by the TTS engine
+ // @param[inout] channels in: the desired number of audio channels
+ // out: the number of channels used by the TTS engine
+ // @return TTS_SUCCESS, or TTS_FAILURE
+ android_tts_result_t (*setAudioFormat)
+ (void *engine,
+ android_tts_audio_format_t* pEncoding,
+ uint32_t* pRate,
+ int* pChannels);
+
+ // Set a property for the the TTS engine
+ // "size" is the maximum size of "value" for properties "property"
+ // @param property pointer to the property name
+ // @param value pointer to the property value
+ // @param size maximum size required to store this type of property
+ // @return TTS_PROPERTY_UNSUPPORTED, or TTS_SUCCESS, or TTS_FAILURE,
+ // or TTS_VALUE_INVALID
+ android_tts_result_t (*setProperty)
+ (void *engine,
+ const char *property,
+ const char *value,
+ const size_t size);
+
+ // Retrieve a property from the TTS engine
+ // @param property pointer to the property name
+ // @param[out] value pointer to the retrieved language value
+ // @param[inout] iosize in: stores the size available to store the
+ // property value.
+ // out: stores the size required to hold the language
+ // value if getLanguage() returned
+ // TTS_PROPERTY_SIZE_TOO_SMALL, unchanged otherwise
+ // @return TTS_PROPERTY_UNSUPPORTED, or TTS_SUCCESS,
+ // or TTS_PROPERTY_SIZE_TOO_SMALL
+ android_tts_result_t (*getProperty)
+ (void *engine,
+ const char *property,
+ char *value,
+ size_t *iosize);
+
+ // Synthesize the text.
+ // As the synthesis is performed, the engine invokes the callback to notify
+ // the TTS framework that it has filled the given buffer, and indicates how
+ // many bytes it wrote. The callback is called repeatedly until the engine
+ // has generated all the audio data corresponding to the text.
+ // Note about the format of the input: the text parameter may use the
+ // following elements
+ // and their respective attributes as defined in the SSML 1.0 specification:
+ // * lang
+ // * say-as:
+ // o interpret-as
+ // * phoneme
+ // * voice:
+ // o gender,
+ // o age,
+ // o variant,
+ // o name
+ // * emphasis
+ // * break:
+ // o strength,
+ // o time
+ // * prosody:
+ // o pitch,
+ // o contour,
+ // o range,
+ // o rate,
+ // o duration,
+ // o volume
+ // * mark
+ // Differences between this text format and SSML are:
+ // * full SSML documents are not supported
+ // * namespaces are not supported
+ // Text is coded in UTF-8.
+ // @param text the UTF-8 text to synthesize
+ // @param userdata pointer to be returned when the call is invoked
+ // @param buffer the location where the synthesized data must be written
+ // @param bufferSize the number of bytes that can be written in buffer
+ // @return TTS_SUCCESS or TTS_FAILURE
+ android_tts_result_t (*synthesizeText)
+ (void *engine,
+ const char *text,
+ int8_t *buffer,
+ size_t bufferSize,
+ void *userdata);
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ANDROID_TTS_H */