#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/events/velocity_tracker/motion_event_generic.h"
#include <numbers>
#include <ostream>
#include <utility>
#include "base/check_op.h"
#include "base/memory/ptr_util.h"
#include "base/numerics/angle_conversions.h"
#include "ui/events/base_event_utils.h"
namespace ui {
PointerProperties::PointerProperties()
: … { … }
PointerProperties::PointerProperties(float x, float y, float touch_major)
: … { … }
PointerProperties::PointerProperties(const MotionEvent& event,
size_t pointer_index)
: … { … }
PointerProperties::PointerProperties(const PointerProperties& other) = default;
PointerProperties& PointerProperties::operator=(
const PointerProperties& other) = default;
void PointerProperties::SetAxesAndOrientation(float radius_x,
float radius_y,
float rotation_angle_degree) { … }
MotionEventGeneric::MotionEventGeneric(Action action,
base::TimeTicks event_time,
const PointerProperties& pointer)
: … { … }
MotionEventGeneric::MotionEventGeneric(const MotionEventGeneric& other)
: … { … }
MotionEventGeneric::~MotionEventGeneric() { … }
uint32_t MotionEventGeneric::GetUniqueEventId() const { … }
MotionEvent::Action MotionEventGeneric::GetAction() const { … }
int MotionEventGeneric::GetActionIndex() const { … }
size_t MotionEventGeneric::GetPointerCount() const { … }
int MotionEventGeneric::GetPointerId(size_t pointer_index) const { … }
float MotionEventGeneric::GetX(size_t pointer_index) const { … }
float MotionEventGeneric::GetY(size_t pointer_index) const { … }
float MotionEventGeneric::GetRawX(size_t pointer_index) const { … }
float MotionEventGeneric::GetRawY(size_t pointer_index) const { … }
float MotionEventGeneric::GetTouchMajor(size_t pointer_index) const { … }
float MotionEventGeneric::GetTouchMinor(size_t pointer_index) const { … }
float MotionEventGeneric::GetOrientation(size_t pointer_index) const { … }
float MotionEventGeneric::GetPressure(size_t pointer_index) const { … }
float MotionEventGeneric::GetTiltX(size_t pointer_index) const { … }
float MotionEventGeneric::GetTiltY(size_t pointer_index) const { … }
float MotionEventGeneric::GetTwist(size_t pointer_index) const { … }
float MotionEventGeneric::GetTangentialPressure(size_t pointer_index) const { … }
MotionEvent::ToolType MotionEventGeneric::GetToolType(
size_t pointer_index) const { … }
int MotionEventGeneric::GetButtonState() const { … }
int MotionEventGeneric::GetFlags() const { … }
base::TimeTicks MotionEventGeneric::GetEventTime() const { … }
size_t MotionEventGeneric::GetHistorySize() const { … }
base::TimeTicks MotionEventGeneric::GetHistoricalEventTime(
size_t historical_index) const { … }
float MotionEventGeneric::GetHistoricalTouchMajor(
size_t pointer_index,
size_t historical_index) const { … }
float MotionEventGeneric::GetHistoricalX(size_t pointer_index,
size_t historical_index) const { … }
float MotionEventGeneric::GetHistoricalY(size_t pointer_index,
size_t historical_index) const { … }
int32_t MotionEventGeneric::GetSourceDeviceId(size_t pointer_index) const { … }
std::unique_ptr<MotionEventGeneric> MotionEventGeneric::CloneEvent(
const MotionEvent& event) { … }
std::unique_ptr<MotionEventGeneric> MotionEventGeneric::CancelEvent(
const MotionEvent& event) { … }
size_t MotionEventGeneric::PushPointer(const PointerProperties& pointer) { … }
void MotionEventGeneric::RemovePointerAt(size_t index) { … }
void MotionEventGeneric::PushHistoricalEvent(
std::unique_ptr<MotionEvent> event) { … }
MotionEventGeneric::MotionEventGeneric()
: … { … }
MotionEventGeneric::MotionEventGeneric(const MotionEvent& event,
bool with_history)
: … { … }
MotionEventGeneric& MotionEventGeneric::operator=(
const MotionEventGeneric& other) { … }
void MotionEventGeneric::PopPointer() { … }
}