1 /* 2 * This file is auto-generated. DO NOT MODIFY. 3 * Using: out/host/linux-x86/bin/aidl --lang=ndk --structured --version 1 --hash a796f8e2fe447a0ddba069b6edd1aba2b1c9fc42 -t --stability vintf --min_sdk_version current --ninja -d out/soong/.intermediates/hardware/interfaces/input/common/aidl/android.hardware.input.common-V1-ndk-source/gen/staging/android/hardware/input/common/MotionEvent.cpp.d -h out/soong/.intermediates/hardware/interfaces/input/common/aidl/android.hardware.input.common-V1-ndk-source/gen/include/staging -o out/soong/.intermediates/hardware/interfaces/input/common/aidl/android.hardware.input.common-V1-ndk-source/gen/staging -Nhardware/interfaces/input/common/aidl/aidl_api/android.hardware.input.common/1 hardware/interfaces/input/common/aidl/aidl_api/android.hardware.input.common/1/android/hardware/input/common/MotionEvent.aidl 4 * 5 * DO NOT CHECK THIS FILE INTO A CODE TREE (e.g. git, etc..). 6 * ALWAYS GENERATE THIS FILE FROM UPDATED AIDL COMPILER 7 * AS A BUILD INTERMEDIATE ONLY. THIS IS NOT SOURCE CODE. 8 */ 9 #pragma once 10 11 #include <cstdint> 12 #include <memory> 13 #include <optional> 14 #include <string> 15 #include <vector> 16 #include <android/binder_interface_utils.h> 17 #include <android/binder_parcelable_utils.h> 18 #include <android/binder_to_string.h> 19 #include <aidl/android/hardware/input/common/Action.h> 20 #include <aidl/android/hardware/input/common/Button.h> 21 #include <aidl/android/hardware/input/common/EdgeFlag.h> 22 #include <aidl/android/hardware/input/common/Flag.h> 23 #include <aidl/android/hardware/input/common/Meta.h> 24 #include <aidl/android/hardware/input/common/PointerCoords.h> 25 #include <aidl/android/hardware/input/common/PointerProperties.h> 26 #include <aidl/android/hardware/input/common/PolicyFlag.h> 27 #include <aidl/android/hardware/input/common/Source.h> 28 #include <aidl/android/hardware/input/common/VideoFrame.h> 29 #ifdef BINDER_STABILITY_SUPPORT 30 #include <android/binder_stability.h> 31 #endif // BINDER_STABILITY_SUPPORT 32 33 namespace aidl::android::hardware::input::common { 34 class PointerCoords; 35 class PointerProperties; 36 class VideoFrame; 37 } // namespace aidl::android::hardware::input::common 38 namespace aidl { 39 namespace android { 40 namespace hardware { 41 namespace input { 42 namespace common { 43 class MotionEvent { 44 public: 45 typedef std::false_type fixed_size; 46 static const char* descriptor; 47 48 int32_t deviceId = 0; 49 ::aidl::android::hardware::input::common::Source source = ::aidl::android::hardware::input::common::Source(0); 50 int32_t displayId = 0; 51 int64_t downTime = 0L; 52 int64_t eventTime = 0L; 53 ::aidl::android::hardware::input::common::Action action = ::aidl::android::hardware::input::common::Action(0); 54 int8_t actionIndex = 0; 55 ::aidl::android::hardware::input::common::Button actionButton = ::aidl::android::hardware::input::common::Button(0); 56 ::aidl::android::hardware::input::common::Flag flags = ::aidl::android::hardware::input::common::Flag(0); 57 ::aidl::android::hardware::input::common::PolicyFlag policyFlags = ::aidl::android::hardware::input::common::PolicyFlag(0); 58 ::aidl::android::hardware::input::common::EdgeFlag edgeFlags = ::aidl::android::hardware::input::common::EdgeFlag(0); 59 ::aidl::android::hardware::input::common::Meta metaState = ::aidl::android::hardware::input::common::Meta(0); 60 ::aidl::android::hardware::input::common::Button buttonState = ::aidl::android::hardware::input::common::Button(0); 61 float xPrecision = 0.000000f; 62 float yPrecision = 0.000000f; 63 std::vector<::aidl::android::hardware::input::common::PointerProperties> pointerProperties; 64 std::vector<::aidl::android::hardware::input::common::PointerCoords> pointerCoords; 65 int32_t deviceTimestamp = 0; 66 std::vector<::aidl::android::hardware::input::common::VideoFrame> frames; 67 68 binder_status_t readFromParcel(const AParcel* parcel); 69 binder_status_t writeToParcel(AParcel* parcel) const; 70 71 inline bool operator==(const MotionEvent& _rhs) const { 72 return std::tie(deviceId, source, displayId, downTime, eventTime, action, actionIndex, actionButton, flags, policyFlags, edgeFlags, metaState, buttonState, xPrecision, yPrecision, pointerProperties, pointerCoords, deviceTimestamp, frames) == std::tie(_rhs.deviceId, _rhs.source, _rhs.displayId, _rhs.downTime, _rhs.eventTime, _rhs.action, _rhs.actionIndex, _rhs.actionButton, _rhs.flags, _rhs.policyFlags, _rhs.edgeFlags, _rhs.metaState, _rhs.buttonState, _rhs.xPrecision, _rhs.yPrecision, _rhs.pointerProperties, _rhs.pointerCoords, _rhs.deviceTimestamp, _rhs.frames); 73 } 74 inline bool operator<(const MotionEvent& _rhs) const { 75 return std::tie(deviceId, source, displayId, downTime, eventTime, action, actionIndex, actionButton, flags, policyFlags, edgeFlags, metaState, buttonState, xPrecision, yPrecision, pointerProperties, pointerCoords, deviceTimestamp, frames) < std::tie(_rhs.deviceId, _rhs.source, _rhs.displayId, _rhs.downTime, _rhs.eventTime, _rhs.action, _rhs.actionIndex, _rhs.actionButton, _rhs.flags, _rhs.policyFlags, _rhs.edgeFlags, _rhs.metaState, _rhs.buttonState, _rhs.xPrecision, _rhs.yPrecision, _rhs.pointerProperties, _rhs.pointerCoords, _rhs.deviceTimestamp, _rhs.frames); 76 } 77 inline bool operator!=(const MotionEvent& _rhs) const { 78 return !(*this == _rhs); 79 } 80 inline bool operator>(const MotionEvent& _rhs) const { 81 return _rhs < *this; 82 } 83 inline bool operator>=(const MotionEvent& _rhs) const { 84 return !(*this < _rhs); 85 } 86 inline bool operator<=(const MotionEvent& _rhs) const { 87 return !(_rhs < *this); 88 } 89 90 static const ::ndk::parcelable_stability_t _aidl_stability = ::ndk::STABILITY_VINTF; toString()91 inline std::string toString() const { 92 std::ostringstream _aidl_os; 93 _aidl_os << "MotionEvent{"; 94 _aidl_os << "deviceId: " << ::android::internal::ToString(deviceId); 95 _aidl_os << ", source: " << ::android::internal::ToString(source); 96 _aidl_os << ", displayId: " << ::android::internal::ToString(displayId); 97 _aidl_os << ", downTime: " << ::android::internal::ToString(downTime); 98 _aidl_os << ", eventTime: " << ::android::internal::ToString(eventTime); 99 _aidl_os << ", action: " << ::android::internal::ToString(action); 100 _aidl_os << ", actionIndex: " << ::android::internal::ToString(actionIndex); 101 _aidl_os << ", actionButton: " << ::android::internal::ToString(actionButton); 102 _aidl_os << ", flags: " << ::android::internal::ToString(flags); 103 _aidl_os << ", policyFlags: " << ::android::internal::ToString(policyFlags); 104 _aidl_os << ", edgeFlags: " << ::android::internal::ToString(edgeFlags); 105 _aidl_os << ", metaState: " << ::android::internal::ToString(metaState); 106 _aidl_os << ", buttonState: " << ::android::internal::ToString(buttonState); 107 _aidl_os << ", xPrecision: " << ::android::internal::ToString(xPrecision); 108 _aidl_os << ", yPrecision: " << ::android::internal::ToString(yPrecision); 109 _aidl_os << ", pointerProperties: " << ::android::internal::ToString(pointerProperties); 110 _aidl_os << ", pointerCoords: " << ::android::internal::ToString(pointerCoords); 111 _aidl_os << ", deviceTimestamp: " << ::android::internal::ToString(deviceTimestamp); 112 _aidl_os << ", frames: " << ::android::internal::ToString(frames); 113 _aidl_os << "}"; 114 return _aidl_os.str(); 115 } 116 }; 117 } // namespace common 118 } // namespace input 119 } // namespace hardware 120 } // namespace android 121 } // namespace aidl 122