#ifndef UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
#define UI_EVENTS_OZONE_EVDEV_INPUT_INJECTOR_EVDEV_H_
#include "base/component_export.h"
#include "base/memory/raw_ptr.h"
#include "ui/events/event_constants.h"
#include "ui/events/ozone/evdev/event_dispatch_callback.h"
#include "ui/ozone/public/system_input_injector.h"
namespace ui {
class CursorDelegateEvdev;
class DeviceEventDispatcherEvdev;
class COMPONENT_EXPORT(EVDEV) InputInjectorEvdev : public SystemInputInjector {
public:
InputInjectorEvdev(std::unique_ptr<DeviceEventDispatcherEvdev> dispatcher,
CursorDelegateEvdev* cursor);
InputInjectorEvdev(const InputInjectorEvdev&) = delete;
InputInjectorEvdev& operator=(const InputInjectorEvdev&) = delete;
~InputInjectorEvdev() override;
void SetDeviceId(int device_id) override;
void InjectMouseButton(EventFlags button, bool down) override;
void InjectMouseWheel(int delta_x, int delta_y) override;
void MoveCursorTo(const gfx::PointF& location) override;
void InjectKeyEvent(DomCode physical_key,
bool down,
bool suppress_auto_repeat) override;
private:
const raw_ptr<CursorDelegateEvdev> cursor_;
int device_id_ = ED_UNKNOWN_DEVICE;
const std::unique_ptr<DeviceEventDispatcherEvdev> dispatcher_;
};
}
#endif