diff options
Diffstat (limited to 'include/android/input.h')
-rw-r--r-- | include/android/input.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/android/input.h b/include/android/input.h index fd9fa98e70..f928c6e4f0 100644 --- a/include/android/input.h +++ b/include/android/input.h @@ -26,6 +26,8 @@ #ifndef _ANDROID_INPUT_H #define _ANDROID_INPUT_H +#include <sys/cdefs.h> + /****************************************************************** * * IMPORTANT NOTICE: @@ -978,8 +980,10 @@ int32_t AMotionEvent_getFlags(const AInputEvent* motion_event); */ int32_t AMotionEvent_getMetaState(const AInputEvent* motion_event); +#if __ANDROID_API__ >= 14 /** Get the button state of all buttons that are pressed. */ int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event); +#endif /** * Get a bitfield indicating which edges, if any, were touched by this motion event. @@ -1044,12 +1048,14 @@ size_t AMotionEvent_getPointerCount(const AInputEvent* motion_event); */ int32_t AMotionEvent_getPointerId(const AInputEvent* motion_event, size_t pointer_index); +#if __ANDROID_API__ >= 14 /** * 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); +#endif /** * Get the original raw X coordinate of this event. @@ -1139,9 +1145,11 @@ float AMotionEvent_getToolMinor(const AInputEvent* motion_event, size_t pointer_ */ float AMotionEvent_getOrientation(const AInputEvent* motion_event, size_t pointer_index); +#if __ANDROID_API__ >= 13 /** 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); +#endif /** * Get the number of historical points in this event. These are movements that @@ -1272,12 +1280,14 @@ float AMotionEvent_getHistoricalToolMinor(const AInputEvent* motion_event, size_ float AMotionEvent_getHistoricalOrientation(const AInputEvent* motion_event, size_t pointer_index, size_t history_index); +#if __ANDROID_API__ >= 13 /** * 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); +#endif struct AInputQueue; |