summaryrefslogtreecommitdiff
path: root/include/android/input.h
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2018-06-18 12:28:46 -0700
committer Elliott Hughes <enh@google.com> 2018-06-18 14:56:07 -0700
commit9db409b053460e065cefb1d1caefe048f90cfff0 (patch)
tree30bc2090dc4954ea8a38ecb57152436c3da819eb /include/android/input.h
parent5d51a061ead239c49e9a7fef2159adb00dddad21 (diff)
Add __INTRODUCED_IN to core <android/*.h> APIs.
Bug: https://github.com/android-ndk/ndk/issues/706 Test: builds Change-Id: I23db5a2180517045bafabe6fbf783456cbddf21a
Diffstat (limited to 'include/android/input.h')
-rw-r--r--include/android/input.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/include/android/input.h b/include/android/input.h
index f3f5312e80..3b36d2e80c 100644
--- a/include/android/input.h
+++ b/include/android/input.h
@@ -56,6 +56,10 @@
#include <android/keycodes.h>
#include <android/looper.h>
+#if !defined(__INTRODUCED_IN)
+#define __INTRODUCED_IN(__api_level) /* nothing */
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -982,10 +986,8 @@ 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
+int32_t AMotionEvent_getButtonState(const AInputEvent* motion_event) __INTRODUCED_IN(14);
/**
* Get a bitfield indicating which edges, if any, were touched by this motion event.
@@ -1050,14 +1052,12 @@ 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
+int32_t AMotionEvent_getToolType(const AInputEvent* motion_event, size_t pointer_index) __INTRODUCED_IN(14);
/**
* Get the original raw X coordinate of this event.
@@ -1147,11 +1147,9 @@ 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
+ int32_t axis, size_t pointer_index) __INTRODUCED_IN(13);
/**
* Get the number of historical points in this event. These are movements that
@@ -1282,14 +1280,12 @@ 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
+ int32_t axis, size_t pointer_index, size_t history_index) __INTRODUCED_IN(13);
struct AInputQueue;