#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "ui/events/ozone/evdev/tablet_event_converter_evdev.h"
#include <errno.h>
#include <linux/input.h>
#include <stddef.h>
#include "base/logging.h"
#include "base/trace_event/trace_event.h"
#include "ui/events/event.h"
#include "ui/events/ozone/evdev/device_event_dispatcher_evdev.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ash/constants/ash_features.h"
#endif
namespace ui {
namespace {
float ScaleTilt(int value, int min_value, int num_values) { … }
uint8_t ToolMaskFromButtonTool(int button_tool) { … }
EventPointerType GetToolType(uint8_t tool_mask) { … }
}
TabletEventConverterEvdev::TabletEventConverterEvdev(
base::ScopedFD fd,
base::FilePath path,
int id,
CursorDelegateEvdev* cursor,
const EventDeviceInfo& info,
DeviceEventDispatcherEvdev* dispatcher)
: … { … }
TabletEventConverterEvdev::~TabletEventConverterEvdev() = default;
void TabletEventConverterEvdev::OnFileCanReadWithoutBlocking(int fd) { … }
bool TabletEventConverterEvdev::HasGraphicsTablet() const { … }
std::ostream& TabletEventConverterEvdev::DescribeForLog(
std::ostream& os) const { … }
void TabletEventConverterEvdev::ProcessEvents(const input_event* inputs,
int count) { … }
void TabletEventConverterEvdev::ConvertKeyEvent(const input_event& input) { … }
void TabletEventConverterEvdev::ConvertAbsEvent(const input_event& input) { … }
void TabletEventConverterEvdev::UpdateCursor() { … }
void TabletEventConverterEvdev::DispatchMouseButton(const input_event& input) { … }
void TabletEventConverterEvdev::FlushEvents(const input_event& input) { … }
}